...

Source file src/github.com/emissary-ingress/emissary/v3/pkg/api/envoy/admin/v2alpha/config_dump.pb.validate.go

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/envoy/admin/v2alpha

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: envoy/admin/v2alpha/config_dump.proto
     3  
     4  package v2alpha
     5  
     6  import (
     7  	"bytes"
     8  	"errors"
     9  	"fmt"
    10  	"net"
    11  	"net/mail"
    12  	"net/url"
    13  	"regexp"
    14  	"sort"
    15  	"strings"
    16  	"time"
    17  	"unicode/utf8"
    18  
    19  	"google.golang.org/protobuf/types/known/anypb"
    20  )
    21  
    22  // ensure the imports are used
    23  var (
    24  	_ = bytes.MinRead
    25  	_ = errors.New("")
    26  	_ = fmt.Print
    27  	_ = utf8.UTFMax
    28  	_ = (*regexp.Regexp)(nil)
    29  	_ = (*strings.Reader)(nil)
    30  	_ = net.IPv4len
    31  	_ = time.Duration(0)
    32  	_ = (*url.URL)(nil)
    33  	_ = (*mail.Address)(nil)
    34  	_ = anypb.Any{}
    35  	_ = sort.Sort
    36  )
    37  
    38  // Validate checks the field values on ConfigDump with the rules defined in the
    39  // proto definition for this message. If any rules are violated, the first
    40  // error encountered is returned, or nil if there are no violations.
    41  func (m *ConfigDump) Validate() error {
    42  	return m.validate(false)
    43  }
    44  
    45  // ValidateAll checks the field values on ConfigDump with the rules defined in
    46  // the proto definition for this message. If any rules are violated, the
    47  // result is a list of violation errors wrapped in ConfigDumpMultiError, or
    48  // nil if none found.
    49  func (m *ConfigDump) ValidateAll() error {
    50  	return m.validate(true)
    51  }
    52  
    53  func (m *ConfigDump) validate(all bool) error {
    54  	if m == nil {
    55  		return nil
    56  	}
    57  
    58  	var errors []error
    59  
    60  	for idx, item := range m.GetConfigs() {
    61  		_, _ = idx, item
    62  
    63  		if all {
    64  			switch v := interface{}(item).(type) {
    65  			case interface{ ValidateAll() error }:
    66  				if err := v.ValidateAll(); err != nil {
    67  					errors = append(errors, ConfigDumpValidationError{
    68  						field:  fmt.Sprintf("Configs[%v]", idx),
    69  						reason: "embedded message failed validation",
    70  						cause:  err,
    71  					})
    72  				}
    73  			case interface{ Validate() error }:
    74  				if err := v.Validate(); err != nil {
    75  					errors = append(errors, ConfigDumpValidationError{
    76  						field:  fmt.Sprintf("Configs[%v]", idx),
    77  						reason: "embedded message failed validation",
    78  						cause:  err,
    79  					})
    80  				}
    81  			}
    82  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
    83  			if err := v.Validate(); err != nil {
    84  				return ConfigDumpValidationError{
    85  					field:  fmt.Sprintf("Configs[%v]", idx),
    86  					reason: "embedded message failed validation",
    87  					cause:  err,
    88  				}
    89  			}
    90  		}
    91  
    92  	}
    93  
    94  	if len(errors) > 0 {
    95  		return ConfigDumpMultiError(errors)
    96  	}
    97  
    98  	return nil
    99  }
   100  
   101  // ConfigDumpMultiError is an error wrapping multiple validation errors
   102  // returned by ConfigDump.ValidateAll() if the designated constraints aren't met.
   103  type ConfigDumpMultiError []error
   104  
   105  // Error returns a concatenation of all the error messages it wraps.
   106  func (m ConfigDumpMultiError) Error() string {
   107  	var msgs []string
   108  	for _, err := range m {
   109  		msgs = append(msgs, err.Error())
   110  	}
   111  	return strings.Join(msgs, "; ")
   112  }
   113  
   114  // AllErrors returns a list of validation violation errors.
   115  func (m ConfigDumpMultiError) AllErrors() []error { return m }
   116  
   117  // ConfigDumpValidationError is the validation error returned by
   118  // ConfigDump.Validate if the designated constraints aren't met.
   119  type ConfigDumpValidationError struct {
   120  	field  string
   121  	reason string
   122  	cause  error
   123  	key    bool
   124  }
   125  
   126  // Field function returns field value.
   127  func (e ConfigDumpValidationError) Field() string { return e.field }
   128  
   129  // Reason function returns reason value.
   130  func (e ConfigDumpValidationError) Reason() string { return e.reason }
   131  
   132  // Cause function returns cause value.
   133  func (e ConfigDumpValidationError) Cause() error { return e.cause }
   134  
   135  // Key function returns key value.
   136  func (e ConfigDumpValidationError) Key() bool { return e.key }
   137  
   138  // ErrorName returns error name.
   139  func (e ConfigDumpValidationError) ErrorName() string { return "ConfigDumpValidationError" }
   140  
   141  // Error satisfies the builtin error interface
   142  func (e ConfigDumpValidationError) Error() string {
   143  	cause := ""
   144  	if e.cause != nil {
   145  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   146  	}
   147  
   148  	key := ""
   149  	if e.key {
   150  		key = "key for "
   151  	}
   152  
   153  	return fmt.Sprintf(
   154  		"invalid %sConfigDump.%s: %s%s",
   155  		key,
   156  		e.field,
   157  		e.reason,
   158  		cause)
   159  }
   160  
   161  var _ error = ConfigDumpValidationError{}
   162  
   163  var _ interface {
   164  	Field() string
   165  	Reason() string
   166  	Key() bool
   167  	Cause() error
   168  	ErrorName() string
   169  } = ConfigDumpValidationError{}
   170  
   171  // Validate checks the field values on UpdateFailureState with the rules
   172  // defined in the proto definition for this message. If any rules are
   173  // violated, the first error encountered is returned, or nil if there are no violations.
   174  func (m *UpdateFailureState) Validate() error {
   175  	return m.validate(false)
   176  }
   177  
   178  // ValidateAll checks the field values on UpdateFailureState with the rules
   179  // defined in the proto definition for this message. If any rules are
   180  // violated, the result is a list of violation errors wrapped in
   181  // UpdateFailureStateMultiError, or nil if none found.
   182  func (m *UpdateFailureState) ValidateAll() error {
   183  	return m.validate(true)
   184  }
   185  
   186  func (m *UpdateFailureState) validate(all bool) error {
   187  	if m == nil {
   188  		return nil
   189  	}
   190  
   191  	var errors []error
   192  
   193  	if all {
   194  		switch v := interface{}(m.GetFailedConfiguration()).(type) {
   195  		case interface{ ValidateAll() error }:
   196  			if err := v.ValidateAll(); err != nil {
   197  				errors = append(errors, UpdateFailureStateValidationError{
   198  					field:  "FailedConfiguration",
   199  					reason: "embedded message failed validation",
   200  					cause:  err,
   201  				})
   202  			}
   203  		case interface{ Validate() error }:
   204  			if err := v.Validate(); err != nil {
   205  				errors = append(errors, UpdateFailureStateValidationError{
   206  					field:  "FailedConfiguration",
   207  					reason: "embedded message failed validation",
   208  					cause:  err,
   209  				})
   210  			}
   211  		}
   212  	} else if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok {
   213  		if err := v.Validate(); err != nil {
   214  			return UpdateFailureStateValidationError{
   215  				field:  "FailedConfiguration",
   216  				reason: "embedded message failed validation",
   217  				cause:  err,
   218  			}
   219  		}
   220  	}
   221  
   222  	if all {
   223  		switch v := interface{}(m.GetLastUpdateAttempt()).(type) {
   224  		case interface{ ValidateAll() error }:
   225  			if err := v.ValidateAll(); err != nil {
   226  				errors = append(errors, UpdateFailureStateValidationError{
   227  					field:  "LastUpdateAttempt",
   228  					reason: "embedded message failed validation",
   229  					cause:  err,
   230  				})
   231  			}
   232  		case interface{ Validate() error }:
   233  			if err := v.Validate(); err != nil {
   234  				errors = append(errors, UpdateFailureStateValidationError{
   235  					field:  "LastUpdateAttempt",
   236  					reason: "embedded message failed validation",
   237  					cause:  err,
   238  				})
   239  			}
   240  		}
   241  	} else if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok {
   242  		if err := v.Validate(); err != nil {
   243  			return UpdateFailureStateValidationError{
   244  				field:  "LastUpdateAttempt",
   245  				reason: "embedded message failed validation",
   246  				cause:  err,
   247  			}
   248  		}
   249  	}
   250  
   251  	// no validation rules for Details
   252  
   253  	if len(errors) > 0 {
   254  		return UpdateFailureStateMultiError(errors)
   255  	}
   256  
   257  	return nil
   258  }
   259  
   260  // UpdateFailureStateMultiError is an error wrapping multiple validation errors
   261  // returned by UpdateFailureState.ValidateAll() if the designated constraints
   262  // aren't met.
   263  type UpdateFailureStateMultiError []error
   264  
   265  // Error returns a concatenation of all the error messages it wraps.
   266  func (m UpdateFailureStateMultiError) Error() string {
   267  	var msgs []string
   268  	for _, err := range m {
   269  		msgs = append(msgs, err.Error())
   270  	}
   271  	return strings.Join(msgs, "; ")
   272  }
   273  
   274  // AllErrors returns a list of validation violation errors.
   275  func (m UpdateFailureStateMultiError) AllErrors() []error { return m }
   276  
   277  // UpdateFailureStateValidationError is the validation error returned by
   278  // UpdateFailureState.Validate if the designated constraints aren't met.
   279  type UpdateFailureStateValidationError struct {
   280  	field  string
   281  	reason string
   282  	cause  error
   283  	key    bool
   284  }
   285  
   286  // Field function returns field value.
   287  func (e UpdateFailureStateValidationError) Field() string { return e.field }
   288  
   289  // Reason function returns reason value.
   290  func (e UpdateFailureStateValidationError) Reason() string { return e.reason }
   291  
   292  // Cause function returns cause value.
   293  func (e UpdateFailureStateValidationError) Cause() error { return e.cause }
   294  
   295  // Key function returns key value.
   296  func (e UpdateFailureStateValidationError) Key() bool { return e.key }
   297  
   298  // ErrorName returns error name.
   299  func (e UpdateFailureStateValidationError) ErrorName() string {
   300  	return "UpdateFailureStateValidationError"
   301  }
   302  
   303  // Error satisfies the builtin error interface
   304  func (e UpdateFailureStateValidationError) Error() string {
   305  	cause := ""
   306  	if e.cause != nil {
   307  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   308  	}
   309  
   310  	key := ""
   311  	if e.key {
   312  		key = "key for "
   313  	}
   314  
   315  	return fmt.Sprintf(
   316  		"invalid %sUpdateFailureState.%s: %s%s",
   317  		key,
   318  		e.field,
   319  		e.reason,
   320  		cause)
   321  }
   322  
   323  var _ error = UpdateFailureStateValidationError{}
   324  
   325  var _ interface {
   326  	Field() string
   327  	Reason() string
   328  	Key() bool
   329  	Cause() error
   330  	ErrorName() string
   331  } = UpdateFailureStateValidationError{}
   332  
   333  // Validate checks the field values on BootstrapConfigDump with the rules
   334  // defined in the proto definition for this message. If any rules are
   335  // violated, the first error encountered is returned, or nil if there are no violations.
   336  func (m *BootstrapConfigDump) Validate() error {
   337  	return m.validate(false)
   338  }
   339  
   340  // ValidateAll checks the field values on BootstrapConfigDump with the rules
   341  // defined in the proto definition for this message. If any rules are
   342  // violated, the result is a list of violation errors wrapped in
   343  // BootstrapConfigDumpMultiError, or nil if none found.
   344  func (m *BootstrapConfigDump) ValidateAll() error {
   345  	return m.validate(true)
   346  }
   347  
   348  func (m *BootstrapConfigDump) validate(all bool) error {
   349  	if m == nil {
   350  		return nil
   351  	}
   352  
   353  	var errors []error
   354  
   355  	if all {
   356  		switch v := interface{}(m.GetBootstrap()).(type) {
   357  		case interface{ ValidateAll() error }:
   358  			if err := v.ValidateAll(); err != nil {
   359  				errors = append(errors, BootstrapConfigDumpValidationError{
   360  					field:  "Bootstrap",
   361  					reason: "embedded message failed validation",
   362  					cause:  err,
   363  				})
   364  			}
   365  		case interface{ Validate() error }:
   366  			if err := v.Validate(); err != nil {
   367  				errors = append(errors, BootstrapConfigDumpValidationError{
   368  					field:  "Bootstrap",
   369  					reason: "embedded message failed validation",
   370  					cause:  err,
   371  				})
   372  			}
   373  		}
   374  	} else if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok {
   375  		if err := v.Validate(); err != nil {
   376  			return BootstrapConfigDumpValidationError{
   377  				field:  "Bootstrap",
   378  				reason: "embedded message failed validation",
   379  				cause:  err,
   380  			}
   381  		}
   382  	}
   383  
   384  	if all {
   385  		switch v := interface{}(m.GetLastUpdated()).(type) {
   386  		case interface{ ValidateAll() error }:
   387  			if err := v.ValidateAll(); err != nil {
   388  				errors = append(errors, BootstrapConfigDumpValidationError{
   389  					field:  "LastUpdated",
   390  					reason: "embedded message failed validation",
   391  					cause:  err,
   392  				})
   393  			}
   394  		case interface{ Validate() error }:
   395  			if err := v.Validate(); err != nil {
   396  				errors = append(errors, BootstrapConfigDumpValidationError{
   397  					field:  "LastUpdated",
   398  					reason: "embedded message failed validation",
   399  					cause:  err,
   400  				})
   401  			}
   402  		}
   403  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
   404  		if err := v.Validate(); err != nil {
   405  			return BootstrapConfigDumpValidationError{
   406  				field:  "LastUpdated",
   407  				reason: "embedded message failed validation",
   408  				cause:  err,
   409  			}
   410  		}
   411  	}
   412  
   413  	if len(errors) > 0 {
   414  		return BootstrapConfigDumpMultiError(errors)
   415  	}
   416  
   417  	return nil
   418  }
   419  
   420  // BootstrapConfigDumpMultiError is an error wrapping multiple validation
   421  // errors returned by BootstrapConfigDump.ValidateAll() if the designated
   422  // constraints aren't met.
   423  type BootstrapConfigDumpMultiError []error
   424  
   425  // Error returns a concatenation of all the error messages it wraps.
   426  func (m BootstrapConfigDumpMultiError) Error() string {
   427  	var msgs []string
   428  	for _, err := range m {
   429  		msgs = append(msgs, err.Error())
   430  	}
   431  	return strings.Join(msgs, "; ")
   432  }
   433  
   434  // AllErrors returns a list of validation violation errors.
   435  func (m BootstrapConfigDumpMultiError) AllErrors() []error { return m }
   436  
   437  // BootstrapConfigDumpValidationError is the validation error returned by
   438  // BootstrapConfigDump.Validate if the designated constraints aren't met.
   439  type BootstrapConfigDumpValidationError struct {
   440  	field  string
   441  	reason string
   442  	cause  error
   443  	key    bool
   444  }
   445  
   446  // Field function returns field value.
   447  func (e BootstrapConfigDumpValidationError) Field() string { return e.field }
   448  
   449  // Reason function returns reason value.
   450  func (e BootstrapConfigDumpValidationError) Reason() string { return e.reason }
   451  
   452  // Cause function returns cause value.
   453  func (e BootstrapConfigDumpValidationError) Cause() error { return e.cause }
   454  
   455  // Key function returns key value.
   456  func (e BootstrapConfigDumpValidationError) Key() bool { return e.key }
   457  
   458  // ErrorName returns error name.
   459  func (e BootstrapConfigDumpValidationError) ErrorName() string {
   460  	return "BootstrapConfigDumpValidationError"
   461  }
   462  
   463  // Error satisfies the builtin error interface
   464  func (e BootstrapConfigDumpValidationError) Error() string {
   465  	cause := ""
   466  	if e.cause != nil {
   467  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   468  	}
   469  
   470  	key := ""
   471  	if e.key {
   472  		key = "key for "
   473  	}
   474  
   475  	return fmt.Sprintf(
   476  		"invalid %sBootstrapConfigDump.%s: %s%s",
   477  		key,
   478  		e.field,
   479  		e.reason,
   480  		cause)
   481  }
   482  
   483  var _ error = BootstrapConfigDumpValidationError{}
   484  
   485  var _ interface {
   486  	Field() string
   487  	Reason() string
   488  	Key() bool
   489  	Cause() error
   490  	ErrorName() string
   491  } = BootstrapConfigDumpValidationError{}
   492  
   493  // Validate checks the field values on ListenersConfigDump with the rules
   494  // defined in the proto definition for this message. If any rules are
   495  // violated, the first error encountered is returned, or nil if there are no violations.
   496  func (m *ListenersConfigDump) Validate() error {
   497  	return m.validate(false)
   498  }
   499  
   500  // ValidateAll checks the field values on ListenersConfigDump with the rules
   501  // defined in the proto definition for this message. If any rules are
   502  // violated, the result is a list of violation errors wrapped in
   503  // ListenersConfigDumpMultiError, or nil if none found.
   504  func (m *ListenersConfigDump) ValidateAll() error {
   505  	return m.validate(true)
   506  }
   507  
   508  func (m *ListenersConfigDump) validate(all bool) error {
   509  	if m == nil {
   510  		return nil
   511  	}
   512  
   513  	var errors []error
   514  
   515  	// no validation rules for VersionInfo
   516  
   517  	for idx, item := range m.GetStaticListeners() {
   518  		_, _ = idx, item
   519  
   520  		if all {
   521  			switch v := interface{}(item).(type) {
   522  			case interface{ ValidateAll() error }:
   523  				if err := v.ValidateAll(); err != nil {
   524  					errors = append(errors, ListenersConfigDumpValidationError{
   525  						field:  fmt.Sprintf("StaticListeners[%v]", idx),
   526  						reason: "embedded message failed validation",
   527  						cause:  err,
   528  					})
   529  				}
   530  			case interface{ Validate() error }:
   531  				if err := v.Validate(); err != nil {
   532  					errors = append(errors, ListenersConfigDumpValidationError{
   533  						field:  fmt.Sprintf("StaticListeners[%v]", idx),
   534  						reason: "embedded message failed validation",
   535  						cause:  err,
   536  					})
   537  				}
   538  			}
   539  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   540  			if err := v.Validate(); err != nil {
   541  				return ListenersConfigDumpValidationError{
   542  					field:  fmt.Sprintf("StaticListeners[%v]", idx),
   543  					reason: "embedded message failed validation",
   544  					cause:  err,
   545  				}
   546  			}
   547  		}
   548  
   549  	}
   550  
   551  	for idx, item := range m.GetDynamicListeners() {
   552  		_, _ = idx, item
   553  
   554  		if all {
   555  			switch v := interface{}(item).(type) {
   556  			case interface{ ValidateAll() error }:
   557  				if err := v.ValidateAll(); err != nil {
   558  					errors = append(errors, ListenersConfigDumpValidationError{
   559  						field:  fmt.Sprintf("DynamicListeners[%v]", idx),
   560  						reason: "embedded message failed validation",
   561  						cause:  err,
   562  					})
   563  				}
   564  			case interface{ Validate() error }:
   565  				if err := v.Validate(); err != nil {
   566  					errors = append(errors, ListenersConfigDumpValidationError{
   567  						field:  fmt.Sprintf("DynamicListeners[%v]", idx),
   568  						reason: "embedded message failed validation",
   569  						cause:  err,
   570  					})
   571  				}
   572  			}
   573  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   574  			if err := v.Validate(); err != nil {
   575  				return ListenersConfigDumpValidationError{
   576  					field:  fmt.Sprintf("DynamicListeners[%v]", idx),
   577  					reason: "embedded message failed validation",
   578  					cause:  err,
   579  				}
   580  			}
   581  		}
   582  
   583  	}
   584  
   585  	if len(errors) > 0 {
   586  		return ListenersConfigDumpMultiError(errors)
   587  	}
   588  
   589  	return nil
   590  }
   591  
   592  // ListenersConfigDumpMultiError is an error wrapping multiple validation
   593  // errors returned by ListenersConfigDump.ValidateAll() if the designated
   594  // constraints aren't met.
   595  type ListenersConfigDumpMultiError []error
   596  
   597  // Error returns a concatenation of all the error messages it wraps.
   598  func (m ListenersConfigDumpMultiError) Error() string {
   599  	var msgs []string
   600  	for _, err := range m {
   601  		msgs = append(msgs, err.Error())
   602  	}
   603  	return strings.Join(msgs, "; ")
   604  }
   605  
   606  // AllErrors returns a list of validation violation errors.
   607  func (m ListenersConfigDumpMultiError) AllErrors() []error { return m }
   608  
   609  // ListenersConfigDumpValidationError is the validation error returned by
   610  // ListenersConfigDump.Validate if the designated constraints aren't met.
   611  type ListenersConfigDumpValidationError struct {
   612  	field  string
   613  	reason string
   614  	cause  error
   615  	key    bool
   616  }
   617  
   618  // Field function returns field value.
   619  func (e ListenersConfigDumpValidationError) Field() string { return e.field }
   620  
   621  // Reason function returns reason value.
   622  func (e ListenersConfigDumpValidationError) Reason() string { return e.reason }
   623  
   624  // Cause function returns cause value.
   625  func (e ListenersConfigDumpValidationError) Cause() error { return e.cause }
   626  
   627  // Key function returns key value.
   628  func (e ListenersConfigDumpValidationError) Key() bool { return e.key }
   629  
   630  // ErrorName returns error name.
   631  func (e ListenersConfigDumpValidationError) ErrorName() string {
   632  	return "ListenersConfigDumpValidationError"
   633  }
   634  
   635  // Error satisfies the builtin error interface
   636  func (e ListenersConfigDumpValidationError) Error() string {
   637  	cause := ""
   638  	if e.cause != nil {
   639  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   640  	}
   641  
   642  	key := ""
   643  	if e.key {
   644  		key = "key for "
   645  	}
   646  
   647  	return fmt.Sprintf(
   648  		"invalid %sListenersConfigDump.%s: %s%s",
   649  		key,
   650  		e.field,
   651  		e.reason,
   652  		cause)
   653  }
   654  
   655  var _ error = ListenersConfigDumpValidationError{}
   656  
   657  var _ interface {
   658  	Field() string
   659  	Reason() string
   660  	Key() bool
   661  	Cause() error
   662  	ErrorName() string
   663  } = ListenersConfigDumpValidationError{}
   664  
   665  // Validate checks the field values on ClustersConfigDump with the rules
   666  // defined in the proto definition for this message. If any rules are
   667  // violated, the first error encountered is returned, or nil if there are no violations.
   668  func (m *ClustersConfigDump) Validate() error {
   669  	return m.validate(false)
   670  }
   671  
   672  // ValidateAll checks the field values on ClustersConfigDump with the rules
   673  // defined in the proto definition for this message. If any rules are
   674  // violated, the result is a list of violation errors wrapped in
   675  // ClustersConfigDumpMultiError, or nil if none found.
   676  func (m *ClustersConfigDump) ValidateAll() error {
   677  	return m.validate(true)
   678  }
   679  
   680  func (m *ClustersConfigDump) validate(all bool) error {
   681  	if m == nil {
   682  		return nil
   683  	}
   684  
   685  	var errors []error
   686  
   687  	// no validation rules for VersionInfo
   688  
   689  	for idx, item := range m.GetStaticClusters() {
   690  		_, _ = idx, item
   691  
   692  		if all {
   693  			switch v := interface{}(item).(type) {
   694  			case interface{ ValidateAll() error }:
   695  				if err := v.ValidateAll(); err != nil {
   696  					errors = append(errors, ClustersConfigDumpValidationError{
   697  						field:  fmt.Sprintf("StaticClusters[%v]", idx),
   698  						reason: "embedded message failed validation",
   699  						cause:  err,
   700  					})
   701  				}
   702  			case interface{ Validate() error }:
   703  				if err := v.Validate(); err != nil {
   704  					errors = append(errors, ClustersConfigDumpValidationError{
   705  						field:  fmt.Sprintf("StaticClusters[%v]", idx),
   706  						reason: "embedded message failed validation",
   707  						cause:  err,
   708  					})
   709  				}
   710  			}
   711  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   712  			if err := v.Validate(); err != nil {
   713  				return ClustersConfigDumpValidationError{
   714  					field:  fmt.Sprintf("StaticClusters[%v]", idx),
   715  					reason: "embedded message failed validation",
   716  					cause:  err,
   717  				}
   718  			}
   719  		}
   720  
   721  	}
   722  
   723  	for idx, item := range m.GetDynamicActiveClusters() {
   724  		_, _ = idx, item
   725  
   726  		if all {
   727  			switch v := interface{}(item).(type) {
   728  			case interface{ ValidateAll() error }:
   729  				if err := v.ValidateAll(); err != nil {
   730  					errors = append(errors, ClustersConfigDumpValidationError{
   731  						field:  fmt.Sprintf("DynamicActiveClusters[%v]", idx),
   732  						reason: "embedded message failed validation",
   733  						cause:  err,
   734  					})
   735  				}
   736  			case interface{ Validate() error }:
   737  				if err := v.Validate(); err != nil {
   738  					errors = append(errors, ClustersConfigDumpValidationError{
   739  						field:  fmt.Sprintf("DynamicActiveClusters[%v]", idx),
   740  						reason: "embedded message failed validation",
   741  						cause:  err,
   742  					})
   743  				}
   744  			}
   745  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   746  			if err := v.Validate(); err != nil {
   747  				return ClustersConfigDumpValidationError{
   748  					field:  fmt.Sprintf("DynamicActiveClusters[%v]", idx),
   749  					reason: "embedded message failed validation",
   750  					cause:  err,
   751  				}
   752  			}
   753  		}
   754  
   755  	}
   756  
   757  	for idx, item := range m.GetDynamicWarmingClusters() {
   758  		_, _ = idx, item
   759  
   760  		if all {
   761  			switch v := interface{}(item).(type) {
   762  			case interface{ ValidateAll() error }:
   763  				if err := v.ValidateAll(); err != nil {
   764  					errors = append(errors, ClustersConfigDumpValidationError{
   765  						field:  fmt.Sprintf("DynamicWarmingClusters[%v]", idx),
   766  						reason: "embedded message failed validation",
   767  						cause:  err,
   768  					})
   769  				}
   770  			case interface{ Validate() error }:
   771  				if err := v.Validate(); err != nil {
   772  					errors = append(errors, ClustersConfigDumpValidationError{
   773  						field:  fmt.Sprintf("DynamicWarmingClusters[%v]", idx),
   774  						reason: "embedded message failed validation",
   775  						cause:  err,
   776  					})
   777  				}
   778  			}
   779  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   780  			if err := v.Validate(); err != nil {
   781  				return ClustersConfigDumpValidationError{
   782  					field:  fmt.Sprintf("DynamicWarmingClusters[%v]", idx),
   783  					reason: "embedded message failed validation",
   784  					cause:  err,
   785  				}
   786  			}
   787  		}
   788  
   789  	}
   790  
   791  	if len(errors) > 0 {
   792  		return ClustersConfigDumpMultiError(errors)
   793  	}
   794  
   795  	return nil
   796  }
   797  
   798  // ClustersConfigDumpMultiError is an error wrapping multiple validation errors
   799  // returned by ClustersConfigDump.ValidateAll() if the designated constraints
   800  // aren't met.
   801  type ClustersConfigDumpMultiError []error
   802  
   803  // Error returns a concatenation of all the error messages it wraps.
   804  func (m ClustersConfigDumpMultiError) Error() string {
   805  	var msgs []string
   806  	for _, err := range m {
   807  		msgs = append(msgs, err.Error())
   808  	}
   809  	return strings.Join(msgs, "; ")
   810  }
   811  
   812  // AllErrors returns a list of validation violation errors.
   813  func (m ClustersConfigDumpMultiError) AllErrors() []error { return m }
   814  
   815  // ClustersConfigDumpValidationError is the validation error returned by
   816  // ClustersConfigDump.Validate if the designated constraints aren't met.
   817  type ClustersConfigDumpValidationError struct {
   818  	field  string
   819  	reason string
   820  	cause  error
   821  	key    bool
   822  }
   823  
   824  // Field function returns field value.
   825  func (e ClustersConfigDumpValidationError) Field() string { return e.field }
   826  
   827  // Reason function returns reason value.
   828  func (e ClustersConfigDumpValidationError) Reason() string { return e.reason }
   829  
   830  // Cause function returns cause value.
   831  func (e ClustersConfigDumpValidationError) Cause() error { return e.cause }
   832  
   833  // Key function returns key value.
   834  func (e ClustersConfigDumpValidationError) Key() bool { return e.key }
   835  
   836  // ErrorName returns error name.
   837  func (e ClustersConfigDumpValidationError) ErrorName() string {
   838  	return "ClustersConfigDumpValidationError"
   839  }
   840  
   841  // Error satisfies the builtin error interface
   842  func (e ClustersConfigDumpValidationError) Error() string {
   843  	cause := ""
   844  	if e.cause != nil {
   845  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   846  	}
   847  
   848  	key := ""
   849  	if e.key {
   850  		key = "key for "
   851  	}
   852  
   853  	return fmt.Sprintf(
   854  		"invalid %sClustersConfigDump.%s: %s%s",
   855  		key,
   856  		e.field,
   857  		e.reason,
   858  		cause)
   859  }
   860  
   861  var _ error = ClustersConfigDumpValidationError{}
   862  
   863  var _ interface {
   864  	Field() string
   865  	Reason() string
   866  	Key() bool
   867  	Cause() error
   868  	ErrorName() string
   869  } = ClustersConfigDumpValidationError{}
   870  
   871  // Validate checks the field values on RoutesConfigDump with the rules defined
   872  // in the proto definition for this message. If any rules are violated, the
   873  // first error encountered is returned, or nil if there are no violations.
   874  func (m *RoutesConfigDump) Validate() error {
   875  	return m.validate(false)
   876  }
   877  
   878  // ValidateAll checks the field values on RoutesConfigDump with the rules
   879  // defined in the proto definition for this message. If any rules are
   880  // violated, the result is a list of violation errors wrapped in
   881  // RoutesConfigDumpMultiError, or nil if none found.
   882  func (m *RoutesConfigDump) ValidateAll() error {
   883  	return m.validate(true)
   884  }
   885  
   886  func (m *RoutesConfigDump) validate(all bool) error {
   887  	if m == nil {
   888  		return nil
   889  	}
   890  
   891  	var errors []error
   892  
   893  	for idx, item := range m.GetStaticRouteConfigs() {
   894  		_, _ = idx, item
   895  
   896  		if all {
   897  			switch v := interface{}(item).(type) {
   898  			case interface{ ValidateAll() error }:
   899  				if err := v.ValidateAll(); err != nil {
   900  					errors = append(errors, RoutesConfigDumpValidationError{
   901  						field:  fmt.Sprintf("StaticRouteConfigs[%v]", idx),
   902  						reason: "embedded message failed validation",
   903  						cause:  err,
   904  					})
   905  				}
   906  			case interface{ Validate() error }:
   907  				if err := v.Validate(); err != nil {
   908  					errors = append(errors, RoutesConfigDumpValidationError{
   909  						field:  fmt.Sprintf("StaticRouteConfigs[%v]", idx),
   910  						reason: "embedded message failed validation",
   911  						cause:  err,
   912  					})
   913  				}
   914  			}
   915  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   916  			if err := v.Validate(); err != nil {
   917  				return RoutesConfigDumpValidationError{
   918  					field:  fmt.Sprintf("StaticRouteConfigs[%v]", idx),
   919  					reason: "embedded message failed validation",
   920  					cause:  err,
   921  				}
   922  			}
   923  		}
   924  
   925  	}
   926  
   927  	for idx, item := range m.GetDynamicRouteConfigs() {
   928  		_, _ = idx, item
   929  
   930  		if all {
   931  			switch v := interface{}(item).(type) {
   932  			case interface{ ValidateAll() error }:
   933  				if err := v.ValidateAll(); err != nil {
   934  					errors = append(errors, RoutesConfigDumpValidationError{
   935  						field:  fmt.Sprintf("DynamicRouteConfigs[%v]", idx),
   936  						reason: "embedded message failed validation",
   937  						cause:  err,
   938  					})
   939  				}
   940  			case interface{ Validate() error }:
   941  				if err := v.Validate(); err != nil {
   942  					errors = append(errors, RoutesConfigDumpValidationError{
   943  						field:  fmt.Sprintf("DynamicRouteConfigs[%v]", idx),
   944  						reason: "embedded message failed validation",
   945  						cause:  err,
   946  					})
   947  				}
   948  			}
   949  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   950  			if err := v.Validate(); err != nil {
   951  				return RoutesConfigDumpValidationError{
   952  					field:  fmt.Sprintf("DynamicRouteConfigs[%v]", idx),
   953  					reason: "embedded message failed validation",
   954  					cause:  err,
   955  				}
   956  			}
   957  		}
   958  
   959  	}
   960  
   961  	if len(errors) > 0 {
   962  		return RoutesConfigDumpMultiError(errors)
   963  	}
   964  
   965  	return nil
   966  }
   967  
   968  // RoutesConfigDumpMultiError is an error wrapping multiple validation errors
   969  // returned by RoutesConfigDump.ValidateAll() if the designated constraints
   970  // aren't met.
   971  type RoutesConfigDumpMultiError []error
   972  
   973  // Error returns a concatenation of all the error messages it wraps.
   974  func (m RoutesConfigDumpMultiError) Error() string {
   975  	var msgs []string
   976  	for _, err := range m {
   977  		msgs = append(msgs, err.Error())
   978  	}
   979  	return strings.Join(msgs, "; ")
   980  }
   981  
   982  // AllErrors returns a list of validation violation errors.
   983  func (m RoutesConfigDumpMultiError) AllErrors() []error { return m }
   984  
   985  // RoutesConfigDumpValidationError is the validation error returned by
   986  // RoutesConfigDump.Validate if the designated constraints aren't met.
   987  type RoutesConfigDumpValidationError struct {
   988  	field  string
   989  	reason string
   990  	cause  error
   991  	key    bool
   992  }
   993  
   994  // Field function returns field value.
   995  func (e RoutesConfigDumpValidationError) Field() string { return e.field }
   996  
   997  // Reason function returns reason value.
   998  func (e RoutesConfigDumpValidationError) Reason() string { return e.reason }
   999  
  1000  // Cause function returns cause value.
  1001  func (e RoutesConfigDumpValidationError) Cause() error { return e.cause }
  1002  
  1003  // Key function returns key value.
  1004  func (e RoutesConfigDumpValidationError) Key() bool { return e.key }
  1005  
  1006  // ErrorName returns error name.
  1007  func (e RoutesConfigDumpValidationError) ErrorName() string { return "RoutesConfigDumpValidationError" }
  1008  
  1009  // Error satisfies the builtin error interface
  1010  func (e RoutesConfigDumpValidationError) Error() string {
  1011  	cause := ""
  1012  	if e.cause != nil {
  1013  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1014  	}
  1015  
  1016  	key := ""
  1017  	if e.key {
  1018  		key = "key for "
  1019  	}
  1020  
  1021  	return fmt.Sprintf(
  1022  		"invalid %sRoutesConfigDump.%s: %s%s",
  1023  		key,
  1024  		e.field,
  1025  		e.reason,
  1026  		cause)
  1027  }
  1028  
  1029  var _ error = RoutesConfigDumpValidationError{}
  1030  
  1031  var _ interface {
  1032  	Field() string
  1033  	Reason() string
  1034  	Key() bool
  1035  	Cause() error
  1036  	ErrorName() string
  1037  } = RoutesConfigDumpValidationError{}
  1038  
  1039  // Validate checks the field values on ScopedRoutesConfigDump with the rules
  1040  // defined in the proto definition for this message. If any rules are
  1041  // violated, the first error encountered is returned, or nil if there are no violations.
  1042  func (m *ScopedRoutesConfigDump) Validate() error {
  1043  	return m.validate(false)
  1044  }
  1045  
  1046  // ValidateAll checks the field values on ScopedRoutesConfigDump with the rules
  1047  // defined in the proto definition for this message. If any rules are
  1048  // violated, the result is a list of violation errors wrapped in
  1049  // ScopedRoutesConfigDumpMultiError, or nil if none found.
  1050  func (m *ScopedRoutesConfigDump) ValidateAll() error {
  1051  	return m.validate(true)
  1052  }
  1053  
  1054  func (m *ScopedRoutesConfigDump) validate(all bool) error {
  1055  	if m == nil {
  1056  		return nil
  1057  	}
  1058  
  1059  	var errors []error
  1060  
  1061  	for idx, item := range m.GetInlineScopedRouteConfigs() {
  1062  		_, _ = idx, item
  1063  
  1064  		if all {
  1065  			switch v := interface{}(item).(type) {
  1066  			case interface{ ValidateAll() error }:
  1067  				if err := v.ValidateAll(); err != nil {
  1068  					errors = append(errors, ScopedRoutesConfigDumpValidationError{
  1069  						field:  fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx),
  1070  						reason: "embedded message failed validation",
  1071  						cause:  err,
  1072  					})
  1073  				}
  1074  			case interface{ Validate() error }:
  1075  				if err := v.Validate(); err != nil {
  1076  					errors = append(errors, ScopedRoutesConfigDumpValidationError{
  1077  						field:  fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx),
  1078  						reason: "embedded message failed validation",
  1079  						cause:  err,
  1080  					})
  1081  				}
  1082  			}
  1083  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1084  			if err := v.Validate(); err != nil {
  1085  				return ScopedRoutesConfigDumpValidationError{
  1086  					field:  fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx),
  1087  					reason: "embedded message failed validation",
  1088  					cause:  err,
  1089  				}
  1090  			}
  1091  		}
  1092  
  1093  	}
  1094  
  1095  	for idx, item := range m.GetDynamicScopedRouteConfigs() {
  1096  		_, _ = idx, item
  1097  
  1098  		if all {
  1099  			switch v := interface{}(item).(type) {
  1100  			case interface{ ValidateAll() error }:
  1101  				if err := v.ValidateAll(); err != nil {
  1102  					errors = append(errors, ScopedRoutesConfigDumpValidationError{
  1103  						field:  fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx),
  1104  						reason: "embedded message failed validation",
  1105  						cause:  err,
  1106  					})
  1107  				}
  1108  			case interface{ Validate() error }:
  1109  				if err := v.Validate(); err != nil {
  1110  					errors = append(errors, ScopedRoutesConfigDumpValidationError{
  1111  						field:  fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx),
  1112  						reason: "embedded message failed validation",
  1113  						cause:  err,
  1114  					})
  1115  				}
  1116  			}
  1117  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1118  			if err := v.Validate(); err != nil {
  1119  				return ScopedRoutesConfigDumpValidationError{
  1120  					field:  fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx),
  1121  					reason: "embedded message failed validation",
  1122  					cause:  err,
  1123  				}
  1124  			}
  1125  		}
  1126  
  1127  	}
  1128  
  1129  	if len(errors) > 0 {
  1130  		return ScopedRoutesConfigDumpMultiError(errors)
  1131  	}
  1132  
  1133  	return nil
  1134  }
  1135  
  1136  // ScopedRoutesConfigDumpMultiError is an error wrapping multiple validation
  1137  // errors returned by ScopedRoutesConfigDump.ValidateAll() if the designated
  1138  // constraints aren't met.
  1139  type ScopedRoutesConfigDumpMultiError []error
  1140  
  1141  // Error returns a concatenation of all the error messages it wraps.
  1142  func (m ScopedRoutesConfigDumpMultiError) Error() string {
  1143  	var msgs []string
  1144  	for _, err := range m {
  1145  		msgs = append(msgs, err.Error())
  1146  	}
  1147  	return strings.Join(msgs, "; ")
  1148  }
  1149  
  1150  // AllErrors returns a list of validation violation errors.
  1151  func (m ScopedRoutesConfigDumpMultiError) AllErrors() []error { return m }
  1152  
  1153  // ScopedRoutesConfigDumpValidationError is the validation error returned by
  1154  // ScopedRoutesConfigDump.Validate if the designated constraints aren't met.
  1155  type ScopedRoutesConfigDumpValidationError struct {
  1156  	field  string
  1157  	reason string
  1158  	cause  error
  1159  	key    bool
  1160  }
  1161  
  1162  // Field function returns field value.
  1163  func (e ScopedRoutesConfigDumpValidationError) Field() string { return e.field }
  1164  
  1165  // Reason function returns reason value.
  1166  func (e ScopedRoutesConfigDumpValidationError) Reason() string { return e.reason }
  1167  
  1168  // Cause function returns cause value.
  1169  func (e ScopedRoutesConfigDumpValidationError) Cause() error { return e.cause }
  1170  
  1171  // Key function returns key value.
  1172  func (e ScopedRoutesConfigDumpValidationError) Key() bool { return e.key }
  1173  
  1174  // ErrorName returns error name.
  1175  func (e ScopedRoutesConfigDumpValidationError) ErrorName() string {
  1176  	return "ScopedRoutesConfigDumpValidationError"
  1177  }
  1178  
  1179  // Error satisfies the builtin error interface
  1180  func (e ScopedRoutesConfigDumpValidationError) Error() string {
  1181  	cause := ""
  1182  	if e.cause != nil {
  1183  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1184  	}
  1185  
  1186  	key := ""
  1187  	if e.key {
  1188  		key = "key for "
  1189  	}
  1190  
  1191  	return fmt.Sprintf(
  1192  		"invalid %sScopedRoutesConfigDump.%s: %s%s",
  1193  		key,
  1194  		e.field,
  1195  		e.reason,
  1196  		cause)
  1197  }
  1198  
  1199  var _ error = ScopedRoutesConfigDumpValidationError{}
  1200  
  1201  var _ interface {
  1202  	Field() string
  1203  	Reason() string
  1204  	Key() bool
  1205  	Cause() error
  1206  	ErrorName() string
  1207  } = ScopedRoutesConfigDumpValidationError{}
  1208  
  1209  // Validate checks the field values on SecretsConfigDump with the rules defined
  1210  // in the proto definition for this message. If any rules are violated, the
  1211  // first error encountered is returned, or nil if there are no violations.
  1212  func (m *SecretsConfigDump) Validate() error {
  1213  	return m.validate(false)
  1214  }
  1215  
  1216  // ValidateAll checks the field values on SecretsConfigDump with the rules
  1217  // defined in the proto definition for this message. If any rules are
  1218  // violated, the result is a list of violation errors wrapped in
  1219  // SecretsConfigDumpMultiError, or nil if none found.
  1220  func (m *SecretsConfigDump) ValidateAll() error {
  1221  	return m.validate(true)
  1222  }
  1223  
  1224  func (m *SecretsConfigDump) validate(all bool) error {
  1225  	if m == nil {
  1226  		return nil
  1227  	}
  1228  
  1229  	var errors []error
  1230  
  1231  	for idx, item := range m.GetStaticSecrets() {
  1232  		_, _ = idx, item
  1233  
  1234  		if all {
  1235  			switch v := interface{}(item).(type) {
  1236  			case interface{ ValidateAll() error }:
  1237  				if err := v.ValidateAll(); err != nil {
  1238  					errors = append(errors, SecretsConfigDumpValidationError{
  1239  						field:  fmt.Sprintf("StaticSecrets[%v]", idx),
  1240  						reason: "embedded message failed validation",
  1241  						cause:  err,
  1242  					})
  1243  				}
  1244  			case interface{ Validate() error }:
  1245  				if err := v.Validate(); err != nil {
  1246  					errors = append(errors, SecretsConfigDumpValidationError{
  1247  						field:  fmt.Sprintf("StaticSecrets[%v]", idx),
  1248  						reason: "embedded message failed validation",
  1249  						cause:  err,
  1250  					})
  1251  				}
  1252  			}
  1253  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1254  			if err := v.Validate(); err != nil {
  1255  				return SecretsConfigDumpValidationError{
  1256  					field:  fmt.Sprintf("StaticSecrets[%v]", idx),
  1257  					reason: "embedded message failed validation",
  1258  					cause:  err,
  1259  				}
  1260  			}
  1261  		}
  1262  
  1263  	}
  1264  
  1265  	for idx, item := range m.GetDynamicActiveSecrets() {
  1266  		_, _ = idx, item
  1267  
  1268  		if all {
  1269  			switch v := interface{}(item).(type) {
  1270  			case interface{ ValidateAll() error }:
  1271  				if err := v.ValidateAll(); err != nil {
  1272  					errors = append(errors, SecretsConfigDumpValidationError{
  1273  						field:  fmt.Sprintf("DynamicActiveSecrets[%v]", idx),
  1274  						reason: "embedded message failed validation",
  1275  						cause:  err,
  1276  					})
  1277  				}
  1278  			case interface{ Validate() error }:
  1279  				if err := v.Validate(); err != nil {
  1280  					errors = append(errors, SecretsConfigDumpValidationError{
  1281  						field:  fmt.Sprintf("DynamicActiveSecrets[%v]", idx),
  1282  						reason: "embedded message failed validation",
  1283  						cause:  err,
  1284  					})
  1285  				}
  1286  			}
  1287  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1288  			if err := v.Validate(); err != nil {
  1289  				return SecretsConfigDumpValidationError{
  1290  					field:  fmt.Sprintf("DynamicActiveSecrets[%v]", idx),
  1291  					reason: "embedded message failed validation",
  1292  					cause:  err,
  1293  				}
  1294  			}
  1295  		}
  1296  
  1297  	}
  1298  
  1299  	for idx, item := range m.GetDynamicWarmingSecrets() {
  1300  		_, _ = idx, item
  1301  
  1302  		if all {
  1303  			switch v := interface{}(item).(type) {
  1304  			case interface{ ValidateAll() error }:
  1305  				if err := v.ValidateAll(); err != nil {
  1306  					errors = append(errors, SecretsConfigDumpValidationError{
  1307  						field:  fmt.Sprintf("DynamicWarmingSecrets[%v]", idx),
  1308  						reason: "embedded message failed validation",
  1309  						cause:  err,
  1310  					})
  1311  				}
  1312  			case interface{ Validate() error }:
  1313  				if err := v.Validate(); err != nil {
  1314  					errors = append(errors, SecretsConfigDumpValidationError{
  1315  						field:  fmt.Sprintf("DynamicWarmingSecrets[%v]", idx),
  1316  						reason: "embedded message failed validation",
  1317  						cause:  err,
  1318  					})
  1319  				}
  1320  			}
  1321  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1322  			if err := v.Validate(); err != nil {
  1323  				return SecretsConfigDumpValidationError{
  1324  					field:  fmt.Sprintf("DynamicWarmingSecrets[%v]", idx),
  1325  					reason: "embedded message failed validation",
  1326  					cause:  err,
  1327  				}
  1328  			}
  1329  		}
  1330  
  1331  	}
  1332  
  1333  	if len(errors) > 0 {
  1334  		return SecretsConfigDumpMultiError(errors)
  1335  	}
  1336  
  1337  	return nil
  1338  }
  1339  
  1340  // SecretsConfigDumpMultiError is an error wrapping multiple validation errors
  1341  // returned by SecretsConfigDump.ValidateAll() if the designated constraints
  1342  // aren't met.
  1343  type SecretsConfigDumpMultiError []error
  1344  
  1345  // Error returns a concatenation of all the error messages it wraps.
  1346  func (m SecretsConfigDumpMultiError) Error() string {
  1347  	var msgs []string
  1348  	for _, err := range m {
  1349  		msgs = append(msgs, err.Error())
  1350  	}
  1351  	return strings.Join(msgs, "; ")
  1352  }
  1353  
  1354  // AllErrors returns a list of validation violation errors.
  1355  func (m SecretsConfigDumpMultiError) AllErrors() []error { return m }
  1356  
  1357  // SecretsConfigDumpValidationError is the validation error returned by
  1358  // SecretsConfigDump.Validate if the designated constraints aren't met.
  1359  type SecretsConfigDumpValidationError struct {
  1360  	field  string
  1361  	reason string
  1362  	cause  error
  1363  	key    bool
  1364  }
  1365  
  1366  // Field function returns field value.
  1367  func (e SecretsConfigDumpValidationError) Field() string { return e.field }
  1368  
  1369  // Reason function returns reason value.
  1370  func (e SecretsConfigDumpValidationError) Reason() string { return e.reason }
  1371  
  1372  // Cause function returns cause value.
  1373  func (e SecretsConfigDumpValidationError) Cause() error { return e.cause }
  1374  
  1375  // Key function returns key value.
  1376  func (e SecretsConfigDumpValidationError) Key() bool { return e.key }
  1377  
  1378  // ErrorName returns error name.
  1379  func (e SecretsConfigDumpValidationError) ErrorName() string {
  1380  	return "SecretsConfigDumpValidationError"
  1381  }
  1382  
  1383  // Error satisfies the builtin error interface
  1384  func (e SecretsConfigDumpValidationError) Error() string {
  1385  	cause := ""
  1386  	if e.cause != nil {
  1387  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1388  	}
  1389  
  1390  	key := ""
  1391  	if e.key {
  1392  		key = "key for "
  1393  	}
  1394  
  1395  	return fmt.Sprintf(
  1396  		"invalid %sSecretsConfigDump.%s: %s%s",
  1397  		key,
  1398  		e.field,
  1399  		e.reason,
  1400  		cause)
  1401  }
  1402  
  1403  var _ error = SecretsConfigDumpValidationError{}
  1404  
  1405  var _ interface {
  1406  	Field() string
  1407  	Reason() string
  1408  	Key() bool
  1409  	Cause() error
  1410  	ErrorName() string
  1411  } = SecretsConfigDumpValidationError{}
  1412  
  1413  // Validate checks the field values on ListenersConfigDump_StaticListener with
  1414  // the rules defined in the proto definition for this message. If any rules
  1415  // are violated, the first error encountered is returned, or nil if there are
  1416  // no violations.
  1417  func (m *ListenersConfigDump_StaticListener) Validate() error {
  1418  	return m.validate(false)
  1419  }
  1420  
  1421  // ValidateAll checks the field values on ListenersConfigDump_StaticListener
  1422  // with the rules defined in the proto definition for this message. If any
  1423  // rules are violated, the result is a list of violation errors wrapped in
  1424  // ListenersConfigDump_StaticListenerMultiError, or nil if none found.
  1425  func (m *ListenersConfigDump_StaticListener) ValidateAll() error {
  1426  	return m.validate(true)
  1427  }
  1428  
  1429  func (m *ListenersConfigDump_StaticListener) validate(all bool) error {
  1430  	if m == nil {
  1431  		return nil
  1432  	}
  1433  
  1434  	var errors []error
  1435  
  1436  	if all {
  1437  		switch v := interface{}(m.GetListener()).(type) {
  1438  		case interface{ ValidateAll() error }:
  1439  			if err := v.ValidateAll(); err != nil {
  1440  				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
  1441  					field:  "Listener",
  1442  					reason: "embedded message failed validation",
  1443  					cause:  err,
  1444  				})
  1445  			}
  1446  		case interface{ Validate() error }:
  1447  			if err := v.Validate(); err != nil {
  1448  				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
  1449  					field:  "Listener",
  1450  					reason: "embedded message failed validation",
  1451  					cause:  err,
  1452  				})
  1453  			}
  1454  		}
  1455  	} else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok {
  1456  		if err := v.Validate(); err != nil {
  1457  			return ListenersConfigDump_StaticListenerValidationError{
  1458  				field:  "Listener",
  1459  				reason: "embedded message failed validation",
  1460  				cause:  err,
  1461  			}
  1462  		}
  1463  	}
  1464  
  1465  	if all {
  1466  		switch v := interface{}(m.GetLastUpdated()).(type) {
  1467  		case interface{ ValidateAll() error }:
  1468  			if err := v.ValidateAll(); err != nil {
  1469  				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
  1470  					field:  "LastUpdated",
  1471  					reason: "embedded message failed validation",
  1472  					cause:  err,
  1473  				})
  1474  			}
  1475  		case interface{ Validate() error }:
  1476  			if err := v.Validate(); err != nil {
  1477  				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
  1478  					field:  "LastUpdated",
  1479  					reason: "embedded message failed validation",
  1480  					cause:  err,
  1481  				})
  1482  			}
  1483  		}
  1484  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  1485  		if err := v.Validate(); err != nil {
  1486  			return ListenersConfigDump_StaticListenerValidationError{
  1487  				field:  "LastUpdated",
  1488  				reason: "embedded message failed validation",
  1489  				cause:  err,
  1490  			}
  1491  		}
  1492  	}
  1493  
  1494  	if len(errors) > 0 {
  1495  		return ListenersConfigDump_StaticListenerMultiError(errors)
  1496  	}
  1497  
  1498  	return nil
  1499  }
  1500  
  1501  // ListenersConfigDump_StaticListenerMultiError is an error wrapping multiple
  1502  // validation errors returned by
  1503  // ListenersConfigDump_StaticListener.ValidateAll() if the designated
  1504  // constraints aren't met.
  1505  type ListenersConfigDump_StaticListenerMultiError []error
  1506  
  1507  // Error returns a concatenation of all the error messages it wraps.
  1508  func (m ListenersConfigDump_StaticListenerMultiError) Error() string {
  1509  	var msgs []string
  1510  	for _, err := range m {
  1511  		msgs = append(msgs, err.Error())
  1512  	}
  1513  	return strings.Join(msgs, "; ")
  1514  }
  1515  
  1516  // AllErrors returns a list of validation violation errors.
  1517  func (m ListenersConfigDump_StaticListenerMultiError) AllErrors() []error { return m }
  1518  
  1519  // ListenersConfigDump_StaticListenerValidationError is the validation error
  1520  // returned by ListenersConfigDump_StaticListener.Validate if the designated
  1521  // constraints aren't met.
  1522  type ListenersConfigDump_StaticListenerValidationError struct {
  1523  	field  string
  1524  	reason string
  1525  	cause  error
  1526  	key    bool
  1527  }
  1528  
  1529  // Field function returns field value.
  1530  func (e ListenersConfigDump_StaticListenerValidationError) Field() string { return e.field }
  1531  
  1532  // Reason function returns reason value.
  1533  func (e ListenersConfigDump_StaticListenerValidationError) Reason() string { return e.reason }
  1534  
  1535  // Cause function returns cause value.
  1536  func (e ListenersConfigDump_StaticListenerValidationError) Cause() error { return e.cause }
  1537  
  1538  // Key function returns key value.
  1539  func (e ListenersConfigDump_StaticListenerValidationError) Key() bool { return e.key }
  1540  
  1541  // ErrorName returns error name.
  1542  func (e ListenersConfigDump_StaticListenerValidationError) ErrorName() string {
  1543  	return "ListenersConfigDump_StaticListenerValidationError"
  1544  }
  1545  
  1546  // Error satisfies the builtin error interface
  1547  func (e ListenersConfigDump_StaticListenerValidationError) Error() string {
  1548  	cause := ""
  1549  	if e.cause != nil {
  1550  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1551  	}
  1552  
  1553  	key := ""
  1554  	if e.key {
  1555  		key = "key for "
  1556  	}
  1557  
  1558  	return fmt.Sprintf(
  1559  		"invalid %sListenersConfigDump_StaticListener.%s: %s%s",
  1560  		key,
  1561  		e.field,
  1562  		e.reason,
  1563  		cause)
  1564  }
  1565  
  1566  var _ error = ListenersConfigDump_StaticListenerValidationError{}
  1567  
  1568  var _ interface {
  1569  	Field() string
  1570  	Reason() string
  1571  	Key() bool
  1572  	Cause() error
  1573  	ErrorName() string
  1574  } = ListenersConfigDump_StaticListenerValidationError{}
  1575  
  1576  // Validate checks the field values on ListenersConfigDump_DynamicListenerState
  1577  // with the rules defined in the proto definition for this message. If any
  1578  // rules are violated, the first error encountered is returned, or nil if
  1579  // there are no violations.
  1580  func (m *ListenersConfigDump_DynamicListenerState) Validate() error {
  1581  	return m.validate(false)
  1582  }
  1583  
  1584  // ValidateAll checks the field values on
  1585  // ListenersConfigDump_DynamicListenerState with the rules defined in the
  1586  // proto definition for this message. If any rules are violated, the result is
  1587  // a list of violation errors wrapped in
  1588  // ListenersConfigDump_DynamicListenerStateMultiError, or nil if none found.
  1589  func (m *ListenersConfigDump_DynamicListenerState) ValidateAll() error {
  1590  	return m.validate(true)
  1591  }
  1592  
  1593  func (m *ListenersConfigDump_DynamicListenerState) validate(all bool) error {
  1594  	if m == nil {
  1595  		return nil
  1596  	}
  1597  
  1598  	var errors []error
  1599  
  1600  	// no validation rules for VersionInfo
  1601  
  1602  	if all {
  1603  		switch v := interface{}(m.GetListener()).(type) {
  1604  		case interface{ ValidateAll() error }:
  1605  			if err := v.ValidateAll(); err != nil {
  1606  				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
  1607  					field:  "Listener",
  1608  					reason: "embedded message failed validation",
  1609  					cause:  err,
  1610  				})
  1611  			}
  1612  		case interface{ Validate() error }:
  1613  			if err := v.Validate(); err != nil {
  1614  				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
  1615  					field:  "Listener",
  1616  					reason: "embedded message failed validation",
  1617  					cause:  err,
  1618  				})
  1619  			}
  1620  		}
  1621  	} else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok {
  1622  		if err := v.Validate(); err != nil {
  1623  			return ListenersConfigDump_DynamicListenerStateValidationError{
  1624  				field:  "Listener",
  1625  				reason: "embedded message failed validation",
  1626  				cause:  err,
  1627  			}
  1628  		}
  1629  	}
  1630  
  1631  	if all {
  1632  		switch v := interface{}(m.GetLastUpdated()).(type) {
  1633  		case interface{ ValidateAll() error }:
  1634  			if err := v.ValidateAll(); err != nil {
  1635  				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
  1636  					field:  "LastUpdated",
  1637  					reason: "embedded message failed validation",
  1638  					cause:  err,
  1639  				})
  1640  			}
  1641  		case interface{ Validate() error }:
  1642  			if err := v.Validate(); err != nil {
  1643  				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
  1644  					field:  "LastUpdated",
  1645  					reason: "embedded message failed validation",
  1646  					cause:  err,
  1647  				})
  1648  			}
  1649  		}
  1650  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  1651  		if err := v.Validate(); err != nil {
  1652  			return ListenersConfigDump_DynamicListenerStateValidationError{
  1653  				field:  "LastUpdated",
  1654  				reason: "embedded message failed validation",
  1655  				cause:  err,
  1656  			}
  1657  		}
  1658  	}
  1659  
  1660  	if len(errors) > 0 {
  1661  		return ListenersConfigDump_DynamicListenerStateMultiError(errors)
  1662  	}
  1663  
  1664  	return nil
  1665  }
  1666  
  1667  // ListenersConfigDump_DynamicListenerStateMultiError is an error wrapping
  1668  // multiple validation errors returned by
  1669  // ListenersConfigDump_DynamicListenerState.ValidateAll() if the designated
  1670  // constraints aren't met.
  1671  type ListenersConfigDump_DynamicListenerStateMultiError []error
  1672  
  1673  // Error returns a concatenation of all the error messages it wraps.
  1674  func (m ListenersConfigDump_DynamicListenerStateMultiError) Error() string {
  1675  	var msgs []string
  1676  	for _, err := range m {
  1677  		msgs = append(msgs, err.Error())
  1678  	}
  1679  	return strings.Join(msgs, "; ")
  1680  }
  1681  
  1682  // AllErrors returns a list of validation violation errors.
  1683  func (m ListenersConfigDump_DynamicListenerStateMultiError) AllErrors() []error { return m }
  1684  
  1685  // ListenersConfigDump_DynamicListenerStateValidationError is the validation
  1686  // error returned by ListenersConfigDump_DynamicListenerState.Validate if the
  1687  // designated constraints aren't met.
  1688  type ListenersConfigDump_DynamicListenerStateValidationError struct {
  1689  	field  string
  1690  	reason string
  1691  	cause  error
  1692  	key    bool
  1693  }
  1694  
  1695  // Field function returns field value.
  1696  func (e ListenersConfigDump_DynamicListenerStateValidationError) Field() string { return e.field }
  1697  
  1698  // Reason function returns reason value.
  1699  func (e ListenersConfigDump_DynamicListenerStateValidationError) Reason() string { return e.reason }
  1700  
  1701  // Cause function returns cause value.
  1702  func (e ListenersConfigDump_DynamicListenerStateValidationError) Cause() error { return e.cause }
  1703  
  1704  // Key function returns key value.
  1705  func (e ListenersConfigDump_DynamicListenerStateValidationError) Key() bool { return e.key }
  1706  
  1707  // ErrorName returns error name.
  1708  func (e ListenersConfigDump_DynamicListenerStateValidationError) ErrorName() string {
  1709  	return "ListenersConfigDump_DynamicListenerStateValidationError"
  1710  }
  1711  
  1712  // Error satisfies the builtin error interface
  1713  func (e ListenersConfigDump_DynamicListenerStateValidationError) Error() string {
  1714  	cause := ""
  1715  	if e.cause != nil {
  1716  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1717  	}
  1718  
  1719  	key := ""
  1720  	if e.key {
  1721  		key = "key for "
  1722  	}
  1723  
  1724  	return fmt.Sprintf(
  1725  		"invalid %sListenersConfigDump_DynamicListenerState.%s: %s%s",
  1726  		key,
  1727  		e.field,
  1728  		e.reason,
  1729  		cause)
  1730  }
  1731  
  1732  var _ error = ListenersConfigDump_DynamicListenerStateValidationError{}
  1733  
  1734  var _ interface {
  1735  	Field() string
  1736  	Reason() string
  1737  	Key() bool
  1738  	Cause() error
  1739  	ErrorName() string
  1740  } = ListenersConfigDump_DynamicListenerStateValidationError{}
  1741  
  1742  // Validate checks the field values on ListenersConfigDump_DynamicListener with
  1743  // the rules defined in the proto definition for this message. If any rules
  1744  // are violated, the first error encountered is returned, or nil if there are
  1745  // no violations.
  1746  func (m *ListenersConfigDump_DynamicListener) Validate() error {
  1747  	return m.validate(false)
  1748  }
  1749  
  1750  // ValidateAll checks the field values on ListenersConfigDump_DynamicListener
  1751  // with the rules defined in the proto definition for this message. If any
  1752  // rules are violated, the result is a list of violation errors wrapped in
  1753  // ListenersConfigDump_DynamicListenerMultiError, or nil if none found.
  1754  func (m *ListenersConfigDump_DynamicListener) ValidateAll() error {
  1755  	return m.validate(true)
  1756  }
  1757  
  1758  func (m *ListenersConfigDump_DynamicListener) validate(all bool) error {
  1759  	if m == nil {
  1760  		return nil
  1761  	}
  1762  
  1763  	var errors []error
  1764  
  1765  	// no validation rules for Name
  1766  
  1767  	if all {
  1768  		switch v := interface{}(m.GetActiveState()).(type) {
  1769  		case interface{ ValidateAll() error }:
  1770  			if err := v.ValidateAll(); err != nil {
  1771  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1772  					field:  "ActiveState",
  1773  					reason: "embedded message failed validation",
  1774  					cause:  err,
  1775  				})
  1776  			}
  1777  		case interface{ Validate() error }:
  1778  			if err := v.Validate(); err != nil {
  1779  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1780  					field:  "ActiveState",
  1781  					reason: "embedded message failed validation",
  1782  					cause:  err,
  1783  				})
  1784  			}
  1785  		}
  1786  	} else if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok {
  1787  		if err := v.Validate(); err != nil {
  1788  			return ListenersConfigDump_DynamicListenerValidationError{
  1789  				field:  "ActiveState",
  1790  				reason: "embedded message failed validation",
  1791  				cause:  err,
  1792  			}
  1793  		}
  1794  	}
  1795  
  1796  	if all {
  1797  		switch v := interface{}(m.GetWarmingState()).(type) {
  1798  		case interface{ ValidateAll() error }:
  1799  			if err := v.ValidateAll(); err != nil {
  1800  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1801  					field:  "WarmingState",
  1802  					reason: "embedded message failed validation",
  1803  					cause:  err,
  1804  				})
  1805  			}
  1806  		case interface{ Validate() error }:
  1807  			if err := v.Validate(); err != nil {
  1808  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1809  					field:  "WarmingState",
  1810  					reason: "embedded message failed validation",
  1811  					cause:  err,
  1812  				})
  1813  			}
  1814  		}
  1815  	} else if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok {
  1816  		if err := v.Validate(); err != nil {
  1817  			return ListenersConfigDump_DynamicListenerValidationError{
  1818  				field:  "WarmingState",
  1819  				reason: "embedded message failed validation",
  1820  				cause:  err,
  1821  			}
  1822  		}
  1823  	}
  1824  
  1825  	if all {
  1826  		switch v := interface{}(m.GetDrainingState()).(type) {
  1827  		case interface{ ValidateAll() error }:
  1828  			if err := v.ValidateAll(); err != nil {
  1829  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1830  					field:  "DrainingState",
  1831  					reason: "embedded message failed validation",
  1832  					cause:  err,
  1833  				})
  1834  			}
  1835  		case interface{ Validate() error }:
  1836  			if err := v.Validate(); err != nil {
  1837  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1838  					field:  "DrainingState",
  1839  					reason: "embedded message failed validation",
  1840  					cause:  err,
  1841  				})
  1842  			}
  1843  		}
  1844  	} else if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok {
  1845  		if err := v.Validate(); err != nil {
  1846  			return ListenersConfigDump_DynamicListenerValidationError{
  1847  				field:  "DrainingState",
  1848  				reason: "embedded message failed validation",
  1849  				cause:  err,
  1850  			}
  1851  		}
  1852  	}
  1853  
  1854  	if all {
  1855  		switch v := interface{}(m.GetErrorState()).(type) {
  1856  		case interface{ ValidateAll() error }:
  1857  			if err := v.ValidateAll(); err != nil {
  1858  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1859  					field:  "ErrorState",
  1860  					reason: "embedded message failed validation",
  1861  					cause:  err,
  1862  				})
  1863  			}
  1864  		case interface{ Validate() error }:
  1865  			if err := v.Validate(); err != nil {
  1866  				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
  1867  					field:  "ErrorState",
  1868  					reason: "embedded message failed validation",
  1869  					cause:  err,
  1870  				})
  1871  			}
  1872  		}
  1873  	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
  1874  		if err := v.Validate(); err != nil {
  1875  			return ListenersConfigDump_DynamicListenerValidationError{
  1876  				field:  "ErrorState",
  1877  				reason: "embedded message failed validation",
  1878  				cause:  err,
  1879  			}
  1880  		}
  1881  	}
  1882  
  1883  	if len(errors) > 0 {
  1884  		return ListenersConfigDump_DynamicListenerMultiError(errors)
  1885  	}
  1886  
  1887  	return nil
  1888  }
  1889  
  1890  // ListenersConfigDump_DynamicListenerMultiError is an error wrapping multiple
  1891  // validation errors returned by
  1892  // ListenersConfigDump_DynamicListener.ValidateAll() if the designated
  1893  // constraints aren't met.
  1894  type ListenersConfigDump_DynamicListenerMultiError []error
  1895  
  1896  // Error returns a concatenation of all the error messages it wraps.
  1897  func (m ListenersConfigDump_DynamicListenerMultiError) Error() string {
  1898  	var msgs []string
  1899  	for _, err := range m {
  1900  		msgs = append(msgs, err.Error())
  1901  	}
  1902  	return strings.Join(msgs, "; ")
  1903  }
  1904  
  1905  // AllErrors returns a list of validation violation errors.
  1906  func (m ListenersConfigDump_DynamicListenerMultiError) AllErrors() []error { return m }
  1907  
  1908  // ListenersConfigDump_DynamicListenerValidationError is the validation error
  1909  // returned by ListenersConfigDump_DynamicListener.Validate if the designated
  1910  // constraints aren't met.
  1911  type ListenersConfigDump_DynamicListenerValidationError struct {
  1912  	field  string
  1913  	reason string
  1914  	cause  error
  1915  	key    bool
  1916  }
  1917  
  1918  // Field function returns field value.
  1919  func (e ListenersConfigDump_DynamicListenerValidationError) Field() string { return e.field }
  1920  
  1921  // Reason function returns reason value.
  1922  func (e ListenersConfigDump_DynamicListenerValidationError) Reason() string { return e.reason }
  1923  
  1924  // Cause function returns cause value.
  1925  func (e ListenersConfigDump_DynamicListenerValidationError) Cause() error { return e.cause }
  1926  
  1927  // Key function returns key value.
  1928  func (e ListenersConfigDump_DynamicListenerValidationError) Key() bool { return e.key }
  1929  
  1930  // ErrorName returns error name.
  1931  func (e ListenersConfigDump_DynamicListenerValidationError) ErrorName() string {
  1932  	return "ListenersConfigDump_DynamicListenerValidationError"
  1933  }
  1934  
  1935  // Error satisfies the builtin error interface
  1936  func (e ListenersConfigDump_DynamicListenerValidationError) Error() string {
  1937  	cause := ""
  1938  	if e.cause != nil {
  1939  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1940  	}
  1941  
  1942  	key := ""
  1943  	if e.key {
  1944  		key = "key for "
  1945  	}
  1946  
  1947  	return fmt.Sprintf(
  1948  		"invalid %sListenersConfigDump_DynamicListener.%s: %s%s",
  1949  		key,
  1950  		e.field,
  1951  		e.reason,
  1952  		cause)
  1953  }
  1954  
  1955  var _ error = ListenersConfigDump_DynamicListenerValidationError{}
  1956  
  1957  var _ interface {
  1958  	Field() string
  1959  	Reason() string
  1960  	Key() bool
  1961  	Cause() error
  1962  	ErrorName() string
  1963  } = ListenersConfigDump_DynamicListenerValidationError{}
  1964  
  1965  // Validate checks the field values on ClustersConfigDump_StaticCluster with
  1966  // the rules defined in the proto definition for this message. If any rules
  1967  // are violated, the first error encountered is returned, or nil if there are
  1968  // no violations.
  1969  func (m *ClustersConfigDump_StaticCluster) Validate() error {
  1970  	return m.validate(false)
  1971  }
  1972  
  1973  // ValidateAll checks the field values on ClustersConfigDump_StaticCluster with
  1974  // the rules defined in the proto definition for this message. If any rules
  1975  // are violated, the result is a list of violation errors wrapped in
  1976  // ClustersConfigDump_StaticClusterMultiError, or nil if none found.
  1977  func (m *ClustersConfigDump_StaticCluster) ValidateAll() error {
  1978  	return m.validate(true)
  1979  }
  1980  
  1981  func (m *ClustersConfigDump_StaticCluster) validate(all bool) error {
  1982  	if m == nil {
  1983  		return nil
  1984  	}
  1985  
  1986  	var errors []error
  1987  
  1988  	if all {
  1989  		switch v := interface{}(m.GetCluster()).(type) {
  1990  		case interface{ ValidateAll() error }:
  1991  			if err := v.ValidateAll(); err != nil {
  1992  				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
  1993  					field:  "Cluster",
  1994  					reason: "embedded message failed validation",
  1995  					cause:  err,
  1996  				})
  1997  			}
  1998  		case interface{ Validate() error }:
  1999  			if err := v.Validate(); err != nil {
  2000  				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
  2001  					field:  "Cluster",
  2002  					reason: "embedded message failed validation",
  2003  					cause:  err,
  2004  				})
  2005  			}
  2006  		}
  2007  	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
  2008  		if err := v.Validate(); err != nil {
  2009  			return ClustersConfigDump_StaticClusterValidationError{
  2010  				field:  "Cluster",
  2011  				reason: "embedded message failed validation",
  2012  				cause:  err,
  2013  			}
  2014  		}
  2015  	}
  2016  
  2017  	if all {
  2018  		switch v := interface{}(m.GetLastUpdated()).(type) {
  2019  		case interface{ ValidateAll() error }:
  2020  			if err := v.ValidateAll(); err != nil {
  2021  				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
  2022  					field:  "LastUpdated",
  2023  					reason: "embedded message failed validation",
  2024  					cause:  err,
  2025  				})
  2026  			}
  2027  		case interface{ Validate() error }:
  2028  			if err := v.Validate(); err != nil {
  2029  				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
  2030  					field:  "LastUpdated",
  2031  					reason: "embedded message failed validation",
  2032  					cause:  err,
  2033  				})
  2034  			}
  2035  		}
  2036  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  2037  		if err := v.Validate(); err != nil {
  2038  			return ClustersConfigDump_StaticClusterValidationError{
  2039  				field:  "LastUpdated",
  2040  				reason: "embedded message failed validation",
  2041  				cause:  err,
  2042  			}
  2043  		}
  2044  	}
  2045  
  2046  	if len(errors) > 0 {
  2047  		return ClustersConfigDump_StaticClusterMultiError(errors)
  2048  	}
  2049  
  2050  	return nil
  2051  }
  2052  
  2053  // ClustersConfigDump_StaticClusterMultiError is an error wrapping multiple
  2054  // validation errors returned by
  2055  // ClustersConfigDump_StaticCluster.ValidateAll() if the designated
  2056  // constraints aren't met.
  2057  type ClustersConfigDump_StaticClusterMultiError []error
  2058  
  2059  // Error returns a concatenation of all the error messages it wraps.
  2060  func (m ClustersConfigDump_StaticClusterMultiError) Error() string {
  2061  	var msgs []string
  2062  	for _, err := range m {
  2063  		msgs = append(msgs, err.Error())
  2064  	}
  2065  	return strings.Join(msgs, "; ")
  2066  }
  2067  
  2068  // AllErrors returns a list of validation violation errors.
  2069  func (m ClustersConfigDump_StaticClusterMultiError) AllErrors() []error { return m }
  2070  
  2071  // ClustersConfigDump_StaticClusterValidationError is the validation error
  2072  // returned by ClustersConfigDump_StaticCluster.Validate if the designated
  2073  // constraints aren't met.
  2074  type ClustersConfigDump_StaticClusterValidationError struct {
  2075  	field  string
  2076  	reason string
  2077  	cause  error
  2078  	key    bool
  2079  }
  2080  
  2081  // Field function returns field value.
  2082  func (e ClustersConfigDump_StaticClusterValidationError) Field() string { return e.field }
  2083  
  2084  // Reason function returns reason value.
  2085  func (e ClustersConfigDump_StaticClusterValidationError) Reason() string { return e.reason }
  2086  
  2087  // Cause function returns cause value.
  2088  func (e ClustersConfigDump_StaticClusterValidationError) Cause() error { return e.cause }
  2089  
  2090  // Key function returns key value.
  2091  func (e ClustersConfigDump_StaticClusterValidationError) Key() bool { return e.key }
  2092  
  2093  // ErrorName returns error name.
  2094  func (e ClustersConfigDump_StaticClusterValidationError) ErrorName() string {
  2095  	return "ClustersConfigDump_StaticClusterValidationError"
  2096  }
  2097  
  2098  // Error satisfies the builtin error interface
  2099  func (e ClustersConfigDump_StaticClusterValidationError) Error() string {
  2100  	cause := ""
  2101  	if e.cause != nil {
  2102  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2103  	}
  2104  
  2105  	key := ""
  2106  	if e.key {
  2107  		key = "key for "
  2108  	}
  2109  
  2110  	return fmt.Sprintf(
  2111  		"invalid %sClustersConfigDump_StaticCluster.%s: %s%s",
  2112  		key,
  2113  		e.field,
  2114  		e.reason,
  2115  		cause)
  2116  }
  2117  
  2118  var _ error = ClustersConfigDump_StaticClusterValidationError{}
  2119  
  2120  var _ interface {
  2121  	Field() string
  2122  	Reason() string
  2123  	Key() bool
  2124  	Cause() error
  2125  	ErrorName() string
  2126  } = ClustersConfigDump_StaticClusterValidationError{}
  2127  
  2128  // Validate checks the field values on ClustersConfigDump_DynamicCluster with
  2129  // the rules defined in the proto definition for this message. If any rules
  2130  // are violated, the first error encountered is returned, or nil if there are
  2131  // no violations.
  2132  func (m *ClustersConfigDump_DynamicCluster) Validate() error {
  2133  	return m.validate(false)
  2134  }
  2135  
  2136  // ValidateAll checks the field values on ClustersConfigDump_DynamicCluster
  2137  // with the rules defined in the proto definition for this message. If any
  2138  // rules are violated, the result is a list of violation errors wrapped in
  2139  // ClustersConfigDump_DynamicClusterMultiError, or nil if none found.
  2140  func (m *ClustersConfigDump_DynamicCluster) ValidateAll() error {
  2141  	return m.validate(true)
  2142  }
  2143  
  2144  func (m *ClustersConfigDump_DynamicCluster) validate(all bool) error {
  2145  	if m == nil {
  2146  		return nil
  2147  	}
  2148  
  2149  	var errors []error
  2150  
  2151  	// no validation rules for VersionInfo
  2152  
  2153  	if all {
  2154  		switch v := interface{}(m.GetCluster()).(type) {
  2155  		case interface{ ValidateAll() error }:
  2156  			if err := v.ValidateAll(); err != nil {
  2157  				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
  2158  					field:  "Cluster",
  2159  					reason: "embedded message failed validation",
  2160  					cause:  err,
  2161  				})
  2162  			}
  2163  		case interface{ Validate() error }:
  2164  			if err := v.Validate(); err != nil {
  2165  				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
  2166  					field:  "Cluster",
  2167  					reason: "embedded message failed validation",
  2168  					cause:  err,
  2169  				})
  2170  			}
  2171  		}
  2172  	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
  2173  		if err := v.Validate(); err != nil {
  2174  			return ClustersConfigDump_DynamicClusterValidationError{
  2175  				field:  "Cluster",
  2176  				reason: "embedded message failed validation",
  2177  				cause:  err,
  2178  			}
  2179  		}
  2180  	}
  2181  
  2182  	if all {
  2183  		switch v := interface{}(m.GetLastUpdated()).(type) {
  2184  		case interface{ ValidateAll() error }:
  2185  			if err := v.ValidateAll(); err != nil {
  2186  				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
  2187  					field:  "LastUpdated",
  2188  					reason: "embedded message failed validation",
  2189  					cause:  err,
  2190  				})
  2191  			}
  2192  		case interface{ Validate() error }:
  2193  			if err := v.Validate(); err != nil {
  2194  				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
  2195  					field:  "LastUpdated",
  2196  					reason: "embedded message failed validation",
  2197  					cause:  err,
  2198  				})
  2199  			}
  2200  		}
  2201  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  2202  		if err := v.Validate(); err != nil {
  2203  			return ClustersConfigDump_DynamicClusterValidationError{
  2204  				field:  "LastUpdated",
  2205  				reason: "embedded message failed validation",
  2206  				cause:  err,
  2207  			}
  2208  		}
  2209  	}
  2210  
  2211  	if len(errors) > 0 {
  2212  		return ClustersConfigDump_DynamicClusterMultiError(errors)
  2213  	}
  2214  
  2215  	return nil
  2216  }
  2217  
  2218  // ClustersConfigDump_DynamicClusterMultiError is an error wrapping multiple
  2219  // validation errors returned by
  2220  // ClustersConfigDump_DynamicCluster.ValidateAll() if the designated
  2221  // constraints aren't met.
  2222  type ClustersConfigDump_DynamicClusterMultiError []error
  2223  
  2224  // Error returns a concatenation of all the error messages it wraps.
  2225  func (m ClustersConfigDump_DynamicClusterMultiError) Error() string {
  2226  	var msgs []string
  2227  	for _, err := range m {
  2228  		msgs = append(msgs, err.Error())
  2229  	}
  2230  	return strings.Join(msgs, "; ")
  2231  }
  2232  
  2233  // AllErrors returns a list of validation violation errors.
  2234  func (m ClustersConfigDump_DynamicClusterMultiError) AllErrors() []error { return m }
  2235  
  2236  // ClustersConfigDump_DynamicClusterValidationError is the validation error
  2237  // returned by ClustersConfigDump_DynamicCluster.Validate if the designated
  2238  // constraints aren't met.
  2239  type ClustersConfigDump_DynamicClusterValidationError struct {
  2240  	field  string
  2241  	reason string
  2242  	cause  error
  2243  	key    bool
  2244  }
  2245  
  2246  // Field function returns field value.
  2247  func (e ClustersConfigDump_DynamicClusterValidationError) Field() string { return e.field }
  2248  
  2249  // Reason function returns reason value.
  2250  func (e ClustersConfigDump_DynamicClusterValidationError) Reason() string { return e.reason }
  2251  
  2252  // Cause function returns cause value.
  2253  func (e ClustersConfigDump_DynamicClusterValidationError) Cause() error { return e.cause }
  2254  
  2255  // Key function returns key value.
  2256  func (e ClustersConfigDump_DynamicClusterValidationError) Key() bool { return e.key }
  2257  
  2258  // ErrorName returns error name.
  2259  func (e ClustersConfigDump_DynamicClusterValidationError) ErrorName() string {
  2260  	return "ClustersConfigDump_DynamicClusterValidationError"
  2261  }
  2262  
  2263  // Error satisfies the builtin error interface
  2264  func (e ClustersConfigDump_DynamicClusterValidationError) Error() string {
  2265  	cause := ""
  2266  	if e.cause != nil {
  2267  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2268  	}
  2269  
  2270  	key := ""
  2271  	if e.key {
  2272  		key = "key for "
  2273  	}
  2274  
  2275  	return fmt.Sprintf(
  2276  		"invalid %sClustersConfigDump_DynamicCluster.%s: %s%s",
  2277  		key,
  2278  		e.field,
  2279  		e.reason,
  2280  		cause)
  2281  }
  2282  
  2283  var _ error = ClustersConfigDump_DynamicClusterValidationError{}
  2284  
  2285  var _ interface {
  2286  	Field() string
  2287  	Reason() string
  2288  	Key() bool
  2289  	Cause() error
  2290  	ErrorName() string
  2291  } = ClustersConfigDump_DynamicClusterValidationError{}
  2292  
  2293  // Validate checks the field values on RoutesConfigDump_StaticRouteConfig with
  2294  // the rules defined in the proto definition for this message. If any rules
  2295  // are violated, the first error encountered is returned, or nil if there are
  2296  // no violations.
  2297  func (m *RoutesConfigDump_StaticRouteConfig) Validate() error {
  2298  	return m.validate(false)
  2299  }
  2300  
  2301  // ValidateAll checks the field values on RoutesConfigDump_StaticRouteConfig
  2302  // with the rules defined in the proto definition for this message. If any
  2303  // rules are violated, the result is a list of violation errors wrapped in
  2304  // RoutesConfigDump_StaticRouteConfigMultiError, or nil if none found.
  2305  func (m *RoutesConfigDump_StaticRouteConfig) ValidateAll() error {
  2306  	return m.validate(true)
  2307  }
  2308  
  2309  func (m *RoutesConfigDump_StaticRouteConfig) validate(all bool) error {
  2310  	if m == nil {
  2311  		return nil
  2312  	}
  2313  
  2314  	var errors []error
  2315  
  2316  	if all {
  2317  		switch v := interface{}(m.GetRouteConfig()).(type) {
  2318  		case interface{ ValidateAll() error }:
  2319  			if err := v.ValidateAll(); err != nil {
  2320  				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
  2321  					field:  "RouteConfig",
  2322  					reason: "embedded message failed validation",
  2323  					cause:  err,
  2324  				})
  2325  			}
  2326  		case interface{ Validate() error }:
  2327  			if err := v.Validate(); err != nil {
  2328  				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
  2329  					field:  "RouteConfig",
  2330  					reason: "embedded message failed validation",
  2331  					cause:  err,
  2332  				})
  2333  			}
  2334  		}
  2335  	} else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
  2336  		if err := v.Validate(); err != nil {
  2337  			return RoutesConfigDump_StaticRouteConfigValidationError{
  2338  				field:  "RouteConfig",
  2339  				reason: "embedded message failed validation",
  2340  				cause:  err,
  2341  			}
  2342  		}
  2343  	}
  2344  
  2345  	if all {
  2346  		switch v := interface{}(m.GetLastUpdated()).(type) {
  2347  		case interface{ ValidateAll() error }:
  2348  			if err := v.ValidateAll(); err != nil {
  2349  				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
  2350  					field:  "LastUpdated",
  2351  					reason: "embedded message failed validation",
  2352  					cause:  err,
  2353  				})
  2354  			}
  2355  		case interface{ Validate() error }:
  2356  			if err := v.Validate(); err != nil {
  2357  				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
  2358  					field:  "LastUpdated",
  2359  					reason: "embedded message failed validation",
  2360  					cause:  err,
  2361  				})
  2362  			}
  2363  		}
  2364  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  2365  		if err := v.Validate(); err != nil {
  2366  			return RoutesConfigDump_StaticRouteConfigValidationError{
  2367  				field:  "LastUpdated",
  2368  				reason: "embedded message failed validation",
  2369  				cause:  err,
  2370  			}
  2371  		}
  2372  	}
  2373  
  2374  	if len(errors) > 0 {
  2375  		return RoutesConfigDump_StaticRouteConfigMultiError(errors)
  2376  	}
  2377  
  2378  	return nil
  2379  }
  2380  
  2381  // RoutesConfigDump_StaticRouteConfigMultiError is an error wrapping multiple
  2382  // validation errors returned by
  2383  // RoutesConfigDump_StaticRouteConfig.ValidateAll() if the designated
  2384  // constraints aren't met.
  2385  type RoutesConfigDump_StaticRouteConfigMultiError []error
  2386  
  2387  // Error returns a concatenation of all the error messages it wraps.
  2388  func (m RoutesConfigDump_StaticRouteConfigMultiError) Error() string {
  2389  	var msgs []string
  2390  	for _, err := range m {
  2391  		msgs = append(msgs, err.Error())
  2392  	}
  2393  	return strings.Join(msgs, "; ")
  2394  }
  2395  
  2396  // AllErrors returns a list of validation violation errors.
  2397  func (m RoutesConfigDump_StaticRouteConfigMultiError) AllErrors() []error { return m }
  2398  
  2399  // RoutesConfigDump_StaticRouteConfigValidationError is the validation error
  2400  // returned by RoutesConfigDump_StaticRouteConfig.Validate if the designated
  2401  // constraints aren't met.
  2402  type RoutesConfigDump_StaticRouteConfigValidationError struct {
  2403  	field  string
  2404  	reason string
  2405  	cause  error
  2406  	key    bool
  2407  }
  2408  
  2409  // Field function returns field value.
  2410  func (e RoutesConfigDump_StaticRouteConfigValidationError) Field() string { return e.field }
  2411  
  2412  // Reason function returns reason value.
  2413  func (e RoutesConfigDump_StaticRouteConfigValidationError) Reason() string { return e.reason }
  2414  
  2415  // Cause function returns cause value.
  2416  func (e RoutesConfigDump_StaticRouteConfigValidationError) Cause() error { return e.cause }
  2417  
  2418  // Key function returns key value.
  2419  func (e RoutesConfigDump_StaticRouteConfigValidationError) Key() bool { return e.key }
  2420  
  2421  // ErrorName returns error name.
  2422  func (e RoutesConfigDump_StaticRouteConfigValidationError) ErrorName() string {
  2423  	return "RoutesConfigDump_StaticRouteConfigValidationError"
  2424  }
  2425  
  2426  // Error satisfies the builtin error interface
  2427  func (e RoutesConfigDump_StaticRouteConfigValidationError) Error() string {
  2428  	cause := ""
  2429  	if e.cause != nil {
  2430  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2431  	}
  2432  
  2433  	key := ""
  2434  	if e.key {
  2435  		key = "key for "
  2436  	}
  2437  
  2438  	return fmt.Sprintf(
  2439  		"invalid %sRoutesConfigDump_StaticRouteConfig.%s: %s%s",
  2440  		key,
  2441  		e.field,
  2442  		e.reason,
  2443  		cause)
  2444  }
  2445  
  2446  var _ error = RoutesConfigDump_StaticRouteConfigValidationError{}
  2447  
  2448  var _ interface {
  2449  	Field() string
  2450  	Reason() string
  2451  	Key() bool
  2452  	Cause() error
  2453  	ErrorName() string
  2454  } = RoutesConfigDump_StaticRouteConfigValidationError{}
  2455  
  2456  // Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with
  2457  // the rules defined in the proto definition for this message. If any rules
  2458  // are violated, the first error encountered is returned, or nil if there are
  2459  // no violations.
  2460  func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error {
  2461  	return m.validate(false)
  2462  }
  2463  
  2464  // ValidateAll checks the field values on RoutesConfigDump_DynamicRouteConfig
  2465  // with the rules defined in the proto definition for this message. If any
  2466  // rules are violated, the result is a list of violation errors wrapped in
  2467  // RoutesConfigDump_DynamicRouteConfigMultiError, or nil if none found.
  2468  func (m *RoutesConfigDump_DynamicRouteConfig) ValidateAll() error {
  2469  	return m.validate(true)
  2470  }
  2471  
  2472  func (m *RoutesConfigDump_DynamicRouteConfig) validate(all bool) error {
  2473  	if m == nil {
  2474  		return nil
  2475  	}
  2476  
  2477  	var errors []error
  2478  
  2479  	// no validation rules for VersionInfo
  2480  
  2481  	if all {
  2482  		switch v := interface{}(m.GetRouteConfig()).(type) {
  2483  		case interface{ ValidateAll() error }:
  2484  			if err := v.ValidateAll(); err != nil {
  2485  				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
  2486  					field:  "RouteConfig",
  2487  					reason: "embedded message failed validation",
  2488  					cause:  err,
  2489  				})
  2490  			}
  2491  		case interface{ Validate() error }:
  2492  			if err := v.Validate(); err != nil {
  2493  				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
  2494  					field:  "RouteConfig",
  2495  					reason: "embedded message failed validation",
  2496  					cause:  err,
  2497  				})
  2498  			}
  2499  		}
  2500  	} else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
  2501  		if err := v.Validate(); err != nil {
  2502  			return RoutesConfigDump_DynamicRouteConfigValidationError{
  2503  				field:  "RouteConfig",
  2504  				reason: "embedded message failed validation",
  2505  				cause:  err,
  2506  			}
  2507  		}
  2508  	}
  2509  
  2510  	if all {
  2511  		switch v := interface{}(m.GetLastUpdated()).(type) {
  2512  		case interface{ ValidateAll() error }:
  2513  			if err := v.ValidateAll(); err != nil {
  2514  				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
  2515  					field:  "LastUpdated",
  2516  					reason: "embedded message failed validation",
  2517  					cause:  err,
  2518  				})
  2519  			}
  2520  		case interface{ Validate() error }:
  2521  			if err := v.Validate(); err != nil {
  2522  				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
  2523  					field:  "LastUpdated",
  2524  					reason: "embedded message failed validation",
  2525  					cause:  err,
  2526  				})
  2527  			}
  2528  		}
  2529  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  2530  		if err := v.Validate(); err != nil {
  2531  			return RoutesConfigDump_DynamicRouteConfigValidationError{
  2532  				field:  "LastUpdated",
  2533  				reason: "embedded message failed validation",
  2534  				cause:  err,
  2535  			}
  2536  		}
  2537  	}
  2538  
  2539  	if len(errors) > 0 {
  2540  		return RoutesConfigDump_DynamicRouteConfigMultiError(errors)
  2541  	}
  2542  
  2543  	return nil
  2544  }
  2545  
  2546  // RoutesConfigDump_DynamicRouteConfigMultiError is an error wrapping multiple
  2547  // validation errors returned by
  2548  // RoutesConfigDump_DynamicRouteConfig.ValidateAll() if the designated
  2549  // constraints aren't met.
  2550  type RoutesConfigDump_DynamicRouteConfigMultiError []error
  2551  
  2552  // Error returns a concatenation of all the error messages it wraps.
  2553  func (m RoutesConfigDump_DynamicRouteConfigMultiError) Error() string {
  2554  	var msgs []string
  2555  	for _, err := range m {
  2556  		msgs = append(msgs, err.Error())
  2557  	}
  2558  	return strings.Join(msgs, "; ")
  2559  }
  2560  
  2561  // AllErrors returns a list of validation violation errors.
  2562  func (m RoutesConfigDump_DynamicRouteConfigMultiError) AllErrors() []error { return m }
  2563  
  2564  // RoutesConfigDump_DynamicRouteConfigValidationError is the validation error
  2565  // returned by RoutesConfigDump_DynamicRouteConfig.Validate if the designated
  2566  // constraints aren't met.
  2567  type RoutesConfigDump_DynamicRouteConfigValidationError struct {
  2568  	field  string
  2569  	reason string
  2570  	cause  error
  2571  	key    bool
  2572  }
  2573  
  2574  // Field function returns field value.
  2575  func (e RoutesConfigDump_DynamicRouteConfigValidationError) Field() string { return e.field }
  2576  
  2577  // Reason function returns reason value.
  2578  func (e RoutesConfigDump_DynamicRouteConfigValidationError) Reason() string { return e.reason }
  2579  
  2580  // Cause function returns cause value.
  2581  func (e RoutesConfigDump_DynamicRouteConfigValidationError) Cause() error { return e.cause }
  2582  
  2583  // Key function returns key value.
  2584  func (e RoutesConfigDump_DynamicRouteConfigValidationError) Key() bool { return e.key }
  2585  
  2586  // ErrorName returns error name.
  2587  func (e RoutesConfigDump_DynamicRouteConfigValidationError) ErrorName() string {
  2588  	return "RoutesConfigDump_DynamicRouteConfigValidationError"
  2589  }
  2590  
  2591  // Error satisfies the builtin error interface
  2592  func (e RoutesConfigDump_DynamicRouteConfigValidationError) Error() string {
  2593  	cause := ""
  2594  	if e.cause != nil {
  2595  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2596  	}
  2597  
  2598  	key := ""
  2599  	if e.key {
  2600  		key = "key for "
  2601  	}
  2602  
  2603  	return fmt.Sprintf(
  2604  		"invalid %sRoutesConfigDump_DynamicRouteConfig.%s: %s%s",
  2605  		key,
  2606  		e.field,
  2607  		e.reason,
  2608  		cause)
  2609  }
  2610  
  2611  var _ error = RoutesConfigDump_DynamicRouteConfigValidationError{}
  2612  
  2613  var _ interface {
  2614  	Field() string
  2615  	Reason() string
  2616  	Key() bool
  2617  	Cause() error
  2618  	ErrorName() string
  2619  } = RoutesConfigDump_DynamicRouteConfigValidationError{}
  2620  
  2621  // Validate checks the field values on
  2622  // ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in
  2623  // the proto definition for this message. If any rules are violated, the first
  2624  // error encountered is returned, or nil if there are no violations.
  2625  func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error {
  2626  	return m.validate(false)
  2627  }
  2628  
  2629  // ValidateAll checks the field values on
  2630  // ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in
  2631  // the proto definition for this message. If any rules are violated, the
  2632  // result is a list of violation errors wrapped in
  2633  // ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError, or nil if none found.
  2634  func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ValidateAll() error {
  2635  	return m.validate(true)
  2636  }
  2637  
  2638  func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) validate(all bool) error {
  2639  	if m == nil {
  2640  		return nil
  2641  	}
  2642  
  2643  	var errors []error
  2644  
  2645  	// no validation rules for Name
  2646  
  2647  	for idx, item := range m.GetScopedRouteConfigs() {
  2648  		_, _ = idx, item
  2649  
  2650  		if all {
  2651  			switch v := interface{}(item).(type) {
  2652  			case interface{ ValidateAll() error }:
  2653  				if err := v.ValidateAll(); err != nil {
  2654  					errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
  2655  						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
  2656  						reason: "embedded message failed validation",
  2657  						cause:  err,
  2658  					})
  2659  				}
  2660  			case interface{ Validate() error }:
  2661  				if err := v.Validate(); err != nil {
  2662  					errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
  2663  						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
  2664  						reason: "embedded message failed validation",
  2665  						cause:  err,
  2666  					})
  2667  				}
  2668  			}
  2669  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  2670  			if err := v.Validate(); err != nil {
  2671  				return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
  2672  					field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
  2673  					reason: "embedded message failed validation",
  2674  					cause:  err,
  2675  				}
  2676  			}
  2677  		}
  2678  
  2679  	}
  2680  
  2681  	if all {
  2682  		switch v := interface{}(m.GetLastUpdated()).(type) {
  2683  		case interface{ ValidateAll() error }:
  2684  			if err := v.ValidateAll(); err != nil {
  2685  				errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
  2686  					field:  "LastUpdated",
  2687  					reason: "embedded message failed validation",
  2688  					cause:  err,
  2689  				})
  2690  			}
  2691  		case interface{ Validate() error }:
  2692  			if err := v.Validate(); err != nil {
  2693  				errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
  2694  					field:  "LastUpdated",
  2695  					reason: "embedded message failed validation",
  2696  					cause:  err,
  2697  				})
  2698  			}
  2699  		}
  2700  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  2701  		if err := v.Validate(); err != nil {
  2702  			return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
  2703  				field:  "LastUpdated",
  2704  				reason: "embedded message failed validation",
  2705  				cause:  err,
  2706  			}
  2707  		}
  2708  	}
  2709  
  2710  	if len(errors) > 0 {
  2711  		return ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError(errors)
  2712  	}
  2713  
  2714  	return nil
  2715  }
  2716  
  2717  // ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError is an error
  2718  // wrapping multiple validation errors returned by
  2719  // ScopedRoutesConfigDump_InlineScopedRouteConfigs.ValidateAll() if the
  2720  // designated constraints aren't met.
  2721  type ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError []error
  2722  
  2723  // Error returns a concatenation of all the error messages it wraps.
  2724  func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) Error() string {
  2725  	var msgs []string
  2726  	for _, err := range m {
  2727  		msgs = append(msgs, err.Error())
  2728  	}
  2729  	return strings.Join(msgs, "; ")
  2730  }
  2731  
  2732  // AllErrors returns a list of validation violation errors.
  2733  func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) AllErrors() []error { return m }
  2734  
  2735  // ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError is the
  2736  // validation error returned by
  2737  // ScopedRoutesConfigDump_InlineScopedRouteConfigs.Validate if the designated
  2738  // constraints aren't met.
  2739  type ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError struct {
  2740  	field  string
  2741  	reason string
  2742  	cause  error
  2743  	key    bool
  2744  }
  2745  
  2746  // Field function returns field value.
  2747  func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Field() string {
  2748  	return e.field
  2749  }
  2750  
  2751  // Reason function returns reason value.
  2752  func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Reason() string {
  2753  	return e.reason
  2754  }
  2755  
  2756  // Cause function returns cause value.
  2757  func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Cause() error { return e.cause }
  2758  
  2759  // Key function returns key value.
  2760  func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Key() bool { return e.key }
  2761  
  2762  // ErrorName returns error name.
  2763  func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) ErrorName() string {
  2764  	return "ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError"
  2765  }
  2766  
  2767  // Error satisfies the builtin error interface
  2768  func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Error() string {
  2769  	cause := ""
  2770  	if e.cause != nil {
  2771  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2772  	}
  2773  
  2774  	key := ""
  2775  	if e.key {
  2776  		key = "key for "
  2777  	}
  2778  
  2779  	return fmt.Sprintf(
  2780  		"invalid %sScopedRoutesConfigDump_InlineScopedRouteConfigs.%s: %s%s",
  2781  		key,
  2782  		e.field,
  2783  		e.reason,
  2784  		cause)
  2785  }
  2786  
  2787  var _ error = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{}
  2788  
  2789  var _ interface {
  2790  	Field() string
  2791  	Reason() string
  2792  	Key() bool
  2793  	Cause() error
  2794  	ErrorName() string
  2795  } = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{}
  2796  
  2797  // Validate checks the field values on
  2798  // ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in
  2799  // the proto definition for this message. If any rules are violated, the first
  2800  // error encountered is returned, or nil if there are no violations.
  2801  func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error {
  2802  	return m.validate(false)
  2803  }
  2804  
  2805  // ValidateAll checks the field values on
  2806  // ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in
  2807  // the proto definition for this message. If any rules are violated, the
  2808  // result is a list of violation errors wrapped in
  2809  // ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError, or nil if none found.
  2810  func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ValidateAll() error {
  2811  	return m.validate(true)
  2812  }
  2813  
  2814  func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) validate(all bool) error {
  2815  	if m == nil {
  2816  		return nil
  2817  	}
  2818  
  2819  	var errors []error
  2820  
  2821  	// no validation rules for Name
  2822  
  2823  	// no validation rules for VersionInfo
  2824  
  2825  	for idx, item := range m.GetScopedRouteConfigs() {
  2826  		_, _ = idx, item
  2827  
  2828  		if all {
  2829  			switch v := interface{}(item).(type) {
  2830  			case interface{ ValidateAll() error }:
  2831  				if err := v.ValidateAll(); err != nil {
  2832  					errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
  2833  						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
  2834  						reason: "embedded message failed validation",
  2835  						cause:  err,
  2836  					})
  2837  				}
  2838  			case interface{ Validate() error }:
  2839  				if err := v.Validate(); err != nil {
  2840  					errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
  2841  						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
  2842  						reason: "embedded message failed validation",
  2843  						cause:  err,
  2844  					})
  2845  				}
  2846  			}
  2847  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  2848  			if err := v.Validate(); err != nil {
  2849  				return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
  2850  					field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
  2851  					reason: "embedded message failed validation",
  2852  					cause:  err,
  2853  				}
  2854  			}
  2855  		}
  2856  
  2857  	}
  2858  
  2859  	if all {
  2860  		switch v := interface{}(m.GetLastUpdated()).(type) {
  2861  		case interface{ ValidateAll() error }:
  2862  			if err := v.ValidateAll(); err != nil {
  2863  				errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
  2864  					field:  "LastUpdated",
  2865  					reason: "embedded message failed validation",
  2866  					cause:  err,
  2867  				})
  2868  			}
  2869  		case interface{ Validate() error }:
  2870  			if err := v.Validate(); err != nil {
  2871  				errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
  2872  					field:  "LastUpdated",
  2873  					reason: "embedded message failed validation",
  2874  					cause:  err,
  2875  				})
  2876  			}
  2877  		}
  2878  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  2879  		if err := v.Validate(); err != nil {
  2880  			return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
  2881  				field:  "LastUpdated",
  2882  				reason: "embedded message failed validation",
  2883  				cause:  err,
  2884  			}
  2885  		}
  2886  	}
  2887  
  2888  	if len(errors) > 0 {
  2889  		return ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError(errors)
  2890  	}
  2891  
  2892  	return nil
  2893  }
  2894  
  2895  // ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError is an error
  2896  // wrapping multiple validation errors returned by
  2897  // ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ValidateAll() if the
  2898  // designated constraints aren't met.
  2899  type ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError []error
  2900  
  2901  // Error returns a concatenation of all the error messages it wraps.
  2902  func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) Error() string {
  2903  	var msgs []string
  2904  	for _, err := range m {
  2905  		msgs = append(msgs, err.Error())
  2906  	}
  2907  	return strings.Join(msgs, "; ")
  2908  }
  2909  
  2910  // AllErrors returns a list of validation violation errors.
  2911  func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) AllErrors() []error { return m }
  2912  
  2913  // ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError is the
  2914  // validation error returned by
  2915  // ScopedRoutesConfigDump_DynamicScopedRouteConfigs.Validate if the designated
  2916  // constraints aren't met.
  2917  type ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError struct {
  2918  	field  string
  2919  	reason string
  2920  	cause  error
  2921  	key    bool
  2922  }
  2923  
  2924  // Field function returns field value.
  2925  func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Field() string {
  2926  	return e.field
  2927  }
  2928  
  2929  // Reason function returns reason value.
  2930  func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Reason() string {
  2931  	return e.reason
  2932  }
  2933  
  2934  // Cause function returns cause value.
  2935  func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Cause() error {
  2936  	return e.cause
  2937  }
  2938  
  2939  // Key function returns key value.
  2940  func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Key() bool { return e.key }
  2941  
  2942  // ErrorName returns error name.
  2943  func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) ErrorName() string {
  2944  	return "ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError"
  2945  }
  2946  
  2947  // Error satisfies the builtin error interface
  2948  func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Error() string {
  2949  	cause := ""
  2950  	if e.cause != nil {
  2951  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2952  	}
  2953  
  2954  	key := ""
  2955  	if e.key {
  2956  		key = "key for "
  2957  	}
  2958  
  2959  	return fmt.Sprintf(
  2960  		"invalid %sScopedRoutesConfigDump_DynamicScopedRouteConfigs.%s: %s%s",
  2961  		key,
  2962  		e.field,
  2963  		e.reason,
  2964  		cause)
  2965  }
  2966  
  2967  var _ error = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{}
  2968  
  2969  var _ interface {
  2970  	Field() string
  2971  	Reason() string
  2972  	Key() bool
  2973  	Cause() error
  2974  	ErrorName() string
  2975  } = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{}
  2976  
  2977  // Validate checks the field values on SecretsConfigDump_DynamicSecret with the
  2978  // rules defined in the proto definition for this message. If any rules are
  2979  // violated, the first error encountered is returned, or nil if there are no violations.
  2980  func (m *SecretsConfigDump_DynamicSecret) Validate() error {
  2981  	return m.validate(false)
  2982  }
  2983  
  2984  // ValidateAll checks the field values on SecretsConfigDump_DynamicSecret with
  2985  // the rules defined in the proto definition for this message. If any rules
  2986  // are violated, the result is a list of violation errors wrapped in
  2987  // SecretsConfigDump_DynamicSecretMultiError, or nil if none found.
  2988  func (m *SecretsConfigDump_DynamicSecret) ValidateAll() error {
  2989  	return m.validate(true)
  2990  }
  2991  
  2992  func (m *SecretsConfigDump_DynamicSecret) validate(all bool) error {
  2993  	if m == nil {
  2994  		return nil
  2995  	}
  2996  
  2997  	var errors []error
  2998  
  2999  	// no validation rules for Name
  3000  
  3001  	// no validation rules for VersionInfo
  3002  
  3003  	if all {
  3004  		switch v := interface{}(m.GetLastUpdated()).(type) {
  3005  		case interface{ ValidateAll() error }:
  3006  			if err := v.ValidateAll(); err != nil {
  3007  				errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{
  3008  					field:  "LastUpdated",
  3009  					reason: "embedded message failed validation",
  3010  					cause:  err,
  3011  				})
  3012  			}
  3013  		case interface{ Validate() error }:
  3014  			if err := v.Validate(); err != nil {
  3015  				errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{
  3016  					field:  "LastUpdated",
  3017  					reason: "embedded message failed validation",
  3018  					cause:  err,
  3019  				})
  3020  			}
  3021  		}
  3022  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  3023  		if err := v.Validate(); err != nil {
  3024  			return SecretsConfigDump_DynamicSecretValidationError{
  3025  				field:  "LastUpdated",
  3026  				reason: "embedded message failed validation",
  3027  				cause:  err,
  3028  			}
  3029  		}
  3030  	}
  3031  
  3032  	if all {
  3033  		switch v := interface{}(m.GetSecret()).(type) {
  3034  		case interface{ ValidateAll() error }:
  3035  			if err := v.ValidateAll(); err != nil {
  3036  				errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{
  3037  					field:  "Secret",
  3038  					reason: "embedded message failed validation",
  3039  					cause:  err,
  3040  				})
  3041  			}
  3042  		case interface{ Validate() error }:
  3043  			if err := v.Validate(); err != nil {
  3044  				errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{
  3045  					field:  "Secret",
  3046  					reason: "embedded message failed validation",
  3047  					cause:  err,
  3048  				})
  3049  			}
  3050  		}
  3051  	} else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok {
  3052  		if err := v.Validate(); err != nil {
  3053  			return SecretsConfigDump_DynamicSecretValidationError{
  3054  				field:  "Secret",
  3055  				reason: "embedded message failed validation",
  3056  				cause:  err,
  3057  			}
  3058  		}
  3059  	}
  3060  
  3061  	if len(errors) > 0 {
  3062  		return SecretsConfigDump_DynamicSecretMultiError(errors)
  3063  	}
  3064  
  3065  	return nil
  3066  }
  3067  
  3068  // SecretsConfigDump_DynamicSecretMultiError is an error wrapping multiple
  3069  // validation errors returned by SecretsConfigDump_DynamicSecret.ValidateAll()
  3070  // if the designated constraints aren't met.
  3071  type SecretsConfigDump_DynamicSecretMultiError []error
  3072  
  3073  // Error returns a concatenation of all the error messages it wraps.
  3074  func (m SecretsConfigDump_DynamicSecretMultiError) Error() string {
  3075  	var msgs []string
  3076  	for _, err := range m {
  3077  		msgs = append(msgs, err.Error())
  3078  	}
  3079  	return strings.Join(msgs, "; ")
  3080  }
  3081  
  3082  // AllErrors returns a list of validation violation errors.
  3083  func (m SecretsConfigDump_DynamicSecretMultiError) AllErrors() []error { return m }
  3084  
  3085  // SecretsConfigDump_DynamicSecretValidationError is the validation error
  3086  // returned by SecretsConfigDump_DynamicSecret.Validate if the designated
  3087  // constraints aren't met.
  3088  type SecretsConfigDump_DynamicSecretValidationError struct {
  3089  	field  string
  3090  	reason string
  3091  	cause  error
  3092  	key    bool
  3093  }
  3094  
  3095  // Field function returns field value.
  3096  func (e SecretsConfigDump_DynamicSecretValidationError) Field() string { return e.field }
  3097  
  3098  // Reason function returns reason value.
  3099  func (e SecretsConfigDump_DynamicSecretValidationError) Reason() string { return e.reason }
  3100  
  3101  // Cause function returns cause value.
  3102  func (e SecretsConfigDump_DynamicSecretValidationError) Cause() error { return e.cause }
  3103  
  3104  // Key function returns key value.
  3105  func (e SecretsConfigDump_DynamicSecretValidationError) Key() bool { return e.key }
  3106  
  3107  // ErrorName returns error name.
  3108  func (e SecretsConfigDump_DynamicSecretValidationError) ErrorName() string {
  3109  	return "SecretsConfigDump_DynamicSecretValidationError"
  3110  }
  3111  
  3112  // Error satisfies the builtin error interface
  3113  func (e SecretsConfigDump_DynamicSecretValidationError) Error() string {
  3114  	cause := ""
  3115  	if e.cause != nil {
  3116  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3117  	}
  3118  
  3119  	key := ""
  3120  	if e.key {
  3121  		key = "key for "
  3122  	}
  3123  
  3124  	return fmt.Sprintf(
  3125  		"invalid %sSecretsConfigDump_DynamicSecret.%s: %s%s",
  3126  		key,
  3127  		e.field,
  3128  		e.reason,
  3129  		cause)
  3130  }
  3131  
  3132  var _ error = SecretsConfigDump_DynamicSecretValidationError{}
  3133  
  3134  var _ interface {
  3135  	Field() string
  3136  	Reason() string
  3137  	Key() bool
  3138  	Cause() error
  3139  	ErrorName() string
  3140  } = SecretsConfigDump_DynamicSecretValidationError{}
  3141  
  3142  // Validate checks the field values on SecretsConfigDump_StaticSecret with the
  3143  // rules defined in the proto definition for this message. If any rules are
  3144  // violated, the first error encountered is returned, or nil if there are no violations.
  3145  func (m *SecretsConfigDump_StaticSecret) Validate() error {
  3146  	return m.validate(false)
  3147  }
  3148  
  3149  // ValidateAll checks the field values on SecretsConfigDump_StaticSecret with
  3150  // the rules defined in the proto definition for this message. If any rules
  3151  // are violated, the result is a list of violation errors wrapped in
  3152  // SecretsConfigDump_StaticSecretMultiError, or nil if none found.
  3153  func (m *SecretsConfigDump_StaticSecret) ValidateAll() error {
  3154  	return m.validate(true)
  3155  }
  3156  
  3157  func (m *SecretsConfigDump_StaticSecret) validate(all bool) error {
  3158  	if m == nil {
  3159  		return nil
  3160  	}
  3161  
  3162  	var errors []error
  3163  
  3164  	// no validation rules for Name
  3165  
  3166  	if all {
  3167  		switch v := interface{}(m.GetLastUpdated()).(type) {
  3168  		case interface{ ValidateAll() error }:
  3169  			if err := v.ValidateAll(); err != nil {
  3170  				errors = append(errors, SecretsConfigDump_StaticSecretValidationError{
  3171  					field:  "LastUpdated",
  3172  					reason: "embedded message failed validation",
  3173  					cause:  err,
  3174  				})
  3175  			}
  3176  		case interface{ Validate() error }:
  3177  			if err := v.Validate(); err != nil {
  3178  				errors = append(errors, SecretsConfigDump_StaticSecretValidationError{
  3179  					field:  "LastUpdated",
  3180  					reason: "embedded message failed validation",
  3181  					cause:  err,
  3182  				})
  3183  			}
  3184  		}
  3185  	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
  3186  		if err := v.Validate(); err != nil {
  3187  			return SecretsConfigDump_StaticSecretValidationError{
  3188  				field:  "LastUpdated",
  3189  				reason: "embedded message failed validation",
  3190  				cause:  err,
  3191  			}
  3192  		}
  3193  	}
  3194  
  3195  	if all {
  3196  		switch v := interface{}(m.GetSecret()).(type) {
  3197  		case interface{ ValidateAll() error }:
  3198  			if err := v.ValidateAll(); err != nil {
  3199  				errors = append(errors, SecretsConfigDump_StaticSecretValidationError{
  3200  					field:  "Secret",
  3201  					reason: "embedded message failed validation",
  3202  					cause:  err,
  3203  				})
  3204  			}
  3205  		case interface{ Validate() error }:
  3206  			if err := v.Validate(); err != nil {
  3207  				errors = append(errors, SecretsConfigDump_StaticSecretValidationError{
  3208  					field:  "Secret",
  3209  					reason: "embedded message failed validation",
  3210  					cause:  err,
  3211  				})
  3212  			}
  3213  		}
  3214  	} else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok {
  3215  		if err := v.Validate(); err != nil {
  3216  			return SecretsConfigDump_StaticSecretValidationError{
  3217  				field:  "Secret",
  3218  				reason: "embedded message failed validation",
  3219  				cause:  err,
  3220  			}
  3221  		}
  3222  	}
  3223  
  3224  	if len(errors) > 0 {
  3225  		return SecretsConfigDump_StaticSecretMultiError(errors)
  3226  	}
  3227  
  3228  	return nil
  3229  }
  3230  
  3231  // SecretsConfigDump_StaticSecretMultiError is an error wrapping multiple
  3232  // validation errors returned by SecretsConfigDump_StaticSecret.ValidateAll()
  3233  // if the designated constraints aren't met.
  3234  type SecretsConfigDump_StaticSecretMultiError []error
  3235  
  3236  // Error returns a concatenation of all the error messages it wraps.
  3237  func (m SecretsConfigDump_StaticSecretMultiError) Error() string {
  3238  	var msgs []string
  3239  	for _, err := range m {
  3240  		msgs = append(msgs, err.Error())
  3241  	}
  3242  	return strings.Join(msgs, "; ")
  3243  }
  3244  
  3245  // AllErrors returns a list of validation violation errors.
  3246  func (m SecretsConfigDump_StaticSecretMultiError) AllErrors() []error { return m }
  3247  
  3248  // SecretsConfigDump_StaticSecretValidationError is the validation error
  3249  // returned by SecretsConfigDump_StaticSecret.Validate if the designated
  3250  // constraints aren't met.
  3251  type SecretsConfigDump_StaticSecretValidationError struct {
  3252  	field  string
  3253  	reason string
  3254  	cause  error
  3255  	key    bool
  3256  }
  3257  
  3258  // Field function returns field value.
  3259  func (e SecretsConfigDump_StaticSecretValidationError) Field() string { return e.field }
  3260  
  3261  // Reason function returns reason value.
  3262  func (e SecretsConfigDump_StaticSecretValidationError) Reason() string { return e.reason }
  3263  
  3264  // Cause function returns cause value.
  3265  func (e SecretsConfigDump_StaticSecretValidationError) Cause() error { return e.cause }
  3266  
  3267  // Key function returns key value.
  3268  func (e SecretsConfigDump_StaticSecretValidationError) Key() bool { return e.key }
  3269  
  3270  // ErrorName returns error name.
  3271  func (e SecretsConfigDump_StaticSecretValidationError) ErrorName() string {
  3272  	return "SecretsConfigDump_StaticSecretValidationError"
  3273  }
  3274  
  3275  // Error satisfies the builtin error interface
  3276  func (e SecretsConfigDump_StaticSecretValidationError) Error() string {
  3277  	cause := ""
  3278  	if e.cause != nil {
  3279  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3280  	}
  3281  
  3282  	key := ""
  3283  	if e.key {
  3284  		key = "key for "
  3285  	}
  3286  
  3287  	return fmt.Sprintf(
  3288  		"invalid %sSecretsConfigDump_StaticSecret.%s: %s%s",
  3289  		key,
  3290  		e.field,
  3291  		e.reason,
  3292  		cause)
  3293  }
  3294  
  3295  var _ error = SecretsConfigDump_StaticSecretValidationError{}
  3296  
  3297  var _ interface {
  3298  	Field() string
  3299  	Reason() string
  3300  	Key() bool
  3301  	Cause() error
  3302  	ErrorName() string
  3303  } = SecretsConfigDump_StaticSecretValidationError{}
  3304  

View as plain text