// 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 KubeAdmissionControlConfigV1Alpha1 -type KubeAggregatorCAConfigV1Alpha1 -type KubeAPIServerCAConfigV1Alpha1 -type KubeAPIServerConfigV1Alpha1 -type KubeAuditPolicyConfigV1Alpha1 -type KubeAuthenticationConfigV1Alpha1 -type KubeAuthorizerConfigV1Alpha1 -type KubeClusterConfigV1Alpha1 -type KubeControllerManagerConfigV1Alpha1 -type KubeCoreDNSConfigV1Alpha1 -type KubeEtcdEncryptionConfigV1Alpha1 -type KubeExternalManifestConfigV1Alpha1 -type KubeFlannelCNIConfigV1Alpha1 -type KubeInlineManifestConfigV1Alpha1 -type KubePrismConfigV1Alpha1 -type KubeletConfigV1Alpha1 -type KubeNetworkConfigV1Alpha1 -type KubeNodeConfigV1Alpha1 -type KubeProxyConfigV1Alpha1 -type KubeSchedulerConfigV1Alpha1 -type KubeServiceAccountConfigV1Alpha1 -type KubeCredentialProviderConfigV1Alpha1 -type KubeStaticPodConfigV1Alpha1 -type KubeTalosAPIAccessConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.

package k8s

import (
	"net/url"

	"github.com/siderolabs/talos/pkg/machinery/config/types/meta"
)

