...

Source file src/github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/status/v2/csds.pb.validate.go

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/status/v2

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: envoy/service/status/v2/csds.proto
     3  
     4  package statusv2
     5  
     6  import (
     7  	"bytes"
     8  	"errors"
     9  	"fmt"
    10  	"net"
    11  	"net/mail"
    12  	"net/url"
    13  	"regexp"
    14  	"sort"
    15  	"strings"
    16  	"time"
    17  	"unicode/utf8"
    18  
    19  	"google.golang.org/protobuf/types/known/anypb"
    20  )
    21  
    22  // ensure the imports are used
    23  var (
    24  	_ = bytes.MinRead
    25  	_ = errors.New("")
    26  	_ = fmt.Print
    27  	_ = utf8.UTFMax
    28  	_ = (*regexp.Regexp)(nil)
    29  	_ = (*strings.Reader)(nil)
    30  	_ = net.IPv4len
    31  	_ = time.Duration(0)
    32  	_ = (*url.URL)(nil)
    33  	_ = (*mail.Address)(nil)
    34  	_ = anypb.Any{}
    35  	_ = sort.Sort
    36  )
    37  
    38  // Validate checks the field values on ClientStatusRequest with the rules
    39  // defined in the proto definition for this message. If any rules are
    40  // violated, the first error encountered is returned, or nil if there are no violations.
    41  func (m *ClientStatusRequest) Validate() error {
    42  	return m.validate(false)
    43  }
    44  
    45  // ValidateAll checks the field values on ClientStatusRequest with the rules
    46  // defined in the proto definition for this message. If any rules are
    47  // violated, the result is a list of violation errors wrapped in
    48  // ClientStatusRequestMultiError, or nil if none found.
    49  func (m *ClientStatusRequest) ValidateAll() error {
    50  	return m.validate(true)
    51  }
    52  
    53  func (m *ClientStatusRequest) validate(all bool) error {
    54  	if m == nil {
    55  		return nil
    56  	}
    57  
    58  	var errors []error
    59  
    60  	for idx, item := range m.GetNodeMatchers() {
    61  		_, _ = idx, item
    62  
    63  		if all {
    64  			switch v := interface{}(item).(type) {
    65  			case interface{ ValidateAll() error }:
    66  				if err := v.ValidateAll(); err != nil {
    67  					errors = append(errors, ClientStatusRequestValidationError{
    68  						field:  fmt.Sprintf("NodeMatchers[%v]", idx),
    69  						reason: "embedded message failed validation",
    70  						cause:  err,
    71  					})
    72  				}
    73  			case interface{ Validate() error }:
    74  				if err := v.Validate(); err != nil {
    75  					errors = append(errors, ClientStatusRequestValidationError{
    76  						field:  fmt.Sprintf("NodeMatchers[%v]", idx),
    77  						reason: "embedded message failed validation",
    78  						cause:  err,
    79  					})
    80  				}
    81  			}
    82  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
    83  			if err := v.Validate(); err != nil {
    84  				return ClientStatusRequestValidationError{
    85  					field:  fmt.Sprintf("NodeMatchers[%v]", idx),
    86  					reason: "embedded message failed validation",
    87  					cause:  err,
    88  				}
    89  			}
    90  		}
    91  
    92  	}
    93  
    94  	if len(errors) > 0 {
    95  		return ClientStatusRequestMultiError(errors)
    96  	}
    97  
    98  	return nil
    99  }
   100  
   101  // ClientStatusRequestMultiError is an error wrapping multiple validation
   102  // errors returned by ClientStatusRequest.ValidateAll() if the designated
   103  // constraints aren't met.
   104  type ClientStatusRequestMultiError []error
   105  
   106  // Error returns a concatenation of all the error messages it wraps.
   107  func (m ClientStatusRequestMultiError) Error() string {
   108  	var msgs []string
   109  	for _, err := range m {
   110  		msgs = append(msgs, err.Error())
   111  	}
   112  	return strings.Join(msgs, "; ")
   113  }
   114  
   115  // AllErrors returns a list of validation violation errors.
   116  func (m ClientStatusRequestMultiError) AllErrors() []error { return m }
   117  
   118  // ClientStatusRequestValidationError is the validation error returned by
   119  // ClientStatusRequest.Validate if the designated constraints aren't met.
   120  type ClientStatusRequestValidationError struct {
   121  	field  string
   122  	reason string
   123  	cause  error
   124  	key    bool
   125  }
   126  
   127  // Field function returns field value.
   128  func (e ClientStatusRequestValidationError) Field() string { return e.field }
   129  
   130  // Reason function returns reason value.
   131  func (e ClientStatusRequestValidationError) Reason() string { return e.reason }
   132  
   133  // Cause function returns cause value.
   134  func (e ClientStatusRequestValidationError) Cause() error { return e.cause }
   135  
   136  // Key function returns key value.
   137  func (e ClientStatusRequestValidationError) Key() bool { return e.key }
   138  
   139  // ErrorName returns error name.
   140  func (e ClientStatusRequestValidationError) ErrorName() string {
   141  	return "ClientStatusRequestValidationError"
   142  }
   143  
   144  // Error satisfies the builtin error interface
   145  func (e ClientStatusRequestValidationError) Error() string {
   146  	cause := ""
   147  	if e.cause != nil {
   148  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   149  	}
   150  
   151  	key := ""
   152  	if e.key {
   153  		key = "key for "
   154  	}
   155  
   156  	return fmt.Sprintf(
   157  		"invalid %sClientStatusRequest.%s: %s%s",
   158  		key,
   159  		e.field,
   160  		e.reason,
   161  		cause)
   162  }
   163  
   164  var _ error = ClientStatusRequestValidationError{}
   165  
   166  var _ interface {
   167  	Field() string
   168  	Reason() string
   169  	Key() bool
   170  	Cause() error
   171  	ErrorName() string
   172  } = ClientStatusRequestValidationError{}
   173  
   174  // Validate checks the field values on PerXdsConfig with the rules defined in
   175  // the proto definition for this message. If any rules are violated, the first
   176  // error encountered is returned, or nil if there are no violations.
   177  func (m *PerXdsConfig) Validate() error {
   178  	return m.validate(false)
   179  }
   180  
   181  // ValidateAll checks the field values on PerXdsConfig with the rules defined
   182  // in the proto definition for this message. If any rules are violated, the
   183  // result is a list of violation errors wrapped in PerXdsConfigMultiError, or
   184  // nil if none found.
   185  func (m *PerXdsConfig) ValidateAll() error {
   186  	return m.validate(true)
   187  }
   188  
   189  func (m *PerXdsConfig) validate(all bool) error {
   190  	if m == nil {
   191  		return nil
   192  	}
   193  
   194  	var errors []error
   195  
   196  	// no validation rules for Status
   197  
   198  	switch v := m.PerXdsConfig.(type) {
   199  	case *PerXdsConfig_ListenerConfig:
   200  		if v == nil {
   201  			err := PerXdsConfigValidationError{
   202  				field:  "PerXdsConfig",
   203  				reason: "oneof value cannot be a typed-nil",
   204  			}
   205  			if !all {
   206  				return err
   207  			}
   208  			errors = append(errors, err)
   209  		}
   210  
   211  		if all {
   212  			switch v := interface{}(m.GetListenerConfig()).(type) {
   213  			case interface{ ValidateAll() error }:
   214  				if err := v.ValidateAll(); err != nil {
   215  					errors = append(errors, PerXdsConfigValidationError{
   216  						field:  "ListenerConfig",
   217  						reason: "embedded message failed validation",
   218  						cause:  err,
   219  					})
   220  				}
   221  			case interface{ Validate() error }:
   222  				if err := v.Validate(); err != nil {
   223  					errors = append(errors, PerXdsConfigValidationError{
   224  						field:  "ListenerConfig",
   225  						reason: "embedded message failed validation",
   226  						cause:  err,
   227  					})
   228  				}
   229  			}
   230  		} else if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok {
   231  			if err := v.Validate(); err != nil {
   232  				return PerXdsConfigValidationError{
   233  					field:  "ListenerConfig",
   234  					reason: "embedded message failed validation",
   235  					cause:  err,
   236  				}
   237  			}
   238  		}
   239  
   240  	case *PerXdsConfig_ClusterConfig:
   241  		if v == nil {
   242  			err := PerXdsConfigValidationError{
   243  				field:  "PerXdsConfig",
   244  				reason: "oneof value cannot be a typed-nil",
   245  			}
   246  			if !all {
   247  				return err
   248  			}
   249  			errors = append(errors, err)
   250  		}
   251  
   252  		if all {
   253  			switch v := interface{}(m.GetClusterConfig()).(type) {
   254  			case interface{ ValidateAll() error }:
   255  				if err := v.ValidateAll(); err != nil {
   256  					errors = append(errors, PerXdsConfigValidationError{
   257  						field:  "ClusterConfig",
   258  						reason: "embedded message failed validation",
   259  						cause:  err,
   260  					})
   261  				}
   262  			case interface{ Validate() error }:
   263  				if err := v.Validate(); err != nil {
   264  					errors = append(errors, PerXdsConfigValidationError{
   265  						field:  "ClusterConfig",
   266  						reason: "embedded message failed validation",
   267  						cause:  err,
   268  					})
   269  				}
   270  			}
   271  		} else if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok {
   272  			if err := v.Validate(); err != nil {
   273  				return PerXdsConfigValidationError{
   274  					field:  "ClusterConfig",
   275  					reason: "embedded message failed validation",
   276  					cause:  err,
   277  				}
   278  			}
   279  		}
   280  
   281  	case *PerXdsConfig_RouteConfig:
   282  		if v == nil {
   283  			err := PerXdsConfigValidationError{
   284  				field:  "PerXdsConfig",
   285  				reason: "oneof value cannot be a typed-nil",
   286  			}
   287  			if !all {
   288  				return err
   289  			}
   290  			errors = append(errors, err)
   291  		}
   292  
   293  		if all {
   294  			switch v := interface{}(m.GetRouteConfig()).(type) {
   295  			case interface{ ValidateAll() error }:
   296  				if err := v.ValidateAll(); err != nil {
   297  					errors = append(errors, PerXdsConfigValidationError{
   298  						field:  "RouteConfig",
   299  						reason: "embedded message failed validation",
   300  						cause:  err,
   301  					})
   302  				}
   303  			case interface{ Validate() error }:
   304  				if err := v.Validate(); err != nil {
   305  					errors = append(errors, PerXdsConfigValidationError{
   306  						field:  "RouteConfig",
   307  						reason: "embedded message failed validation",
   308  						cause:  err,
   309  					})
   310  				}
   311  			}
   312  		} else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
   313  			if err := v.Validate(); err != nil {
   314  				return PerXdsConfigValidationError{
   315  					field:  "RouteConfig",
   316  					reason: "embedded message failed validation",
   317  					cause:  err,
   318  				}
   319  			}
   320  		}
   321  
   322  	case *PerXdsConfig_ScopedRouteConfig:
   323  		if v == nil {
   324  			err := PerXdsConfigValidationError{
   325  				field:  "PerXdsConfig",
   326  				reason: "oneof value cannot be a typed-nil",
   327  			}
   328  			if !all {
   329  				return err
   330  			}
   331  			errors = append(errors, err)
   332  		}
   333  
   334  		if all {
   335  			switch v := interface{}(m.GetScopedRouteConfig()).(type) {
   336  			case interface{ ValidateAll() error }:
   337  				if err := v.ValidateAll(); err != nil {
   338  					errors = append(errors, PerXdsConfigValidationError{
   339  						field:  "ScopedRouteConfig",
   340  						reason: "embedded message failed validation",
   341  						cause:  err,
   342  					})
   343  				}
   344  			case interface{ Validate() error }:
   345  				if err := v.Validate(); err != nil {
   346  					errors = append(errors, PerXdsConfigValidationError{
   347  						field:  "ScopedRouteConfig",
   348  						reason: "embedded message failed validation",
   349  						cause:  err,
   350  					})
   351  				}
   352  			}
   353  		} else if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok {
   354  			if err := v.Validate(); err != nil {
   355  				return PerXdsConfigValidationError{
   356  					field:  "ScopedRouteConfig",
   357  					reason: "embedded message failed validation",
   358  					cause:  err,
   359  				}
   360  			}
   361  		}
   362  
   363  	default:
   364  		_ = v // ensures v is used
   365  	}
   366  
   367  	if len(errors) > 0 {
   368  		return PerXdsConfigMultiError(errors)
   369  	}
   370  
   371  	return nil
   372  }
   373  
   374  // PerXdsConfigMultiError is an error wrapping multiple validation errors
   375  // returned by PerXdsConfig.ValidateAll() if the designated constraints aren't met.
   376  type PerXdsConfigMultiError []error
   377  
   378  // Error returns a concatenation of all the error messages it wraps.
   379  func (m PerXdsConfigMultiError) Error() string {
   380  	var msgs []string
   381  	for _, err := range m {
   382  		msgs = append(msgs, err.Error())
   383  	}
   384  	return strings.Join(msgs, "; ")
   385  }
   386  
   387  // AllErrors returns a list of validation violation errors.
   388  func (m PerXdsConfigMultiError) AllErrors() []error { return m }
   389  
   390  // PerXdsConfigValidationError is the validation error returned by
   391  // PerXdsConfig.Validate if the designated constraints aren't met.
   392  type PerXdsConfigValidationError struct {
   393  	field  string
   394  	reason string
   395  	cause  error
   396  	key    bool
   397  }
   398  
   399  // Field function returns field value.
   400  func (e PerXdsConfigValidationError) Field() string { return e.field }
   401  
   402  // Reason function returns reason value.
   403  func (e PerXdsConfigValidationError) Reason() string { return e.reason }
   404  
   405  // Cause function returns cause value.
   406  func (e PerXdsConfigValidationError) Cause() error { return e.cause }
   407  
   408  // Key function returns key value.
   409  func (e PerXdsConfigValidationError) Key() bool { return e.key }
   410  
   411  // ErrorName returns error name.
   412  func (e PerXdsConfigValidationError) ErrorName() string { return "PerXdsConfigValidationError" }
   413  
   414  // Error satisfies the builtin error interface
   415  func (e PerXdsConfigValidationError) Error() string {
   416  	cause := ""
   417  	if e.cause != nil {
   418  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   419  	}
   420  
   421  	key := ""
   422  	if e.key {
   423  		key = "key for "
   424  	}
   425  
   426  	return fmt.Sprintf(
   427  		"invalid %sPerXdsConfig.%s: %s%s",
   428  		key,
   429  		e.field,
   430  		e.reason,
   431  		cause)
   432  }
   433  
   434  var _ error = PerXdsConfigValidationError{}
   435  
   436  var _ interface {
   437  	Field() string
   438  	Reason() string
   439  	Key() bool
   440  	Cause() error
   441  	ErrorName() string
   442  } = PerXdsConfigValidationError{}
   443  
   444  // Validate checks the field values on ClientConfig with the rules defined in
   445  // the proto definition for this message. If any rules are violated, the first
   446  // error encountered is returned, or nil if there are no violations.
   447  func (m *ClientConfig) Validate() error {
   448  	return m.validate(false)
   449  }
   450  
   451  // ValidateAll checks the field values on ClientConfig with the rules defined
   452  // in the proto definition for this message. If any rules are violated, the
   453  // result is a list of violation errors wrapped in ClientConfigMultiError, or
   454  // nil if none found.
   455  func (m *ClientConfig) ValidateAll() error {
   456  	return m.validate(true)
   457  }
   458  
   459  func (m *ClientConfig) validate(all bool) error {
   460  	if m == nil {
   461  		return nil
   462  	}
   463  
   464  	var errors []error
   465  
   466  	if all {
   467  		switch v := interface{}(m.GetNode()).(type) {
   468  		case interface{ ValidateAll() error }:
   469  			if err := v.ValidateAll(); err != nil {
   470  				errors = append(errors, ClientConfigValidationError{
   471  					field:  "Node",
   472  					reason: "embedded message failed validation",
   473  					cause:  err,
   474  				})
   475  			}
   476  		case interface{ Validate() error }:
   477  			if err := v.Validate(); err != nil {
   478  				errors = append(errors, ClientConfigValidationError{
   479  					field:  "Node",
   480  					reason: "embedded message failed validation",
   481  					cause:  err,
   482  				})
   483  			}
   484  		}
   485  	} else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
   486  		if err := v.Validate(); err != nil {
   487  			return ClientConfigValidationError{
   488  				field:  "Node",
   489  				reason: "embedded message failed validation",
   490  				cause:  err,
   491  			}
   492  		}
   493  	}
   494  
   495  	for idx, item := range m.GetXdsConfig() {
   496  		_, _ = idx, item
   497  
   498  		if all {
   499  			switch v := interface{}(item).(type) {
   500  			case interface{ ValidateAll() error }:
   501  				if err := v.ValidateAll(); err != nil {
   502  					errors = append(errors, ClientConfigValidationError{
   503  						field:  fmt.Sprintf("XdsConfig[%v]", idx),
   504  						reason: "embedded message failed validation",
   505  						cause:  err,
   506  					})
   507  				}
   508  			case interface{ Validate() error }:
   509  				if err := v.Validate(); err != nil {
   510  					errors = append(errors, ClientConfigValidationError{
   511  						field:  fmt.Sprintf("XdsConfig[%v]", idx),
   512  						reason: "embedded message failed validation",
   513  						cause:  err,
   514  					})
   515  				}
   516  			}
   517  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   518  			if err := v.Validate(); err != nil {
   519  				return ClientConfigValidationError{
   520  					field:  fmt.Sprintf("XdsConfig[%v]", idx),
   521  					reason: "embedded message failed validation",
   522  					cause:  err,
   523  				}
   524  			}
   525  		}
   526  
   527  	}
   528  
   529  	if len(errors) > 0 {
   530  		return ClientConfigMultiError(errors)
   531  	}
   532  
   533  	return nil
   534  }
   535  
   536  // ClientConfigMultiError is an error wrapping multiple validation errors
   537  // returned by ClientConfig.ValidateAll() if the designated constraints aren't met.
   538  type ClientConfigMultiError []error
   539  
   540  // Error returns a concatenation of all the error messages it wraps.
   541  func (m ClientConfigMultiError) Error() string {
   542  	var msgs []string
   543  	for _, err := range m {
   544  		msgs = append(msgs, err.Error())
   545  	}
   546  	return strings.Join(msgs, "; ")
   547  }
   548  
   549  // AllErrors returns a list of validation violation errors.
   550  func (m ClientConfigMultiError) AllErrors() []error { return m }
   551  
   552  // ClientConfigValidationError is the validation error returned by
   553  // ClientConfig.Validate if the designated constraints aren't met.
   554  type ClientConfigValidationError struct {
   555  	field  string
   556  	reason string
   557  	cause  error
   558  	key    bool
   559  }
   560  
   561  // Field function returns field value.
   562  func (e ClientConfigValidationError) Field() string { return e.field }
   563  
   564  // Reason function returns reason value.
   565  func (e ClientConfigValidationError) Reason() string { return e.reason }
   566  
   567  // Cause function returns cause value.
   568  func (e ClientConfigValidationError) Cause() error { return e.cause }
   569  
   570  // Key function returns key value.
   571  func (e ClientConfigValidationError) Key() bool { return e.key }
   572  
   573  // ErrorName returns error name.
   574  func (e ClientConfigValidationError) ErrorName() string { return "ClientConfigValidationError" }
   575  
   576  // Error satisfies the builtin error interface
   577  func (e ClientConfigValidationError) Error() string {
   578  	cause := ""
   579  	if e.cause != nil {
   580  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   581  	}
   582  
   583  	key := ""
   584  	if e.key {
   585  		key = "key for "
   586  	}
   587  
   588  	return fmt.Sprintf(
   589  		"invalid %sClientConfig.%s: %s%s",
   590  		key,
   591  		e.field,
   592  		e.reason,
   593  		cause)
   594  }
   595  
   596  var _ error = ClientConfigValidationError{}
   597  
   598  var _ interface {
   599  	Field() string
   600  	Reason() string
   601  	Key() bool
   602  	Cause() error
   603  	ErrorName() string
   604  } = ClientConfigValidationError{}
   605  
   606  // Validate checks the field values on ClientStatusResponse with the rules
   607  // defined in the proto definition for this message. If any rules are
   608  // violated, the first error encountered is returned, or nil if there are no violations.
   609  func (m *ClientStatusResponse) Validate() error {
   610  	return m.validate(false)
   611  }
   612  
   613  // ValidateAll checks the field values on ClientStatusResponse with the rules
   614  // defined in the proto definition for this message. If any rules are
   615  // violated, the result is a list of violation errors wrapped in
   616  // ClientStatusResponseMultiError, or nil if none found.
   617  func (m *ClientStatusResponse) ValidateAll() error {
   618  	return m.validate(true)
   619  }
   620  
   621  func (m *ClientStatusResponse) validate(all bool) error {
   622  	if m == nil {
   623  		return nil
   624  	}
   625  
   626  	var errors []error
   627  
   628  	for idx, item := range m.GetConfig() {
   629  		_, _ = idx, item
   630  
   631  		if all {
   632  			switch v := interface{}(item).(type) {
   633  			case interface{ ValidateAll() error }:
   634  				if err := v.ValidateAll(); err != nil {
   635  					errors = append(errors, ClientStatusResponseValidationError{
   636  						field:  fmt.Sprintf("Config[%v]", idx),
   637  						reason: "embedded message failed validation",
   638  						cause:  err,
   639  					})
   640  				}
   641  			case interface{ Validate() error }:
   642  				if err := v.Validate(); err != nil {
   643  					errors = append(errors, ClientStatusResponseValidationError{
   644  						field:  fmt.Sprintf("Config[%v]", idx),
   645  						reason: "embedded message failed validation",
   646  						cause:  err,
   647  					})
   648  				}
   649  			}
   650  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   651  			if err := v.Validate(); err != nil {
   652  				return ClientStatusResponseValidationError{
   653  					field:  fmt.Sprintf("Config[%v]", idx),
   654  					reason: "embedded message failed validation",
   655  					cause:  err,
   656  				}
   657  			}
   658  		}
   659  
   660  	}
   661  
   662  	if len(errors) > 0 {
   663  		return ClientStatusResponseMultiError(errors)
   664  	}
   665  
   666  	return nil
   667  }
   668  
   669  // ClientStatusResponseMultiError is an error wrapping multiple validation
   670  // errors returned by ClientStatusResponse.ValidateAll() if the designated
   671  // constraints aren't met.
   672  type ClientStatusResponseMultiError []error
   673  
   674  // Error returns a concatenation of all the error messages it wraps.
   675  func (m ClientStatusResponseMultiError) Error() string {
   676  	var msgs []string
   677  	for _, err := range m {
   678  		msgs = append(msgs, err.Error())
   679  	}
   680  	return strings.Join(msgs, "; ")
   681  }
   682  
   683  // AllErrors returns a list of validation violation errors.
   684  func (m ClientStatusResponseMultiError) AllErrors() []error { return m }
   685  
   686  // ClientStatusResponseValidationError is the validation error returned by
   687  // ClientStatusResponse.Validate if the designated constraints aren't met.
   688  type ClientStatusResponseValidationError struct {
   689  	field  string
   690  	reason string
   691  	cause  error
   692  	key    bool
   693  }
   694  
   695  // Field function returns field value.
   696  func (e ClientStatusResponseValidationError) Field() string { return e.field }
   697  
   698  // Reason function returns reason value.
   699  func (e ClientStatusResponseValidationError) Reason() string { return e.reason }
   700  
   701  // Cause function returns cause value.
   702  func (e ClientStatusResponseValidationError) Cause() error { return e.cause }
   703  
   704  // Key function returns key value.
   705  func (e ClientStatusResponseValidationError) Key() bool { return e.key }
   706  
   707  // ErrorName returns error name.
   708  func (e ClientStatusResponseValidationError) ErrorName() string {
   709  	return "ClientStatusResponseValidationError"
   710  }
   711  
   712  // Error satisfies the builtin error interface
   713  func (e ClientStatusResponseValidationError) Error() string {
   714  	cause := ""
   715  	if e.cause != nil {
   716  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   717  	}
   718  
   719  	key := ""
   720  	if e.key {
   721  		key = "key for "
   722  	}
   723  
   724  	return fmt.Sprintf(
   725  		"invalid %sClientStatusResponse.%s: %s%s",
   726  		key,
   727  		e.field,
   728  		e.reason,
   729  		cause)
   730  }
   731  
   732  var _ error = ClientStatusResponseValidationError{}
   733  
   734  var _ interface {
   735  	Field() string
   736  	Reason() string
   737  	Key() bool
   738  	Cause() error
   739  	ErrorName() string
   740  } = ClientStatusResponseValidationError{}
   741  

View as plain text