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

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

	if in.Index != other.Index {
		return false
	}
	if in.MTU != other.MTU {
		return false
	}
	if in.Name != other.Name {
		return false
	}
	if ((in.HardwareAddr != nil) && (other.HardwareAddr != nil)) || ((in.HardwareAddr == nil) != (other.HardwareAddr == nil)) {
		in, other := &in.HardwareAddr, &other.HardwareAddr
		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.Flags != other.Flags {
		return false
	}
	if ((in.Addrs != nil) && (other.Addrs != nil)) || ((in.Addrs == nil) != (other.Addrs == nil)) {
		in, other := &in.Addrs, &other.Addrs
		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.RawFlags != other.RawFlags {
		return false
	}
	if in.Type != other.Type {
		return false
	}
	if in.MasterIndex != other.MasterIndex {
		return false
	}
	if in.Selected != other.Selected {
		return false
	}
	if in.NotSelectedReason != other.NotSelectedReason {
		return false
	}

	return true
}
