// 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 AddressSpecSpec -type AddressStatusSpec -type HardwareAddrSpec -type HostnameSpecSpec -type HostnameStatusSpec -type LinkRefreshSpec -type LinkSpecSpec -type LinkStatusSpec -type NodeAddressSpec -type NodeAddressFilterSpec -type OperatorSpecSpec -type ProbeSpecSpec -type ProbeStatusSpec -type ResolverSpecSpec -type ResolverStatusSpec -type RouteSpecSpec -type RouteStatusSpec -type StatusSpec -type TimeServerSpecSpec -type TimeServerStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.

package network

import (
	"net/netip"
)

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

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

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

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

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

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

// DeepCopy generates a deep copy of LinkSpecSpec.
func (o LinkSpecSpec) DeepCopy() LinkSpecSpec {
	var cp LinkSpecSpec = o
	if o.Wireguard.Peers != nil {
		cp.Wireguard.Peers = make([]WireguardPeer, len(o.Wireguard.Peers))
		copy(cp.Wireguard.Peers, o.Wireguard.Peers)
		for i3 := range o.Wireguard.Peers {
			if o.Wireguard.Peers[i3].AllowedIPs != nil {
				cp.Wireguard.Peers[i3].AllowedIPs = make([]netip.Prefix, len(o.Wireguard.Peers[i3].AllowedIPs))
				copy(cp.Wireguard.Peers[i3].AllowedIPs, o.Wireguard.Peers[i3].AllowedIPs)
			}
		}
	}
	return cp
}

// DeepCopy generates a deep copy of LinkStatusSpec.
func (o LinkStatusSpec) DeepCopy() LinkStatusSpec {
	var cp LinkStatusSpec = o
	if o.HardwareAddr != nil {
		cp.HardwareAddr = make([]byte, len(o.HardwareAddr))
		copy(cp.HardwareAddr, o.HardwareAddr)
	}
	if o.PermanentAddr != nil {
		cp.PermanentAddr = make([]byte, len(o.PermanentAddr))
		copy(cp.PermanentAddr, o.PermanentAddr)
	}
	if o.BroadcastAddr != nil {
		cp.BroadcastAddr = make([]byte, len(o.BroadcastAddr))
		copy(cp.BroadcastAddr, o.BroadcastAddr)
	}
	if o.Wireguard.Peers != nil {
		cp.Wireguard.Peers = make([]WireguardPeer, len(o.Wireguard.Peers))
		copy(cp.Wireguard.Peers, o.Wireguard.Peers)
		for i3 := range o.Wireguard.Peers {
			if o.Wireguard.Peers[i3].AllowedIPs != nil {
				cp.Wireguard.Peers[i3].AllowedIPs = make([]netip.Prefix, len(o.Wireguard.Peers[i3].AllowedIPs))
				copy(cp.Wireguard.Peers[i3].AllowedIPs, o.Wireguard.Peers[i3].AllowedIPs)
			}
		}
	}
	return cp
}

// DeepCopy generates a deep copy of NodeAddressSpec.
func (o NodeAddressSpec) DeepCopy() NodeAddressSpec {
	var cp NodeAddressSpec = o
	if o.Addresses != nil {
		cp.Addresses = make([]netip.Prefix, len(o.Addresses))
		copy(cp.Addresses, o.Addresses)
	}
	return cp
}

// DeepCopy generates a deep copy of NodeAddressFilterSpec.
func (o NodeAddressFilterSpec) DeepCopy() NodeAddressFilterSpec {
	var cp NodeAddressFilterSpec = o
	if o.IncludeSubnets != nil {
		cp.IncludeSubnets = make([]netip.Prefix, len(o.IncludeSubnets))
		copy(cp.IncludeSubnets, o.IncludeSubnets)
	}
	if o.ExcludeSubnets != nil {
		cp.ExcludeSubnets = make([]netip.Prefix, len(o.ExcludeSubnets))
		copy(cp.ExcludeSubnets, o.ExcludeSubnets)
	}
	return cp
}

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

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

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

// DeepCopy generates a deep copy of ResolverSpecSpec.
func (o ResolverSpecSpec) DeepCopy() ResolverSpecSpec {
	var cp ResolverSpecSpec = o
	if o.DNSServers != nil {
		cp.DNSServers = make([]netip.Addr, len(o.DNSServers))
		copy(cp.DNSServers, o.DNSServers)
	}
	return cp
}

// DeepCopy generates a deep copy of ResolverStatusSpec.
func (o ResolverStatusSpec) DeepCopy() ResolverStatusSpec {
	var cp ResolverStatusSpec = o
	if o.DNSServers != nil {
		cp.DNSServers = make([]netip.Addr, len(o.DNSServers))
		copy(cp.DNSServers, o.DNSServers)
	}
	return cp
}

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

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

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

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

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