github.com/cilium/cilium@v1.16.2/pkg/labels/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 labels 10 11 // DeepEqual is an autogenerated deepequal function, deeply comparing the 12 // receiver with other. in must be non-nil. 13 func (in *Label) DeepEqual(other *Label) bool { 14 if other == nil { 15 return false 16 } 17 18 if in.Key != other.Key { 19 return false 20 } 21 if in.Value != other.Value { 22 return false 23 } 24 if in.Source != other.Source { 25 return false 26 } 27 28 return true 29 } 30 31 // DeepEqual is an autogenerated deepequal function, deeply comparing the 32 // receiver with other. in must be non-nil. 33 func (in *LabelArray) DeepEqual(other *LabelArray) bool { 34 if other == nil { 35 return false 36 } 37 38 if len(*in) != len(*other) { 39 return false 40 } else { 41 for i, inElement := range *in { 42 if !inElement.DeepEqual(&(*other)[i]) { 43 return false 44 } 45 } 46 } 47 48 return true 49 } 50 51 // DeepEqual is an autogenerated deepequal function, deeply comparing the 52 // receiver with other. in must be non-nil. 53 func (in *LabelArrayList) DeepEqual(other *LabelArrayList) bool { 54 if other == nil { 55 return false 56 } 57 58 if len(*in) != len(*other) { 59 return false 60 } else { 61 for i, inElement := range *in { 62 if !inElement.DeepEqual(&(*other)[i]) { 63 return false 64 } 65 } 66 } 67 68 return true 69 } 70 71 // DeepEqual is an autogenerated deepequal function, deeply comparing the 72 // receiver with other. in must be non-nil. 73 func (in *Labels) DeepEqual(other *Labels) bool { 74 if other == nil { 75 return false 76 } 77 78 if len(*in) != len(*other) { 79 return false 80 } else { 81 for key, inValue := range *in { 82 if otherValue, present := (*other)[key]; !present { 83 return false 84 } else { 85 if !inValue.DeepEqual(&otherValue) { 86 return false 87 } 88 } 89 } 90 } 91 92 return true 93 } 94 95 // DeepEqual is an autogenerated deepequal function, deeply comparing the 96 // receiver with other. in must be non-nil. 97 func (in *OpLabels) DeepEqual(other *OpLabels) bool { 98 if other == nil { 99 return false 100 } 101 102 if ((in.Custom != nil) && (other.Custom != nil)) || ((in.Custom == nil) != (other.Custom == nil)) { 103 in, other := &in.Custom, &other.Custom 104 if other == nil || !in.DeepEqual(other) { 105 return false 106 } 107 } 108 109 if ((in.OrchestrationIdentity != nil) && (other.OrchestrationIdentity != nil)) || ((in.OrchestrationIdentity == nil) != (other.OrchestrationIdentity == nil)) { 110 in, other := &in.OrchestrationIdentity, &other.OrchestrationIdentity 111 if other == nil || !in.DeepEqual(other) { 112 return false 113 } 114 } 115 116 if ((in.Disabled != nil) && (other.Disabled != nil)) || ((in.Disabled == nil) != (other.Disabled == nil)) { 117 in, other := &in.Disabled, &other.Disabled 118 if other == nil || !in.DeepEqual(other) { 119 return false 120 } 121 } 122 123 if ((in.OrchestrationInfo != nil) && (other.OrchestrationInfo != nil)) || ((in.OrchestrationInfo == nil) != (other.OrchestrationInfo == nil)) { 124 in, other := &in.OrchestrationInfo, &other.OrchestrationInfo 125 if other == nil || !in.DeepEqual(other) { 126 return false 127 } 128 } 129 130 return true 131 }