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

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: envoy/config/core/v3/grpc_service.proto
     3  
     4  package envoy_config_core_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 GrpcService with the rules defined in
    37  // the proto definition for this message. If any rules are violated, an error
    38  // is returned.
    39  func (m *GrpcService) Validate() error {
    40  	if m == nil {
    41  		return nil
    42  	}
    43  
    44  	if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok {
    45  		if err := v.Validate(); err != nil {
    46  			return GrpcServiceValidationError{
    47  				field:  "Timeout",
    48  				reason: "embedded message failed validation",
    49  				cause:  err,
    50  			}
    51  		}
    52  	}
    53  
    54  	for idx, item := range m.GetInitialMetadata() {
    55  		_, _ = idx, item
    56  
    57  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
    58  			if err := v.Validate(); err != nil {
    59  				return GrpcServiceValidationError{
    60  					field:  fmt.Sprintf("InitialMetadata[%v]", idx),
    61  					reason: "embedded message failed validation",
    62  					cause:  err,
    63  				}
    64  			}
    65  		}
    66  
    67  	}
    68  
    69  	switch m.TargetSpecifier.(type) {
    70  
    71  	case *GrpcService_EnvoyGrpc_:
    72  
    73  		if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok {
    74  			if err := v.Validate(); err != nil {
    75  				return GrpcServiceValidationError{
    76  					field:  "EnvoyGrpc",
    77  					reason: "embedded message failed validation",
    78  					cause:  err,
    79  				}
    80  			}
    81  		}
    82  
    83  	case *GrpcService_GoogleGrpc_:
    84  
    85  		if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok {
    86  			if err := v.Validate(); err != nil {
    87  				return GrpcServiceValidationError{
    88  					field:  "GoogleGrpc",
    89  					reason: "embedded message failed validation",
    90  					cause:  err,
    91  				}
    92  			}
    93  		}
    94  
    95  	default:
    96  		return GrpcServiceValidationError{
    97  			field:  "TargetSpecifier",
    98  			reason: "value is required",
    99  		}
   100  
   101  	}
   102  
   103  	return nil
   104  }
   105  
   106  // GrpcServiceValidationError is the validation error returned by
   107  // GrpcService.Validate if the designated constraints aren't met.
   108  type GrpcServiceValidationError struct {
   109  	field  string
   110  	reason string
   111  	cause  error
   112  	key    bool
   113  }
   114  
   115  // Field function returns field value.
   116  func (e GrpcServiceValidationError) Field() string { return e.field }
   117  
   118  // Reason function returns reason value.
   119  func (e GrpcServiceValidationError) Reason() string { return e.reason }
   120  
   121  // Cause function returns cause value.
   122  func (e GrpcServiceValidationError) Cause() error { return e.cause }
   123  
   124  // Key function returns key value.
   125  func (e GrpcServiceValidationError) Key() bool { return e.key }
   126  
   127  // ErrorName returns error name.
   128  func (e GrpcServiceValidationError) ErrorName() string { return "GrpcServiceValidationError" }
   129  
   130  // Error satisfies the builtin error interface
   131  func (e GrpcServiceValidationError) Error() string {
   132  	cause := ""
   133  	if e.cause != nil {
   134  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   135  	}
   136  
   137  	key := ""
   138  	if e.key {
   139  		key = "key for "
   140  	}
   141  
   142  	return fmt.Sprintf(
   143  		"invalid %sGrpcService.%s: %s%s",
   144  		key,
   145  		e.field,
   146  		e.reason,
   147  		cause)
   148  }
   149  
   150  var _ error = GrpcServiceValidationError{}
   151  
   152  var _ interface {
   153  	Field() string
   154  	Reason() string
   155  	Key() bool
   156  	Cause() error
   157  	ErrorName() string
   158  } = GrpcServiceValidationError{}
   159  
   160  // Validate checks the field values on GrpcService_EnvoyGrpc with the rules
   161  // defined in the proto definition for this message. If any rules are
   162  // violated, an error is returned.
   163  func (m *GrpcService_EnvoyGrpc) Validate() error {
   164  	if m == nil {
   165  		return nil
   166  	}
   167  
   168  	if utf8.RuneCountInString(m.GetClusterName()) < 1 {
   169  		return GrpcService_EnvoyGrpcValidationError{
   170  			field:  "ClusterName",
   171  			reason: "value length must be at least 1 runes",
   172  		}
   173  	}
   174  
   175  	if utf8.RuneCountInString(m.GetAuthority()) < 0 {
   176  		return GrpcService_EnvoyGrpcValidationError{
   177  			field:  "Authority",
   178  			reason: "value length must be at least 0 runes",
   179  		}
   180  	}
   181  
   182  	if len(m.GetAuthority()) > 16384 {
   183  		return GrpcService_EnvoyGrpcValidationError{
   184  			field:  "Authority",
   185  			reason: "value length must be at most 16384 bytes",
   186  		}
   187  	}
   188  
   189  	if !_GrpcService_EnvoyGrpc_Authority_Pattern.MatchString(m.GetAuthority()) {
   190  		return GrpcService_EnvoyGrpcValidationError{
   191  			field:  "Authority",
   192  			reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
   193  		}
   194  	}
   195  
   196  	return nil
   197  }
   198  
   199  // GrpcService_EnvoyGrpcValidationError is the validation error returned by
   200  // GrpcService_EnvoyGrpc.Validate if the designated constraints aren't met.
   201  type GrpcService_EnvoyGrpcValidationError struct {
   202  	field  string
   203  	reason string
   204  	cause  error
   205  	key    bool
   206  }
   207  
   208  // Field function returns field value.
   209  func (e GrpcService_EnvoyGrpcValidationError) Field() string { return e.field }
   210  
   211  // Reason function returns reason value.
   212  func (e GrpcService_EnvoyGrpcValidationError) Reason() string { return e.reason }
   213  
   214  // Cause function returns cause value.
   215  func (e GrpcService_EnvoyGrpcValidationError) Cause() error { return e.cause }
   216  
   217  // Key function returns key value.
   218  func (e GrpcService_EnvoyGrpcValidationError) Key() bool { return e.key }
   219  
   220  // ErrorName returns error name.
   221  func (e GrpcService_EnvoyGrpcValidationError) ErrorName() string {
   222  	return "GrpcService_EnvoyGrpcValidationError"
   223  }
   224  
   225  // Error satisfies the builtin error interface
   226  func (e GrpcService_EnvoyGrpcValidationError) Error() string {
   227  	cause := ""
   228  	if e.cause != nil {
   229  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   230  	}
   231  
   232  	key := ""
   233  	if e.key {
   234  		key = "key for "
   235  	}
   236  
   237  	return fmt.Sprintf(
   238  		"invalid %sGrpcService_EnvoyGrpc.%s: %s%s",
   239  		key,
   240  		e.field,
   241  		e.reason,
   242  		cause)
   243  }
   244  
   245  var _ error = GrpcService_EnvoyGrpcValidationError{}
   246  
   247  var _ interface {
   248  	Field() string
   249  	Reason() string
   250  	Key() bool
   251  	Cause() error
   252  	ErrorName() string
   253  } = GrpcService_EnvoyGrpcValidationError{}
   254  
   255  var _GrpcService_EnvoyGrpc_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
   256  
   257  // Validate checks the field values on GrpcService_GoogleGrpc with the rules
   258  // defined in the proto definition for this message. If any rules are
   259  // violated, an error is returned.
   260  func (m *GrpcService_GoogleGrpc) Validate() error {
   261  	if m == nil {
   262  		return nil
   263  	}
   264  
   265  	if utf8.RuneCountInString(m.GetTargetUri()) < 1 {
   266  		return GrpcService_GoogleGrpcValidationError{
   267  			field:  "TargetUri",
   268  			reason: "value length must be at least 1 runes",
   269  		}
   270  	}
   271  
   272  	if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok {
   273  		if err := v.Validate(); err != nil {
   274  			return GrpcService_GoogleGrpcValidationError{
   275  				field:  "ChannelCredentials",
   276  				reason: "embedded message failed validation",
   277  				cause:  err,
   278  			}
   279  		}
   280  	}
   281  
   282  	for idx, item := range m.GetCallCredentials() {
   283  		_, _ = idx, item
   284  
   285  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   286  			if err := v.Validate(); err != nil {
   287  				return GrpcService_GoogleGrpcValidationError{
   288  					field:  fmt.Sprintf("CallCredentials[%v]", idx),
   289  					reason: "embedded message failed validation",
   290  					cause:  err,
   291  				}
   292  			}
   293  		}
   294  
   295  	}
   296  
   297  	if utf8.RuneCountInString(m.GetStatPrefix()) < 1 {
   298  		return GrpcService_GoogleGrpcValidationError{
   299  			field:  "StatPrefix",
   300  			reason: "value length must be at least 1 runes",
   301  		}
   302  	}
   303  
   304  	// no validation rules for CredentialsFactoryName
   305  
   306  	if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok {
   307  		if err := v.Validate(); err != nil {
   308  			return GrpcService_GoogleGrpcValidationError{
   309  				field:  "Config",
   310  				reason: "embedded message failed validation",
   311  				cause:  err,
   312  			}
   313  		}
   314  	}
   315  
   316  	if v, ok := interface{}(m.GetPerStreamBufferLimitBytes()).(interface{ Validate() error }); ok {
   317  		if err := v.Validate(); err != nil {
   318  			return GrpcService_GoogleGrpcValidationError{
   319  				field:  "PerStreamBufferLimitBytes",
   320  				reason: "embedded message failed validation",
   321  				cause:  err,
   322  			}
   323  		}
   324  	}
   325  
   326  	if v, ok := interface{}(m.GetChannelArgs()).(interface{ Validate() error }); ok {
   327  		if err := v.Validate(); err != nil {
   328  			return GrpcService_GoogleGrpcValidationError{
   329  				field:  "ChannelArgs",
   330  				reason: "embedded message failed validation",
   331  				cause:  err,
   332  			}
   333  		}
   334  	}
   335  
   336  	return nil
   337  }
   338  
   339  // GrpcService_GoogleGrpcValidationError is the validation error returned by
   340  // GrpcService_GoogleGrpc.Validate if the designated constraints aren't met.
   341  type GrpcService_GoogleGrpcValidationError struct {
   342  	field  string
   343  	reason string
   344  	cause  error
   345  	key    bool
   346  }
   347  
   348  // Field function returns field value.
   349  func (e GrpcService_GoogleGrpcValidationError) Field() string { return e.field }
   350  
   351  // Reason function returns reason value.
   352  func (e GrpcService_GoogleGrpcValidationError) Reason() string { return e.reason }
   353  
   354  // Cause function returns cause value.
   355  func (e GrpcService_GoogleGrpcValidationError) Cause() error { return e.cause }
   356  
   357  // Key function returns key value.
   358  func (e GrpcService_GoogleGrpcValidationError) Key() bool { return e.key }
   359  
   360  // ErrorName returns error name.
   361  func (e GrpcService_GoogleGrpcValidationError) ErrorName() string {
   362  	return "GrpcService_GoogleGrpcValidationError"
   363  }
   364  
   365  // Error satisfies the builtin error interface
   366  func (e GrpcService_GoogleGrpcValidationError) Error() string {
   367  	cause := ""
   368  	if e.cause != nil {
   369  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   370  	}
   371  
   372  	key := ""
   373  	if e.key {
   374  		key = "key for "
   375  	}
   376  
   377  	return fmt.Sprintf(
   378  		"invalid %sGrpcService_GoogleGrpc.%s: %s%s",
   379  		key,
   380  		e.field,
   381  		e.reason,
   382  		cause)
   383  }
   384  
   385  var _ error = GrpcService_GoogleGrpcValidationError{}
   386  
   387  var _ interface {
   388  	Field() string
   389  	Reason() string
   390  	Key() bool
   391  	Cause() error
   392  	ErrorName() string
   393  } = GrpcService_GoogleGrpcValidationError{}
   394  
   395  // Validate checks the field values on GrpcService_GoogleGrpc_SslCredentials
   396  // with the rules defined in the proto definition for this message. If any
   397  // rules are violated, an error is returned.
   398  func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error {
   399  	if m == nil {
   400  		return nil
   401  	}
   402  
   403  	if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok {
   404  		if err := v.Validate(); err != nil {
   405  			return GrpcService_GoogleGrpc_SslCredentialsValidationError{
   406  				field:  "RootCerts",
   407  				reason: "embedded message failed validation",
   408  				cause:  err,
   409  			}
   410  		}
   411  	}
   412  
   413  	if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok {
   414  		if err := v.Validate(); err != nil {
   415  			return GrpcService_GoogleGrpc_SslCredentialsValidationError{
   416  				field:  "PrivateKey",
   417  				reason: "embedded message failed validation",
   418  				cause:  err,
   419  			}
   420  		}
   421  	}
   422  
   423  	if v, ok := interface{}(m.GetCertChain()).(interface{ Validate() error }); ok {
   424  		if err := v.Validate(); err != nil {
   425  			return GrpcService_GoogleGrpc_SslCredentialsValidationError{
   426  				field:  "CertChain",
   427  				reason: "embedded message failed validation",
   428  				cause:  err,
   429  			}
   430  		}
   431  	}
   432  
   433  	return nil
   434  }
   435  
   436  // GrpcService_GoogleGrpc_SslCredentialsValidationError is the validation error
   437  // returned by GrpcService_GoogleGrpc_SslCredentials.Validate if the
   438  // designated constraints aren't met.
   439  type GrpcService_GoogleGrpc_SslCredentialsValidationError struct {
   440  	field  string
   441  	reason string
   442  	cause  error
   443  	key    bool
   444  }
   445  
   446  // Field function returns field value.
   447  func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Field() string { return e.field }
   448  
   449  // Reason function returns reason value.
   450  func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Reason() string { return e.reason }
   451  
   452  // Cause function returns cause value.
   453  func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Cause() error { return e.cause }
   454  
   455  // Key function returns key value.
   456  func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Key() bool { return e.key }
   457  
   458  // ErrorName returns error name.
   459  func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) ErrorName() string {
   460  	return "GrpcService_GoogleGrpc_SslCredentialsValidationError"
   461  }
   462  
   463  // Error satisfies the builtin error interface
   464  func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) 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 %sGrpcService_GoogleGrpc_SslCredentials.%s: %s%s",
   477  		key,
   478  		e.field,
   479  		e.reason,
   480  		cause)
   481  }
   482  
   483  var _ error = GrpcService_GoogleGrpc_SslCredentialsValidationError{}
   484  
   485  var _ interface {
   486  	Field() string
   487  	Reason() string
   488  	Key() bool
   489  	Cause() error
   490  	ErrorName() string
   491  } = GrpcService_GoogleGrpc_SslCredentialsValidationError{}
   492  
   493  // Validate checks the field values on
   494  // GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the
   495  // proto definition for this message. If any rules are violated, an error is returned.
   496  func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) Validate() error {
   497  	if m == nil {
   498  		return nil
   499  	}
   500  
   501  	return nil
   502  }
   503  
   504  // GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError is the
   505  // validation error returned by
   506  // GrpcService_GoogleGrpc_GoogleLocalCredentials.Validate if the designated
   507  // constraints aren't met.
   508  type GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError struct {
   509  	field  string
   510  	reason string
   511  	cause  error
   512  	key    bool
   513  }
   514  
   515  // Field function returns field value.
   516  func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Field() string { return e.field }
   517  
   518  // Reason function returns reason value.
   519  func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Reason() string {
   520  	return e.reason
   521  }
   522  
   523  // Cause function returns cause value.
   524  func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Cause() error { return e.cause }
   525  
   526  // Key function returns key value.
   527  func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Key() bool { return e.key }
   528  
   529  // ErrorName returns error name.
   530  func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) ErrorName() string {
   531  	return "GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError"
   532  }
   533  
   534  // Error satisfies the builtin error interface
   535  func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Error() string {
   536  	cause := ""
   537  	if e.cause != nil {
   538  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   539  	}
   540  
   541  	key := ""
   542  	if e.key {
   543  		key = "key for "
   544  	}
   545  
   546  	return fmt.Sprintf(
   547  		"invalid %sGrpcService_GoogleGrpc_GoogleLocalCredentials.%s: %s%s",
   548  		key,
   549  		e.field,
   550  		e.reason,
   551  		cause)
   552  }
   553  
   554  var _ error = GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError{}
   555  
   556  var _ interface {
   557  	Field() string
   558  	Reason() string
   559  	Key() bool
   560  	Cause() error
   561  	ErrorName() string
   562  } = GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError{}
   563  
   564  // Validate checks the field values on
   565  // GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the
   566  // proto definition for this message. If any rules are violated, an error is returned.
   567  func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error {
   568  	if m == nil {
   569  		return nil
   570  	}
   571  
   572  	switch m.CredentialSpecifier.(type) {
   573  
   574  	case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials:
   575  
   576  		if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok {
   577  			if err := v.Validate(); err != nil {
   578  				return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{
   579  					field:  "SslCredentials",
   580  					reason: "embedded message failed validation",
   581  					cause:  err,
   582  				}
   583  			}
   584  		}
   585  
   586  	case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault:
   587  
   588  		if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok {
   589  			if err := v.Validate(); err != nil {
   590  				return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{
   591  					field:  "GoogleDefault",
   592  					reason: "embedded message failed validation",
   593  					cause:  err,
   594  				}
   595  			}
   596  		}
   597  
   598  	case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials:
   599  
   600  		if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok {
   601  			if err := v.Validate(); err != nil {
   602  				return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{
   603  					field:  "LocalCredentials",
   604  					reason: "embedded message failed validation",
   605  					cause:  err,
   606  				}
   607  			}
   608  		}
   609  
   610  	default:
   611  		return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{
   612  			field:  "CredentialSpecifier",
   613  			reason: "value is required",
   614  		}
   615  
   616  	}
   617  
   618  	return nil
   619  }
   620  
   621  // GrpcService_GoogleGrpc_ChannelCredentialsValidationError is the validation
   622  // error returned by GrpcService_GoogleGrpc_ChannelCredentials.Validate if the
   623  // designated constraints aren't met.
   624  type GrpcService_GoogleGrpc_ChannelCredentialsValidationError struct {
   625  	field  string
   626  	reason string
   627  	cause  error
   628  	key    bool
   629  }
   630  
   631  // Field function returns field value.
   632  func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Field() string { return e.field }
   633  
   634  // Reason function returns reason value.
   635  func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Reason() string { return e.reason }
   636  
   637  // Cause function returns cause value.
   638  func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Cause() error { return e.cause }
   639  
   640  // Key function returns key value.
   641  func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Key() bool { return e.key }
   642  
   643  // ErrorName returns error name.
   644  func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) ErrorName() string {
   645  	return "GrpcService_GoogleGrpc_ChannelCredentialsValidationError"
   646  }
   647  
   648  // Error satisfies the builtin error interface
   649  func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Error() string {
   650  	cause := ""
   651  	if e.cause != nil {
   652  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   653  	}
   654  
   655  	key := ""
   656  	if e.key {
   657  		key = "key for "
   658  	}
   659  
   660  	return fmt.Sprintf(
   661  		"invalid %sGrpcService_GoogleGrpc_ChannelCredentials.%s: %s%s",
   662  		key,
   663  		e.field,
   664  		e.reason,
   665  		cause)
   666  }
   667  
   668  var _ error = GrpcService_GoogleGrpc_ChannelCredentialsValidationError{}
   669  
   670  var _ interface {
   671  	Field() string
   672  	Reason() string
   673  	Key() bool
   674  	Cause() error
   675  	ErrorName() string
   676  } = GrpcService_GoogleGrpc_ChannelCredentialsValidationError{}
   677  
   678  // Validate checks the field values on GrpcService_GoogleGrpc_CallCredentials
   679  // with the rules defined in the proto definition for this message. If any
   680  // rules are violated, an error is returned.
   681  func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error {
   682  	if m == nil {
   683  		return nil
   684  	}
   685  
   686  	switch m.CredentialSpecifier.(type) {
   687  
   688  	case *GrpcService_GoogleGrpc_CallCredentials_AccessToken:
   689  		// no validation rules for AccessToken
   690  
   691  	case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine:
   692  
   693  		if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok {
   694  			if err := v.Validate(); err != nil {
   695  				return GrpcService_GoogleGrpc_CallCredentialsValidationError{
   696  					field:  "GoogleComputeEngine",
   697  					reason: "embedded message failed validation",
   698  					cause:  err,
   699  				}
   700  			}
   701  		}
   702  
   703  	case *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken:
   704  		// no validation rules for GoogleRefreshToken
   705  
   706  	case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess:
   707  
   708  		if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok {
   709  			if err := v.Validate(); err != nil {
   710  				return GrpcService_GoogleGrpc_CallCredentialsValidationError{
   711  					field:  "ServiceAccountJwtAccess",
   712  					reason: "embedded message failed validation",
   713  					cause:  err,
   714  				}
   715  			}
   716  		}
   717  
   718  	case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam:
   719  
   720  		if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok {
   721  			if err := v.Validate(); err != nil {
   722  				return GrpcService_GoogleGrpc_CallCredentialsValidationError{
   723  					field:  "GoogleIam",
   724  					reason: "embedded message failed validation",
   725  					cause:  err,
   726  				}
   727  			}
   728  		}
   729  
   730  	case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin:
   731  
   732  		if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok {
   733  			if err := v.Validate(); err != nil {
   734  				return GrpcService_GoogleGrpc_CallCredentialsValidationError{
   735  					field:  "FromPlugin",
   736  					reason: "embedded message failed validation",
   737  					cause:  err,
   738  				}
   739  			}
   740  		}
   741  
   742  	case *GrpcService_GoogleGrpc_CallCredentials_StsService_:
   743  
   744  		if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok {
   745  			if err := v.Validate(); err != nil {
   746  				return GrpcService_GoogleGrpc_CallCredentialsValidationError{
   747  					field:  "StsService",
   748  					reason: "embedded message failed validation",
   749  					cause:  err,
   750  				}
   751  			}
   752  		}
   753  
   754  	default:
   755  		return GrpcService_GoogleGrpc_CallCredentialsValidationError{
   756  			field:  "CredentialSpecifier",
   757  			reason: "value is required",
   758  		}
   759  
   760  	}
   761  
   762  	return nil
   763  }
   764  
   765  // GrpcService_GoogleGrpc_CallCredentialsValidationError is the validation
   766  // error returned by GrpcService_GoogleGrpc_CallCredentials.Validate if the
   767  // designated constraints aren't met.
   768  type GrpcService_GoogleGrpc_CallCredentialsValidationError struct {
   769  	field  string
   770  	reason string
   771  	cause  error
   772  	key    bool
   773  }
   774  
   775  // Field function returns field value.
   776  func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Field() string { return e.field }
   777  
   778  // Reason function returns reason value.
   779  func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Reason() string { return e.reason }
   780  
   781  // Cause function returns cause value.
   782  func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Cause() error { return e.cause }
   783  
   784  // Key function returns key value.
   785  func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Key() bool { return e.key }
   786  
   787  // ErrorName returns error name.
   788  func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) ErrorName() string {
   789  	return "GrpcService_GoogleGrpc_CallCredentialsValidationError"
   790  }
   791  
   792  // Error satisfies the builtin error interface
   793  func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Error() string {
   794  	cause := ""
   795  	if e.cause != nil {
   796  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   797  	}
   798  
   799  	key := ""
   800  	if e.key {
   801  		key = "key for "
   802  	}
   803  
   804  	return fmt.Sprintf(
   805  		"invalid %sGrpcService_GoogleGrpc_CallCredentials.%s: %s%s",
   806  		key,
   807  		e.field,
   808  		e.reason,
   809  		cause)
   810  }
   811  
   812  var _ error = GrpcService_GoogleGrpc_CallCredentialsValidationError{}
   813  
   814  var _ interface {
   815  	Field() string
   816  	Reason() string
   817  	Key() bool
   818  	Cause() error
   819  	ErrorName() string
   820  } = GrpcService_GoogleGrpc_CallCredentialsValidationError{}
   821  
   822  // Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs with
   823  // the rules defined in the proto definition for this message. If any rules
   824  // are violated, an error is returned.
   825  func (m *GrpcService_GoogleGrpc_ChannelArgs) Validate() error {
   826  	if m == nil {
   827  		return nil
   828  	}
   829  
   830  	for key, val := range m.GetArgs() {
   831  		_ = val
   832  
   833  		// no validation rules for Args[key]
   834  
   835  		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
   836  			if err := v.Validate(); err != nil {
   837  				return GrpcService_GoogleGrpc_ChannelArgsValidationError{
   838  					field:  fmt.Sprintf("Args[%v]", key),
   839  					reason: "embedded message failed validation",
   840  					cause:  err,
   841  				}
   842  			}
   843  		}
   844  
   845  	}
   846  
   847  	return nil
   848  }
   849  
   850  // GrpcService_GoogleGrpc_ChannelArgsValidationError is the validation error
   851  // returned by GrpcService_GoogleGrpc_ChannelArgs.Validate if the designated
   852  // constraints aren't met.
   853  type GrpcService_GoogleGrpc_ChannelArgsValidationError struct {
   854  	field  string
   855  	reason string
   856  	cause  error
   857  	key    bool
   858  }
   859  
   860  // Field function returns field value.
   861  func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Field() string { return e.field }
   862  
   863  // Reason function returns reason value.
   864  func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Reason() string { return e.reason }
   865  
   866  // Cause function returns cause value.
   867  func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Cause() error { return e.cause }
   868  
   869  // Key function returns key value.
   870  func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Key() bool { return e.key }
   871  
   872  // ErrorName returns error name.
   873  func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) ErrorName() string {
   874  	return "GrpcService_GoogleGrpc_ChannelArgsValidationError"
   875  }
   876  
   877  // Error satisfies the builtin error interface
   878  func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Error() string {
   879  	cause := ""
   880  	if e.cause != nil {
   881  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   882  	}
   883  
   884  	key := ""
   885  	if e.key {
   886  		key = "key for "
   887  	}
   888  
   889  	return fmt.Sprintf(
   890  		"invalid %sGrpcService_GoogleGrpc_ChannelArgs.%s: %s%s",
   891  		key,
   892  		e.field,
   893  		e.reason,
   894  		cause)
   895  }
   896  
   897  var _ error = GrpcService_GoogleGrpc_ChannelArgsValidationError{}
   898  
   899  var _ interface {
   900  	Field() string
   901  	Reason() string
   902  	Key() bool
   903  	Cause() error
   904  	ErrorName() string
   905  } = GrpcService_GoogleGrpc_ChannelArgsValidationError{}
   906  
   907  // Validate checks the field values on
   908  // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials
   909  // with the rules defined in the proto definition for this message. If any
   910  // rules are violated, an error is returned.
   911  func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Validate() error {
   912  	if m == nil {
   913  		return nil
   914  	}
   915  
   916  	// no validation rules for JsonKey
   917  
   918  	// no validation rules for TokenLifetimeSeconds
   919  
   920  	return nil
   921  }
   922  
   923  // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError
   924  // is the validation error returned by
   925  // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Validate
   926  // if the designated constraints aren't met.
   927  type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError struct {
   928  	field  string
   929  	reason string
   930  	cause  error
   931  	key    bool
   932  }
   933  
   934  // Field function returns field value.
   935  func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Field() string {
   936  	return e.field
   937  }
   938  
   939  // Reason function returns reason value.
   940  func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Reason() string {
   941  	return e.reason
   942  }
   943  
   944  // Cause function returns cause value.
   945  func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Cause() error {
   946  	return e.cause
   947  }
   948  
   949  // Key function returns key value.
   950  func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Key() bool {
   951  	return e.key
   952  }
   953  
   954  // ErrorName returns error name.
   955  func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) ErrorName() string {
   956  	return "GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError"
   957  }
   958  
   959  // Error satisfies the builtin error interface
   960  func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Error() string {
   961  	cause := ""
   962  	if e.cause != nil {
   963  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   964  	}
   965  
   966  	key := ""
   967  	if e.key {
   968  		key = "key for "
   969  	}
   970  
   971  	return fmt.Sprintf(
   972  		"invalid %sGrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.%s: %s%s",
   973  		key,
   974  		e.field,
   975  		e.reason,
   976  		cause)
   977  }
   978  
   979  var _ error = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError{}
   980  
   981  var _ interface {
   982  	Field() string
   983  	Reason() string
   984  	Key() bool
   985  	Cause() error
   986  	ErrorName() string
   987  } = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError{}
   988  
   989  // Validate checks the field values on
   990  // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules
   991  // defined in the proto definition for this message. If any rules are
   992  // violated, an error is returned.
   993  func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Validate() error {
   994  	if m == nil {
   995  		return nil
   996  	}
   997  
   998  	// no validation rules for AuthorizationToken
   999  
  1000  	// no validation rules for AuthoritySelector
  1001  
  1002  	return nil
  1003  }
  1004  
  1005  // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError
  1006  // is the validation error returned by
  1007  // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Validate if the
  1008  // designated constraints aren't met.
  1009  type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError struct {
  1010  	field  string
  1011  	reason string
  1012  	cause  error
  1013  	key    bool
  1014  }
  1015  
  1016  // Field function returns field value.
  1017  func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Field() string {
  1018  	return e.field
  1019  }
  1020  
  1021  // Reason function returns reason value.
  1022  func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Reason() string {
  1023  	return e.reason
  1024  }
  1025  
  1026  // Cause function returns cause value.
  1027  func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Cause() error {
  1028  	return e.cause
  1029  }
  1030  
  1031  // Key function returns key value.
  1032  func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Key() bool {
  1033  	return e.key
  1034  }
  1035  
  1036  // ErrorName returns error name.
  1037  func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) ErrorName() string {
  1038  	return "GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError"
  1039  }
  1040  
  1041  // Error satisfies the builtin error interface
  1042  func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Error() string {
  1043  	cause := ""
  1044  	if e.cause != nil {
  1045  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1046  	}
  1047  
  1048  	key := ""
  1049  	if e.key {
  1050  		key = "key for "
  1051  	}
  1052  
  1053  	return fmt.Sprintf(
  1054  		"invalid %sGrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.%s: %s%s",
  1055  		key,
  1056  		e.field,
  1057  		e.reason,
  1058  		cause)
  1059  }
  1060  
  1061  var _ error = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError{}
  1062  
  1063  var _ interface {
  1064  	Field() string
  1065  	Reason() string
  1066  	Key() bool
  1067  	Cause() error
  1068  	ErrorName() string
  1069  } = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError{}
  1070  
  1071  // Validate checks the field values on
  1072  // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with
  1073  // the rules defined in the proto definition for this message. If any rules
  1074  // are violated, an error is returned.
  1075  func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Validate() error {
  1076  	if m == nil {
  1077  		return nil
  1078  	}
  1079  
  1080  	// no validation rules for Name
  1081  
  1082  	switch m.ConfigType.(type) {
  1083  
  1084  	case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig:
  1085  
  1086  		if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
  1087  			if err := v.Validate(); err != nil {
  1088  				return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{
  1089  					field:  "TypedConfig",
  1090  					reason: "embedded message failed validation",
  1091  					cause:  err,
  1092  				}
  1093  			}
  1094  		}
  1095  
  1096  	case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig:
  1097  
  1098  		if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok {
  1099  			if err := v.Validate(); err != nil {
  1100  				return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{
  1101  					field:  "HiddenEnvoyDeprecatedConfig",
  1102  					reason: "embedded message failed validation",
  1103  					cause:  err,
  1104  				}
  1105  			}
  1106  		}
  1107  
  1108  	}
  1109  
  1110  	return nil
  1111  }
  1112  
  1113  // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError
  1114  // is the validation error returned by
  1115  // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Validate
  1116  // if the designated constraints aren't met.
  1117  type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError struct {
  1118  	field  string
  1119  	reason string
  1120  	cause  error
  1121  	key    bool
  1122  }
  1123  
  1124  // Field function returns field value.
  1125  func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Field() string {
  1126  	return e.field
  1127  }
  1128  
  1129  // Reason function returns reason value.
  1130  func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Reason() string {
  1131  	return e.reason
  1132  }
  1133  
  1134  // Cause function returns cause value.
  1135  func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Cause() error {
  1136  	return e.cause
  1137  }
  1138  
  1139  // Key function returns key value.
  1140  func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Key() bool {
  1141  	return e.key
  1142  }
  1143  
  1144  // ErrorName returns error name.
  1145  func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) ErrorName() string {
  1146  	return "GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError"
  1147  }
  1148  
  1149  // Error satisfies the builtin error interface
  1150  func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Error() string {
  1151  	cause := ""
  1152  	if e.cause != nil {
  1153  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1154  	}
  1155  
  1156  	key := ""
  1157  	if e.key {
  1158  		key = "key for "
  1159  	}
  1160  
  1161  	return fmt.Sprintf(
  1162  		"invalid %sGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.%s: %s%s",
  1163  		key,
  1164  		e.field,
  1165  		e.reason,
  1166  		cause)
  1167  }
  1168  
  1169  var _ error = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{}
  1170  
  1171  var _ interface {
  1172  	Field() string
  1173  	Reason() string
  1174  	Key() bool
  1175  	Cause() error
  1176  	ErrorName() string
  1177  } = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{}
  1178  
  1179  // Validate checks the field values on
  1180  // GrpcService_GoogleGrpc_CallCredentials_StsService with the rules defined in
  1181  // the proto definition for this message. If any rules are violated, an error
  1182  // is returned.
  1183  func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error {
  1184  	if m == nil {
  1185  		return nil
  1186  	}
  1187  
  1188  	// no validation rules for TokenExchangeServiceUri
  1189  
  1190  	// no validation rules for Resource
  1191  
  1192  	// no validation rules for Audience
  1193  
  1194  	// no validation rules for Scope
  1195  
  1196  	// no validation rules for RequestedTokenType
  1197  
  1198  	if utf8.RuneCountInString(m.GetSubjectTokenPath()) < 1 {
  1199  		return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{
  1200  			field:  "SubjectTokenPath",
  1201  			reason: "value length must be at least 1 runes",
  1202  		}
  1203  	}
  1204  
  1205  	if utf8.RuneCountInString(m.GetSubjectTokenType()) < 1 {
  1206  		return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{
  1207  			field:  "SubjectTokenType",
  1208  			reason: "value length must be at least 1 runes",
  1209  		}
  1210  	}
  1211  
  1212  	// no validation rules for ActorTokenPath
  1213  
  1214  	// no validation rules for ActorTokenType
  1215  
  1216  	return nil
  1217  }
  1218  
  1219  // GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError is the
  1220  // validation error returned by
  1221  // GrpcService_GoogleGrpc_CallCredentials_StsService.Validate if the
  1222  // designated constraints aren't met.
  1223  type GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError struct {
  1224  	field  string
  1225  	reason string
  1226  	cause  error
  1227  	key    bool
  1228  }
  1229  
  1230  // Field function returns field value.
  1231  func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Field() string {
  1232  	return e.field
  1233  }
  1234  
  1235  // Reason function returns reason value.
  1236  func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Reason() string {
  1237  	return e.reason
  1238  }
  1239  
  1240  // Cause function returns cause value.
  1241  func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Cause() error {
  1242  	return e.cause
  1243  }
  1244  
  1245  // Key function returns key value.
  1246  func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Key() bool { return e.key }
  1247  
  1248  // ErrorName returns error name.
  1249  func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) ErrorName() string {
  1250  	return "GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError"
  1251  }
  1252  
  1253  // Error satisfies the builtin error interface
  1254  func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Error() string {
  1255  	cause := ""
  1256  	if e.cause != nil {
  1257  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1258  	}
  1259  
  1260  	key := ""
  1261  	if e.key {
  1262  		key = "key for "
  1263  	}
  1264  
  1265  	return fmt.Sprintf(
  1266  		"invalid %sGrpcService_GoogleGrpc_CallCredentials_StsService.%s: %s%s",
  1267  		key,
  1268  		e.field,
  1269  		e.reason,
  1270  		cause)
  1271  }
  1272  
  1273  var _ error = GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{}
  1274  
  1275  var _ interface {
  1276  	Field() string
  1277  	Reason() string
  1278  	Key() bool
  1279  	Cause() error
  1280  	ErrorName() string
  1281  } = GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{}
  1282  
  1283  // Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs_Value
  1284  // with the rules defined in the proto definition for this message. If any
  1285  // rules are violated, an error is returned.
  1286  func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) Validate() error {
  1287  	if m == nil {
  1288  		return nil
  1289  	}
  1290  
  1291  	switch m.ValueSpecifier.(type) {
  1292  
  1293  	case *GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue:
  1294  		// no validation rules for StringValue
  1295  
  1296  	case *GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue:
  1297  		// no validation rules for IntValue
  1298  
  1299  	default:
  1300  		return GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{
  1301  			field:  "ValueSpecifier",
  1302  			reason: "value is required",
  1303  		}
  1304  
  1305  	}
  1306  
  1307  	return nil
  1308  }
  1309  
  1310  // GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError is the validation
  1311  // error returned by GrpcService_GoogleGrpc_ChannelArgs_Value.Validate if the
  1312  // designated constraints aren't met.
  1313  type GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError struct {
  1314  	field  string
  1315  	reason string
  1316  	cause  error
  1317  	key    bool
  1318  }
  1319  
  1320  // Field function returns field value.
  1321  func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Field() string { return e.field }
  1322  
  1323  // Reason function returns reason value.
  1324  func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Reason() string { return e.reason }
  1325  
  1326  // Cause function returns cause value.
  1327  func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Cause() error { return e.cause }
  1328  
  1329  // Key function returns key value.
  1330  func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Key() bool { return e.key }
  1331  
  1332  // ErrorName returns error name.
  1333  func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) ErrorName() string {
  1334  	return "GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError"
  1335  }
  1336  
  1337  // Error satisfies the builtin error interface
  1338  func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Error() string {
  1339  	cause := ""
  1340  	if e.cause != nil {
  1341  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1342  	}
  1343  
  1344  	key := ""
  1345  	if e.key {
  1346  		key = "key for "
  1347  	}
  1348  
  1349  	return fmt.Sprintf(
  1350  		"invalid %sGrpcService_GoogleGrpc_ChannelArgs_Value.%s: %s%s",
  1351  		key,
  1352  		e.field,
  1353  		e.reason,
  1354  		cause)
  1355  }
  1356  
  1357  var _ error = GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{}
  1358  
  1359  var _ interface {
  1360  	Field() string
  1361  	Reason() string
  1362  	Key() bool
  1363  	Cause() error
  1364  	ErrorName() string
  1365  } = GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{}