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

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

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

	if ((in.PortNames != nil) && (other.PortNames != nil)) || ((in.PortNames == nil) != (other.PortNames == nil)) {
		in, other := &in.PortNames, &other.PortNames
		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.Weight != other.Weight {
		return false
	}
	if in.NodeName != other.NodeName {
		return false
	}
	if (in.Zone == nil) != (other.Zone == nil) {
		return false
	} else if in.Zone != nil {
		if !in.Zone.DeepEqual(other.Zone) {
			return false
		}
	}

	if in.ClusterID != other.ClusterID {
		return false
	}
	if in.Source != other.Source {
		return false
	}
	if in.State != other.State {
		return false
	}
	if in.Unhealthy != other.Unhealthy {
		return false
	}

	return true
}

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

	if in.Zone != other.Zone {
		return false
	}
	if ((in.ForZones != nil) && (other.ForZones != nil)) || ((in.ForZones == nil) != (other.ForZones == nil)) {
		in, other := &in.ForZones, &other.ForZones
		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 *Config) DeepEqual(other *Config) bool {
	if other == nil {
		return false
	}

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

	if in.NodePortMin != other.NodePortMin {
		return false
	}
	if in.NodePortMax != other.NodePortMax {
		return false
	}

	return true
}

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

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

	if in.Type != other.Type {
		return false
	}
	if in.ServiceName != other.ServiceName {
		return false
	}

	if in.PortName != other.PortName {
		return false
	}
	if in.ServicePort != other.ServicePort {
		return false
	}

	return true
}

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

	if in.Protocol != other.Protocol {
		return false
	}
	if in.Port != other.Port {
		return false
	}

	return true
}

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

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

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

		if len(*in) != len(*other) {
			return false
		} else {
			for key, inValue := range *in {
				if otherValue, present := (*other)[key]; !present {
					return false
				} else {
					if inValue != otherValue {
						return false
					}
				}
			}
		}
	}

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

		if len(*in) != len(*other) {
			return false
		} else {
			for key, inValue := range *in {
				if otherValue, present := (*other)[key]; !present {
					return false
				} else {
					if inValue != otherValue {
						return false
					}
				}
			}
		}
	}

	if in.NatPolicy != other.NatPolicy {
		return false
	}
	if in.ExtTrafficPolicy != other.ExtTrafficPolicy {
		return false
	}
	if in.IntTrafficPolicy != other.IntTrafficPolicy {
		return false
	}
	if in.ForwardingMode != other.ForwardingMode {
		return false
	}
	if in.SessionAffinity != other.SessionAffinity {
		return false
	}
	if in.SessionAffinityTimeout != other.SessionAffinityTimeout {
		return false
	}
	if (in.LoadBalancerClass == nil) != (other.LoadBalancerClass == nil) {
		return false
	} else if in.LoadBalancerClass != nil {
		if *in.LoadBalancerClass != *other.LoadBalancerClass {
			return false
		}
	}

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

		if len(*in) != len(*other) {
			return false
		} else {
			for key, inValue := range *in {
				if otherValue, present := (*other)[key]; !present {
					return false
				} else {
					if inValue != otherValue {
						return false
					}
				}
			}
		}
	}

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

	return true
}

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

	if in.RetryBackoffMin != other.RetryBackoffMin {
		return false
	}
	if in.RetryBackoffMax != other.RetryBackoffMax {
		return false
	}
	if in.LBMapEntries != other.LBMapEntries {
		return false
	}
	if in.LBServiceMapEntries != other.LBServiceMapEntries {
		return false
	}
	if in.LBBackendMapEntries != other.LBBackendMapEntries {
		return false
	}
	if in.LBRevNatEntries != other.LBRevNatEntries {
		return false
	}
	if in.LBAffinityMapEntries != other.LBAffinityMapEntries {
		return false
	}
	if in.LBSourceRangeAllTypes != other.LBSourceRangeAllTypes {
		return false
	}
	if in.LBSourceRangeMapEntries != other.LBSourceRangeMapEntries {
		return false
	}
	if in.LBMaglevMapEntries != other.LBMaglevMapEntries {
		return false
	}
	if in.LBSockRevNatEntries != other.LBSockRevNatEntries {
		return false
	}
	if ((in.NodePortRange != nil) && (other.NodePortRange != nil)) || ((in.NodePortRange == nil) != (other.NodePortRange == nil)) {
		in, other := &in.NodePortRange, &other.NodePortRange
		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.LBMode != other.LBMode {
		return false
	}
	if in.LBModeAnnotation != other.LBModeAnnotation {
		return false
	}
	if in.LBAlgorithm != other.LBAlgorithm {
		return false
	}
	if in.DSRDispatch != other.DSRDispatch {
		return false
	}
	if in.ExternalClusterIP != other.ExternalClusterIP {
		return false
	}
	if in.AlgorithmAnnotation != other.AlgorithmAnnotation {
		return false
	}
	if in.EnableHealthCheckLoadBalancerIP != other.EnableHealthCheckLoadBalancerIP {
		return false
	}
	if in.EnableHealthCheckNodePort != other.EnableHealthCheckNodePort {
		return false
	}
	if in.LBPressureMetricsInterval != other.LBPressureMetricsInterval {
		return false
	}
	if in.LBSockTerminateAllProtos != other.LBSockTerminateAllProtos {
		return false
	}
	if in.EnableServiceTopology != other.EnableServiceTopology {
		return false
	}
	if in.InitWaitTimeout != other.InitWaitTimeout {
		return false
	}

	return true
}
