//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 *CiliumEndpoint) deepEqual(other *CiliumEndpoint) bool {
	if other == nil {
		return false
	}

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

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

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

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

	return true
}

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

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

	return true
}

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

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

	return true
}

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

	return true
}
