github.com/cilium/cilium@v1.16.2/pkg/k8s/types/zz_generated.deepequal.go (about) 1 //go:build !ignore_autogenerated 2 // +build !ignore_autogenerated 3 4 // SPDX-License-Identifier: Apache-2.0 5 // Copyright Authors of Cilium 6 7 // Code generated by deepequal-gen. DO NOT EDIT. 8 9 package types 10 11 // deepEqual is an autogenerated deepequal function, deeply comparing the 12 // receiver with other. in must be non-nil. 13 func (in *CiliumEndpoint) deepEqual(other *CiliumEndpoint) bool { 14 if other == nil { 15 return false 16 } 17 18 if (in.Identity == nil) != (other.Identity == nil) { 19 return false 20 } else if in.Identity != nil { 21 if !in.Identity.DeepEqual(other.Identity) { 22 return false 23 } 24 } 25 26 if (in.Networking == nil) != (other.Networking == nil) { 27 return false 28 } else if in.Networking != nil { 29 if !in.Networking.DeepEqual(other.Networking) { 30 return false 31 } 32 } 33 34 if (in.Encryption == nil) != (other.Encryption == nil) { 35 return false 36 } else if in.Encryption != nil { 37 if !in.Encryption.DeepEqual(other.Encryption) { 38 return false 39 } 40 } 41 42 if ((in.NamedPorts != nil) && (other.NamedPorts != nil)) || ((in.NamedPorts == nil) != (other.NamedPorts == nil)) { 43 in, other := &in.NamedPorts, &other.NamedPorts 44 if other == nil || !in.DeepEqual(other) { 45 return false 46 } 47 } 48 49 return true 50 } 51 52 // DeepEqual is an autogenerated deepequal function, deeply comparing the 53 // receiver with other. in must be non-nil. 54 func (in *IPSlice) DeepEqual(other *IPSlice) bool { 55 if other == nil { 56 return false 57 } 58 59 if len(*in) != len(*other) { 60 return false 61 } else { 62 for i, inElement := range *in { 63 if inElement != (*other)[i] { 64 return false 65 } 66 } 67 } 68 69 return true 70 } 71 72 // DeepEqual is an autogenerated deepequal function, deeply comparing the 73 // receiver with other. in must be non-nil. 74 func (in *SlimCNP) DeepEqual(other *SlimCNP) bool { 75 if other == nil { 76 return false 77 } 78 79 if (in.CiliumNetworkPolicy == nil) != (other.CiliumNetworkPolicy == nil) { 80 return false 81 } else if in.CiliumNetworkPolicy != nil { 82 if !in.CiliumNetworkPolicy.DeepEqual(other.CiliumNetworkPolicy) { 83 return false 84 } 85 } 86 87 return true 88 } 89 90 // DeepEqual is an autogenerated deepequal function, deeply comparing the 91 // receiver with other. in must be non-nil. 92 func (in *UnserializableObject) DeepEqual(other *UnserializableObject) bool { 93 if other == nil { 94 return false 95 } 96 97 return true 98 }