// DeepCopy generates a deep copy of *KubeAdmissionControlConfigV1Alpha1.
func (o *KubeAdmissionControlConfigV1Alpha1) DeepCopy() *KubeAdmissionControlConfigV1Alpha1 {
	var cp KubeAdmissionControlConfigV1Alpha1 = *o
	{
		retV := o.PluginConfig.DeepCopy()
		cp.PluginConfig = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeAggregatorCAConfigV1Alpha1.
func (o *KubeAggregatorCAConfigV1Alpha1) DeepCopy() *KubeAggregatorCAConfigV1Alpha1 {
	var cp KubeAggregatorCAConfigV1Alpha1 = *o
	if o.AggregatorIssuingCA != nil {
		cp.AggregatorIssuingCA = new(meta.CertificateAndKey)
		*cp.AggregatorIssuingCA = *o.AggregatorIssuingCA
	}
	if o.AggregatorAcceptedCAs != nil {
		cp.AggregatorAcceptedCAs = make([]string, len(o.AggregatorAcceptedCAs))
		copy(cp.AggregatorAcceptedCAs, o.AggregatorAcceptedCAs)
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeAPIServerCAConfigV1Alpha1.
func (o *KubeAPIServerCAConfigV1Alpha1) DeepCopy() *KubeAPIServerCAConfigV1Alpha1 {
	var cp KubeAPIServerCAConfigV1Alpha1 = *o
	if o.APIIssuingCA != nil {
		cp.APIIssuingCA = new(meta.CertificateAndKey)
		*cp.APIIssuingCA = *o.APIIssuingCA
	}
	if o.APIAcceptedCAs != nil {
		cp.APIAcceptedCAs = make([]string, len(o.APIAcceptedCAs))
		copy(cp.APIAcceptedCAs, o.APIAcceptedCAs)
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeAPIServerConfigV1Alpha1.
func (o *KubeAPIServerConfigV1Alpha1) DeepCopy() *KubeAPIServerConfigV1Alpha1 {
	var cp KubeAPIServerConfigV1Alpha1 = *o
	if o.PodArgs != nil {
		cp.PodArgs = make(map[string]meta.ArgValue, len(o.PodArgs))
		for k2, v2 := range o.PodArgs {
			cp.PodArgs[k2] = v2
		}
	}
	if o.PodEnv != nil {
		cp.PodEnv = make(map[string]string, len(o.PodEnv))
		for k2, v2 := range o.PodEnv {
			cp.PodEnv[k2] = v2
		}
	}
	{
		retV := o.PodResources.Requests.DeepCopy()
		cp.PodResources.Requests = *retV
	}
	{
		retV := o.PodResources.Limits.DeepCopy()
		cp.PodResources.Limits = *retV
	}
	if o.PodAPIPort != nil {
		cp.PodAPIPort = new(int)
		*cp.PodAPIPort = *o.PodAPIPort
	}
	if o.PodCertExtraSANs != nil {
		cp.PodCertExtraSANs = make([]string, len(o.PodCertExtraSANs))
		copy(cp.PodCertExtraSANs, o.PodCertExtraSANs)
	}
	if o.PodStartupProbes != nil {
		cp.PodStartupProbes = new(bool)
		*cp.PodStartupProbes = *o.PodStartupProbes
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeAuditPolicyConfigV1Alpha1.
func (o *KubeAuditPolicyConfigV1Alpha1) DeepCopy() *KubeAuditPolicyConfigV1Alpha1 {
	var cp KubeAuditPolicyConfigV1Alpha1 = *o
	{
		retV := o.AuditConfig.DeepCopy()
		cp.AuditConfig = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeAuthenticationConfigV1Alpha1.
func (o *KubeAuthenticationConfigV1Alpha1) DeepCopy() *KubeAuthenticationConfigV1Alpha1 {
	var cp KubeAuthenticationConfigV1Alpha1 = *o
	{
		retV := o.AuthConfig.DeepCopy()
		cp.AuthConfig = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeAuthorizerConfigV1Alpha1.
func (o *KubeAuthorizerConfigV1Alpha1) DeepCopy() *KubeAuthorizerConfigV1Alpha1 {
	var cp KubeAuthorizerConfigV1Alpha1 = *o
	{
		retV := o.AuthorizerWebhook.DeepCopy()
		cp.AuthorizerWebhook = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeClusterConfigV1Alpha1.
func (o *KubeClusterConfigV1Alpha1) DeepCopy() *KubeClusterConfigV1Alpha1 {
	var cp KubeClusterConfigV1Alpha1 = *o
	if o.ClusterEndpointConfig.URL != nil {
		cp.ClusterEndpointConfig.URL = new(url.URL)
		*cp.ClusterEndpointConfig.URL = *o.ClusterEndpointConfig.URL
		if o.ClusterEndpointConfig.URL.User != nil {
			cp.ClusterEndpointConfig.URL.User = new(url.Userinfo)
			*cp.ClusterEndpointConfig.URL.User = *o.ClusterEndpointConfig.URL.User
		}
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeControllerManagerConfigV1Alpha1.
func (o *KubeControllerManagerConfigV1Alpha1) DeepCopy() *KubeControllerManagerConfigV1Alpha1 {
	var cp KubeControllerManagerConfigV1Alpha1 = *o
	if o.PodEnabled != nil {
		cp.PodEnabled = new(bool)
		*cp.PodEnabled = *o.PodEnabled
	}
	if o.PodArgs != nil {
		cp.PodArgs = make(map[string]meta.ArgValue, len(o.PodArgs))
		for k2, v2 := range o.PodArgs {
			cp.PodArgs[k2] = v2
		}
	}
	if o.PodEnv != nil {
		cp.PodEnv = make(map[string]string, len(o.PodEnv))
		for k2, v2 := range o.PodEnv {
			cp.PodEnv[k2] = v2
		}
	}
	{
		retV := o.PodResources.Requests.DeepCopy()
		cp.PodResources.Requests = *retV
	}
	{
		retV := o.PodResources.Limits.DeepCopy()
		cp.PodResources.Limits = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeCoreDNSConfigV1Alpha1.
func (o *KubeCoreDNSConfigV1Alpha1) DeepCopy() *KubeCoreDNSConfigV1Alpha1 {
	var cp KubeCoreDNSConfigV1Alpha1 = *o
	if o.PodEnabled != nil {
		cp.PodEnabled = new(bool)
		*cp.PodEnabled = *o.PodEnabled
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeEtcdEncryptionConfigV1Alpha1.
func (o *KubeEtcdEncryptionConfigV1Alpha1) DeepCopy() *KubeEtcdEncryptionConfigV1Alpha1 {
	var cp KubeEtcdEncryptionConfigV1Alpha1 = *o
	{
		retV := o.Config.DeepCopy()
		cp.Config = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeExternalManifestConfigV1Alpha1.
func (o *KubeExternalManifestConfigV1Alpha1) DeepCopy() *KubeExternalManifestConfigV1Alpha1 {
	var cp KubeExternalManifestConfigV1Alpha1 = *o
	if o.HeadersSpec != nil {
		cp.HeadersSpec = make(map[string]string, len(o.HeadersSpec))
		for k2, v2 := range o.HeadersSpec {
			cp.HeadersSpec[k2] = v2
		}
	}
	if o.URLSpec.URL != nil {
		cp.URLSpec.URL = new(url.URL)
		*cp.URLSpec.URL = *o.URLSpec.URL
		if o.URLSpec.URL.User != nil {
			cp.URLSpec.URL.User = new(url.Userinfo)
			*cp.URLSpec.URL.User = *o.URLSpec.URL.User
		}
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeFlannelCNIConfigV1Alpha1.
func (o *KubeFlannelCNIConfigV1Alpha1) DeepCopy() *KubeFlannelCNIConfigV1Alpha1 {
	var cp KubeFlannelCNIConfigV1Alpha1 = *o
	{
		retV := o.FlannelBackendExtraConfig.DeepCopy()
		cp.FlannelBackendExtraConfig = *retV
	}
	{
		retV := o.FlannelResources.Requests.DeepCopy()
		cp.FlannelResources.Requests = *retV
	}
	{
		retV := o.FlannelResources.Limits.DeepCopy()
		cp.FlannelResources.Limits = *retV
	}
	if o.FlannelExtraArgs != nil {
		cp.FlannelExtraArgs = make([]string, len(o.FlannelExtraArgs))
		copy(cp.FlannelExtraArgs, o.FlannelExtraArgs)
	}
	if o.FlannelKubeNetworkPoliciesEnabled != nil {
		cp.FlannelKubeNetworkPoliciesEnabled = new(bool)
		*cp.FlannelKubeNetworkPoliciesEnabled = *o.FlannelKubeNetworkPoliciesEnabled
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeInlineManifestConfigV1Alpha1.
func (o *KubeInlineManifestConfigV1Alpha1) DeepCopy() *KubeInlineManifestConfigV1Alpha1 {
	var cp KubeInlineManifestConfigV1Alpha1 = *o
	return &cp
}

// DeepCopy generates a deep copy of *KubePrismConfigV1Alpha1.
func (o *KubePrismConfigV1Alpha1) DeepCopy() *KubePrismConfigV1Alpha1 {
	var cp KubePrismConfigV1Alpha1 = *o
	return &cp
}

// DeepCopy generates a deep copy of *KubeletConfigV1Alpha1.
func (o *KubeletConfigV1Alpha1) DeepCopy() *KubeletConfigV1Alpha1 {
	var cp KubeletConfigV1Alpha1 = *o
	{
		retV := o.KubeletConfig.DeepCopy()
		cp.KubeletConfig = *retV
	}
	if o.KubeletArgs != nil {
		cp.KubeletArgs = make(map[string]meta.ArgValue, len(o.KubeletArgs))
		for k2, v2 := range o.KubeletArgs {
			cp.KubeletArgs[k2] = v2
		}
	}
	if o.KubeletClusterDNS != nil {
		cp.KubeletClusterDNS = make([]string, len(o.KubeletClusterDNS))
		copy(cp.KubeletClusterDNS, o.KubeletClusterDNS)
	}
	if o.KubeletDefaultRuntimeSeccompProfileEnabled != nil {
		cp.KubeletDefaultRuntimeSeccompProfileEnabled = new(bool)
		*cp.KubeletDefaultRuntimeSeccompProfileEnabled = *o.KubeletDefaultRuntimeSeccompProfileEnabled
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeNetworkConfigV1Alpha1.
func (o *KubeNetworkConfigV1Alpha1) DeepCopy() *KubeNetworkConfigV1Alpha1 {
	var cp KubeNetworkConfigV1Alpha1 = *o
	if o.NetworkPodSubnets != nil {
		cp.NetworkPodSubnets = make([]meta.Prefix, len(o.NetworkPodSubnets))
		copy(cp.NetworkPodSubnets, o.NetworkPodSubnets)
	}
	if o.NetworkServiceSubnets != nil {
		cp.NetworkServiceSubnets = make([]meta.Prefix, len(o.NetworkServiceSubnets))
		copy(cp.NetworkServiceSubnets, o.NetworkServiceSubnets)
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeNodeConfigV1Alpha1.
func (o *KubeNodeConfigV1Alpha1) DeepCopy() *KubeNodeConfigV1Alpha1 {
	var cp KubeNodeConfigV1Alpha1 = *o
	if o.SkipNodeRegistrationConfig != nil {
		cp.SkipNodeRegistrationConfig = new(bool)
		*cp.SkipNodeRegistrationConfig = *o.SkipNodeRegistrationConfig
	}
	if o.RegisterWithFQDNConfig != nil {
		cp.RegisterWithFQDNConfig = new(bool)
		*cp.RegisterWithFQDNConfig = *o.RegisterWithFQDNConfig
	}
	if o.NodeIPConfig.NodeIPValidSubnets != nil {
		cp.NodeIPConfig.NodeIPValidSubnets = make([]string, len(o.NodeIPConfig.NodeIPValidSubnets))
		copy(cp.NodeIPConfig.NodeIPValidSubnets, o.NodeIPConfig.NodeIPValidSubnets)
	}
	if o.LabelsConfig != nil {
		cp.LabelsConfig = make(map[string]string, len(o.LabelsConfig))
		for k2, v2 := range o.LabelsConfig {
			cp.LabelsConfig[k2] = v2
		}
	}
	if o.AnnotationsConfig != nil {
		cp.AnnotationsConfig = make(map[string]string, len(o.AnnotationsConfig))
		for k2, v2 := range o.AnnotationsConfig {
			cp.AnnotationsConfig[k2] = v2
		}
	}
	if o.TaintsConfig != nil {
		cp.TaintsConfig = make(map[string]string, len(o.TaintsConfig))
		for k2, v2 := range o.TaintsConfig {
			cp.TaintsConfig[k2] = v2
		}
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeProxyConfigV1Alpha1.
func (o *KubeProxyConfigV1Alpha1) DeepCopy() *KubeProxyConfigV1Alpha1 {
	var cp KubeProxyConfigV1Alpha1 = *o
	if o.ProxyEnabled != nil {
		cp.ProxyEnabled = new(bool)
		*cp.ProxyEnabled = *o.ProxyEnabled
	}
	{
		retV := o.ProxyConfig.DeepCopy()
		cp.ProxyConfig = *retV
	}
	if o.ProxyExtraArgs != nil {
		cp.ProxyExtraArgs = make(map[string]meta.ArgValue, len(o.ProxyExtraArgs))
		for k2, v2 := range o.ProxyExtraArgs {
			cp.ProxyExtraArgs[k2] = v2
		}
	}
	{
		retV := o.ProxyResources.Requests.DeepCopy()
		cp.ProxyResources.Requests = *retV
	}
	{
		retV := o.ProxyResources.Limits.DeepCopy()
		cp.ProxyResources.Limits = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeSchedulerConfigV1Alpha1.
func (o *KubeSchedulerConfigV1Alpha1) DeepCopy() *KubeSchedulerConfigV1Alpha1 {
	var cp KubeSchedulerConfigV1Alpha1 = *o
	if o.PodEnabled != nil {
		cp.PodEnabled = new(bool)
		*cp.PodEnabled = *o.PodEnabled
	}
	{
		retV := o.PodConfig.DeepCopy()
		cp.PodConfig = *retV
	}
	if o.PodArgs != nil {
		cp.PodArgs = make(map[string]meta.ArgValue, len(o.PodArgs))
		for k2, v2 := range o.PodArgs {
			cp.PodArgs[k2] = v2
		}
	}
	if o.PodEnv != nil {
		cp.PodEnv = make(map[string]string, len(o.PodEnv))
		for k2, v2 := range o.PodEnv {
			cp.PodEnv[k2] = v2
		}
	}
	{
		retV := o.PodResources.Requests.DeepCopy()
		cp.PodResources.Requests = *retV
	}
	{
		retV := o.PodResources.Limits.DeepCopy()
		cp.PodResources.Limits = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeServiceAccountConfigV1Alpha1.
func (o *KubeServiceAccountConfigV1Alpha1) DeepCopy() *KubeServiceAccountConfigV1Alpha1 {
	var cp KubeServiceAccountConfigV1Alpha1 = *o
	if o.ServiceIssuer.IssuerURL.URL != nil {
		cp.ServiceIssuer.IssuerURL.URL = new(url.URL)
		*cp.ServiceIssuer.IssuerURL.URL = *o.ServiceIssuer.IssuerURL.URL
		if o.ServiceIssuer.IssuerURL.URL.User != nil {
			cp.ServiceIssuer.IssuerURL.URL.User = new(url.Userinfo)
			*cp.ServiceIssuer.IssuerURL.URL.User = *o.ServiceIssuer.IssuerURL.URL.User
		}
	}
	if o.ServiceAccepted.PublicKeys != nil {
		cp.ServiceAccepted.PublicKeys = make([]string, len(o.ServiceAccepted.PublicKeys))
		copy(cp.ServiceAccepted.PublicKeys, o.ServiceAccepted.PublicKeys)
	}
	if o.ServiceAccepted.Issuers != nil {
		cp.ServiceAccepted.Issuers = make([]meta.URL, len(o.ServiceAccepted.Issuers))
		copy(cp.ServiceAccepted.Issuers, o.ServiceAccepted.Issuers)
		for i3 := range o.ServiceAccepted.Issuers {
			if o.ServiceAccepted.Issuers[i3].URL != nil {
				cp.ServiceAccepted.Issuers[i3].URL = new(url.URL)
				*cp.ServiceAccepted.Issuers[i3].URL = *o.ServiceAccepted.Issuers[i3].URL
				if o.ServiceAccepted.Issuers[i3].URL.User != nil {
					cp.ServiceAccepted.Issuers[i3].URL.User = new(url.Userinfo)
					*cp.ServiceAccepted.Issuers[i3].URL.User = *o.ServiceAccepted.Issuers[i3].URL.User
				}
			}
		}
	}
	if o.ServiceAccepted.Audiences != nil {
		cp.ServiceAccepted.Audiences = make([]string, len(o.ServiceAccepted.Audiences))
		copy(cp.ServiceAccepted.Audiences, o.ServiceAccepted.Audiences)
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeCredentialProviderConfigV1Alpha1.
func (o *KubeCredentialProviderConfigV1Alpha1) DeepCopy() *KubeCredentialProviderConfigV1Alpha1 {
	var cp KubeCredentialProviderConfigV1Alpha1 = *o
	{
		retV := o.CredentialProviderConfig.DeepCopy()
		cp.CredentialProviderConfig = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeStaticPodConfigV1Alpha1.
func (o *KubeStaticPodConfigV1Alpha1) DeepCopy() *KubeStaticPodConfigV1Alpha1 {
	var cp KubeStaticPodConfigV1Alpha1 = *o
	{
		retV := o.PodSpec.DeepCopy()
		cp.PodSpec = *retV
	}
	return &cp
}

// DeepCopy generates a deep copy of *KubeTalosAPIAccessConfigV1Alpha1.
func (o *KubeTalosAPIAccessConfigV1Alpha1) DeepCopy() *KubeTalosAPIAccessConfigV1Alpha1 {
	var cp KubeTalosAPIAccessConfigV1Alpha1 = *o
	if o.AccessAllowedRoles != nil {
		cp.AccessAllowedRoles = make([]string, len(o.AccessAllowedRoles))
		copy(cp.AccessAllowedRoles, o.AccessAllowedRoles)
	}
	if o.AccessAllowedKubernetesNamespaces != nil {
		cp.AccessAllowedKubernetesNamespaces = make([]string, len(o.AccessAllowedKubernetesNamespaces))
		copy(cp.AccessAllowedKubernetesNamespaces, o.AccessAllowedKubernetesNamespaces)
	}
	return &cp
}
