gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/go-control-plane/envoy/config/bootstrap/v3/bootstrap.pb.validate.go (about)

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: envoy/config/bootstrap/v3/bootstrap.proto
     3  
     4  package envoy_config_bootstrap_v3
     5  
     6  import (
     7  	"bytes"
     8  	"errors"
     9  	"fmt"
    10  	"net"
    11  	"net/mail"
    12  	"net/url"
    13  	"regexp"
    14  	"strings"
    15  	"time"
    16  	"unicode/utf8"
    17  
    18  	"google.golang.org/protobuf/types/known/anypb"
    19  )
    20  
    21  // ensure the imports are used
    22  var (
    23  	_ = bytes.MinRead
    24  	_ = errors.New("")
    25  	_ = fmt.Print
    26  	_ = utf8.UTFMax
    27  	_ = (*regexp.Regexp)(nil)
    28  	_ = (*strings.Reader)(nil)
    29  	_ = net.IPv4len
    30  	_ = time.Duration(0)
    31  	_ = (*url.URL)(nil)
    32  	_ = (*mail.Address)(nil)
    33  	_ = anypb.Any{}
    34  )
    35  
    36  // Validate checks the field values on Bootstrap with the rules defined in the
    37  // proto definition for this message. If any rules are violated, an error is returned.
    38  func (m *Bootstrap) Validate() error {
    39  	if m == nil {
    40  		return nil
    41  	}
    42  
    43  	if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
    44  		if err := v.Validate(); err != nil {
    45  			return BootstrapValidationError{
    46  				field:  "Node",
    47  				reason: "embedded message failed validation",
    48  				cause:  err,
    49  			}
    50  		}
    51  	}
    52  
    53  	if v, ok := interface{}(m.GetStaticResources()).(interface{ Validate() error }); ok {
    54  		if err := v.Validate(); err != nil {
    55  			return BootstrapValidationError{
    56  				field:  "StaticResources",
    57  				reason: "embedded message failed validation",
    58  				cause:  err,
    59  			}
    60  		}
    61  	}
    62  
    63  	if v, ok := interface{}(m.GetDynamicResources()).(interface{ Validate() error }); ok {
    64  		if err := v.Validate(); err != nil {
    65  			return BootstrapValidationError{
    66  				field:  "DynamicResources",
    67  				reason: "embedded message failed validation",
    68  				cause:  err,
    69  			}
    70  		}
    71  	}
    72  
    73  	if v, ok := interface{}(m.GetClusterManager()).(interface{ Validate() error }); ok {
    74  		if err := v.Validate(); err != nil {
    75  			return BootstrapValidationError{
    76  				field:  "ClusterManager",
    77  				reason: "embedded message failed validation",
    78  				cause:  err,
    79  			}
    80  		}
    81  	}
    82  
    83  	if v, ok := interface{}(m.GetHdsConfig()).(interface{ Validate() error }); ok {
    84  		if err := v.Validate(); err != nil {
    85  			return BootstrapValidationError{
    86  				field:  "HdsConfig",
    87  				reason: "embedded message failed validation",
    88  				cause:  err,
    89  			}
    90  		}
    91  	}
    92  
    93  	// no validation rules for FlagsPath
    94  
    95  	for idx, item := range m.GetStatsSinks() {
    96  		_, _ = idx, item
    97  
    98  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
    99  			if err := v.Validate(); err != nil {
   100  				return BootstrapValidationError{
   101  					field:  fmt.Sprintf("StatsSinks[%v]", idx),
   102  					reason: "embedded message failed validation",
   103  					cause:  err,
   104  				}
   105  			}
   106  		}
   107  
   108  	}
   109  
   110  	if v, ok := interface{}(m.GetStatsConfig()).(interface{ Validate() error }); ok {
   111  		if err := v.Validate(); err != nil {
   112  			return BootstrapValidationError{
   113  				field:  "StatsConfig",
   114  				reason: "embedded message failed validation",
   115  				cause:  err,
   116  			}
   117  		}
   118  	}
   119  
   120  	if d := m.GetStatsFlushInterval(); d != nil {
   121  		dur, err := d.AsDuration(), d.CheckValid()
   122  		if err != nil {
   123  			return BootstrapValidationError{
   124  				field:  "StatsFlushInterval",
   125  				reason: "value is not a valid duration",
   126  				cause:  err,
   127  			}
   128  		}
   129  
   130  		lt := time.Duration(300*time.Second + 0*time.Nanosecond)
   131  		gte := time.Duration(0*time.Second + 1000000*time.Nanosecond)
   132  
   133  		if dur < gte || dur >= lt {
   134  			return BootstrapValidationError{
   135  				field:  "StatsFlushInterval",
   136  				reason: "value must be inside range [1ms, 5m0s)",
   137  			}
   138  		}
   139  
   140  	}
   141  
   142  	if v, ok := interface{}(m.GetWatchdog()).(interface{ Validate() error }); ok {
   143  		if err := v.Validate(); err != nil {
   144  			return BootstrapValidationError{
   145  				field:  "Watchdog",
   146  				reason: "embedded message failed validation",
   147  				cause:  err,
   148  			}
   149  		}
   150  	}
   151  
   152  	if v, ok := interface{}(m.GetWatchdogs()).(interface{ Validate() error }); ok {
   153  		if err := v.Validate(); err != nil {
   154  			return BootstrapValidationError{
   155  				field:  "Watchdogs",
   156  				reason: "embedded message failed validation",
   157  				cause:  err,
   158  			}
   159  		}
   160  	}
   161  
   162  	if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok {
   163  		if err := v.Validate(); err != nil {
   164  			return BootstrapValidationError{
   165  				field:  "Tracing",
   166  				reason: "embedded message failed validation",
   167  				cause:  err,
   168  			}
   169  		}
   170  	}
   171  
   172  	if v, ok := interface{}(m.GetLayeredRuntime()).(interface{ Validate() error }); ok {
   173  		if err := v.Validate(); err != nil {
   174  			return BootstrapValidationError{
   175  				field:  "LayeredRuntime",
   176  				reason: "embedded message failed validation",
   177  				cause:  err,
   178  			}
   179  		}
   180  	}
   181  
   182  	if v, ok := interface{}(m.GetAdmin()).(interface{ Validate() error }); ok {
   183  		if err := v.Validate(); err != nil {
   184  			return BootstrapValidationError{
   185  				field:  "Admin",
   186  				reason: "embedded message failed validation",
   187  				cause:  err,
   188  			}
   189  		}
   190  	}
   191  
   192  	if v, ok := interface{}(m.GetOverloadManager()).(interface{ Validate() error }); ok {
   193  		if err := v.Validate(); err != nil {
   194  			return BootstrapValidationError{
   195  				field:  "OverloadManager",
   196  				reason: "embedded message failed validation",
   197  				cause:  err,
   198  			}
   199  		}
   200  	}
   201  
   202  	// no validation rules for EnableDispatcherStats
   203  
   204  	// no validation rules for HeaderPrefix
   205  
   206  	if v, ok := interface{}(m.GetStatsServerVersionOverride()).(interface{ Validate() error }); ok {
   207  		if err := v.Validate(); err != nil {
   208  			return BootstrapValidationError{
   209  				field:  "StatsServerVersionOverride",
   210  				reason: "embedded message failed validation",
   211  				cause:  err,
   212  			}
   213  		}
   214  	}
   215  
   216  	// no validation rules for UseTcpForDnsLookups
   217  
   218  	if v, ok := interface{}(m.GetDnsResolutionConfig()).(interface{ Validate() error }); ok {
   219  		if err := v.Validate(); err != nil {
   220  			return BootstrapValidationError{
   221  				field:  "DnsResolutionConfig",
   222  				reason: "embedded message failed validation",
   223  				cause:  err,
   224  			}
   225  		}
   226  	}
   227  
   228  	if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok {
   229  		if err := v.Validate(); err != nil {
   230  			return BootstrapValidationError{
   231  				field:  "TypedDnsResolverConfig",
   232  				reason: "embedded message failed validation",
   233  				cause:  err,
   234  			}
   235  		}
   236  	}
   237  
   238  	for idx, item := range m.GetBootstrapExtensions() {
   239  		_, _ = idx, item
   240  
   241  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   242  			if err := v.Validate(); err != nil {
   243  				return BootstrapValidationError{
   244  					field:  fmt.Sprintf("BootstrapExtensions[%v]", idx),
   245  					reason: "embedded message failed validation",
   246  					cause:  err,
   247  				}
   248  			}
   249  		}
   250  
   251  	}
   252  
   253  	for idx, item := range m.GetFatalActions() {
   254  		_, _ = idx, item
   255  
   256  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   257  			if err := v.Validate(); err != nil {
   258  				return BootstrapValidationError{
   259  					field:  fmt.Sprintf("FatalActions[%v]", idx),
   260  					reason: "embedded message failed validation",
   261  					cause:  err,
   262  				}
   263  			}
   264  		}
   265  
   266  	}
   267  
   268  	for idx, item := range m.GetConfigSources() {
   269  		_, _ = idx, item
   270  
   271  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   272  			if err := v.Validate(); err != nil {
   273  				return BootstrapValidationError{
   274  					field:  fmt.Sprintf("ConfigSources[%v]", idx),
   275  					reason: "embedded message failed validation",
   276  					cause:  err,
   277  				}
   278  			}
   279  		}
   280  
   281  	}
   282  
   283  	if v, ok := interface{}(m.GetDefaultConfigSource()).(interface{ Validate() error }); ok {
   284  		if err := v.Validate(); err != nil {
   285  			return BootstrapValidationError{
   286  				field:  "DefaultConfigSource",
   287  				reason: "embedded message failed validation",
   288  				cause:  err,
   289  			}
   290  		}
   291  	}
   292  
   293  	// no validation rules for DefaultSocketInterface
   294  
   295  	for key, val := range m.GetCertificateProviderInstances() {
   296  		_ = val
   297  
   298  		// no validation rules for CertificateProviderInstances[key]
   299  
   300  		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
   301  			if err := v.Validate(); err != nil {
   302  				return BootstrapValidationError{
   303  					field:  fmt.Sprintf("CertificateProviderInstances[%v]", key),
   304  					reason: "embedded message failed validation",
   305  					cause:  err,
   306  				}
   307  			}
   308  		}
   309  
   310  	}
   311  
   312  	for idx, item := range m.GetInlineHeaders() {
   313  		_, _ = idx, item
   314  
   315  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   316  			if err := v.Validate(); err != nil {
   317  				return BootstrapValidationError{
   318  					field:  fmt.Sprintf("InlineHeaders[%v]", idx),
   319  					reason: "embedded message failed validation",
   320  					cause:  err,
   321  				}
   322  			}
   323  		}
   324  
   325  	}
   326  
   327  	if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedRuntime()).(interface{ Validate() error }); ok {
   328  		if err := v.Validate(); err != nil {
   329  			return BootstrapValidationError{
   330  				field:  "HiddenEnvoyDeprecatedRuntime",
   331  				reason: "embedded message failed validation",
   332  				cause:  err,
   333  			}
   334  		}
   335  	}
   336  
   337  	switch m.StatsFlush.(type) {
   338  
   339  	case *Bootstrap_StatsFlushOnAdmin:
   340  
   341  		if m.GetStatsFlushOnAdmin() != true {
   342  			return BootstrapValidationError{
   343  				field:  "StatsFlushOnAdmin",
   344  				reason: "value must equal true",
   345  			}
   346  		}
   347  
   348  	}
   349  
   350  	return nil
   351  }
   352  
   353  // BootstrapValidationError is the validation error returned by
   354  // Bootstrap.Validate if the designated constraints aren't met.
   355  type BootstrapValidationError struct {
   356  	field  string
   357  	reason string
   358  	cause  error
   359  	key    bool
   360  }
   361  
   362  // Field function returns field value.
   363  func (e BootstrapValidationError) Field() string { return e.field }
   364  
   365  // Reason function returns reason value.
   366  func (e BootstrapValidationError) Reason() string { return e.reason }
   367  
   368  // Cause function returns cause value.
   369  func (e BootstrapValidationError) Cause() error { return e.cause }
   370  
   371  // Key function returns key value.
   372  func (e BootstrapValidationError) Key() bool { return e.key }
   373  
   374  // ErrorName returns error name.
   375  func (e BootstrapValidationError) ErrorName() string { return "BootstrapValidationError" }
   376  
   377  // Error satisfies the builtin error interface
   378  func (e BootstrapValidationError) Error() string {
   379  	cause := ""
   380  	if e.cause != nil {
   381  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   382  	}
   383  
   384  	key := ""
   385  	if e.key {
   386  		key = "key for "
   387  	}
   388  
   389  	return fmt.Sprintf(
   390  		"invalid %sBootstrap.%s: %s%s",
   391  		key,
   392  		e.field,
   393  		e.reason,
   394  		cause)
   395  }
   396  
   397  var _ error = BootstrapValidationError{}
   398  
   399  var _ interface {
   400  	Field() string
   401  	Reason() string
   402  	Key() bool
   403  	Cause() error
   404  	ErrorName() string
   405  } = BootstrapValidationError{}
   406  
   407  // Validate checks the field values on Admin with the rules defined in the
   408  // proto definition for this message. If any rules are violated, an error is returned.
   409  func (m *Admin) Validate() error {
   410  	if m == nil {
   411  		return nil
   412  	}
   413  
   414  	for idx, item := range m.GetAccessLog() {
   415  		_, _ = idx, item
   416  
   417  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   418  			if err := v.Validate(); err != nil {
   419  				return AdminValidationError{
   420  					field:  fmt.Sprintf("AccessLog[%v]", idx),
   421  					reason: "embedded message failed validation",
   422  					cause:  err,
   423  				}
   424  			}
   425  		}
   426  
   427  	}
   428  
   429  	// no validation rules for AccessLogPath
   430  
   431  	// no validation rules for ProfilePath
   432  
   433  	if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok {
   434  		if err := v.Validate(); err != nil {
   435  			return AdminValidationError{
   436  				field:  "Address",
   437  				reason: "embedded message failed validation",
   438  				cause:  err,
   439  			}
   440  		}
   441  	}
   442  
   443  	for idx, item := range m.GetSocketOptions() {
   444  		_, _ = idx, item
   445  
   446  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   447  			if err := v.Validate(); err != nil {
   448  				return AdminValidationError{
   449  					field:  fmt.Sprintf("SocketOptions[%v]", idx),
   450  					reason: "embedded message failed validation",
   451  					cause:  err,
   452  				}
   453  			}
   454  		}
   455  
   456  	}
   457  
   458  	return nil
   459  }
   460  
   461  // AdminValidationError is the validation error returned by Admin.Validate if
   462  // the designated constraints aren't met.
   463  type AdminValidationError struct {
   464  	field  string
   465  	reason string
   466  	cause  error
   467  	key    bool
   468  }
   469  
   470  // Field function returns field value.
   471  func (e AdminValidationError) Field() string { return e.field }
   472  
   473  // Reason function returns reason value.
   474  func (e AdminValidationError) Reason() string { return e.reason }
   475  
   476  // Cause function returns cause value.
   477  func (e AdminValidationError) Cause() error { return e.cause }
   478  
   479  // Key function returns key value.
   480  func (e AdminValidationError) Key() bool { return e.key }
   481  
   482  // ErrorName returns error name.
   483  func (e AdminValidationError) ErrorName() string { return "AdminValidationError" }
   484  
   485  // Error satisfies the builtin error interface
   486  func (e AdminValidationError) Error() string {
   487  	cause := ""
   488  	if e.cause != nil {
   489  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   490  	}
   491  
   492  	key := ""
   493  	if e.key {
   494  		key = "key for "
   495  	}
   496  
   497  	return fmt.Sprintf(
   498  		"invalid %sAdmin.%s: %s%s",
   499  		key,
   500  		e.field,
   501  		e.reason,
   502  		cause)
   503  }
   504  
   505  var _ error = AdminValidationError{}
   506  
   507  var _ interface {
   508  	Field() string
   509  	Reason() string
   510  	Key() bool
   511  	Cause() error
   512  	ErrorName() string
   513  } = AdminValidationError{}
   514  
   515  // Validate checks the field values on ClusterManager with the rules defined in
   516  // the proto definition for this message. If any rules are violated, an error
   517  // is returned.
   518  func (m *ClusterManager) Validate() error {
   519  	if m == nil {
   520  		return nil
   521  	}
   522  
   523  	// no validation rules for LocalClusterName
   524  
   525  	if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok {
   526  		if err := v.Validate(); err != nil {
   527  			return ClusterManagerValidationError{
   528  				field:  "OutlierDetection",
   529  				reason: "embedded message failed validation",
   530  				cause:  err,
   531  			}
   532  		}
   533  	}
   534  
   535  	if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok {
   536  		if err := v.Validate(); err != nil {
   537  			return ClusterManagerValidationError{
   538  				field:  "UpstreamBindConfig",
   539  				reason: "embedded message failed validation",
   540  				cause:  err,
   541  			}
   542  		}
   543  	}
   544  
   545  	if v, ok := interface{}(m.GetLoadStatsConfig()).(interface{ Validate() error }); ok {
   546  		if err := v.Validate(); err != nil {
   547  			return ClusterManagerValidationError{
   548  				field:  "LoadStatsConfig",
   549  				reason: "embedded message failed validation",
   550  				cause:  err,
   551  			}
   552  		}
   553  	}
   554  
   555  	return nil
   556  }
   557  
   558  // ClusterManagerValidationError is the validation error returned by
   559  // ClusterManager.Validate if the designated constraints aren't met.
   560  type ClusterManagerValidationError struct {
   561  	field  string
   562  	reason string
   563  	cause  error
   564  	key    bool
   565  }
   566  
   567  // Field function returns field value.
   568  func (e ClusterManagerValidationError) Field() string { return e.field }
   569  
   570  // Reason function returns reason value.
   571  func (e ClusterManagerValidationError) Reason() string { return e.reason }
   572  
   573  // Cause function returns cause value.
   574  func (e ClusterManagerValidationError) Cause() error { return e.cause }
   575  
   576  // Key function returns key value.
   577  func (e ClusterManagerValidationError) Key() bool { return e.key }
   578  
   579  // ErrorName returns error name.
   580  func (e ClusterManagerValidationError) ErrorName() string { return "ClusterManagerValidationError" }
   581  
   582  // Error satisfies the builtin error interface
   583  func (e ClusterManagerValidationError) Error() string {
   584  	cause := ""
   585  	if e.cause != nil {
   586  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   587  	}
   588  
   589  	key := ""
   590  	if e.key {
   591  		key = "key for "
   592  	}
   593  
   594  	return fmt.Sprintf(
   595  		"invalid %sClusterManager.%s: %s%s",
   596  		key,
   597  		e.field,
   598  		e.reason,
   599  		cause)
   600  }
   601  
   602  var _ error = ClusterManagerValidationError{}
   603  
   604  var _ interface {
   605  	Field() string
   606  	Reason() string
   607  	Key() bool
   608  	Cause() error
   609  	ErrorName() string
   610  } = ClusterManagerValidationError{}
   611  
   612  // Validate checks the field values on Watchdogs with the rules defined in the
   613  // proto definition for this message. If any rules are violated, an error is returned.
   614  func (m *Watchdogs) Validate() error {
   615  	if m == nil {
   616  		return nil
   617  	}
   618  
   619  	if v, ok := interface{}(m.GetMainThreadWatchdog()).(interface{ Validate() error }); ok {
   620  		if err := v.Validate(); err != nil {
   621  			return WatchdogsValidationError{
   622  				field:  "MainThreadWatchdog",
   623  				reason: "embedded message failed validation",
   624  				cause:  err,
   625  			}
   626  		}
   627  	}
   628  
   629  	if v, ok := interface{}(m.GetWorkerWatchdog()).(interface{ Validate() error }); ok {
   630  		if err := v.Validate(); err != nil {
   631  			return WatchdogsValidationError{
   632  				field:  "WorkerWatchdog",
   633  				reason: "embedded message failed validation",
   634  				cause:  err,
   635  			}
   636  		}
   637  	}
   638  
   639  	return nil
   640  }
   641  
   642  // WatchdogsValidationError is the validation error returned by
   643  // Watchdogs.Validate if the designated constraints aren't met.
   644  type WatchdogsValidationError struct {
   645  	field  string
   646  	reason string
   647  	cause  error
   648  	key    bool
   649  }
   650  
   651  // Field function returns field value.
   652  func (e WatchdogsValidationError) Field() string { return e.field }
   653  
   654  // Reason function returns reason value.
   655  func (e WatchdogsValidationError) Reason() string { return e.reason }
   656  
   657  // Cause function returns cause value.
   658  func (e WatchdogsValidationError) Cause() error { return e.cause }
   659  
   660  // Key function returns key value.
   661  func (e WatchdogsValidationError) Key() bool { return e.key }
   662  
   663  // ErrorName returns error name.
   664  func (e WatchdogsValidationError) ErrorName() string { return "WatchdogsValidationError" }
   665  
   666  // Error satisfies the builtin error interface
   667  func (e WatchdogsValidationError) Error() string {
   668  	cause := ""
   669  	if e.cause != nil {
   670  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   671  	}
   672  
   673  	key := ""
   674  	if e.key {
   675  		key = "key for "
   676  	}
   677  
   678  	return fmt.Sprintf(
   679  		"invalid %sWatchdogs.%s: %s%s",
   680  		key,
   681  		e.field,
   682  		e.reason,
   683  		cause)
   684  }
   685  
   686  var _ error = WatchdogsValidationError{}
   687  
   688  var _ interface {
   689  	Field() string
   690  	Reason() string
   691  	Key() bool
   692  	Cause() error
   693  	ErrorName() string
   694  } = WatchdogsValidationError{}
   695  
   696  // Validate checks the field values on Watchdog with the rules defined in the
   697  // proto definition for this message. If any rules are violated, an error is returned.
   698  func (m *Watchdog) Validate() error {
   699  	if m == nil {
   700  		return nil
   701  	}
   702  
   703  	for idx, item := range m.GetActions() {
   704  		_, _ = idx, item
   705  
   706  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   707  			if err := v.Validate(); err != nil {
   708  				return WatchdogValidationError{
   709  					field:  fmt.Sprintf("Actions[%v]", idx),
   710  					reason: "embedded message failed validation",
   711  					cause:  err,
   712  				}
   713  			}
   714  		}
   715  
   716  	}
   717  
   718  	if v, ok := interface{}(m.GetMissTimeout()).(interface{ Validate() error }); ok {
   719  		if err := v.Validate(); err != nil {
   720  			return WatchdogValidationError{
   721  				field:  "MissTimeout",
   722  				reason: "embedded message failed validation",
   723  				cause:  err,
   724  			}
   725  		}
   726  	}
   727  
   728  	if v, ok := interface{}(m.GetMegamissTimeout()).(interface{ Validate() error }); ok {
   729  		if err := v.Validate(); err != nil {
   730  			return WatchdogValidationError{
   731  				field:  "MegamissTimeout",
   732  				reason: "embedded message failed validation",
   733  				cause:  err,
   734  			}
   735  		}
   736  	}
   737  
   738  	if v, ok := interface{}(m.GetKillTimeout()).(interface{ Validate() error }); ok {
   739  		if err := v.Validate(); err != nil {
   740  			return WatchdogValidationError{
   741  				field:  "KillTimeout",
   742  				reason: "embedded message failed validation",
   743  				cause:  err,
   744  			}
   745  		}
   746  	}
   747  
   748  	if d := m.GetMaxKillTimeoutJitter(); d != nil {
   749  		dur, err := d.AsDuration(), d.CheckValid()
   750  		if err != nil {
   751  			return WatchdogValidationError{
   752  				field:  "MaxKillTimeoutJitter",
   753  				reason: "value is not a valid duration",
   754  				cause:  err,
   755  			}
   756  		}
   757  
   758  		gte := time.Duration(0*time.Second + 0*time.Nanosecond)
   759  
   760  		if dur < gte {
   761  			return WatchdogValidationError{
   762  				field:  "MaxKillTimeoutJitter",
   763  				reason: "value must be greater than or equal to 0s",
   764  			}
   765  		}
   766  
   767  	}
   768  
   769  	if v, ok := interface{}(m.GetMultikillTimeout()).(interface{ Validate() error }); ok {
   770  		if err := v.Validate(); err != nil {
   771  			return WatchdogValidationError{
   772  				field:  "MultikillTimeout",
   773  				reason: "embedded message failed validation",
   774  				cause:  err,
   775  			}
   776  		}
   777  	}
   778  
   779  	if v, ok := interface{}(m.GetMultikillThreshold()).(interface{ Validate() error }); ok {
   780  		if err := v.Validate(); err != nil {
   781  			return WatchdogValidationError{
   782  				field:  "MultikillThreshold",
   783  				reason: "embedded message failed validation",
   784  				cause:  err,
   785  			}
   786  		}
   787  	}
   788  
   789  	return nil
   790  }
   791  
   792  // WatchdogValidationError is the validation error returned by
   793  // Watchdog.Validate if the designated constraints aren't met.
   794  type WatchdogValidationError struct {
   795  	field  string
   796  	reason string
   797  	cause  error
   798  	key    bool
   799  }
   800  
   801  // Field function returns field value.
   802  func (e WatchdogValidationError) Field() string { return e.field }
   803  
   804  // Reason function returns reason value.
   805  func (e WatchdogValidationError) Reason() string { return e.reason }
   806  
   807  // Cause function returns cause value.
   808  func (e WatchdogValidationError) Cause() error { return e.cause }
   809  
   810  // Key function returns key value.
   811  func (e WatchdogValidationError) Key() bool { return e.key }
   812  
   813  // ErrorName returns error name.
   814  func (e WatchdogValidationError) ErrorName() string { return "WatchdogValidationError" }
   815  
   816  // Error satisfies the builtin error interface
   817  func (e WatchdogValidationError) Error() string {
   818  	cause := ""
   819  	if e.cause != nil {
   820  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   821  	}
   822  
   823  	key := ""
   824  	if e.key {
   825  		key = "key for "
   826  	}
   827  
   828  	return fmt.Sprintf(
   829  		"invalid %sWatchdog.%s: %s%s",
   830  		key,
   831  		e.field,
   832  		e.reason,
   833  		cause)
   834  }
   835  
   836  var _ error = WatchdogValidationError{}
   837  
   838  var _ interface {
   839  	Field() string
   840  	Reason() string
   841  	Key() bool
   842  	Cause() error
   843  	ErrorName() string
   844  } = WatchdogValidationError{}
   845  
   846  // Validate checks the field values on FatalAction with the rules defined in
   847  // the proto definition for this message. If any rules are violated, an error
   848  // is returned.
   849  func (m *FatalAction) Validate() error {
   850  	if m == nil {
   851  		return nil
   852  	}
   853  
   854  	if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok {
   855  		if err := v.Validate(); err != nil {
   856  			return FatalActionValidationError{
   857  				field:  "Config",
   858  				reason: "embedded message failed validation",
   859  				cause:  err,
   860  			}
   861  		}
   862  	}
   863  
   864  	return nil
   865  }
   866  
   867  // FatalActionValidationError is the validation error returned by
   868  // FatalAction.Validate if the designated constraints aren't met.
   869  type FatalActionValidationError struct {
   870  	field  string
   871  	reason string
   872  	cause  error
   873  	key    bool
   874  }
   875  
   876  // Field function returns field value.
   877  func (e FatalActionValidationError) Field() string { return e.field }
   878  
   879  // Reason function returns reason value.
   880  func (e FatalActionValidationError) Reason() string { return e.reason }
   881  
   882  // Cause function returns cause value.
   883  func (e FatalActionValidationError) Cause() error { return e.cause }
   884  
   885  // Key function returns key value.
   886  func (e FatalActionValidationError) Key() bool { return e.key }
   887  
   888  // ErrorName returns error name.
   889  func (e FatalActionValidationError) ErrorName() string { return "FatalActionValidationError" }
   890  
   891  // Error satisfies the builtin error interface
   892  func (e FatalActionValidationError) Error() string {
   893  	cause := ""
   894  	if e.cause != nil {
   895  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   896  	}
   897  
   898  	key := ""
   899  	if e.key {
   900  		key = "key for "
   901  	}
   902  
   903  	return fmt.Sprintf(
   904  		"invalid %sFatalAction.%s: %s%s",
   905  		key,
   906  		e.field,
   907  		e.reason,
   908  		cause)
   909  }
   910  
   911  var _ error = FatalActionValidationError{}
   912  
   913  var _ interface {
   914  	Field() string
   915  	Reason() string
   916  	Key() bool
   917  	Cause() error
   918  	ErrorName() string
   919  } = FatalActionValidationError{}
   920  
   921  // Validate checks the field values on Runtime with the rules defined in the
   922  // proto definition for this message. If any rules are violated, an error is returned.
   923  func (m *Runtime) Validate() error {
   924  	if m == nil {
   925  		return nil
   926  	}
   927  
   928  	// no validation rules for SymlinkRoot
   929  
   930  	// no validation rules for Subdirectory
   931  
   932  	// no validation rules for OverrideSubdirectory
   933  
   934  	if v, ok := interface{}(m.GetBase()).(interface{ Validate() error }); ok {
   935  		if err := v.Validate(); err != nil {
   936  			return RuntimeValidationError{
   937  				field:  "Base",
   938  				reason: "embedded message failed validation",
   939  				cause:  err,
   940  			}
   941  		}
   942  	}
   943  
   944  	return nil
   945  }
   946  
   947  // RuntimeValidationError is the validation error returned by Runtime.Validate
   948  // if the designated constraints aren't met.
   949  type RuntimeValidationError struct {
   950  	field  string
   951  	reason string
   952  	cause  error
   953  	key    bool
   954  }
   955  
   956  // Field function returns field value.
   957  func (e RuntimeValidationError) Field() string { return e.field }
   958  
   959  // Reason function returns reason value.
   960  func (e RuntimeValidationError) Reason() string { return e.reason }
   961  
   962  // Cause function returns cause value.
   963  func (e RuntimeValidationError) Cause() error { return e.cause }
   964  
   965  // Key function returns key value.
   966  func (e RuntimeValidationError) Key() bool { return e.key }
   967  
   968  // ErrorName returns error name.
   969  func (e RuntimeValidationError) ErrorName() string { return "RuntimeValidationError" }
   970  
   971  // Error satisfies the builtin error interface
   972  func (e RuntimeValidationError) Error() string {
   973  	cause := ""
   974  	if e.cause != nil {
   975  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   976  	}
   977  
   978  	key := ""
   979  	if e.key {
   980  		key = "key for "
   981  	}
   982  
   983  	return fmt.Sprintf(
   984  		"invalid %sRuntime.%s: %s%s",
   985  		key,
   986  		e.field,
   987  		e.reason,
   988  		cause)
   989  }
   990  
   991  var _ error = RuntimeValidationError{}
   992  
   993  var _ interface {
   994  	Field() string
   995  	Reason() string
   996  	Key() bool
   997  	Cause() error
   998  	ErrorName() string
   999  } = RuntimeValidationError{}
  1000  
  1001  // Validate checks the field values on RuntimeLayer with the rules defined in
  1002  // the proto definition for this message. If any rules are violated, an error
  1003  // is returned.
  1004  func (m *RuntimeLayer) Validate() error {
  1005  	if m == nil {
  1006  		return nil
  1007  	}
  1008  
  1009  	if utf8.RuneCountInString(m.GetName()) < 1 {
  1010  		return RuntimeLayerValidationError{
  1011  			field:  "Name",
  1012  			reason: "value length must be at least 1 runes",
  1013  		}
  1014  	}
  1015  
  1016  	switch m.LayerSpecifier.(type) {
  1017  
  1018  	case *RuntimeLayer_StaticLayer:
  1019  
  1020  		if v, ok := interface{}(m.GetStaticLayer()).(interface{ Validate() error }); ok {
  1021  			if err := v.Validate(); err != nil {
  1022  				return RuntimeLayerValidationError{
  1023  					field:  "StaticLayer",
  1024  					reason: "embedded message failed validation",
  1025  					cause:  err,
  1026  				}
  1027  			}
  1028  		}
  1029  
  1030  	case *RuntimeLayer_DiskLayer_:
  1031  
  1032  		if v, ok := interface{}(m.GetDiskLayer()).(interface{ Validate() error }); ok {
  1033  			if err := v.Validate(); err != nil {
  1034  				return RuntimeLayerValidationError{
  1035  					field:  "DiskLayer",
  1036  					reason: "embedded message failed validation",
  1037  					cause:  err,
  1038  				}
  1039  			}
  1040  		}
  1041  
  1042  	case *RuntimeLayer_AdminLayer_:
  1043  
  1044  		if v, ok := interface{}(m.GetAdminLayer()).(interface{ Validate() error }); ok {
  1045  			if err := v.Validate(); err != nil {
  1046  				return RuntimeLayerValidationError{
  1047  					field:  "AdminLayer",
  1048  					reason: "embedded message failed validation",
  1049  					cause:  err,
  1050  				}
  1051  			}
  1052  		}
  1053  
  1054  	case *RuntimeLayer_RtdsLayer_:
  1055  
  1056  		if v, ok := interface{}(m.GetRtdsLayer()).(interface{ Validate() error }); ok {
  1057  			if err := v.Validate(); err != nil {
  1058  				return RuntimeLayerValidationError{
  1059  					field:  "RtdsLayer",
  1060  					reason: "embedded message failed validation",
  1061  					cause:  err,
  1062  				}
  1063  			}
  1064  		}
  1065  
  1066  	default:
  1067  		return RuntimeLayerValidationError{
  1068  			field:  "LayerSpecifier",
  1069  			reason: "value is required",
  1070  		}
  1071  
  1072  	}
  1073  
  1074  	return nil
  1075  }
  1076  
  1077  // RuntimeLayerValidationError is the validation error returned by
  1078  // RuntimeLayer.Validate if the designated constraints aren't met.
  1079  type RuntimeLayerValidationError struct {
  1080  	field  string
  1081  	reason string
  1082  	cause  error
  1083  	key    bool
  1084  }
  1085  
  1086  // Field function returns field value.
  1087  func (e RuntimeLayerValidationError) Field() string { return e.field }
  1088  
  1089  // Reason function returns reason value.
  1090  func (e RuntimeLayerValidationError) Reason() string { return e.reason }
  1091  
  1092  // Cause function returns cause value.
  1093  func (e RuntimeLayerValidationError) Cause() error { return e.cause }
  1094  
  1095  // Key function returns key value.
  1096  func (e RuntimeLayerValidationError) Key() bool { return e.key }
  1097  
  1098  // ErrorName returns error name.
  1099  func (e RuntimeLayerValidationError) ErrorName() string { return "RuntimeLayerValidationError" }
  1100  
  1101  // Error satisfies the builtin error interface
  1102  func (e RuntimeLayerValidationError) Error() string {
  1103  	cause := ""
  1104  	if e.cause != nil {
  1105  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1106  	}
  1107  
  1108  	key := ""
  1109  	if e.key {
  1110  		key = "key for "
  1111  	}
  1112  
  1113  	return fmt.Sprintf(
  1114  		"invalid %sRuntimeLayer.%s: %s%s",
  1115  		key,
  1116  		e.field,
  1117  		e.reason,
  1118  		cause)
  1119  }
  1120  
  1121  var _ error = RuntimeLayerValidationError{}
  1122  
  1123  var _ interface {
  1124  	Field() string
  1125  	Reason() string
  1126  	Key() bool
  1127  	Cause() error
  1128  	ErrorName() string
  1129  } = RuntimeLayerValidationError{}
  1130  
  1131  // Validate checks the field values on LayeredRuntime with the rules defined in
  1132  // the proto definition for this message. If any rules are violated, an error
  1133  // is returned.
  1134  func (m *LayeredRuntime) Validate() error {
  1135  	if m == nil {
  1136  		return nil
  1137  	}
  1138  
  1139  	for idx, item := range m.GetLayers() {
  1140  		_, _ = idx, item
  1141  
  1142  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1143  			if err := v.Validate(); err != nil {
  1144  				return LayeredRuntimeValidationError{
  1145  					field:  fmt.Sprintf("Layers[%v]", idx),
  1146  					reason: "embedded message failed validation",
  1147  					cause:  err,
  1148  				}
  1149  			}
  1150  		}
  1151  
  1152  	}
  1153  
  1154  	return nil
  1155  }
  1156  
  1157  // LayeredRuntimeValidationError is the validation error returned by
  1158  // LayeredRuntime.Validate if the designated constraints aren't met.
  1159  type LayeredRuntimeValidationError struct {
  1160  	field  string
  1161  	reason string
  1162  	cause  error
  1163  	key    bool
  1164  }
  1165  
  1166  // Field function returns field value.
  1167  func (e LayeredRuntimeValidationError) Field() string { return e.field }
  1168  
  1169  // Reason function returns reason value.
  1170  func (e LayeredRuntimeValidationError) Reason() string { return e.reason }
  1171  
  1172  // Cause function returns cause value.
  1173  func (e LayeredRuntimeValidationError) Cause() error { return e.cause }
  1174  
  1175  // Key function returns key value.
  1176  func (e LayeredRuntimeValidationError) Key() bool { return e.key }
  1177  
  1178  // ErrorName returns error name.
  1179  func (e LayeredRuntimeValidationError) ErrorName() string { return "LayeredRuntimeValidationError" }
  1180  
  1181  // Error satisfies the builtin error interface
  1182  func (e LayeredRuntimeValidationError) Error() string {
  1183  	cause := ""
  1184  	if e.cause != nil {
  1185  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1186  	}
  1187  
  1188  	key := ""
  1189  	if e.key {
  1190  		key = "key for "
  1191  	}
  1192  
  1193  	return fmt.Sprintf(
  1194  		"invalid %sLayeredRuntime.%s: %s%s",
  1195  		key,
  1196  		e.field,
  1197  		e.reason,
  1198  		cause)
  1199  }
  1200  
  1201  var _ error = LayeredRuntimeValidationError{}
  1202  
  1203  var _ interface {
  1204  	Field() string
  1205  	Reason() string
  1206  	Key() bool
  1207  	Cause() error
  1208  	ErrorName() string
  1209  } = LayeredRuntimeValidationError{}
  1210  
  1211  // Validate checks the field values on CustomInlineHeader with the rules
  1212  // defined in the proto definition for this message. If any rules are
  1213  // violated, an error is returned.
  1214  func (m *CustomInlineHeader) Validate() error {
  1215  	if m == nil {
  1216  		return nil
  1217  	}
  1218  
  1219  	if utf8.RuneCountInString(m.GetInlineHeaderName()) < 1 {
  1220  		return CustomInlineHeaderValidationError{
  1221  			field:  "InlineHeaderName",
  1222  			reason: "value length must be at least 1 runes",
  1223  		}
  1224  	}
  1225  
  1226  	if !_CustomInlineHeader_InlineHeaderName_Pattern.MatchString(m.GetInlineHeaderName()) {
  1227  		return CustomInlineHeaderValidationError{
  1228  			field:  "InlineHeaderName",
  1229  			reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
  1230  		}
  1231  	}
  1232  
  1233  	if _, ok := CustomInlineHeader_InlineHeaderType_name[int32(m.GetInlineHeaderType())]; !ok {
  1234  		return CustomInlineHeaderValidationError{
  1235  			field:  "InlineHeaderType",
  1236  			reason: "value must be one of the defined enum values",
  1237  		}
  1238  	}
  1239  
  1240  	return nil
  1241  }
  1242  
  1243  // CustomInlineHeaderValidationError is the validation error returned by
  1244  // CustomInlineHeader.Validate if the designated constraints aren't met.
  1245  type CustomInlineHeaderValidationError struct {
  1246  	field  string
  1247  	reason string
  1248  	cause  error
  1249  	key    bool
  1250  }
  1251  
  1252  // Field function returns field value.
  1253  func (e CustomInlineHeaderValidationError) Field() string { return e.field }
  1254  
  1255  // Reason function returns reason value.
  1256  func (e CustomInlineHeaderValidationError) Reason() string { return e.reason }
  1257  
  1258  // Cause function returns cause value.
  1259  func (e CustomInlineHeaderValidationError) Cause() error { return e.cause }
  1260  
  1261  // Key function returns key value.
  1262  func (e CustomInlineHeaderValidationError) Key() bool { return e.key }
  1263  
  1264  // ErrorName returns error name.
  1265  func (e CustomInlineHeaderValidationError) ErrorName() string {
  1266  	return "CustomInlineHeaderValidationError"
  1267  }
  1268  
  1269  // Error satisfies the builtin error interface
  1270  func (e CustomInlineHeaderValidationError) Error() string {
  1271  	cause := ""
  1272  	if e.cause != nil {
  1273  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1274  	}
  1275  
  1276  	key := ""
  1277  	if e.key {
  1278  		key = "key for "
  1279  	}
  1280  
  1281  	return fmt.Sprintf(
  1282  		"invalid %sCustomInlineHeader.%s: %s%s",
  1283  		key,
  1284  		e.field,
  1285  		e.reason,
  1286  		cause)
  1287  }
  1288  
  1289  var _ error = CustomInlineHeaderValidationError{}
  1290  
  1291  var _ interface {
  1292  	Field() string
  1293  	Reason() string
  1294  	Key() bool
  1295  	Cause() error
  1296  	ErrorName() string
  1297  } = CustomInlineHeaderValidationError{}
  1298  
  1299  var _CustomInlineHeader_InlineHeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
  1300  
  1301  // Validate checks the field values on Bootstrap_StaticResources with the rules
  1302  // defined in the proto definition for this message. If any rules are
  1303  // violated, an error is returned.
  1304  func (m *Bootstrap_StaticResources) Validate() error {
  1305  	if m == nil {
  1306  		return nil
  1307  	}
  1308  
  1309  	for idx, item := range m.GetListeners() {
  1310  		_, _ = idx, item
  1311  
  1312  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1313  			if err := v.Validate(); err != nil {
  1314  				return Bootstrap_StaticResourcesValidationError{
  1315  					field:  fmt.Sprintf("Listeners[%v]", idx),
  1316  					reason: "embedded message failed validation",
  1317  					cause:  err,
  1318  				}
  1319  			}
  1320  		}
  1321  
  1322  	}
  1323  
  1324  	for idx, item := range m.GetClusters() {
  1325  		_, _ = idx, item
  1326  
  1327  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1328  			if err := v.Validate(); err != nil {
  1329  				return Bootstrap_StaticResourcesValidationError{
  1330  					field:  fmt.Sprintf("Clusters[%v]", idx),
  1331  					reason: "embedded message failed validation",
  1332  					cause:  err,
  1333  				}
  1334  			}
  1335  		}
  1336  
  1337  	}
  1338  
  1339  	for idx, item := range m.GetSecrets() {
  1340  		_, _ = idx, item
  1341  
  1342  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1343  			if err := v.Validate(); err != nil {
  1344  				return Bootstrap_StaticResourcesValidationError{
  1345  					field:  fmt.Sprintf("Secrets[%v]", idx),
  1346  					reason: "embedded message failed validation",
  1347  					cause:  err,
  1348  				}
  1349  			}
  1350  		}
  1351  
  1352  	}
  1353  
  1354  	return nil
  1355  }
  1356  
  1357  // Bootstrap_StaticResourcesValidationError is the validation error returned by
  1358  // Bootstrap_StaticResources.Validate if the designated constraints aren't met.
  1359  type Bootstrap_StaticResourcesValidationError struct {
  1360  	field  string
  1361  	reason string
  1362  	cause  error
  1363  	key    bool
  1364  }
  1365  
  1366  // Field function returns field value.
  1367  func (e Bootstrap_StaticResourcesValidationError) Field() string { return e.field }
  1368  
  1369  // Reason function returns reason value.
  1370  func (e Bootstrap_StaticResourcesValidationError) Reason() string { return e.reason }
  1371  
  1372  // Cause function returns cause value.
  1373  func (e Bootstrap_StaticResourcesValidationError) Cause() error { return e.cause }
  1374  
  1375  // Key function returns key value.
  1376  func (e Bootstrap_StaticResourcesValidationError) Key() bool { return e.key }
  1377  
  1378  // ErrorName returns error name.
  1379  func (e Bootstrap_StaticResourcesValidationError) ErrorName() string {
  1380  	return "Bootstrap_StaticResourcesValidationError"
  1381  }
  1382  
  1383  // Error satisfies the builtin error interface
  1384  func (e Bootstrap_StaticResourcesValidationError) 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 %sBootstrap_StaticResources.%s: %s%s",
  1397  		key,
  1398  		e.field,
  1399  		e.reason,
  1400  		cause)
  1401  }
  1402  
  1403  var _ error = Bootstrap_StaticResourcesValidationError{}
  1404  
  1405  var _ interface {
  1406  	Field() string
  1407  	Reason() string
  1408  	Key() bool
  1409  	Cause() error
  1410  	ErrorName() string
  1411  } = Bootstrap_StaticResourcesValidationError{}
  1412  
  1413  // Validate checks the field values on Bootstrap_DynamicResources with the
  1414  // rules defined in the proto definition for this message. If any rules are
  1415  // violated, an error is returned.
  1416  func (m *Bootstrap_DynamicResources) Validate() error {
  1417  	if m == nil {
  1418  		return nil
  1419  	}
  1420  
  1421  	if v, ok := interface{}(m.GetLdsConfig()).(interface{ Validate() error }); ok {
  1422  		if err := v.Validate(); err != nil {
  1423  			return Bootstrap_DynamicResourcesValidationError{
  1424  				field:  "LdsConfig",
  1425  				reason: "embedded message failed validation",
  1426  				cause:  err,
  1427  			}
  1428  		}
  1429  	}
  1430  
  1431  	// no validation rules for LdsResourcesLocator
  1432  
  1433  	if v, ok := interface{}(m.GetCdsConfig()).(interface{ Validate() error }); ok {
  1434  		if err := v.Validate(); err != nil {
  1435  			return Bootstrap_DynamicResourcesValidationError{
  1436  				field:  "CdsConfig",
  1437  				reason: "embedded message failed validation",
  1438  				cause:  err,
  1439  			}
  1440  		}
  1441  	}
  1442  
  1443  	// no validation rules for CdsResourcesLocator
  1444  
  1445  	if v, ok := interface{}(m.GetAdsConfig()).(interface{ Validate() error }); ok {
  1446  		if err := v.Validate(); err != nil {
  1447  			return Bootstrap_DynamicResourcesValidationError{
  1448  				field:  "AdsConfig",
  1449  				reason: "embedded message failed validation",
  1450  				cause:  err,
  1451  			}
  1452  		}
  1453  	}
  1454  
  1455  	return nil
  1456  }
  1457  
  1458  // Bootstrap_DynamicResourcesValidationError is the validation error returned
  1459  // by Bootstrap_DynamicResources.Validate if the designated constraints aren't met.
  1460  type Bootstrap_DynamicResourcesValidationError struct {
  1461  	field  string
  1462  	reason string
  1463  	cause  error
  1464  	key    bool
  1465  }
  1466  
  1467  // Field function returns field value.
  1468  func (e Bootstrap_DynamicResourcesValidationError) Field() string { return e.field }
  1469  
  1470  // Reason function returns reason value.
  1471  func (e Bootstrap_DynamicResourcesValidationError) Reason() string { return e.reason }
  1472  
  1473  // Cause function returns cause value.
  1474  func (e Bootstrap_DynamicResourcesValidationError) Cause() error { return e.cause }
  1475  
  1476  // Key function returns key value.
  1477  func (e Bootstrap_DynamicResourcesValidationError) Key() bool { return e.key }
  1478  
  1479  // ErrorName returns error name.
  1480  func (e Bootstrap_DynamicResourcesValidationError) ErrorName() string {
  1481  	return "Bootstrap_DynamicResourcesValidationError"
  1482  }
  1483  
  1484  // Error satisfies the builtin error interface
  1485  func (e Bootstrap_DynamicResourcesValidationError) Error() string {
  1486  	cause := ""
  1487  	if e.cause != nil {
  1488  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1489  	}
  1490  
  1491  	key := ""
  1492  	if e.key {
  1493  		key = "key for "
  1494  	}
  1495  
  1496  	return fmt.Sprintf(
  1497  		"invalid %sBootstrap_DynamicResources.%s: %s%s",
  1498  		key,
  1499  		e.field,
  1500  		e.reason,
  1501  		cause)
  1502  }
  1503  
  1504  var _ error = Bootstrap_DynamicResourcesValidationError{}
  1505  
  1506  var _ interface {
  1507  	Field() string
  1508  	Reason() string
  1509  	Key() bool
  1510  	Cause() error
  1511  	ErrorName() string
  1512  } = Bootstrap_DynamicResourcesValidationError{}
  1513  
  1514  // Validate checks the field values on ClusterManager_OutlierDetection with the
  1515  // rules defined in the proto definition for this message. If any rules are
  1516  // violated, an error is returned.
  1517  func (m *ClusterManager_OutlierDetection) Validate() error {
  1518  	if m == nil {
  1519  		return nil
  1520  	}
  1521  
  1522  	// no validation rules for EventLogPath
  1523  
  1524  	if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok {
  1525  		if err := v.Validate(); err != nil {
  1526  			return ClusterManager_OutlierDetectionValidationError{
  1527  				field:  "EventService",
  1528  				reason: "embedded message failed validation",
  1529  				cause:  err,
  1530  			}
  1531  		}
  1532  	}
  1533  
  1534  	return nil
  1535  }
  1536  
  1537  // ClusterManager_OutlierDetectionValidationError is the validation error
  1538  // returned by ClusterManager_OutlierDetection.Validate if the designated
  1539  // constraints aren't met.
  1540  type ClusterManager_OutlierDetectionValidationError struct {
  1541  	field  string
  1542  	reason string
  1543  	cause  error
  1544  	key    bool
  1545  }
  1546  
  1547  // Field function returns field value.
  1548  func (e ClusterManager_OutlierDetectionValidationError) Field() string { return e.field }
  1549  
  1550  // Reason function returns reason value.
  1551  func (e ClusterManager_OutlierDetectionValidationError) Reason() string { return e.reason }
  1552  
  1553  // Cause function returns cause value.
  1554  func (e ClusterManager_OutlierDetectionValidationError) Cause() error { return e.cause }
  1555  
  1556  // Key function returns key value.
  1557  func (e ClusterManager_OutlierDetectionValidationError) Key() bool { return e.key }
  1558  
  1559  // ErrorName returns error name.
  1560  func (e ClusterManager_OutlierDetectionValidationError) ErrorName() string {
  1561  	return "ClusterManager_OutlierDetectionValidationError"
  1562  }
  1563  
  1564  // Error satisfies the builtin error interface
  1565  func (e ClusterManager_OutlierDetectionValidationError) Error() string {
  1566  	cause := ""
  1567  	if e.cause != nil {
  1568  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1569  	}
  1570  
  1571  	key := ""
  1572  	if e.key {
  1573  		key = "key for "
  1574  	}
  1575  
  1576  	return fmt.Sprintf(
  1577  		"invalid %sClusterManager_OutlierDetection.%s: %s%s",
  1578  		key,
  1579  		e.field,
  1580  		e.reason,
  1581  		cause)
  1582  }
  1583  
  1584  var _ error = ClusterManager_OutlierDetectionValidationError{}
  1585  
  1586  var _ interface {
  1587  	Field() string
  1588  	Reason() string
  1589  	Key() bool
  1590  	Cause() error
  1591  	ErrorName() string
  1592  } = ClusterManager_OutlierDetectionValidationError{}
  1593  
  1594  // Validate checks the field values on Watchdog_WatchdogAction with the rules
  1595  // defined in the proto definition for this message. If any rules are
  1596  // violated, an error is returned.
  1597  func (m *Watchdog_WatchdogAction) Validate() error {
  1598  	if m == nil {
  1599  		return nil
  1600  	}
  1601  
  1602  	if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok {
  1603  		if err := v.Validate(); err != nil {
  1604  			return Watchdog_WatchdogActionValidationError{
  1605  				field:  "Config",
  1606  				reason: "embedded message failed validation",
  1607  				cause:  err,
  1608  			}
  1609  		}
  1610  	}
  1611  
  1612  	if _, ok := Watchdog_WatchdogAction_WatchdogEvent_name[int32(m.GetEvent())]; !ok {
  1613  		return Watchdog_WatchdogActionValidationError{
  1614  			field:  "Event",
  1615  			reason: "value must be one of the defined enum values",
  1616  		}
  1617  	}
  1618  
  1619  	return nil
  1620  }
  1621  
  1622  // Watchdog_WatchdogActionValidationError is the validation error returned by
  1623  // Watchdog_WatchdogAction.Validate if the designated constraints aren't met.
  1624  type Watchdog_WatchdogActionValidationError struct {
  1625  	field  string
  1626  	reason string
  1627  	cause  error
  1628  	key    bool
  1629  }
  1630  
  1631  // Field function returns field value.
  1632  func (e Watchdog_WatchdogActionValidationError) Field() string { return e.field }
  1633  
  1634  // Reason function returns reason value.
  1635  func (e Watchdog_WatchdogActionValidationError) Reason() string { return e.reason }
  1636  
  1637  // Cause function returns cause value.
  1638  func (e Watchdog_WatchdogActionValidationError) Cause() error { return e.cause }
  1639  
  1640  // Key function returns key value.
  1641  func (e Watchdog_WatchdogActionValidationError) Key() bool { return e.key }
  1642  
  1643  // ErrorName returns error name.
  1644  func (e Watchdog_WatchdogActionValidationError) ErrorName() string {
  1645  	return "Watchdog_WatchdogActionValidationError"
  1646  }
  1647  
  1648  // Error satisfies the builtin error interface
  1649  func (e Watchdog_WatchdogActionValidationError) Error() string {
  1650  	cause := ""
  1651  	if e.cause != nil {
  1652  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1653  	}
  1654  
  1655  	key := ""
  1656  	if e.key {
  1657  		key = "key for "
  1658  	}
  1659  
  1660  	return fmt.Sprintf(
  1661  		"invalid %sWatchdog_WatchdogAction.%s: %s%s",
  1662  		key,
  1663  		e.field,
  1664  		e.reason,
  1665  		cause)
  1666  }
  1667  
  1668  var _ error = Watchdog_WatchdogActionValidationError{}
  1669  
  1670  var _ interface {
  1671  	Field() string
  1672  	Reason() string
  1673  	Key() bool
  1674  	Cause() error
  1675  	ErrorName() string
  1676  } = Watchdog_WatchdogActionValidationError{}
  1677  
  1678  // Validate checks the field values on RuntimeLayer_DiskLayer with the rules
  1679  // defined in the proto definition for this message. If any rules are
  1680  // violated, an error is returned.
  1681  func (m *RuntimeLayer_DiskLayer) Validate() error {
  1682  	if m == nil {
  1683  		return nil
  1684  	}
  1685  
  1686  	// no validation rules for SymlinkRoot
  1687  
  1688  	// no validation rules for Subdirectory
  1689  
  1690  	// no validation rules for AppendServiceCluster
  1691  
  1692  	return nil
  1693  }
  1694  
  1695  // RuntimeLayer_DiskLayerValidationError is the validation error returned by
  1696  // RuntimeLayer_DiskLayer.Validate if the designated constraints aren't met.
  1697  type RuntimeLayer_DiskLayerValidationError struct {
  1698  	field  string
  1699  	reason string
  1700  	cause  error
  1701  	key    bool
  1702  }
  1703  
  1704  // Field function returns field value.
  1705  func (e RuntimeLayer_DiskLayerValidationError) Field() string { return e.field }
  1706  
  1707  // Reason function returns reason value.
  1708  func (e RuntimeLayer_DiskLayerValidationError) Reason() string { return e.reason }
  1709  
  1710  // Cause function returns cause value.
  1711  func (e RuntimeLayer_DiskLayerValidationError) Cause() error { return e.cause }
  1712  
  1713  // Key function returns key value.
  1714  func (e RuntimeLayer_DiskLayerValidationError) Key() bool { return e.key }
  1715  
  1716  // ErrorName returns error name.
  1717  func (e RuntimeLayer_DiskLayerValidationError) ErrorName() string {
  1718  	return "RuntimeLayer_DiskLayerValidationError"
  1719  }
  1720  
  1721  // Error satisfies the builtin error interface
  1722  func (e RuntimeLayer_DiskLayerValidationError) Error() string {
  1723  	cause := ""
  1724  	if e.cause != nil {
  1725  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1726  	}
  1727  
  1728  	key := ""
  1729  	if e.key {
  1730  		key = "key for "
  1731  	}
  1732  
  1733  	return fmt.Sprintf(
  1734  		"invalid %sRuntimeLayer_DiskLayer.%s: %s%s",
  1735  		key,
  1736  		e.field,
  1737  		e.reason,
  1738  		cause)
  1739  }
  1740  
  1741  var _ error = RuntimeLayer_DiskLayerValidationError{}
  1742  
  1743  var _ interface {
  1744  	Field() string
  1745  	Reason() string
  1746  	Key() bool
  1747  	Cause() error
  1748  	ErrorName() string
  1749  } = RuntimeLayer_DiskLayerValidationError{}
  1750  
  1751  // Validate checks the field values on RuntimeLayer_AdminLayer with the rules
  1752  // defined in the proto definition for this message. If any rules are
  1753  // violated, an error is returned.
  1754  func (m *RuntimeLayer_AdminLayer) Validate() error {
  1755  	if m == nil {
  1756  		return nil
  1757  	}
  1758  
  1759  	return nil
  1760  }
  1761  
  1762  // RuntimeLayer_AdminLayerValidationError is the validation error returned by
  1763  // RuntimeLayer_AdminLayer.Validate if the designated constraints aren't met.
  1764  type RuntimeLayer_AdminLayerValidationError struct {
  1765  	field  string
  1766  	reason string
  1767  	cause  error
  1768  	key    bool
  1769  }
  1770  
  1771  // Field function returns field value.
  1772  func (e RuntimeLayer_AdminLayerValidationError) Field() string { return e.field }
  1773  
  1774  // Reason function returns reason value.
  1775  func (e RuntimeLayer_AdminLayerValidationError) Reason() string { return e.reason }
  1776  
  1777  // Cause function returns cause value.
  1778  func (e RuntimeLayer_AdminLayerValidationError) Cause() error { return e.cause }
  1779  
  1780  // Key function returns key value.
  1781  func (e RuntimeLayer_AdminLayerValidationError) Key() bool { return e.key }
  1782  
  1783  // ErrorName returns error name.
  1784  func (e RuntimeLayer_AdminLayerValidationError) ErrorName() string {
  1785  	return "RuntimeLayer_AdminLayerValidationError"
  1786  }
  1787  
  1788  // Error satisfies the builtin error interface
  1789  func (e RuntimeLayer_AdminLayerValidationError) Error() string {
  1790  	cause := ""
  1791  	if e.cause != nil {
  1792  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1793  	}
  1794  
  1795  	key := ""
  1796  	if e.key {
  1797  		key = "key for "
  1798  	}
  1799  
  1800  	return fmt.Sprintf(
  1801  		"invalid %sRuntimeLayer_AdminLayer.%s: %s%s",
  1802  		key,
  1803  		e.field,
  1804  		e.reason,
  1805  		cause)
  1806  }
  1807  
  1808  var _ error = RuntimeLayer_AdminLayerValidationError{}
  1809  
  1810  var _ interface {
  1811  	Field() string
  1812  	Reason() string
  1813  	Key() bool
  1814  	Cause() error
  1815  	ErrorName() string
  1816  } = RuntimeLayer_AdminLayerValidationError{}
  1817  
  1818  // Validate checks the field values on RuntimeLayer_RtdsLayer with the rules
  1819  // defined in the proto definition for this message. If any rules are
  1820  // violated, an error is returned.
  1821  func (m *RuntimeLayer_RtdsLayer) Validate() error {
  1822  	if m == nil {
  1823  		return nil
  1824  	}
  1825  
  1826  	// no validation rules for Name
  1827  
  1828  	if v, ok := interface{}(m.GetRtdsConfig()).(interface{ Validate() error }); ok {
  1829  		if err := v.Validate(); err != nil {
  1830  			return RuntimeLayer_RtdsLayerValidationError{
  1831  				field:  "RtdsConfig",
  1832  				reason: "embedded message failed validation",
  1833  				cause:  err,
  1834  			}
  1835  		}
  1836  	}
  1837  
  1838  	return nil
  1839  }
  1840  
  1841  // RuntimeLayer_RtdsLayerValidationError is the validation error returned by
  1842  // RuntimeLayer_RtdsLayer.Validate if the designated constraints aren't met.
  1843  type RuntimeLayer_RtdsLayerValidationError struct {
  1844  	field  string
  1845  	reason string
  1846  	cause  error
  1847  	key    bool
  1848  }
  1849  
  1850  // Field function returns field value.
  1851  func (e RuntimeLayer_RtdsLayerValidationError) Field() string { return e.field }
  1852  
  1853  // Reason function returns reason value.
  1854  func (e RuntimeLayer_RtdsLayerValidationError) Reason() string { return e.reason }
  1855  
  1856  // Cause function returns cause value.
  1857  func (e RuntimeLayer_RtdsLayerValidationError) Cause() error { return e.cause }
  1858  
  1859  // Key function returns key value.
  1860  func (e RuntimeLayer_RtdsLayerValidationError) Key() bool { return e.key }
  1861  
  1862  // ErrorName returns error name.
  1863  func (e RuntimeLayer_RtdsLayerValidationError) ErrorName() string {
  1864  	return "RuntimeLayer_RtdsLayerValidationError"
  1865  }
  1866  
  1867  // Error satisfies the builtin error interface
  1868  func (e RuntimeLayer_RtdsLayerValidationError) Error() string {
  1869  	cause := ""
  1870  	if e.cause != nil {
  1871  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1872  	}
  1873  
  1874  	key := ""
  1875  	if e.key {
  1876  		key = "key for "
  1877  	}
  1878  
  1879  	return fmt.Sprintf(
  1880  		"invalid %sRuntimeLayer_RtdsLayer.%s: %s%s",
  1881  		key,
  1882  		e.field,
  1883  		e.reason,
  1884  		cause)
  1885  }
  1886  
  1887  var _ error = RuntimeLayer_RtdsLayerValidationError{}
  1888  
  1889  var _ interface {
  1890  	Field() string
  1891  	Reason() string
  1892  	Key() bool
  1893  	Cause() error
  1894  	ErrorName() string
  1895  } = RuntimeLayer_RtdsLayerValidationError{}