// 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 RegistriesConfigSpec -type ImageCacheConfigSpec -type SeccompProfileSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.

package cri

// DeepCopy generates a deep copy of RegistriesConfigSpec.
func (o RegistriesConfigSpec) DeepCopy() RegistriesConfigSpec {
	var cp RegistriesConfigSpec = o
	if o.RegistryMirrors != nil {
		cp.RegistryMirrors = make(map[string]*RegistryMirrorConfig, len(o.RegistryMirrors))
		for k2, v2 := range o.RegistryMirrors {
			var cp_RegistryMirrors_v2 *RegistryMirrorConfig
			if v2 != nil {
				cp_RegistryMirrors_v2 = new(RegistryMirrorConfig)
				*cp_RegistryMirrors_v2 = *v2
				if v2.MirrorEndpoints != nil {
					cp_RegistryMirrors_v2.MirrorEndpoints = make([]RegistryEndpointConfig, len(v2.MirrorEndpoints))
					copy(cp_RegistryMirrors_v2.MirrorEndpoints, v2.MirrorEndpoints)
				}
			}
			cp.RegistryMirrors[k2] = cp_RegistryMirrors_v2
		}
	}
	if o.RegistryAuths != nil {
		cp.RegistryAuths = make(map[string]*RegistryAuthConfig, len(o.RegistryAuths))
		for k2, v2 := range o.RegistryAuths {
			var cp_RegistryAuths_v2 *RegistryAuthConfig
			if v2 != nil {
				cp_RegistryAuths_v2 = new(RegistryAuthConfig)
				*cp_RegistryAuths_v2 = *v2
			}
			cp.RegistryAuths[k2] = cp_RegistryAuths_v2
		}
	}
	if o.RegistryTLSs != nil {
		cp.RegistryTLSs = make(map[string]*RegistryTLSConfig, len(o.RegistryTLSs))
		for k2, v2 := range o.RegistryTLSs {
			var cp_RegistryTLSs_v2 *RegistryTLSConfig
			if v2 != nil {
				cp_RegistryTLSs_v2 = new(RegistryTLSConfig)
				*cp_RegistryTLSs_v2 = *v2
				if v2.TLSClientIdentity != nil {
					cp_RegistryTLSs_v2.TLSClientIdentity = v2.TLSClientIdentity.DeepCopy()
				}
				cp_RegistryTLSs_v2.TLSCA = v2.TLSCA.DeepCopy()
			}
			cp.RegistryTLSs[k2] = cp_RegistryTLSs_v2
		}
	}
	return cp
}

// DeepCopy generates a deep copy of ImageCacheConfigSpec.
func (o ImageCacheConfigSpec) DeepCopy() ImageCacheConfigSpec {
	var cp ImageCacheConfigSpec = o
	if o.Roots != nil {
		cp.Roots = make([]string, len(o.Roots))
		copy(cp.Roots, o.Roots)
	}
	return cp
}

// DeepCopy generates a deep copy of SeccompProfileSpec.
func (o SeccompProfileSpec) DeepCopy() SeccompProfileSpec {
	var cp SeccompProfileSpec = o
	if o.Value != nil {
		cp.Value = make(map[string]any, len(o.Value))
		for k2, v2 := range o.Value {
			cp.Value[k2] = v2
		}
	}
	return cp
}
