// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// Code generated by "deep-copy -type ContainerConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.

package container

// DeepCopy generates a deep copy of *ContainerConfigV1Alpha1.
func (o *ContainerConfigV1Alpha1) DeepCopy() *ContainerConfigV1Alpha1 {
	var cp ContainerConfigV1Alpha1 = *o
	if o.ContainerEntrypoint != nil {
		cp.ContainerEntrypoint = make([]string, len(o.ContainerEntrypoint))
		copy(cp.ContainerEntrypoint, o.ContainerEntrypoint)
	}
	if o.ContainerArgs != nil {
		cp.ContainerArgs = make([]string, len(o.ContainerArgs))
		copy(cp.ContainerArgs, o.ContainerArgs)
	}
	if o.RunAsConfig != nil {
		cp.RunAsConfig = new(ContainerRunAs)
		*cp.RunAsConfig = *o.RunAsConfig
		if o.RunAsConfig.RunAsUID != nil {
			cp.RunAsConfig.RunAsUID = new(int32)
			*cp.RunAsConfig.RunAsUID = *o.RunAsConfig.RunAsUID
		}
		if o.RunAsConfig.RunAsGID != nil {
			cp.RunAsConfig.RunAsGID = new(int32)
			*cp.RunAsConfig.RunAsGID = *o.RunAsConfig.RunAsGID
		}
	}
	if o.ContainerEnvironment != nil {
		cp.ContainerEnvironment = make([]string, len(o.ContainerEnvironment))
		copy(cp.ContainerEnvironment, o.ContainerEnvironment)
	}
	if o.MountsConfig != nil {
		cp.MountsConfig = make([]ContainerMount, len(o.MountsConfig))
		copy(cp.MountsConfig, o.MountsConfig)
		for i2 := range o.MountsConfig {
			if o.MountsConfig[i2].UserVolumeMount != nil {
				cp.MountsConfig[i2].UserVolumeMount = new(UserVolumeMount)
				*cp.MountsConfig[i2].UserVolumeMount = *o.MountsConfig[i2].UserVolumeMount
				if o.MountsConfig[i2].UserVolumeMount.MountOpts != nil {
					cp.MountsConfig[i2].UserVolumeMount.MountOpts = make([]string, len(o.MountsConfig[i2].UserVolumeMount.MountOpts))
					copy(cp.MountsConfig[i2].UserVolumeMount.MountOpts, o.MountsConfig[i2].UserVolumeMount.MountOpts)
				}
			}
			if o.MountsConfig[i2].TmpfsMount != nil {
				cp.MountsConfig[i2].TmpfsMount = new(TmpfsMount)
				*cp.MountsConfig[i2].TmpfsMount = *o.MountsConfig[i2].TmpfsMount
				if o.MountsConfig[i2].TmpfsMount.MountOpts != nil {
					cp.MountsConfig[i2].TmpfsMount.MountOpts = make([]string, len(o.MountsConfig[i2].TmpfsMount.MountOpts))
					copy(cp.MountsConfig[i2].TmpfsMount.MountOpts, o.MountsConfig[i2].TmpfsMount.MountOpts)
				}
			}
			if o.MountsConfig[i2].HostPathMount != nil {
				cp.MountsConfig[i2].HostPathMount = new(HostPathMount)
				*cp.MountsConfig[i2].HostPathMount = *o.MountsConfig[i2].HostPathMount
				if o.MountsConfig[i2].HostPathMount.MountOpts != nil {
					cp.MountsConfig[i2].HostPathMount.MountOpts = make([]string, len(o.MountsConfig[i2].HostPathMount.MountOpts))
					copy(cp.MountsConfig[i2].HostPathMount.MountOpts, o.MountsConfig[i2].HostPathMount.MountOpts)
				}
			}
		}
	}
	if o.SecurityConfig != nil {
		cp.SecurityConfig = new(ContainerSecurity)
		*cp.SecurityConfig = *o.SecurityConfig
		if o.SecurityConfig.SecurityCapabilities != nil {
			cp.SecurityConfig.SecurityCapabilities = new(ContainerCapabilities)
			*cp.SecurityConfig.SecurityCapabilities = *o.SecurityConfig.SecurityCapabilities
			if o.SecurityConfig.SecurityCapabilities.CapabilitiesAddConfig != nil {
				cp.SecurityConfig.SecurityCapabilities.CapabilitiesAddConfig = make([]string, len(o.SecurityConfig.SecurityCapabilities.CapabilitiesAddConfig))
				copy(cp.SecurityConfig.SecurityCapabilities.CapabilitiesAddConfig, o.SecurityConfig.SecurityCapabilities.CapabilitiesAddConfig)
			}
			if o.SecurityConfig.SecurityCapabilities.CapabilitiesDropConfig != nil {
				cp.SecurityConfig.SecurityCapabilities.CapabilitiesDropConfig = make([]string, len(o.SecurityConfig.SecurityCapabilities.CapabilitiesDropConfig))
				copy(cp.SecurityConfig.SecurityCapabilities.CapabilitiesDropConfig, o.SecurityConfig.SecurityCapabilities.CapabilitiesDropConfig)
			}
		}
	}
	if o.NetworkConfig != nil {
		cp.NetworkConfig = new(ContainerNetwork)
		*cp.NetworkConfig = *o.NetworkConfig
	}
	if o.ResourcesConfig != nil {
		cp.ResourcesConfig = new(ContainerResources)
		*cp.ResourcesConfig = *o.ResourcesConfig
		if o.ResourcesConfig.Limits != nil {
			cp.ResourcesConfig.Limits = new(ContainerResourceLimits)
			*cp.ResourcesConfig.Limits = *o.ResourcesConfig.Limits
		}
	}
	if o.DependsOnConfig != nil {
		cp.DependsOnConfig = new(ContainerDependsOn)
		*cp.DependsOnConfig = *o.DependsOnConfig
		if o.DependsOnConfig.PathsConfig != nil {
			cp.DependsOnConfig.PathsConfig = make([]string, len(o.DependsOnConfig.PathsConfig))
			copy(cp.DependsOnConfig.PathsConfig, o.DependsOnConfig.PathsConfig)
		}
		if o.DependsOnConfig.NetworksConfig != nil {
			cp.DependsOnConfig.NetworksConfig = make([]string, len(o.DependsOnConfig.NetworksConfig))
			copy(cp.DependsOnConfig.NetworksConfig, o.DependsOnConfig.NetworksConfig)
		}
		if o.DependsOnConfig.TimeConfig != nil {
			cp.DependsOnConfig.TimeConfig = new(bool)
			*cp.DependsOnConfig.TimeConfig = *o.DependsOnConfig.TimeConfig
		}
		if o.DependsOnConfig.ContainersConfig != nil {
			cp.DependsOnConfig.ContainersConfig = make([]string, len(o.DependsOnConfig.ContainersConfig))
			copy(cp.DependsOnConfig.ContainersConfig, o.DependsOnConfig.ContainersConfig)
		}
	}
	return &cp
}
