//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 node

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

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

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

	return true
}

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

	if in.OptOutNodeEncryption != other.OptOutNodeEncryption {
		return false
	}
	if in.UID != other.UID {
		return false
	}
	if in.ProviderID != other.ProviderID {
		return false
	}
	if (in.IPv4NativeRoutingCIDR == nil) != (other.IPv4NativeRoutingCIDR == nil) {
		return false
	} else if in.IPv4NativeRoutingCIDR != nil {
		if !in.IPv4NativeRoutingCIDR.DeepEqual(other.IPv4NativeRoutingCIDR) {
			return false
		}
	}

	if (in.IPv6NativeRoutingCIDR == nil) != (other.IPv6NativeRoutingCIDR == nil) {
		return false
	} else if in.IPv6NativeRoutingCIDR != nil {
		if !in.IPv6NativeRoutingCIDR.DeepEqual(other.IPv6NativeRoutingCIDR) {
			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.IsBeingDeleted != other.IsBeingDeleted {
		return false
	}
	if in.UnderlayProtocol != other.UnderlayProtocol {
		return false
	}

	return true
}
