github.com/cilium/cilium@v1.16.2/pkg/ipam/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 *AllocationIP) DeepEqual(other *AllocationIP) bool {
    14  	if other == nil {
    15  		return false
    16  	}
    17  
    18  	if in.Owner != other.Owner {
    19  		return false
    20  	}
    21  	if in.Resource != other.Resource {
    22  		return false
    23  	}
    24  
    25  	return true
    26  }
    27  
    28  // DeepEqual is an autogenerated deepequal function, deeply comparing the
    29  // receiver with other. in must be non-nil.
    30  func (in *AllocationMap) DeepEqual(other *AllocationMap) bool {
    31  	if other == nil {
    32  		return false
    33  	}
    34  
    35  	if len(*in) != len(*other) {
    36  		return false
    37  	} else {
    38  		for key, inValue := range *in {
    39  			if otherValue, present := (*other)[key]; !present {
    40  				return false
    41  			} else {
    42  				if !inValue.DeepEqual(&otherValue) {
    43  					return false
    44  				}
    45  			}
    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 *IPAMPoolAllocation) DeepEqual(other *IPAMPoolAllocation) bool {
    55  	if other == nil {
    56  		return false
    57  	}
    58  
    59  	if in.Pool != other.Pool {
    60  		return false
    61  	}
    62  	if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) {
    63  		in, other := &in.CIDRs, &other.CIDRs
    64  		if other == nil {
    65  			return false
    66  		}
    67  
    68  		if len(*in) != len(*other) {
    69  			return false
    70  		} else {
    71  			for i, inElement := range *in {
    72  				if inElement != (*other)[i] {
    73  					return false
    74  				}
    75  			}
    76  		}
    77  	}
    78  
    79  	return true
    80  }
    81  
    82  // DeepEqual is an autogenerated deepequal function, deeply comparing the
    83  // receiver with other. in must be non-nil.
    84  func (in *IPAMPoolDemand) DeepEqual(other *IPAMPoolDemand) bool {
    85  	if other == nil {
    86  		return false
    87  	}
    88  
    89  	if in.IPv4Addrs != other.IPv4Addrs {
    90  		return false
    91  	}
    92  	if in.IPv6Addrs != other.IPv6Addrs {
    93  		return false
    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 *IPAMPoolRequest) DeepEqual(other *IPAMPoolRequest) bool {
   102  	if other == nil {
   103  		return false
   104  	}
   105  
   106  	if in.Pool != other.Pool {
   107  		return false
   108  	}
   109  	if in.Needed != other.Needed {
   110  		return false
   111  	}
   112  
   113  	return true
   114  }
   115  
   116  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   117  // receiver with other. in must be non-nil.
   118  func (in *IPAMPoolSpec) DeepEqual(other *IPAMPoolSpec) bool {
   119  	if other == nil {
   120  		return false
   121  	}
   122  
   123  	if ((in.Requested != nil) && (other.Requested != nil)) || ((in.Requested == nil) != (other.Requested == nil)) {
   124  		in, other := &in.Requested, &other.Requested
   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  	if ((in.Allocated != nil) && (other.Allocated != nil)) || ((in.Allocated == nil) != (other.Allocated == nil)) {
   141  		in, other := &in.Allocated, &other.Allocated
   142  		if other == nil {
   143  			return false
   144  		}
   145  
   146  		if len(*in) != len(*other) {
   147  			return false
   148  		} else {
   149  			for i, inElement := range *in {
   150  				if !inElement.DeepEqual(&(*other)[i]) {
   151  					return false
   152  				}
   153  			}
   154  		}
   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 *IPAMSpec) DeepEqual(other *IPAMSpec) bool {
   163  	if other == nil {
   164  		return false
   165  	}
   166  
   167  	if ((in.Pool != nil) && (other.Pool != nil)) || ((in.Pool == nil) != (other.Pool == nil)) {
   168  		in, other := &in.Pool, &other.Pool
   169  		if other == nil || !in.DeepEqual(other) {
   170  			return false
   171  		}
   172  	}
   173  
   174  	if ((in.IPv6Pool != nil) && (other.IPv6Pool != nil)) || ((in.IPv6Pool == nil) != (other.IPv6Pool == nil)) {
   175  		in, other := &in.IPv6Pool, &other.IPv6Pool
   176  		if other == nil || !in.DeepEqual(other) {
   177  			return false
   178  		}
   179  	}
   180  
   181  	if !in.Pools.DeepEqual(&other.Pools) {
   182  		return false
   183  	}
   184  
   185  	if ((in.PodCIDRs != nil) && (other.PodCIDRs != nil)) || ((in.PodCIDRs == nil) != (other.PodCIDRs == nil)) {
   186  		in, other := &in.PodCIDRs, &other.PodCIDRs
   187  		if other == nil {
   188  			return false
   189  		}
   190  
   191  		if len(*in) != len(*other) {
   192  			return false
   193  		} else {
   194  			for i, inElement := range *in {
   195  				if inElement != (*other)[i] {
   196  					return false
   197  				}
   198  			}
   199  		}
   200  	}
   201  
   202  	if in.MinAllocate != other.MinAllocate {
   203  		return false
   204  	}
   205  	if in.MaxAllocate != other.MaxAllocate {
   206  		return false
   207  	}
   208  	if in.PreAllocate != other.PreAllocate {
   209  		return false
   210  	}
   211  	if in.MaxAboveWatermark != other.MaxAboveWatermark {
   212  		return false
   213  	}
   214  
   215  	return true
   216  }
   217  
   218  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   219  // receiver with other. in must be non-nil.
   220  func (in *IPAMStatus) DeepEqual(other *IPAMStatus) bool {
   221  	if other == nil {
   222  		return false
   223  	}
   224  
   225  	if ((in.Used != nil) && (other.Used != nil)) || ((in.Used == nil) != (other.Used == nil)) {
   226  		in, other := &in.Used, &other.Used
   227  		if other == nil || !in.DeepEqual(other) {
   228  			return false
   229  		}
   230  	}
   231  
   232  	if ((in.IPv6Used != nil) && (other.IPv6Used != nil)) || ((in.IPv6Used == nil) != (other.IPv6Used == nil)) {
   233  		in, other := &in.IPv6Used, &other.IPv6Used
   234  		if other == nil || !in.DeepEqual(other) {
   235  			return false
   236  		}
   237  	}
   238  
   239  	if ((in.PodCIDRs != nil) && (other.PodCIDRs != nil)) || ((in.PodCIDRs == nil) != (other.PodCIDRs == nil)) {
   240  		in, other := &in.PodCIDRs, &other.PodCIDRs
   241  		if other == nil || !in.DeepEqual(other) {
   242  			return false
   243  		}
   244  	}
   245  
   246  	if in.OperatorStatus != other.OperatorStatus {
   247  		return false
   248  	}
   249  
   250  	if ((in.ReleaseIPs != nil) && (other.ReleaseIPs != nil)) || ((in.ReleaseIPs == nil) != (other.ReleaseIPs == nil)) {
   251  		in, other := &in.ReleaseIPs, &other.ReleaseIPs
   252  		if other == nil {
   253  			return false
   254  		}
   255  
   256  		if len(*in) != len(*other) {
   257  			return false
   258  		} else {
   259  			for key, inValue := range *in {
   260  				if otherValue, present := (*other)[key]; !present {
   261  					return false
   262  				} else {
   263  					if inValue != otherValue {
   264  						return false
   265  					}
   266  				}
   267  			}
   268  		}
   269  	}
   270  
   271  	if ((in.ReleaseIPv6s != nil) && (other.ReleaseIPv6s != nil)) || ((in.ReleaseIPv6s == nil) != (other.ReleaseIPv6s == nil)) {
   272  		in, other := &in.ReleaseIPv6s, &other.ReleaseIPv6s
   273  		if other == nil {
   274  			return false
   275  		}
   276  
   277  		if len(*in) != len(*other) {
   278  			return false
   279  		} else {
   280  			for key, inValue := range *in {
   281  				if otherValue, present := (*other)[key]; !present {
   282  					return false
   283  				} else {
   284  					if inValue != otherValue {
   285  						return false
   286  					}
   287  				}
   288  			}
   289  		}
   290  	}
   291  
   292  	return true
   293  }
   294  
   295  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   296  // receiver with other. in must be non-nil.
   297  func (in *Limits) DeepEqual(other *Limits) bool {
   298  	if other == nil {
   299  		return false
   300  	}
   301  
   302  	if in.Adapters != other.Adapters {
   303  		return false
   304  	}
   305  	if in.IPv4 != other.IPv4 {
   306  		return false
   307  	}
   308  	if in.IPv6 != other.IPv6 {
   309  		return false
   310  	}
   311  	if in.HypervisorType != other.HypervisorType {
   312  		return false
   313  	}
   314  
   315  	return true
   316  }
   317  
   318  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   319  // receiver with other. in must be non-nil.
   320  func (in *OperatorStatus) DeepEqual(other *OperatorStatus) bool {
   321  	if other == nil {
   322  		return false
   323  	}
   324  
   325  	if in.Error != other.Error {
   326  		return false
   327  	}
   328  
   329  	return true
   330  }
   331  
   332  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   333  // receiver with other. in must be non-nil.
   334  func (in *PodCIDRMap) DeepEqual(other *PodCIDRMap) bool {
   335  	if other == nil {
   336  		return false
   337  	}
   338  
   339  	if len(*in) != len(*other) {
   340  		return false
   341  	} else {
   342  		for key, inValue := range *in {
   343  			if otherValue, present := (*other)[key]; !present {
   344  				return false
   345  			} else {
   346  				if !inValue.DeepEqual(&otherValue) {
   347  					return false
   348  				}
   349  			}
   350  		}
   351  	}
   352  
   353  	return true
   354  }
   355  
   356  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   357  // receiver with other. in must be non-nil.
   358  func (in *PodCIDRMapEntry) DeepEqual(other *PodCIDRMapEntry) bool {
   359  	if other == nil {
   360  		return false
   361  	}
   362  
   363  	if in.Status != other.Status {
   364  		return false
   365  	}
   366  
   367  	return true
   368  }
   369  
   370  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   371  // receiver with other. in must be non-nil.
   372  func (in *PoolQuota) DeepEqual(other *PoolQuota) bool {
   373  	if other == nil {
   374  		return false
   375  	}
   376  
   377  	if in.AvailabilityZone != other.AvailabilityZone {
   378  		return false
   379  	}
   380  	if in.AvailableIPs != other.AvailableIPs {
   381  		return false
   382  	}
   383  	if in.AvailableIPv6s != other.AvailableIPv6s {
   384  		return false
   385  	}
   386  
   387  	return true
   388  }
   389  
   390  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   391  // receiver with other. in must be non-nil.
   392  func (in *PoolQuotaMap) DeepEqual(other *PoolQuotaMap) bool {
   393  	if other == nil {
   394  		return false
   395  	}
   396  
   397  	if len(*in) != len(*other) {
   398  		return false
   399  	} else {
   400  		for key, inValue := range *in {
   401  			if otherValue, present := (*other)[key]; !present {
   402  				return false
   403  			} else {
   404  				if !inValue.DeepEqual(&otherValue) {
   405  					return false
   406  				}
   407  			}
   408  		}
   409  	}
   410  
   411  	return true
   412  }
   413  
   414  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   415  // receiver with other. in must be non-nil.
   416  func (in *Subnet) DeepEqual(other *Subnet) bool {
   417  	if other == nil {
   418  		return false
   419  	}
   420  
   421  	if in.ID != other.ID {
   422  		return false
   423  	}
   424  	if in.Name != other.Name {
   425  		return false
   426  	}
   427  	if (in.CIDR == nil) != (other.CIDR == nil) {
   428  		return false
   429  	} else if in.CIDR != nil {
   430  		if !in.CIDR.DeepEqual(other.CIDR) {
   431  			return false
   432  		}
   433  	}
   434  
   435  	if (in.IPv6CIDR == nil) != (other.IPv6CIDR == nil) {
   436  		return false
   437  	} else if in.IPv6CIDR != nil {
   438  		if !in.IPv6CIDR.DeepEqual(other.IPv6CIDR) {
   439  			return false
   440  		}
   441  	}
   442  
   443  	if in.AvailabilityZone != other.AvailabilityZone {
   444  		return false
   445  	}
   446  	if in.VirtualNetworkID != other.VirtualNetworkID {
   447  		return false
   448  	}
   449  	if in.AvailableAddresses != other.AvailableAddresses {
   450  		return false
   451  	}
   452  	if in.AvailableIPv6Addresses != other.AvailableIPv6Addresses {
   453  		return false
   454  	}
   455  	if ((in.Tags != nil) && (other.Tags != nil)) || ((in.Tags == nil) != (other.Tags == nil)) {
   456  		in, other := &in.Tags, &other.Tags
   457  		if other == nil || !in.DeepEqual(other) {
   458  			return false
   459  		}
   460  	}
   461  
   462  	return true
   463  }
   464  
   465  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   466  // receiver with other. in must be non-nil.
   467  func (in *SubnetMap) DeepEqual(other *SubnetMap) bool {
   468  	if other == nil {
   469  		return false
   470  	}
   471  
   472  	if len(*in) != len(*other) {
   473  		return false
   474  	} else {
   475  		for key, inValue := range *in {
   476  			if otherValue, present := (*other)[key]; !present {
   477  				return false
   478  			} else {
   479  				if !inValue.DeepEqual(otherValue) {
   480  					return false
   481  				}
   482  			}
   483  		}
   484  	}
   485  
   486  	return true
   487  }
   488  
   489  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   490  // receiver with other. in must be non-nil.
   491  func (in *Tags) DeepEqual(other *Tags) bool {
   492  	if other == nil {
   493  		return false
   494  	}
   495  
   496  	if len(*in) != len(*other) {
   497  		return false
   498  	} else {
   499  		for key, inValue := range *in {
   500  			if otherValue, present := (*other)[key]; !present {
   501  				return false
   502  			} else {
   503  				if inValue != otherValue {
   504  					return false
   505  				}
   506  			}
   507  		}
   508  	}
   509  
   510  	return true
   511  }
   512  
   513  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   514  // receiver with other. in must be non-nil.
   515  func (in *VirtualNetwork) DeepEqual(other *VirtualNetwork) bool {
   516  	if other == nil {
   517  		return false
   518  	}
   519  
   520  	if in.ID != other.ID {
   521  		return false
   522  	}
   523  	if in.PrimaryCIDR != other.PrimaryCIDR {
   524  		return false
   525  	}
   526  	if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) {
   527  		in, other := &in.CIDRs, &other.CIDRs
   528  		if other == nil {
   529  			return false
   530  		}
   531  
   532  		if len(*in) != len(*other) {
   533  			return false
   534  		} else {
   535  			for i, inElement := range *in {
   536  				if inElement != (*other)[i] {
   537  					return false
   538  				}
   539  			}
   540  		}
   541  	}
   542  
   543  	if ((in.IPv6CIDRs != nil) && (other.IPv6CIDRs != nil)) || ((in.IPv6CIDRs == nil) != (other.IPv6CIDRs == nil)) {
   544  		in, other := &in.IPv6CIDRs, &other.IPv6CIDRs
   545  		if other == nil {
   546  			return false
   547  		}
   548  
   549  		if len(*in) != len(*other) {
   550  			return false
   551  		} else {
   552  			for i, inElement := range *in {
   553  				if inElement != (*other)[i] {
   554  					return false
   555  				}
   556  			}
   557  		}
   558  	}
   559  
   560  	return true
   561  }
   562  
   563  // DeepEqual is an autogenerated deepequal function, deeply comparing the
   564  // receiver with other. in must be non-nil.
   565  func (in *VirtualNetworkMap) DeepEqual(other *VirtualNetworkMap) bool {
   566  	if other == nil {
   567  		return false
   568  	}
   569  
   570  	if len(*in) != len(*other) {
   571  		return false
   572  	} else {
   573  		for key, inValue := range *in {
   574  			if otherValue, present := (*other)[key]; !present {
   575  				return false
   576  			} else {
   577  				if !inValue.DeepEqual(otherValue) {
   578  					return false
   579  				}
   580  			}
   581  		}
   582  	}
   583  
   584  	return true
   585  }