github.com/cilium/cilium@v1.16.2/pkg/bgpv1/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 *RoutePolicy) DeepEqual(other *RoutePolicy) bool { 14 if other == nil { 15 return false 16 } 17 18 if in.Name != other.Name { 19 return false 20 } 21 if in.Type != other.Type { 22 return false 23 } 24 if ((in.Statements != nil) && (other.Statements != nil)) || ((in.Statements == nil) != (other.Statements == nil)) { 25 in, other := &in.Statements, &other.Statements 26 if other == nil { 27 return false 28 } 29 30 if len(*in) != len(*other) { 31 return false 32 } else { 33 for i, inElement := range *in { 34 if !inElement.DeepEqual((*other)[i]) { 35 return false 36 } 37 } 38 } 39 } 40 41 return true 42 } 43 44 // DeepEqual is an autogenerated deepequal function, deeply comparing the 45 // receiver with other. in must be non-nil. 46 func (in *RoutePolicyActions) DeepEqual(other *RoutePolicyActions) bool { 47 if other == nil { 48 return false 49 } 50 51 if in.RouteAction != other.RouteAction { 52 return false 53 } 54 if ((in.AddCommunities != nil) && (other.AddCommunities != nil)) || ((in.AddCommunities == nil) != (other.AddCommunities == nil)) { 55 in, other := &in.AddCommunities, &other.AddCommunities 56 if other == nil { 57 return false 58 } 59 60 if len(*in) != len(*other) { 61 return false 62 } else { 63 for i, inElement := range *in { 64 if inElement != (*other)[i] { 65 return false 66 } 67 } 68 } 69 } 70 71 if ((in.AddLargeCommunities != nil) && (other.AddLargeCommunities != nil)) || ((in.AddLargeCommunities == nil) != (other.AddLargeCommunities == nil)) { 72 in, other := &in.AddLargeCommunities, &other.AddLargeCommunities 73 if other == nil { 74 return false 75 } 76 77 if len(*in) != len(*other) { 78 return false 79 } else { 80 for i, inElement := range *in { 81 if inElement != (*other)[i] { 82 return false 83 } 84 } 85 } 86 } 87 88 if (in.SetLocalPreference == nil) != (other.SetLocalPreference == nil) { 89 return false 90 } else if in.SetLocalPreference != nil { 91 if *in.SetLocalPreference != *other.SetLocalPreference { 92 return false 93 } 94 } 95 96 return true 97 } 98 99 // DeepEqual is an autogenerated deepequal function, deeply comparing the 100 // receiver with other. in must be non-nil. 101 func (in *RoutePolicyConditions) DeepEqual(other *RoutePolicyConditions) bool { 102 if other == nil { 103 return false 104 } 105 106 if ((in.MatchNeighbors != nil) && (other.MatchNeighbors != nil)) || ((in.MatchNeighbors == nil) != (other.MatchNeighbors == nil)) { 107 in, other := &in.MatchNeighbors, &other.MatchNeighbors 108 if other == nil { 109 return false 110 } 111 112 if len(*in) != len(*other) { 113 return false 114 } else { 115 for i, inElement := range *in { 116 if inElement != (*other)[i] { 117 return false 118 } 119 } 120 } 121 } 122 123 if ((in.MatchPrefixes != nil) && (other.MatchPrefixes != nil)) || ((in.MatchPrefixes == nil) != (other.MatchPrefixes == nil)) { 124 in, other := &in.MatchPrefixes, &other.MatchPrefixes 125 if other == nil { 126 return false 127 } 128 129 if len(*in) != len(*other) { 130 return false 131 } else { 132 for i, inElement := range *in { 133 if !inElement.DeepEqual((*other)[i]) { 134 return false 135 } 136 } 137 } 138 } 139 140 return true 141 } 142 143 // deepEqual is an autogenerated deepequal function, deeply comparing the 144 // receiver with other. in must be non-nil. 145 func (in *RoutePolicyPrefixMatch) deepEqual(other *RoutePolicyPrefixMatch) bool { 146 if other == nil { 147 return false 148 } 149 150 if in.PrefixLenMin != other.PrefixLenMin { 151 return false 152 } 153 if in.PrefixLenMax != other.PrefixLenMax { 154 return false 155 } 156 157 return true 158 } 159 160 // DeepEqual is an autogenerated deepequal function, deeply comparing the 161 // receiver with other. in must be non-nil. 162 func (in *RoutePolicyStatement) DeepEqual(other *RoutePolicyStatement) bool { 163 if other == nil { 164 return false 165 } 166 167 if !in.Conditions.DeepEqual(&other.Conditions) { 168 return false 169 } 170 171 if !in.Actions.DeepEqual(&other.Actions) { 172 return false 173 } 174 175 return true 176 }