github.com/gravitational/teleport/api@v0.0.0-20240507183017-3110591cbafc/types/discoveryconfig/derived.gen.go (about)

     1  // Code generated by goderive DO NOT EDIT.
     2  
     3  package discoveryconfig
     4  
     5  import (
     6  	types "github.com/gravitational/teleport/api/types"
     7  	header "github.com/gravitational/teleport/api/types/header"
     8  	utils "github.com/gravitational/teleport/api/utils"
     9  )
    10  
    11  // deriveTeleportEqualDiscoveryConfig returns whether this and that are equal.
    12  func deriveTeleportEqualDiscoveryConfig(this, that *DiscoveryConfig) bool {
    13  	return (this == nil && that == nil) ||
    14  		this != nil && that != nil &&
    15  			deriveTeleportEqual(&this.ResourceHeader, &that.ResourceHeader) &&
    16  			deriveTeleportEqual_(&this.Spec, &that.Spec)
    17  }
    18  
    19  // deriveTeleportEqual returns whether this and that are equal.
    20  func deriveTeleportEqual(this, that *header.ResourceHeader) bool {
    21  	return (this == nil && that == nil) ||
    22  		this != nil && that != nil &&
    23  			this.Kind == that.Kind &&
    24  			this.SubKind == that.SubKind &&
    25  			this.Version == that.Version &&
    26  			deriveTeleportEqual_1(&this.Metadata, &that.Metadata)
    27  }
    28  
    29  // deriveTeleportEqual_ returns whether this and that are equal.
    30  func deriveTeleportEqual_(this, that *Spec) bool {
    31  	return (this == nil && that == nil) ||
    32  		this != nil && that != nil &&
    33  			this.DiscoveryGroup == that.DiscoveryGroup &&
    34  			deriveTeleportEqual_2(this.AWS, that.AWS) &&
    35  			deriveTeleportEqual_3(this.Azure, that.Azure) &&
    36  			deriveTeleportEqual_4(this.GCP, that.GCP) &&
    37  			deriveTeleportEqual_5(this.Kube, that.Kube) &&
    38  			deriveTeleportEqual_6(this.AccessGraph, that.AccessGraph)
    39  }
    40  
    41  // deriveTeleportEqual_1 returns whether this and that are equal.
    42  func deriveTeleportEqual_1(this, that *header.Metadata) bool {
    43  	return (this == nil && that == nil) ||
    44  		this != nil && that != nil &&
    45  			this.Name == that.Name &&
    46  			this.Description == that.Description &&
    47  			deriveTeleportEqual_7(this.Labels, that.Labels) &&
    48  			this.Expires.Equal(that.Expires)
    49  }
    50  
    51  // deriveTeleportEqual_2 returns whether this and that are equal.
    52  func deriveTeleportEqual_2(this, that []types.AWSMatcher) bool {
    53  	if this == nil || that == nil {
    54  		return this == nil && that == nil
    55  	}
    56  	if len(this) != len(that) {
    57  		return false
    58  	}
    59  	for i := 0; i < len(this); i++ {
    60  		if !(deriveTeleportEqual_8(&this[i], &that[i])) {
    61  			return false
    62  		}
    63  	}
    64  	return true
    65  }
    66  
    67  // deriveTeleportEqual_3 returns whether this and that are equal.
    68  func deriveTeleportEqual_3(this, that []types.AzureMatcher) bool {
    69  	if this == nil || that == nil {
    70  		return this == nil && that == nil
    71  	}
    72  	if len(this) != len(that) {
    73  		return false
    74  	}
    75  	for i := 0; i < len(this); i++ {
    76  		if !(deriveTeleportEqual_9(&this[i], &that[i])) {
    77  			return false
    78  		}
    79  	}
    80  	return true
    81  }
    82  
    83  // deriveTeleportEqual_4 returns whether this and that are equal.
    84  func deriveTeleportEqual_4(this, that []types.GCPMatcher) bool {
    85  	if this == nil || that == nil {
    86  		return this == nil && that == nil
    87  	}
    88  	if len(this) != len(that) {
    89  		return false
    90  	}
    91  	for i := 0; i < len(this); i++ {
    92  		if !(deriveTeleportEqual_10(&this[i], &that[i])) {
    93  			return false
    94  		}
    95  	}
    96  	return true
    97  }
    98  
    99  // deriveTeleportEqual_5 returns whether this and that are equal.
   100  func deriveTeleportEqual_5(this, that []types.KubernetesMatcher) bool {
   101  	if this == nil || that == nil {
   102  		return this == nil && that == nil
   103  	}
   104  	if len(this) != len(that) {
   105  		return false
   106  	}
   107  	for i := 0; i < len(this); i++ {
   108  		if !(deriveTeleportEqual_11(&this[i], &that[i])) {
   109  			return false
   110  		}
   111  	}
   112  	return true
   113  }
   114  
   115  // deriveTeleportEqual_6 returns whether this and that are equal.
   116  func deriveTeleportEqual_6(this, that *types.AccessGraphSync) bool {
   117  	return (this == nil && that == nil) ||
   118  		this != nil && that != nil &&
   119  			deriveTeleportEqual_12(this.AWS, that.AWS)
   120  }
   121  
   122  // deriveTeleportEqual_7 returns whether this and that are equal.
   123  func deriveTeleportEqual_7(this, that map[string]string) bool {
   124  	if this == nil || that == nil {
   125  		return this == nil && that == nil
   126  	}
   127  	if len(this) != len(that) {
   128  		return false
   129  	}
   130  	for k, v := range this {
   131  		thatv, ok := that[k]
   132  		if !ok {
   133  			return false
   134  		}
   135  		if !(v == thatv) {
   136  			return false
   137  		}
   138  	}
   139  	return true
   140  }
   141  
   142  // deriveTeleportEqual_8 returns whether this and that are equal.
   143  func deriveTeleportEqual_8(this, that *types.AWSMatcher) bool {
   144  	return (this == nil && that == nil) ||
   145  		this != nil && that != nil &&
   146  			deriveTeleportEqual_13(this.Types, that.Types) &&
   147  			deriveTeleportEqual_13(this.Regions, that.Regions) &&
   148  			deriveTeleportEqual_14(this.AssumeRole, that.AssumeRole) &&
   149  			deriveTeleportEqual_15(this.Tags, that.Tags) &&
   150  			deriveTeleportEqual_16(this.Params, that.Params) &&
   151  			deriveTeleportEqual_17(this.SSM, that.SSM) &&
   152  			this.Integration == that.Integration &&
   153  			this.KubeAppDiscovery == that.KubeAppDiscovery
   154  }
   155  
   156  // deriveTeleportEqual_9 returns whether this and that are equal.
   157  func deriveTeleportEqual_9(this, that *types.AzureMatcher) bool {
   158  	return (this == nil && that == nil) ||
   159  		this != nil && that != nil &&
   160  			deriveTeleportEqual_13(this.Subscriptions, that.Subscriptions) &&
   161  			deriveTeleportEqual_13(this.ResourceGroups, that.ResourceGroups) &&
   162  			deriveTeleportEqual_13(this.Types, that.Types) &&
   163  			deriveTeleportEqual_13(this.Regions, that.Regions) &&
   164  			deriveTeleportEqual_15(this.ResourceTags, that.ResourceTags) &&
   165  			deriveTeleportEqual_16(this.Params, that.Params)
   166  }
   167  
   168  // deriveTeleportEqual_10 returns whether this and that are equal.
   169  func deriveTeleportEqual_10(this, that *types.GCPMatcher) bool {
   170  	return (this == nil && that == nil) ||
   171  		this != nil && that != nil &&
   172  			deriveTeleportEqual_13(this.Types, that.Types) &&
   173  			deriveTeleportEqual_13(this.Locations, that.Locations) &&
   174  			deriveTeleportEqual_15(this.Tags, that.Tags) &&
   175  			deriveTeleportEqual_13(this.ProjectIDs, that.ProjectIDs) &&
   176  			deriveTeleportEqual_13(this.ServiceAccounts, that.ServiceAccounts) &&
   177  			deriveTeleportEqual_16(this.Params, that.Params) &&
   178  			deriveTeleportEqual_15(this.Labels, that.Labels)
   179  }
   180  
   181  // deriveTeleportEqual_11 returns whether this and that are equal.
   182  func deriveTeleportEqual_11(this, that *types.KubernetesMatcher) bool {
   183  	return (this == nil && that == nil) ||
   184  		this != nil && that != nil &&
   185  			deriveTeleportEqual_13(this.Types, that.Types) &&
   186  			deriveTeleportEqual_13(this.Namespaces, that.Namespaces) &&
   187  			deriveTeleportEqual_15(this.Labels, that.Labels)
   188  }
   189  
   190  // deriveTeleportEqual_12 returns whether this and that are equal.
   191  func deriveTeleportEqual_12(this, that []*types.AccessGraphAWSSync) bool {
   192  	if this == nil || that == nil {
   193  		return this == nil && that == nil
   194  	}
   195  	if len(this) != len(that) {
   196  		return false
   197  	}
   198  	for i := 0; i < len(this); i++ {
   199  		if !(deriveTeleportEqual_18(this[i], that[i])) {
   200  			return false
   201  		}
   202  	}
   203  	return true
   204  }
   205  
   206  // deriveTeleportEqual_13 returns whether this and that are equal.
   207  func deriveTeleportEqual_13(this, that []string) bool {
   208  	if this == nil || that == nil {
   209  		return this == nil && that == nil
   210  	}
   211  	if len(this) != len(that) {
   212  		return false
   213  	}
   214  	for i := 0; i < len(this); i++ {
   215  		if !(this[i] == that[i]) {
   216  			return false
   217  		}
   218  	}
   219  	return true
   220  }
   221  
   222  // deriveTeleportEqual_14 returns whether this and that are equal.
   223  func deriveTeleportEqual_14(this, that *types.AssumeRole) bool {
   224  	return (this == nil && that == nil) ||
   225  		this != nil && that != nil &&
   226  			this.RoleARN == that.RoleARN &&
   227  			this.ExternalID == that.ExternalID
   228  }
   229  
   230  // deriveTeleportEqual_15 returns whether this and that are equal.
   231  func deriveTeleportEqual_15(this, that map[string]utils.Strings) bool {
   232  	if this == nil || that == nil {
   233  		return this == nil && that == nil
   234  	}
   235  	if len(this) != len(that) {
   236  		return false
   237  	}
   238  	for k, v := range this {
   239  		thatv, ok := that[k]
   240  		if !ok {
   241  			return false
   242  		}
   243  		if !(deriveTeleportEqual_13(v, thatv)) {
   244  			return false
   245  		}
   246  	}
   247  	return true
   248  }
   249  
   250  // deriveTeleportEqual_16 returns whether this and that are equal.
   251  func deriveTeleportEqual_16(this, that *types.InstallerParams) bool {
   252  	return (this == nil && that == nil) ||
   253  		this != nil && that != nil &&
   254  			this.JoinMethod == that.JoinMethod &&
   255  			this.JoinToken == that.JoinToken &&
   256  			this.ScriptName == that.ScriptName &&
   257  			this.InstallTeleport == that.InstallTeleport &&
   258  			this.SSHDConfig == that.SSHDConfig &&
   259  			this.PublicProxyAddr == that.PublicProxyAddr &&
   260  			deriveTeleportEqual_19(this.Azure, that.Azure)
   261  }
   262  
   263  // deriveTeleportEqual_17 returns whether this and that are equal.
   264  func deriveTeleportEqual_17(this, that *types.AWSSSM) bool {
   265  	return (this == nil && that == nil) ||
   266  		this != nil && that != nil &&
   267  			this.DocumentName == that.DocumentName
   268  }
   269  
   270  // deriveTeleportEqual_18 returns whether this and that are equal.
   271  func deriveTeleportEqual_18(this, that *types.AccessGraphAWSSync) bool {
   272  	return (this == nil && that == nil) ||
   273  		this != nil && that != nil &&
   274  			deriveTeleportEqual_13(this.Regions, that.Regions) &&
   275  			deriveTeleportEqual_14(this.AssumeRole, that.AssumeRole) &&
   276  			this.Integration == that.Integration
   277  }
   278  
   279  // deriveTeleportEqual_19 returns whether this and that are equal.
   280  func deriveTeleportEqual_19(this, that *types.AzureInstallerParams) bool {
   281  	return (this == nil && that == nil) ||
   282  		this != nil && that != nil &&
   283  			this.ClientID == that.ClientID
   284  }