//go:build !ignore_autogenerated
// +build !ignore_autogenerated

// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

// Code generated by deepequal-gen. DO NOT EDIT.

package types

// DeepEqual is an autogenerated deepequal function, deeply comparing the
// receiver with other. in must be non-nil.
func (in *LocalNodeConfiguration) DeepEqual(other *LocalNodeConfiguration) bool {
	if other == nil {
		return false
	}

	if ((in.NodeIPv4 != nil) && (other.NodeIPv4 != nil)) || ((in.NodeIPv4 == nil) != (other.NodeIPv4 == nil)) {
		in, other := &in.NodeIPv4, &other.NodeIPv4
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if inElement != (*other)[i] {
					return false
				}
			}
		}
	}

	if ((in.NodeIPv6 != nil) && (other.NodeIPv6 != nil)) || ((in.NodeIPv6 == nil) != (other.NodeIPv6 == nil)) {
		in, other := &in.NodeIPv6, &other.NodeIPv6
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if inElement != (*other)[i] {
					return false
				}
			}
		}
	}

	if ((in.CiliumInternalIPv4 != nil) && (other.CiliumInternalIPv4 != nil)) || ((in.CiliumInternalIPv4 == nil) != (other.CiliumInternalIPv4 == nil)) {
		in, other := &in.CiliumInternalIPv4, &other.CiliumInternalIPv4
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if inElement != (*other)[i] {
					return false
				}
			}
		}
	}

	if ((in.CiliumInternalIPv6 != nil) && (other.CiliumInternalIPv6 != nil)) || ((in.CiliumInternalIPv6 == nil) != (other.CiliumInternalIPv6 == nil)) {
		in, other := &in.CiliumInternalIPv6, &other.CiliumInternalIPv6
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if inElement != (*other)[i] {
					return false
				}
			}
		}
	}

	if (in.AllocCIDRIPv4 == nil) != (other.AllocCIDRIPv4 == nil) {
		return false
	} else if in.AllocCIDRIPv4 != nil {
		if !in.AllocCIDRIPv4.DeepEqual(other.AllocCIDRIPv4) {
			return false
		}
	}

	if (in.AllocCIDRIPv6 == nil) != (other.AllocCIDRIPv6 == nil) {
		return false
	} else if in.AllocCIDRIPv6 != nil {
		if !in.AllocCIDRIPv6.DeepEqual(other.AllocCIDRIPv6) {
			return false
		}
	}

	if (in.NativeRoutingCIDRIPv4 == nil) != (other.NativeRoutingCIDRIPv4 == nil) {
		return false
	} else if in.NativeRoutingCIDRIPv4 != nil {
		if !in.NativeRoutingCIDRIPv4.DeepEqual(other.NativeRoutingCIDRIPv4) {
			return false
		}
	}

	if (in.NativeRoutingCIDRIPv6 == nil) != (other.NativeRoutingCIDRIPv6 == nil) {
		return false
	} else if in.NativeRoutingCIDRIPv6 != nil {
		if !in.NativeRoutingCIDRIPv6.DeepEqual(other.NativeRoutingCIDRIPv6) {
			return false
		}
	}

	if ((in.ServiceLoopbackIPv4 != nil) && (other.ServiceLoopbackIPv4 != nil)) || ((in.ServiceLoopbackIPv4 == nil) != (other.ServiceLoopbackIPv4 == nil)) {
		in, other := &in.ServiceLoopbackIPv4, &other.ServiceLoopbackIPv4
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if inElement != (*other)[i] {
					return false
				}
			}
		}
	}

	if ((in.ServiceLoopbackIPv6 != nil) && (other.ServiceLoopbackIPv6 != nil)) || ((in.ServiceLoopbackIPv6 == nil) != (other.ServiceLoopbackIPv6 == nil)) {
		in, other := &in.ServiceLoopbackIPv6, &other.ServiceLoopbackIPv6
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if inElement != (*other)[i] {
					return false
				}
			}
		}
	}

	if ((in.Devices != nil) && (other.Devices != nil)) || ((in.Devices == nil) != (other.Devices == nil)) {
		in, other := &in.Devices, &other.Devices
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if !inElement.DeepEqual((*other)[i]) {
					return false
				}
			}
		}
	}

	if (in.DirectRoutingDevice == nil) != (other.DirectRoutingDevice == nil) {
		return false
	} else if in.DirectRoutingDevice != nil {
		if !in.DirectRoutingDevice.DeepEqual(other.DirectRoutingDevice) {
			return false
		}
	}

	if ((in.NodeAddresses != nil) && (other.NodeAddresses != nil)) || ((in.NodeAddresses == nil) != (other.NodeAddresses == nil)) {
		in, other := &in.NodeAddresses, &other.NodeAddresses
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if !inElement.DeepEqual(&(*other)[i]) {
					return false
				}
			}
		}
	}

	if in.DeriveMasqIPAddrFromDevice != other.DeriveMasqIPAddrFromDevice {
		return false
	}
	if in.HostEndpointID != other.HostEndpointID {
		return false
	}
	if in.DeviceMTU != other.DeviceMTU {
		return false
	}
	if in.RouteMTU != other.RouteMTU {
		return false
	}
	if in.RoutePostEncryptMTU != other.RoutePostEncryptMTU {
		return false
	}
	if ((in.AuxiliaryPrefixes != nil) && (other.AuxiliaryPrefixes != nil)) || ((in.AuxiliaryPrefixes == nil) != (other.AuxiliaryPrefixes == nil)) {
		in, other := &in.AuxiliaryPrefixes, &other.AuxiliaryPrefixes
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if !inElement.DeepEqual((*other)[i]) {
					return false
				}
			}
		}
	}

	if in.EnableIPv4 != other.EnableIPv4 {
		return false
	}
	if in.EnableIPv6 != other.EnableIPv6 {
		return false
	}
	if in.EnableEncapsulation != other.EnableEncapsulation {
		return false
	}
	if in.EnableAutoDirectRouting != other.EnableAutoDirectRouting {
		return false
	}
	if in.DirectRoutingSkipUnreachable != other.DirectRoutingSkipUnreachable {
		return false
	}
	if in.EnableLocalNodeRoute != other.EnableLocalNodeRoute {
		return false
	}
	if in.EnableWireguard != other.EnableWireguard {
		return false
	}
	if in.WireguardIfIndex != other.WireguardIfIndex {
		return false
	}
	if in.EnableIPSec != other.EnableIPSec {
		return false
	}
	if in.EncryptNode != other.EncryptNode {
		return false
	}
	if ((in.IPv4PodSubnets != nil) && (other.IPv4PodSubnets != nil)) || ((in.IPv4PodSubnets == nil) != (other.IPv4PodSubnets == nil)) {
		in, other := &in.IPv4PodSubnets, &other.IPv4PodSubnets
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if !inElement.DeepEqual((*other)[i]) {
					return false
				}
			}
		}
	}

	if ((in.IPv6PodSubnets != nil) && (other.IPv6PodSubnets != nil)) || ((in.IPv6PodSubnets == nil) != (other.IPv6PodSubnets == nil)) {
		in, other := &in.IPv6PodSubnets, &other.IPv6PodSubnets
		if other == nil {
			return false
		}

		if len(*in) != len(*other) {
			return false
		} else {
			for i, inElement := range *in {
				if !inElement.DeepEqual((*other)[i]) {
					return false
				}
			}
		}
	}

	if in.XDPConfig != other.XDPConfig {
		return false
	}

	if !in.LBConfig.DeepEqual(&other.LBConfig) {
		return false
	}

	if in.MaglevConfig != other.MaglevConfig {
		return false
	}

	if in.KPRConfig != other.KPRConfig {
		return false
	}

	if in.SvcRouteConfig != other.SvcRouteConfig {
		return false
	}

	return true
}
