github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/data/accesslog/v2/accesslog.pb.validate.go (about)

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: envoy/data/accesslog/v2/accesslog.proto
     3  
     4  package envoy_data_accesslog_v2
     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  	core "github.com/hxx258456/ccgo/go-control-plane/envoy/api/v2/core"
    21  )
    22  
    23  // ensure the imports are used
    24  var (
    25  	_ = bytes.MinRead
    26  	_ = errors.New("")
    27  	_ = fmt.Print
    28  	_ = utf8.UTFMax
    29  	_ = (*regexp.Regexp)(nil)
    30  	_ = (*strings.Reader)(nil)
    31  	_ = net.IPv4len
    32  	_ = time.Duration(0)
    33  	_ = (*url.URL)(nil)
    34  	_ = (*mail.Address)(nil)
    35  	_ = anypb.Any{}
    36  
    37  	_ = core.RequestMethod(0)
    38  )
    39  
    40  // Validate checks the field values on TCPAccessLogEntry with the rules defined
    41  // in the proto definition for this message. If any rules are violated, an
    42  // error is returned.
    43  func (m *TCPAccessLogEntry) Validate() error {
    44  	if m == nil {
    45  		return nil
    46  	}
    47  
    48  	if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok {
    49  		if err := v.Validate(); err != nil {
    50  			return TCPAccessLogEntryValidationError{
    51  				field:  "CommonProperties",
    52  				reason: "embedded message failed validation",
    53  				cause:  err,
    54  			}
    55  		}
    56  	}
    57  
    58  	if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok {
    59  		if err := v.Validate(); err != nil {
    60  			return TCPAccessLogEntryValidationError{
    61  				field:  "ConnectionProperties",
    62  				reason: "embedded message failed validation",
    63  				cause:  err,
    64  			}
    65  		}
    66  	}
    67  
    68  	return nil
    69  }
    70  
    71  // TCPAccessLogEntryValidationError is the validation error returned by
    72  // TCPAccessLogEntry.Validate if the designated constraints aren't met.
    73  type TCPAccessLogEntryValidationError struct {
    74  	field  string
    75  	reason string
    76  	cause  error
    77  	key    bool
    78  }
    79  
    80  // Field function returns field value.
    81  func (e TCPAccessLogEntryValidationError) Field() string { return e.field }
    82  
    83  // Reason function returns reason value.
    84  func (e TCPAccessLogEntryValidationError) Reason() string { return e.reason }
    85  
    86  // Cause function returns cause value.
    87  func (e TCPAccessLogEntryValidationError) Cause() error { return e.cause }
    88  
    89  // Key function returns key value.
    90  func (e TCPAccessLogEntryValidationError) Key() bool { return e.key }
    91  
    92  // ErrorName returns error name.
    93  func (e TCPAccessLogEntryValidationError) ErrorName() string {
    94  	return "TCPAccessLogEntryValidationError"
    95  }
    96  
    97  // Error satisfies the builtin error interface
    98  func (e TCPAccessLogEntryValidationError) Error() string {
    99  	cause := ""
   100  	if e.cause != nil {
   101  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   102  	}
   103  
   104  	key := ""
   105  	if e.key {
   106  		key = "key for "
   107  	}
   108  
   109  	return fmt.Sprintf(
   110  		"invalid %sTCPAccessLogEntry.%s: %s%s",
   111  		key,
   112  		e.field,
   113  		e.reason,
   114  		cause)
   115  }
   116  
   117  var _ error = TCPAccessLogEntryValidationError{}
   118  
   119  var _ interface {
   120  	Field() string
   121  	Reason() string
   122  	Key() bool
   123  	Cause() error
   124  	ErrorName() string
   125  } = TCPAccessLogEntryValidationError{}
   126  
   127  // Validate checks the field values on HTTPAccessLogEntry with the rules
   128  // defined in the proto definition for this message. If any rules are
   129  // violated, an error is returned.
   130  func (m *HTTPAccessLogEntry) Validate() error {
   131  	if m == nil {
   132  		return nil
   133  	}
   134  
   135  	if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok {
   136  		if err := v.Validate(); err != nil {
   137  			return HTTPAccessLogEntryValidationError{
   138  				field:  "CommonProperties",
   139  				reason: "embedded message failed validation",
   140  				cause:  err,
   141  			}
   142  		}
   143  	}
   144  
   145  	// no validation rules for ProtocolVersion
   146  
   147  	if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok {
   148  		if err := v.Validate(); err != nil {
   149  			return HTTPAccessLogEntryValidationError{
   150  				field:  "Request",
   151  				reason: "embedded message failed validation",
   152  				cause:  err,
   153  			}
   154  		}
   155  	}
   156  
   157  	if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok {
   158  		if err := v.Validate(); err != nil {
   159  			return HTTPAccessLogEntryValidationError{
   160  				field:  "Response",
   161  				reason: "embedded message failed validation",
   162  				cause:  err,
   163  			}
   164  		}
   165  	}
   166  
   167  	return nil
   168  }
   169  
   170  // HTTPAccessLogEntryValidationError is the validation error returned by
   171  // HTTPAccessLogEntry.Validate if the designated constraints aren't met.
   172  type HTTPAccessLogEntryValidationError struct {
   173  	field  string
   174  	reason string
   175  	cause  error
   176  	key    bool
   177  }
   178  
   179  // Field function returns field value.
   180  func (e HTTPAccessLogEntryValidationError) Field() string { return e.field }
   181  
   182  // Reason function returns reason value.
   183  func (e HTTPAccessLogEntryValidationError) Reason() string { return e.reason }
   184  
   185  // Cause function returns cause value.
   186  func (e HTTPAccessLogEntryValidationError) Cause() error { return e.cause }
   187  
   188  // Key function returns key value.
   189  func (e HTTPAccessLogEntryValidationError) Key() bool { return e.key }
   190  
   191  // ErrorName returns error name.
   192  func (e HTTPAccessLogEntryValidationError) ErrorName() string {
   193  	return "HTTPAccessLogEntryValidationError"
   194  }
   195  
   196  // Error satisfies the builtin error interface
   197  func (e HTTPAccessLogEntryValidationError) Error() string {
   198  	cause := ""
   199  	if e.cause != nil {
   200  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   201  	}
   202  
   203  	key := ""
   204  	if e.key {
   205  		key = "key for "
   206  	}
   207  
   208  	return fmt.Sprintf(
   209  		"invalid %sHTTPAccessLogEntry.%s: %s%s",
   210  		key,
   211  		e.field,
   212  		e.reason,
   213  		cause)
   214  }
   215  
   216  var _ error = HTTPAccessLogEntryValidationError{}
   217  
   218  var _ interface {
   219  	Field() string
   220  	Reason() string
   221  	Key() bool
   222  	Cause() error
   223  	ErrorName() string
   224  } = HTTPAccessLogEntryValidationError{}
   225  
   226  // Validate checks the field values on ConnectionProperties with the rules
   227  // defined in the proto definition for this message. If any rules are
   228  // violated, an error is returned.
   229  func (m *ConnectionProperties) Validate() error {
   230  	if m == nil {
   231  		return nil
   232  	}
   233  
   234  	// no validation rules for ReceivedBytes
   235  
   236  	// no validation rules for SentBytes
   237  
   238  	return nil
   239  }
   240  
   241  // ConnectionPropertiesValidationError is the validation error returned by
   242  // ConnectionProperties.Validate if the designated constraints aren't met.
   243  type ConnectionPropertiesValidationError struct {
   244  	field  string
   245  	reason string
   246  	cause  error
   247  	key    bool
   248  }
   249  
   250  // Field function returns field value.
   251  func (e ConnectionPropertiesValidationError) Field() string { return e.field }
   252  
   253  // Reason function returns reason value.
   254  func (e ConnectionPropertiesValidationError) Reason() string { return e.reason }
   255  
   256  // Cause function returns cause value.
   257  func (e ConnectionPropertiesValidationError) Cause() error { return e.cause }
   258  
   259  // Key function returns key value.
   260  func (e ConnectionPropertiesValidationError) Key() bool { return e.key }
   261  
   262  // ErrorName returns error name.
   263  func (e ConnectionPropertiesValidationError) ErrorName() string {
   264  	return "ConnectionPropertiesValidationError"
   265  }
   266  
   267  // Error satisfies the builtin error interface
   268  func (e ConnectionPropertiesValidationError) Error() string {
   269  	cause := ""
   270  	if e.cause != nil {
   271  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   272  	}
   273  
   274  	key := ""
   275  	if e.key {
   276  		key = "key for "
   277  	}
   278  
   279  	return fmt.Sprintf(
   280  		"invalid %sConnectionProperties.%s: %s%s",
   281  		key,
   282  		e.field,
   283  		e.reason,
   284  		cause)
   285  }
   286  
   287  var _ error = ConnectionPropertiesValidationError{}
   288  
   289  var _ interface {
   290  	Field() string
   291  	Reason() string
   292  	Key() bool
   293  	Cause() error
   294  	ErrorName() string
   295  } = ConnectionPropertiesValidationError{}
   296  
   297  // Validate checks the field values on AccessLogCommon with the rules defined
   298  // in the proto definition for this message. If any rules are violated, an
   299  // error is returned.
   300  func (m *AccessLogCommon) Validate() error {
   301  	if m == nil {
   302  		return nil
   303  	}
   304  
   305  	if val := m.GetSampleRate(); val <= 0 || val > 1 {
   306  		return AccessLogCommonValidationError{
   307  			field:  "SampleRate",
   308  			reason: "value must be inside range (0, 1]",
   309  		}
   310  	}
   311  
   312  	if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok {
   313  		if err := v.Validate(); err != nil {
   314  			return AccessLogCommonValidationError{
   315  				field:  "DownstreamRemoteAddress",
   316  				reason: "embedded message failed validation",
   317  				cause:  err,
   318  			}
   319  		}
   320  	}
   321  
   322  	if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok {
   323  		if err := v.Validate(); err != nil {
   324  			return AccessLogCommonValidationError{
   325  				field:  "DownstreamLocalAddress",
   326  				reason: "embedded message failed validation",
   327  				cause:  err,
   328  			}
   329  		}
   330  	}
   331  
   332  	if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok {
   333  		if err := v.Validate(); err != nil {
   334  			return AccessLogCommonValidationError{
   335  				field:  "TlsProperties",
   336  				reason: "embedded message failed validation",
   337  				cause:  err,
   338  			}
   339  		}
   340  	}
   341  
   342  	if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok {
   343  		if err := v.Validate(); err != nil {
   344  			return AccessLogCommonValidationError{
   345  				field:  "StartTime",
   346  				reason: "embedded message failed validation",
   347  				cause:  err,
   348  			}
   349  		}
   350  	}
   351  
   352  	if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok {
   353  		if err := v.Validate(); err != nil {
   354  			return AccessLogCommonValidationError{
   355  				field:  "TimeToLastRxByte",
   356  				reason: "embedded message failed validation",
   357  				cause:  err,
   358  			}
   359  		}
   360  	}
   361  
   362  	if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok {
   363  		if err := v.Validate(); err != nil {
   364  			return AccessLogCommonValidationError{
   365  				field:  "TimeToFirstUpstreamTxByte",
   366  				reason: "embedded message failed validation",
   367  				cause:  err,
   368  			}
   369  		}
   370  	}
   371  
   372  	if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok {
   373  		if err := v.Validate(); err != nil {
   374  			return AccessLogCommonValidationError{
   375  				field:  "TimeToLastUpstreamTxByte",
   376  				reason: "embedded message failed validation",
   377  				cause:  err,
   378  			}
   379  		}
   380  	}
   381  
   382  	if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok {
   383  		if err := v.Validate(); err != nil {
   384  			return AccessLogCommonValidationError{
   385  				field:  "TimeToFirstUpstreamRxByte",
   386  				reason: "embedded message failed validation",
   387  				cause:  err,
   388  			}
   389  		}
   390  	}
   391  
   392  	if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok {
   393  		if err := v.Validate(); err != nil {
   394  			return AccessLogCommonValidationError{
   395  				field:  "TimeToLastUpstreamRxByte",
   396  				reason: "embedded message failed validation",
   397  				cause:  err,
   398  			}
   399  		}
   400  	}
   401  
   402  	if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok {
   403  		if err := v.Validate(); err != nil {
   404  			return AccessLogCommonValidationError{
   405  				field:  "TimeToFirstDownstreamTxByte",
   406  				reason: "embedded message failed validation",
   407  				cause:  err,
   408  			}
   409  		}
   410  	}
   411  
   412  	if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok {
   413  		if err := v.Validate(); err != nil {
   414  			return AccessLogCommonValidationError{
   415  				field:  "TimeToLastDownstreamTxByte",
   416  				reason: "embedded message failed validation",
   417  				cause:  err,
   418  			}
   419  		}
   420  	}
   421  
   422  	if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok {
   423  		if err := v.Validate(); err != nil {
   424  			return AccessLogCommonValidationError{
   425  				field:  "UpstreamRemoteAddress",
   426  				reason: "embedded message failed validation",
   427  				cause:  err,
   428  			}
   429  		}
   430  	}
   431  
   432  	if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok {
   433  		if err := v.Validate(); err != nil {
   434  			return AccessLogCommonValidationError{
   435  				field:  "UpstreamLocalAddress",
   436  				reason: "embedded message failed validation",
   437  				cause:  err,
   438  			}
   439  		}
   440  	}
   441  
   442  	// no validation rules for UpstreamCluster
   443  
   444  	if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok {
   445  		if err := v.Validate(); err != nil {
   446  			return AccessLogCommonValidationError{
   447  				field:  "ResponseFlags",
   448  				reason: "embedded message failed validation",
   449  				cause:  err,
   450  			}
   451  		}
   452  	}
   453  
   454  	if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
   455  		if err := v.Validate(); err != nil {
   456  			return AccessLogCommonValidationError{
   457  				field:  "Metadata",
   458  				reason: "embedded message failed validation",
   459  				cause:  err,
   460  			}
   461  		}
   462  	}
   463  
   464  	// no validation rules for UpstreamTransportFailureReason
   465  
   466  	// no validation rules for RouteName
   467  
   468  	if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok {
   469  		if err := v.Validate(); err != nil {
   470  			return AccessLogCommonValidationError{
   471  				field:  "DownstreamDirectRemoteAddress",
   472  				reason: "embedded message failed validation",
   473  				cause:  err,
   474  			}
   475  		}
   476  	}
   477  
   478  	for key, val := range m.GetFilterStateObjects() {
   479  		_ = val
   480  
   481  		// no validation rules for FilterStateObjects[key]
   482  
   483  		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
   484  			if err := v.Validate(); err != nil {
   485  				return AccessLogCommonValidationError{
   486  					field:  fmt.Sprintf("FilterStateObjects[%v]", key),
   487  					reason: "embedded message failed validation",
   488  					cause:  err,
   489  				}
   490  			}
   491  		}
   492  
   493  	}
   494  
   495  	return nil
   496  }
   497  
   498  // AccessLogCommonValidationError is the validation error returned by
   499  // AccessLogCommon.Validate if the designated constraints aren't met.
   500  type AccessLogCommonValidationError struct {
   501  	field  string
   502  	reason string
   503  	cause  error
   504  	key    bool
   505  }
   506  
   507  // Field function returns field value.
   508  func (e AccessLogCommonValidationError) Field() string { return e.field }
   509  
   510  // Reason function returns reason value.
   511  func (e AccessLogCommonValidationError) Reason() string { return e.reason }
   512  
   513  // Cause function returns cause value.
   514  func (e AccessLogCommonValidationError) Cause() error { return e.cause }
   515  
   516  // Key function returns key value.
   517  func (e AccessLogCommonValidationError) Key() bool { return e.key }
   518  
   519  // ErrorName returns error name.
   520  func (e AccessLogCommonValidationError) ErrorName() string { return "AccessLogCommonValidationError" }
   521  
   522  // Error satisfies the builtin error interface
   523  func (e AccessLogCommonValidationError) Error() string {
   524  	cause := ""
   525  	if e.cause != nil {
   526  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   527  	}
   528  
   529  	key := ""
   530  	if e.key {
   531  		key = "key for "
   532  	}
   533  
   534  	return fmt.Sprintf(
   535  		"invalid %sAccessLogCommon.%s: %s%s",
   536  		key,
   537  		e.field,
   538  		e.reason,
   539  		cause)
   540  }
   541  
   542  var _ error = AccessLogCommonValidationError{}
   543  
   544  var _ interface {
   545  	Field() string
   546  	Reason() string
   547  	Key() bool
   548  	Cause() error
   549  	ErrorName() string
   550  } = AccessLogCommonValidationError{}
   551  
   552  // Validate checks the field values on ResponseFlags with the rules defined in
   553  // the proto definition for this message. If any rules are violated, an error
   554  // is returned.
   555  func (m *ResponseFlags) Validate() error {
   556  	if m == nil {
   557  		return nil
   558  	}
   559  
   560  	// no validation rules for FailedLocalHealthcheck
   561  
   562  	// no validation rules for NoHealthyUpstream
   563  
   564  	// no validation rules for UpstreamRequestTimeout
   565  
   566  	// no validation rules for LocalReset
   567  
   568  	// no validation rules for UpstreamRemoteReset
   569  
   570  	// no validation rules for UpstreamConnectionFailure
   571  
   572  	// no validation rules for UpstreamConnectionTermination
   573  
   574  	// no validation rules for UpstreamOverflow
   575  
   576  	// no validation rules for NoRouteFound
   577  
   578  	// no validation rules for DelayInjected
   579  
   580  	// no validation rules for FaultInjected
   581  
   582  	// no validation rules for RateLimited
   583  
   584  	if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok {
   585  		if err := v.Validate(); err != nil {
   586  			return ResponseFlagsValidationError{
   587  				field:  "UnauthorizedDetails",
   588  				reason: "embedded message failed validation",
   589  				cause:  err,
   590  			}
   591  		}
   592  	}
   593  
   594  	// no validation rules for RateLimitServiceError
   595  
   596  	// no validation rules for DownstreamConnectionTermination
   597  
   598  	// no validation rules for UpstreamRetryLimitExceeded
   599  
   600  	// no validation rules for StreamIdleTimeout
   601  
   602  	// no validation rules for InvalidEnvoyRequestHeaders
   603  
   604  	// no validation rules for DownstreamProtocolError
   605  
   606  	return nil
   607  }
   608  
   609  // ResponseFlagsValidationError is the validation error returned by
   610  // ResponseFlags.Validate if the designated constraints aren't met.
   611  type ResponseFlagsValidationError struct {
   612  	field  string
   613  	reason string
   614  	cause  error
   615  	key    bool
   616  }
   617  
   618  // Field function returns field value.
   619  func (e ResponseFlagsValidationError) Field() string { return e.field }
   620  
   621  // Reason function returns reason value.
   622  func (e ResponseFlagsValidationError) Reason() string { return e.reason }
   623  
   624  // Cause function returns cause value.
   625  func (e ResponseFlagsValidationError) Cause() error { return e.cause }
   626  
   627  // Key function returns key value.
   628  func (e ResponseFlagsValidationError) Key() bool { return e.key }
   629  
   630  // ErrorName returns error name.
   631  func (e ResponseFlagsValidationError) ErrorName() string { return "ResponseFlagsValidationError" }
   632  
   633  // Error satisfies the builtin error interface
   634  func (e ResponseFlagsValidationError) Error() string {
   635  	cause := ""
   636  	if e.cause != nil {
   637  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   638  	}
   639  
   640  	key := ""
   641  	if e.key {
   642  		key = "key for "
   643  	}
   644  
   645  	return fmt.Sprintf(
   646  		"invalid %sResponseFlags.%s: %s%s",
   647  		key,
   648  		e.field,
   649  		e.reason,
   650  		cause)
   651  }
   652  
   653  var _ error = ResponseFlagsValidationError{}
   654  
   655  var _ interface {
   656  	Field() string
   657  	Reason() string
   658  	Key() bool
   659  	Cause() error
   660  	ErrorName() string
   661  } = ResponseFlagsValidationError{}
   662  
   663  // Validate checks the field values on TLSProperties with the rules defined in
   664  // the proto definition for this message. If any rules are violated, an error
   665  // is returned.
   666  func (m *TLSProperties) Validate() error {
   667  	if m == nil {
   668  		return nil
   669  	}
   670  
   671  	// no validation rules for TlsVersion
   672  
   673  	if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok {
   674  		if err := v.Validate(); err != nil {
   675  			return TLSPropertiesValidationError{
   676  				field:  "TlsCipherSuite",
   677  				reason: "embedded message failed validation",
   678  				cause:  err,
   679  			}
   680  		}
   681  	}
   682  
   683  	// no validation rules for TlsSniHostname
   684  
   685  	if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok {
   686  		if err := v.Validate(); err != nil {
   687  			return TLSPropertiesValidationError{
   688  				field:  "LocalCertificateProperties",
   689  				reason: "embedded message failed validation",
   690  				cause:  err,
   691  			}
   692  		}
   693  	}
   694  
   695  	if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok {
   696  		if err := v.Validate(); err != nil {
   697  			return TLSPropertiesValidationError{
   698  				field:  "PeerCertificateProperties",
   699  				reason: "embedded message failed validation",
   700  				cause:  err,
   701  			}
   702  		}
   703  	}
   704  
   705  	// no validation rules for TlsSessionId
   706  
   707  	return nil
   708  }
   709  
   710  // TLSPropertiesValidationError is the validation error returned by
   711  // TLSProperties.Validate if the designated constraints aren't met.
   712  type TLSPropertiesValidationError struct {
   713  	field  string
   714  	reason string
   715  	cause  error
   716  	key    bool
   717  }
   718  
   719  // Field function returns field value.
   720  func (e TLSPropertiesValidationError) Field() string { return e.field }
   721  
   722  // Reason function returns reason value.
   723  func (e TLSPropertiesValidationError) Reason() string { return e.reason }
   724  
   725  // Cause function returns cause value.
   726  func (e TLSPropertiesValidationError) Cause() error { return e.cause }
   727  
   728  // Key function returns key value.
   729  func (e TLSPropertiesValidationError) Key() bool { return e.key }
   730  
   731  // ErrorName returns error name.
   732  func (e TLSPropertiesValidationError) ErrorName() string { return "TLSPropertiesValidationError" }
   733  
   734  // Error satisfies the builtin error interface
   735  func (e TLSPropertiesValidationError) Error() string {
   736  	cause := ""
   737  	if e.cause != nil {
   738  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   739  	}
   740  
   741  	key := ""
   742  	if e.key {
   743  		key = "key for "
   744  	}
   745  
   746  	return fmt.Sprintf(
   747  		"invalid %sTLSProperties.%s: %s%s",
   748  		key,
   749  		e.field,
   750  		e.reason,
   751  		cause)
   752  }
   753  
   754  var _ error = TLSPropertiesValidationError{}
   755  
   756  var _ interface {
   757  	Field() string
   758  	Reason() string
   759  	Key() bool
   760  	Cause() error
   761  	ErrorName() string
   762  } = TLSPropertiesValidationError{}
   763  
   764  // Validate checks the field values on HTTPRequestProperties with the rules
   765  // defined in the proto definition for this message. If any rules are
   766  // violated, an error is returned.
   767  func (m *HTTPRequestProperties) Validate() error {
   768  	if m == nil {
   769  		return nil
   770  	}
   771  
   772  	if _, ok := core.RequestMethod_name[int32(m.GetRequestMethod())]; !ok {
   773  		return HTTPRequestPropertiesValidationError{
   774  			field:  "RequestMethod",
   775  			reason: "value must be one of the defined enum values",
   776  		}
   777  	}
   778  
   779  	// no validation rules for Scheme
   780  
   781  	// no validation rules for Authority
   782  
   783  	if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok {
   784  		if err := v.Validate(); err != nil {
   785  			return HTTPRequestPropertiesValidationError{
   786  				field:  "Port",
   787  				reason: "embedded message failed validation",
   788  				cause:  err,
   789  			}
   790  		}
   791  	}
   792  
   793  	// no validation rules for Path
   794  
   795  	// no validation rules for UserAgent
   796  
   797  	// no validation rules for Referer
   798  
   799  	// no validation rules for ForwardedFor
   800  
   801  	// no validation rules for RequestId
   802  
   803  	// no validation rules for OriginalPath
   804  
   805  	// no validation rules for RequestHeadersBytes
   806  
   807  	// no validation rules for RequestBodyBytes
   808  
   809  	// no validation rules for RequestHeaders
   810  
   811  	return nil
   812  }
   813  
   814  // HTTPRequestPropertiesValidationError is the validation error returned by
   815  // HTTPRequestProperties.Validate if the designated constraints aren't met.
   816  type HTTPRequestPropertiesValidationError struct {
   817  	field  string
   818  	reason string
   819  	cause  error
   820  	key    bool
   821  }
   822  
   823  // Field function returns field value.
   824  func (e HTTPRequestPropertiesValidationError) Field() string { return e.field }
   825  
   826  // Reason function returns reason value.
   827  func (e HTTPRequestPropertiesValidationError) Reason() string { return e.reason }
   828  
   829  // Cause function returns cause value.
   830  func (e HTTPRequestPropertiesValidationError) Cause() error { return e.cause }
   831  
   832  // Key function returns key value.
   833  func (e HTTPRequestPropertiesValidationError) Key() bool { return e.key }
   834  
   835  // ErrorName returns error name.
   836  func (e HTTPRequestPropertiesValidationError) ErrorName() string {
   837  	return "HTTPRequestPropertiesValidationError"
   838  }
   839  
   840  // Error satisfies the builtin error interface
   841  func (e HTTPRequestPropertiesValidationError) Error() string {
   842  	cause := ""
   843  	if e.cause != nil {
   844  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   845  	}
   846  
   847  	key := ""
   848  	if e.key {
   849  		key = "key for "
   850  	}
   851  
   852  	return fmt.Sprintf(
   853  		"invalid %sHTTPRequestProperties.%s: %s%s",
   854  		key,
   855  		e.field,
   856  		e.reason,
   857  		cause)
   858  }
   859  
   860  var _ error = HTTPRequestPropertiesValidationError{}
   861  
   862  var _ interface {
   863  	Field() string
   864  	Reason() string
   865  	Key() bool
   866  	Cause() error
   867  	ErrorName() string
   868  } = HTTPRequestPropertiesValidationError{}
   869  
   870  // Validate checks the field values on HTTPResponseProperties with the rules
   871  // defined in the proto definition for this message. If any rules are
   872  // violated, an error is returned.
   873  func (m *HTTPResponseProperties) Validate() error {
   874  	if m == nil {
   875  		return nil
   876  	}
   877  
   878  	if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok {
   879  		if err := v.Validate(); err != nil {
   880  			return HTTPResponsePropertiesValidationError{
   881  				field:  "ResponseCode",
   882  				reason: "embedded message failed validation",
   883  				cause:  err,
   884  			}
   885  		}
   886  	}
   887  
   888  	// no validation rules for ResponseHeadersBytes
   889  
   890  	// no validation rules for ResponseBodyBytes
   891  
   892  	// no validation rules for ResponseHeaders
   893  
   894  	// no validation rules for ResponseTrailers
   895  
   896  	// no validation rules for ResponseCodeDetails
   897  
   898  	return nil
   899  }
   900  
   901  // HTTPResponsePropertiesValidationError is the validation error returned by
   902  // HTTPResponseProperties.Validate if the designated constraints aren't met.
   903  type HTTPResponsePropertiesValidationError struct {
   904  	field  string
   905  	reason string
   906  	cause  error
   907  	key    bool
   908  }
   909  
   910  // Field function returns field value.
   911  func (e HTTPResponsePropertiesValidationError) Field() string { return e.field }
   912  
   913  // Reason function returns reason value.
   914  func (e HTTPResponsePropertiesValidationError) Reason() string { return e.reason }
   915  
   916  // Cause function returns cause value.
   917  func (e HTTPResponsePropertiesValidationError) Cause() error { return e.cause }
   918  
   919  // Key function returns key value.
   920  func (e HTTPResponsePropertiesValidationError) Key() bool { return e.key }
   921  
   922  // ErrorName returns error name.
   923  func (e HTTPResponsePropertiesValidationError) ErrorName() string {
   924  	return "HTTPResponsePropertiesValidationError"
   925  }
   926  
   927  // Error satisfies the builtin error interface
   928  func (e HTTPResponsePropertiesValidationError) Error() string {
   929  	cause := ""
   930  	if e.cause != nil {
   931  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   932  	}
   933  
   934  	key := ""
   935  	if e.key {
   936  		key = "key for "
   937  	}
   938  
   939  	return fmt.Sprintf(
   940  		"invalid %sHTTPResponseProperties.%s: %s%s",
   941  		key,
   942  		e.field,
   943  		e.reason,
   944  		cause)
   945  }
   946  
   947  var _ error = HTTPResponsePropertiesValidationError{}
   948  
   949  var _ interface {
   950  	Field() string
   951  	Reason() string
   952  	Key() bool
   953  	Cause() error
   954  	ErrorName() string
   955  } = HTTPResponsePropertiesValidationError{}
   956  
   957  // Validate checks the field values on ResponseFlags_Unauthorized with the
   958  // rules defined in the proto definition for this message. If any rules are
   959  // violated, an error is returned.
   960  func (m *ResponseFlags_Unauthorized) Validate() error {
   961  	if m == nil {
   962  		return nil
   963  	}
   964  
   965  	// no validation rules for Reason
   966  
   967  	return nil
   968  }
   969  
   970  // ResponseFlags_UnauthorizedValidationError is the validation error returned
   971  // by ResponseFlags_Unauthorized.Validate if the designated constraints aren't met.
   972  type ResponseFlags_UnauthorizedValidationError struct {
   973  	field  string
   974  	reason string
   975  	cause  error
   976  	key    bool
   977  }
   978  
   979  // Field function returns field value.
   980  func (e ResponseFlags_UnauthorizedValidationError) Field() string { return e.field }
   981  
   982  // Reason function returns reason value.
   983  func (e ResponseFlags_UnauthorizedValidationError) Reason() string { return e.reason }
   984  
   985  // Cause function returns cause value.
   986  func (e ResponseFlags_UnauthorizedValidationError) Cause() error { return e.cause }
   987  
   988  // Key function returns key value.
   989  func (e ResponseFlags_UnauthorizedValidationError) Key() bool { return e.key }
   990  
   991  // ErrorName returns error name.
   992  func (e ResponseFlags_UnauthorizedValidationError) ErrorName() string {
   993  	return "ResponseFlags_UnauthorizedValidationError"
   994  }
   995  
   996  // Error satisfies the builtin error interface
   997  func (e ResponseFlags_UnauthorizedValidationError) Error() string {
   998  	cause := ""
   999  	if e.cause != nil {
  1000  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1001  	}
  1002  
  1003  	key := ""
  1004  	if e.key {
  1005  		key = "key for "
  1006  	}
  1007  
  1008  	return fmt.Sprintf(
  1009  		"invalid %sResponseFlags_Unauthorized.%s: %s%s",
  1010  		key,
  1011  		e.field,
  1012  		e.reason,
  1013  		cause)
  1014  }
  1015  
  1016  var _ error = ResponseFlags_UnauthorizedValidationError{}
  1017  
  1018  var _ interface {
  1019  	Field() string
  1020  	Reason() string
  1021  	Key() bool
  1022  	Cause() error
  1023  	ErrorName() string
  1024  } = ResponseFlags_UnauthorizedValidationError{}
  1025  
  1026  // Validate checks the field values on TLSProperties_CertificateProperties with
  1027  // the rules defined in the proto definition for this message. If any rules
  1028  // are violated, an error is returned.
  1029  func (m *TLSProperties_CertificateProperties) Validate() error {
  1030  	if m == nil {
  1031  		return nil
  1032  	}
  1033  
  1034  	for idx, item := range m.GetSubjectAltName() {
  1035  		_, _ = idx, item
  1036  
  1037  		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1038  			if err := v.Validate(); err != nil {
  1039  				return TLSProperties_CertificatePropertiesValidationError{
  1040  					field:  fmt.Sprintf("SubjectAltName[%v]", idx),
  1041  					reason: "embedded message failed validation",
  1042  					cause:  err,
  1043  				}
  1044  			}
  1045  		}
  1046  
  1047  	}
  1048  
  1049  	// no validation rules for Subject
  1050  
  1051  	return nil
  1052  }
  1053  
  1054  // TLSProperties_CertificatePropertiesValidationError is the validation error
  1055  // returned by TLSProperties_CertificateProperties.Validate if the designated
  1056  // constraints aren't met.
  1057  type TLSProperties_CertificatePropertiesValidationError struct {
  1058  	field  string
  1059  	reason string
  1060  	cause  error
  1061  	key    bool
  1062  }
  1063  
  1064  // Field function returns field value.
  1065  func (e TLSProperties_CertificatePropertiesValidationError) Field() string { return e.field }
  1066  
  1067  // Reason function returns reason value.
  1068  func (e TLSProperties_CertificatePropertiesValidationError) Reason() string { return e.reason }
  1069  
  1070  // Cause function returns cause value.
  1071  func (e TLSProperties_CertificatePropertiesValidationError) Cause() error { return e.cause }
  1072  
  1073  // Key function returns key value.
  1074  func (e TLSProperties_CertificatePropertiesValidationError) Key() bool { return e.key }
  1075  
  1076  // ErrorName returns error name.
  1077  func (e TLSProperties_CertificatePropertiesValidationError) ErrorName() string {
  1078  	return "TLSProperties_CertificatePropertiesValidationError"
  1079  }
  1080  
  1081  // Error satisfies the builtin error interface
  1082  func (e TLSProperties_CertificatePropertiesValidationError) Error() string {
  1083  	cause := ""
  1084  	if e.cause != nil {
  1085  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1086  	}
  1087  
  1088  	key := ""
  1089  	if e.key {
  1090  		key = "key for "
  1091  	}
  1092  
  1093  	return fmt.Sprintf(
  1094  		"invalid %sTLSProperties_CertificateProperties.%s: %s%s",
  1095  		key,
  1096  		e.field,
  1097  		e.reason,
  1098  		cause)
  1099  }
  1100  
  1101  var _ error = TLSProperties_CertificatePropertiesValidationError{}
  1102  
  1103  var _ interface {
  1104  	Field() string
  1105  	Reason() string
  1106  	Key() bool
  1107  	Cause() error
  1108  	ErrorName() string
  1109  } = TLSProperties_CertificatePropertiesValidationError{}
  1110  
  1111  // Validate checks the field values on
  1112  // TLSProperties_CertificateProperties_SubjectAltName with the rules defined
  1113  // in the proto definition for this message. If any rules are violated, an
  1114  // error is returned.
  1115  func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error {
  1116  	if m == nil {
  1117  		return nil
  1118  	}
  1119  
  1120  	switch m.San.(type) {
  1121  
  1122  	case *TLSProperties_CertificateProperties_SubjectAltName_Uri:
  1123  		// no validation rules for Uri
  1124  
  1125  	case *TLSProperties_CertificateProperties_SubjectAltName_Dns:
  1126  		// no validation rules for Dns
  1127  
  1128  	}
  1129  
  1130  	return nil
  1131  }
  1132  
  1133  // TLSProperties_CertificateProperties_SubjectAltNameValidationError is the
  1134  // validation error returned by
  1135  // TLSProperties_CertificateProperties_SubjectAltName.Validate if the
  1136  // designated constraints aren't met.
  1137  type TLSProperties_CertificateProperties_SubjectAltNameValidationError struct {
  1138  	field  string
  1139  	reason string
  1140  	cause  error
  1141  	key    bool
  1142  }
  1143  
  1144  // Field function returns field value.
  1145  func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Field() string {
  1146  	return e.field
  1147  }
  1148  
  1149  // Reason function returns reason value.
  1150  func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Reason() string {
  1151  	return e.reason
  1152  }
  1153  
  1154  // Cause function returns cause value.
  1155  func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Cause() error {
  1156  	return e.cause
  1157  }
  1158  
  1159  // Key function returns key value.
  1160  func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Key() bool { return e.key }
  1161  
  1162  // ErrorName returns error name.
  1163  func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) ErrorName() string {
  1164  	return "TLSProperties_CertificateProperties_SubjectAltNameValidationError"
  1165  }
  1166  
  1167  // Error satisfies the builtin error interface
  1168  func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Error() string {
  1169  	cause := ""
  1170  	if e.cause != nil {
  1171  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1172  	}
  1173  
  1174  	key := ""
  1175  	if e.key {
  1176  		key = "key for "
  1177  	}
  1178  
  1179  	return fmt.Sprintf(
  1180  		"invalid %sTLSProperties_CertificateProperties_SubjectAltName.%s: %s%s",
  1181  		key,
  1182  		e.field,
  1183  		e.reason,
  1184  		cause)
  1185  }
  1186  
  1187  var _ error = TLSProperties_CertificateProperties_SubjectAltNameValidationError{}
  1188  
  1189  var _ interface {
  1190  	Field() string
  1191  	Reason() string
  1192  	Key() bool
  1193  	Cause() error
  1194  	ErrorName() string
  1195  } = TLSProperties_CertificateProperties_SubjectAltNameValidationError{}