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

	if in.key != other.key {
		return false
	}
	if ((in.requirements != nil) && (other.requirements != nil)) || ((in.requirements == nil) != (other.requirements == nil)) {
		in, other := &in.requirements, &other.requirements
		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.generated != other.generated {
		return false
	}

	return true
}

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

	if in.key != other.key {
		return false
	}
	if in.requirements != other.requirements {
		return false
	}

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

	return true
}

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

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

	if ((in.requirements != nil) && (other.requirements != nil)) || ((in.requirements == nil) != (other.requirements == nil)) {
		in, other := &in.requirements, &other.requirements
		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.class != other.class {
		return false
	}
	if ((in.namespaces != nil) && (other.namespaces != nil)) || ((in.namespaces == nil) != (other.namespaces == nil)) {
		in, other := &in.namespaces, &other.namespaces
		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 *PolicyEntry) DeepEqual(other *PolicyEntry) bool {
	if other == nil {
		return false
	}

	if in.Tier != other.Tier {
		return false
	}
	if in.Priority != other.Priority {
		return false
	}
	if (in.Authentication == nil) != (other.Authentication == nil) {
		return false
	} else if in.Authentication != nil {
		if !in.Authentication.DeepEqual(other.Authentication) {
			return false
		}
	}

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

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

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

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

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

	if in.DefaultDeny != other.DefaultDeny {
		return false
	}
	if in.Verdict != other.Verdict {
		return false
	}
	if in.Ingress != other.Ingress {
		return false
	}
	if in.Node != other.Node {
		return false
	}

	return true
}

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

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

	if in.operator != other.operator {
		return false
	}
	if !in.values.DeepEqual(&other.values) {
		return false
	}

	return true
}
