go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/internal/rpc/admin/api/admin.pb.validate.go (about)

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: go.chromium.org/luci/cv/internal/rpc/admin/api/admin.proto
     3  
     4  package adminpb
     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  	run "go.chromium.org/luci/cv/internal/run"
    22  )
    23  
    24  // ensure the imports are used
    25  var (
    26  	_ = bytes.MinRead
    27  	_ = errors.New("")
    28  	_ = fmt.Print
    29  	_ = utf8.UTFMax
    30  	_ = (*regexp.Regexp)(nil)
    31  	_ = (*strings.Reader)(nil)
    32  	_ = net.IPv4len
    33  	_ = time.Duration(0)
    34  	_ = (*url.URL)(nil)
    35  	_ = (*mail.Address)(nil)
    36  	_ = anypb.Any{}
    37  	_ = sort.Sort
    38  
    39  	_ = run.Status(0)
    40  )
    41  
    42  // Validate checks the field values on GetProjectRequest with the rules defined
    43  // in the proto definition for this message. If any rules are violated, the
    44  // first error encountered is returned, or nil if there are no violations.
    45  func (m *GetProjectRequest) Validate() error {
    46  	return m.validate(false)
    47  }
    48  
    49  // ValidateAll checks the field values on GetProjectRequest with the rules
    50  // defined in the proto definition for this message. If any rules are
    51  // violated, the result is a list of violation errors wrapped in
    52  // GetProjectRequestMultiError, or nil if none found.
    53  func (m *GetProjectRequest) ValidateAll() error {
    54  	return m.validate(true)
    55  }
    56  
    57  func (m *GetProjectRequest) validate(all bool) error {
    58  	if m == nil {
    59  		return nil
    60  	}
    61  
    62  	var errors []error
    63  
    64  	// no validation rules for Project
    65  
    66  	if len(errors) > 0 {
    67  		return GetProjectRequestMultiError(errors)
    68  	}
    69  
    70  	return nil
    71  }
    72  
    73  // GetProjectRequestMultiError is an error wrapping multiple validation errors
    74  // returned by GetProjectRequest.ValidateAll() if the designated constraints
    75  // aren't met.
    76  type GetProjectRequestMultiError []error
    77  
    78  // Error returns a concatenation of all the error messages it wraps.
    79  func (m GetProjectRequestMultiError) Error() string {
    80  	var msgs []string
    81  	for _, err := range m {
    82  		msgs = append(msgs, err.Error())
    83  	}
    84  	return strings.Join(msgs, "; ")
    85  }
    86  
    87  // AllErrors returns a list of validation violation errors.
    88  func (m GetProjectRequestMultiError) AllErrors() []error { return m }
    89  
    90  // GetProjectRequestValidationError is the validation error returned by
    91  // GetProjectRequest.Validate if the designated constraints aren't met.
    92  type GetProjectRequestValidationError struct {
    93  	field  string
    94  	reason string
    95  	cause  error
    96  	key    bool
    97  }
    98  
    99  // Field function returns field value.
   100  func (e GetProjectRequestValidationError) Field() string { return e.field }
   101  
   102  // Reason function returns reason value.
   103  func (e GetProjectRequestValidationError) Reason() string { return e.reason }
   104  
   105  // Cause function returns cause value.
   106  func (e GetProjectRequestValidationError) Cause() error { return e.cause }
   107  
   108  // Key function returns key value.
   109  func (e GetProjectRequestValidationError) Key() bool { return e.key }
   110  
   111  // ErrorName returns error name.
   112  func (e GetProjectRequestValidationError) ErrorName() string {
   113  	return "GetProjectRequestValidationError"
   114  }
   115  
   116  // Error satisfies the builtin error interface
   117  func (e GetProjectRequestValidationError) Error() string {
   118  	cause := ""
   119  	if e.cause != nil {
   120  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   121  	}
   122  
   123  	key := ""
   124  	if e.key {
   125  		key = "key for "
   126  	}
   127  
   128  	return fmt.Sprintf(
   129  		"invalid %sGetProjectRequest.%s: %s%s",
   130  		key,
   131  		e.field,
   132  		e.reason,
   133  		cause)
   134  }
   135  
   136  var _ error = GetProjectRequestValidationError{}
   137  
   138  var _ interface {
   139  	Field() string
   140  	Reason() string
   141  	Key() bool
   142  	Cause() error
   143  	ErrorName() string
   144  } = GetProjectRequestValidationError{}
   145  
   146  // Validate checks the field values on GetProjectResponse with the rules
   147  // defined in the proto definition for this message. If any rules are
   148  // violated, the first error encountered is returned, or nil if there are no violations.
   149  func (m *GetProjectResponse) Validate() error {
   150  	return m.validate(false)
   151  }
   152  
   153  // ValidateAll checks the field values on GetProjectResponse with the rules
   154  // defined in the proto definition for this message. If any rules are
   155  // violated, the result is a list of violation errors wrapped in
   156  // GetProjectResponseMultiError, or nil if none found.
   157  func (m *GetProjectResponse) ValidateAll() error {
   158  	return m.validate(true)
   159  }
   160  
   161  func (m *GetProjectResponse) validate(all bool) error {
   162  	if m == nil {
   163  		return nil
   164  	}
   165  
   166  	var errors []error
   167  
   168  	if all {
   169  		switch v := interface{}(m.GetState()).(type) {
   170  		case interface{ ValidateAll() error }:
   171  			if err := v.ValidateAll(); err != nil {
   172  				errors = append(errors, GetProjectResponseValidationError{
   173  					field:  "State",
   174  					reason: "embedded message failed validation",
   175  					cause:  err,
   176  				})
   177  			}
   178  		case interface{ Validate() error }:
   179  			if err := v.Validate(); err != nil {
   180  				errors = append(errors, GetProjectResponseValidationError{
   181  					field:  "State",
   182  					reason: "embedded message failed validation",
   183  					cause:  err,
   184  				})
   185  			}
   186  		}
   187  	} else if v, ok := interface{}(m.GetState()).(interface{ Validate() error }); ok {
   188  		if err := v.Validate(); err != nil {
   189  			return GetProjectResponseValidationError{
   190  				field:  "State",
   191  				reason: "embedded message failed validation",
   192  				cause:  err,
   193  			}
   194  		}
   195  	}
   196  
   197  	for idx, item := range m.GetEvents() {
   198  		_, _ = idx, item
   199  
   200  		if all {
   201  			switch v := interface{}(item).(type) {
   202  			case interface{ ValidateAll() error }:
   203  				if err := v.ValidateAll(); err != nil {
   204  					errors = append(errors, GetProjectResponseValidationError{
   205  						field:  fmt.Sprintf("Events[%v]", idx),
   206  						reason: "embedded message failed validation",
   207  						cause:  err,
   208  					})
   209  				}
   210  			case interface{ Validate() error }:
   211  				if err := v.Validate(); err != nil {
   212  					errors = append(errors, GetProjectResponseValidationError{
   213  						field:  fmt.Sprintf("Events[%v]", idx),
   214  						reason: "embedded message failed validation",
   215  						cause:  err,
   216  					})
   217  				}
   218  			}
   219  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   220  			if err := v.Validate(); err != nil {
   221  				return GetProjectResponseValidationError{
   222  					field:  fmt.Sprintf("Events[%v]", idx),
   223  					reason: "embedded message failed validation",
   224  					cause:  err,
   225  				}
   226  			}
   227  		}
   228  
   229  	}
   230  
   231  	if len(errors) > 0 {
   232  		return GetProjectResponseMultiError(errors)
   233  	}
   234  
   235  	return nil
   236  }
   237  
   238  // GetProjectResponseMultiError is an error wrapping multiple validation errors
   239  // returned by GetProjectResponse.ValidateAll() if the designated constraints
   240  // aren't met.
   241  type GetProjectResponseMultiError []error
   242  
   243  // Error returns a concatenation of all the error messages it wraps.
   244  func (m GetProjectResponseMultiError) Error() string {
   245  	var msgs []string
   246  	for _, err := range m {
   247  		msgs = append(msgs, err.Error())
   248  	}
   249  	return strings.Join(msgs, "; ")
   250  }
   251  
   252  // AllErrors returns a list of validation violation errors.
   253  func (m GetProjectResponseMultiError) AllErrors() []error { return m }
   254  
   255  // GetProjectResponseValidationError is the validation error returned by
   256  // GetProjectResponse.Validate if the designated constraints aren't met.
   257  type GetProjectResponseValidationError struct {
   258  	field  string
   259  	reason string
   260  	cause  error
   261  	key    bool
   262  }
   263  
   264  // Field function returns field value.
   265  func (e GetProjectResponseValidationError) Field() string { return e.field }
   266  
   267  // Reason function returns reason value.
   268  func (e GetProjectResponseValidationError) Reason() string { return e.reason }
   269  
   270  // Cause function returns cause value.
   271  func (e GetProjectResponseValidationError) Cause() error { return e.cause }
   272  
   273  // Key function returns key value.
   274  func (e GetProjectResponseValidationError) Key() bool { return e.key }
   275  
   276  // ErrorName returns error name.
   277  func (e GetProjectResponseValidationError) ErrorName() string {
   278  	return "GetProjectResponseValidationError"
   279  }
   280  
   281  // Error satisfies the builtin error interface
   282  func (e GetProjectResponseValidationError) Error() string {
   283  	cause := ""
   284  	if e.cause != nil {
   285  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   286  	}
   287  
   288  	key := ""
   289  	if e.key {
   290  		key = "key for "
   291  	}
   292  
   293  	return fmt.Sprintf(
   294  		"invalid %sGetProjectResponse.%s: %s%s",
   295  		key,
   296  		e.field,
   297  		e.reason,
   298  		cause)
   299  }
   300  
   301  var _ error = GetProjectResponseValidationError{}
   302  
   303  var _ interface {
   304  	Field() string
   305  	Reason() string
   306  	Key() bool
   307  	Cause() error
   308  	ErrorName() string
   309  } = GetProjectResponseValidationError{}
   310  
   311  // Validate checks the field values on GetProjectLogsRequest with the rules
   312  // defined in the proto definition for this message. If any rules are
   313  // violated, the first error encountered is returned, or nil if there are no violations.
   314  func (m *GetProjectLogsRequest) Validate() error {
   315  	return m.validate(false)
   316  }
   317  
   318  // ValidateAll checks the field values on GetProjectLogsRequest with the rules
   319  // defined in the proto definition for this message. If any rules are
   320  // violated, the result is a list of violation errors wrapped in
   321  // GetProjectLogsRequestMultiError, or nil if none found.
   322  func (m *GetProjectLogsRequest) ValidateAll() error {
   323  	return m.validate(true)
   324  }
   325  
   326  func (m *GetProjectLogsRequest) validate(all bool) error {
   327  	if m == nil {
   328  		return nil
   329  	}
   330  
   331  	var errors []error
   332  
   333  	// no validation rules for PageSize
   334  
   335  	// no validation rules for PageToken
   336  
   337  	// no validation rules for Project
   338  
   339  	// no validation rules for EversionMin
   340  
   341  	// no validation rules for EversionMax
   342  
   343  	if len(errors) > 0 {
   344  		return GetProjectLogsRequestMultiError(errors)
   345  	}
   346  
   347  	return nil
   348  }
   349  
   350  // GetProjectLogsRequestMultiError is an error wrapping multiple validation
   351  // errors returned by GetProjectLogsRequest.ValidateAll() if the designated
   352  // constraints aren't met.
   353  type GetProjectLogsRequestMultiError []error
   354  
   355  // Error returns a concatenation of all the error messages it wraps.
   356  func (m GetProjectLogsRequestMultiError) Error() string {
   357  	var msgs []string
   358  	for _, err := range m {
   359  		msgs = append(msgs, err.Error())
   360  	}
   361  	return strings.Join(msgs, "; ")
   362  }
   363  
   364  // AllErrors returns a list of validation violation errors.
   365  func (m GetProjectLogsRequestMultiError) AllErrors() []error { return m }
   366  
   367  // GetProjectLogsRequestValidationError is the validation error returned by
   368  // GetProjectLogsRequest.Validate if the designated constraints aren't met.
   369  type GetProjectLogsRequestValidationError struct {
   370  	field  string
   371  	reason string
   372  	cause  error
   373  	key    bool
   374  }
   375  
   376  // Field function returns field value.
   377  func (e GetProjectLogsRequestValidationError) Field() string { return e.field }
   378  
   379  // Reason function returns reason value.
   380  func (e GetProjectLogsRequestValidationError) Reason() string { return e.reason }
   381  
   382  // Cause function returns cause value.
   383  func (e GetProjectLogsRequestValidationError) Cause() error { return e.cause }
   384  
   385  // Key function returns key value.
   386  func (e GetProjectLogsRequestValidationError) Key() bool { return e.key }
   387  
   388  // ErrorName returns error name.
   389  func (e GetProjectLogsRequestValidationError) ErrorName() string {
   390  	return "GetProjectLogsRequestValidationError"
   391  }
   392  
   393  // Error satisfies the builtin error interface
   394  func (e GetProjectLogsRequestValidationError) Error() string {
   395  	cause := ""
   396  	if e.cause != nil {
   397  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   398  	}
   399  
   400  	key := ""
   401  	if e.key {
   402  		key = "key for "
   403  	}
   404  
   405  	return fmt.Sprintf(
   406  		"invalid %sGetProjectLogsRequest.%s: %s%s",
   407  		key,
   408  		e.field,
   409  		e.reason,
   410  		cause)
   411  }
   412  
   413  var _ error = GetProjectLogsRequestValidationError{}
   414  
   415  var _ interface {
   416  	Field() string
   417  	Reason() string
   418  	Key() bool
   419  	Cause() error
   420  	ErrorName() string
   421  } = GetProjectLogsRequestValidationError{}
   422  
   423  // Validate checks the field values on GetProjectLogsResponse with the rules
   424  // defined in the proto definition for this message. If any rules are
   425  // violated, the first error encountered is returned, or nil if there are no violations.
   426  func (m *GetProjectLogsResponse) Validate() error {
   427  	return m.validate(false)
   428  }
   429  
   430  // ValidateAll checks the field values on GetProjectLogsResponse with the rules
   431  // defined in the proto definition for this message. If any rules are
   432  // violated, the result is a list of violation errors wrapped in
   433  // GetProjectLogsResponseMultiError, or nil if none found.
   434  func (m *GetProjectLogsResponse) ValidateAll() error {
   435  	return m.validate(true)
   436  }
   437  
   438  func (m *GetProjectLogsResponse) validate(all bool) error {
   439  	if m == nil {
   440  		return nil
   441  	}
   442  
   443  	var errors []error
   444  
   445  	for idx, item := range m.GetLogs() {
   446  		_, _ = idx, item
   447  
   448  		if all {
   449  			switch v := interface{}(item).(type) {
   450  			case interface{ ValidateAll() error }:
   451  				if err := v.ValidateAll(); err != nil {
   452  					errors = append(errors, GetProjectLogsResponseValidationError{
   453  						field:  fmt.Sprintf("Logs[%v]", idx),
   454  						reason: "embedded message failed validation",
   455  						cause:  err,
   456  					})
   457  				}
   458  			case interface{ Validate() error }:
   459  				if err := v.Validate(); err != nil {
   460  					errors = append(errors, GetProjectLogsResponseValidationError{
   461  						field:  fmt.Sprintf("Logs[%v]", idx),
   462  						reason: "embedded message failed validation",
   463  						cause:  err,
   464  					})
   465  				}
   466  			}
   467  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
   468  			if err := v.Validate(); err != nil {
   469  				return GetProjectLogsResponseValidationError{
   470  					field:  fmt.Sprintf("Logs[%v]", idx),
   471  					reason: "embedded message failed validation",
   472  					cause:  err,
   473  				}
   474  			}
   475  		}
   476  
   477  	}
   478  
   479  	if len(errors) > 0 {
   480  		return GetProjectLogsResponseMultiError(errors)
   481  	}
   482  
   483  	return nil
   484  }
   485  
   486  // GetProjectLogsResponseMultiError is an error wrapping multiple validation
   487  // errors returned by GetProjectLogsResponse.ValidateAll() if the designated
   488  // constraints aren't met.
   489  type GetProjectLogsResponseMultiError []error
   490  
   491  // Error returns a concatenation of all the error messages it wraps.
   492  func (m GetProjectLogsResponseMultiError) Error() string {
   493  	var msgs []string
   494  	for _, err := range m {
   495  		msgs = append(msgs, err.Error())
   496  	}
   497  	return strings.Join(msgs, "; ")
   498  }
   499  
   500  // AllErrors returns a list of validation violation errors.
   501  func (m GetProjectLogsResponseMultiError) AllErrors() []error { return m }
   502  
   503  // GetProjectLogsResponseValidationError is the validation error returned by
   504  // GetProjectLogsResponse.Validate if the designated constraints aren't met.
   505  type GetProjectLogsResponseValidationError struct {
   506  	field  string
   507  	reason string
   508  	cause  error
   509  	key    bool
   510  }
   511  
   512  // Field function returns field value.
   513  func (e GetProjectLogsResponseValidationError) Field() string { return e.field }
   514  
   515  // Reason function returns reason value.
   516  func (e GetProjectLogsResponseValidationError) Reason() string { return e.reason }
   517  
   518  // Cause function returns cause value.
   519  func (e GetProjectLogsResponseValidationError) Cause() error { return e.cause }
   520  
   521  // Key function returns key value.
   522  func (e GetProjectLogsResponseValidationError) Key() bool { return e.key }
   523  
   524  // ErrorName returns error name.
   525  func (e GetProjectLogsResponseValidationError) ErrorName() string {
   526  	return "GetProjectLogsResponseValidationError"
   527  }
   528  
   529  // Error satisfies the builtin error interface
   530  func (e GetProjectLogsResponseValidationError) Error() string {
   531  	cause := ""
   532  	if e.cause != nil {
   533  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   534  	}
   535  
   536  	key := ""
   537  	if e.key {
   538  		key = "key for "
   539  	}
   540  
   541  	return fmt.Sprintf(
   542  		"invalid %sGetProjectLogsResponse.%s: %s%s",
   543  		key,
   544  		e.field,
   545  		e.reason,
   546  		cause)
   547  }
   548  
   549  var _ error = GetProjectLogsResponseValidationError{}
   550  
   551  var _ interface {
   552  	Field() string
   553  	Reason() string
   554  	Key() bool
   555  	Cause() error
   556  	ErrorName() string
   557  } = GetProjectLogsResponseValidationError{}
   558  
   559  // Validate checks the field values on ProjectLog with the rules defined in the
   560  // proto definition for this message. If any rules are violated, the first
   561  // error encountered is returned, or nil if there are no violations.
   562  func (m *ProjectLog) Validate() error {
   563  	return m.validate(false)
   564  }
   565  
   566  // ValidateAll checks the field values on ProjectLog with the rules defined in
   567  // the proto definition for this message. If any rules are violated, the
   568  // result is a list of violation errors wrapped in ProjectLogMultiError, or
   569  // nil if none found.
   570  func (m *ProjectLog) ValidateAll() error {
   571  	return m.validate(true)
   572  }
   573  
   574  func (m *ProjectLog) validate(all bool) error {
   575  	if m == nil {
   576  		return nil
   577  	}
   578  
   579  	var errors []error
   580  
   581  	// no validation rules for Eversion
   582  
   583  	if all {
   584  		switch v := interface{}(m.GetState()).(type) {
   585  		case interface{ ValidateAll() error }:
   586  			if err := v.ValidateAll(); err != nil {
   587  				errors = append(errors, ProjectLogValidationError{
   588  					field:  "State",
   589  					reason: "embedded message failed validation",
   590  					cause:  err,
   591  				})
   592  			}
   593  		case interface{ Validate() error }:
   594  			if err := v.Validate(); err != nil {
   595  				errors = append(errors, ProjectLogValidationError{
   596  					field:  "State",
   597  					reason: "embedded message failed validation",
   598  					cause:  err,
   599  				})
   600  			}
   601  		}
   602  	} else if v, ok := interface{}(m.GetState()).(interface{ Validate() error }); ok {
   603  		if err := v.Validate(); err != nil {
   604  			return ProjectLogValidationError{
   605  				field:  "State",
   606  				reason: "embedded message failed validation",
   607  				cause:  err,
   608  			}
   609  		}
   610  	}
   611  
   612  	if all {
   613  		switch v := interface{}(m.GetUpdateTime()).(type) {
   614  		case interface{ ValidateAll() error }:
   615  			if err := v.ValidateAll(); err != nil {
   616  				errors = append(errors, ProjectLogValidationError{
   617  					field:  "UpdateTime",
   618  					reason: "embedded message failed validation",
   619  					cause:  err,
   620  				})
   621  			}
   622  		case interface{ Validate() error }:
   623  			if err := v.Validate(); err != nil {
   624  				errors = append(errors, ProjectLogValidationError{
   625  					field:  "UpdateTime",
   626  					reason: "embedded message failed validation",
   627  					cause:  err,
   628  				})
   629  			}
   630  		}
   631  	} else if v, ok := interface{}(m.GetUpdateTime()).(interface{ Validate() error }); ok {
   632  		if err := v.Validate(); err != nil {
   633  			return ProjectLogValidationError{
   634  				field:  "UpdateTime",
   635  				reason: "embedded message failed validation",
   636  				cause:  err,
   637  			}
   638  		}
   639  	}
   640  
   641  	if all {
   642  		switch v := interface{}(m.GetReasons()).(type) {
   643  		case interface{ ValidateAll() error }:
   644  			if err := v.ValidateAll(); err != nil {
   645  				errors = append(errors, ProjectLogValidationError{
   646  					field:  "Reasons",
   647  					reason: "embedded message failed validation",
   648  					cause:  err,
   649  				})
   650  			}
   651  		case interface{ Validate() error }:
   652  			if err := v.Validate(); err != nil {
   653  				errors = append(errors, ProjectLogValidationError{
   654  					field:  "Reasons",
   655  					reason: "embedded message failed validation",
   656  					cause:  err,
   657  				})
   658  			}
   659  		}
   660  	} else if v, ok := interface{}(m.GetReasons()).(interface{ Validate() error }); ok {
   661  		if err := v.Validate(); err != nil {
   662  			return ProjectLogValidationError{
   663  				field:  "Reasons",
   664  				reason: "embedded message failed validation",
   665  				cause:  err,
   666  			}
   667  		}
   668  	}
   669  
   670  	if len(errors) > 0 {
   671  		return ProjectLogMultiError(errors)
   672  	}
   673  
   674  	return nil
   675  }
   676  
   677  // ProjectLogMultiError is an error wrapping multiple validation errors
   678  // returned by ProjectLog.ValidateAll() if the designated constraints aren't met.
   679  type ProjectLogMultiError []error
   680  
   681  // Error returns a concatenation of all the error messages it wraps.
   682  func (m ProjectLogMultiError) Error() string {
   683  	var msgs []string
   684  	for _, err := range m {
   685  		msgs = append(msgs, err.Error())
   686  	}
   687  	return strings.Join(msgs, "; ")
   688  }
   689  
   690  // AllErrors returns a list of validation violation errors.
   691  func (m ProjectLogMultiError) AllErrors() []error { return m }
   692  
   693  // ProjectLogValidationError is the validation error returned by
   694  // ProjectLog.Validate if the designated constraints aren't met.
   695  type ProjectLogValidationError struct {
   696  	field  string
   697  	reason string
   698  	cause  error
   699  	key    bool
   700  }
   701  
   702  // Field function returns field value.
   703  func (e ProjectLogValidationError) Field() string { return e.field }
   704  
   705  // Reason function returns reason value.
   706  func (e ProjectLogValidationError) Reason() string { return e.reason }
   707  
   708  // Cause function returns cause value.
   709  func (e ProjectLogValidationError) Cause() error { return e.cause }
   710  
   711  // Key function returns key value.
   712  func (e ProjectLogValidationError) Key() bool { return e.key }
   713  
   714  // ErrorName returns error name.
   715  func (e ProjectLogValidationError) ErrorName() string { return "ProjectLogValidationError" }
   716  
   717  // Error satisfies the builtin error interface
   718  func (e ProjectLogValidationError) Error() string {
   719  	cause := ""
   720  	if e.cause != nil {
   721  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   722  	}
   723  
   724  	key := ""
   725  	if e.key {
   726  		key = "key for "
   727  	}
   728  
   729  	return fmt.Sprintf(
   730  		"invalid %sProjectLog.%s: %s%s",
   731  		key,
   732  		e.field,
   733  		e.reason,
   734  		cause)
   735  }
   736  
   737  var _ error = ProjectLogValidationError{}
   738  
   739  var _ interface {
   740  	Field() string
   741  	Reason() string
   742  	Key() bool
   743  	Cause() error
   744  	ErrorName() string
   745  } = ProjectLogValidationError{}
   746  
   747  // Validate checks the field values on GetRunRequest with the rules defined in
   748  // the proto definition for this message. If any rules are violated, the first
   749  // error encountered is returned, or nil if there are no violations.
   750  func (m *GetRunRequest) Validate() error {
   751  	return m.validate(false)
   752  }
   753  
   754  // ValidateAll checks the field values on GetRunRequest with the rules defined
   755  // in the proto definition for this message. If any rules are violated, the
   756  // result is a list of violation errors wrapped in GetRunRequestMultiError, or
   757  // nil if none found.
   758  func (m *GetRunRequest) ValidateAll() error {
   759  	return m.validate(true)
   760  }
   761  
   762  func (m *GetRunRequest) validate(all bool) error {
   763  	if m == nil {
   764  		return nil
   765  	}
   766  
   767  	var errors []error
   768  
   769  	// no validation rules for Run
   770  
   771  	if len(errors) > 0 {
   772  		return GetRunRequestMultiError(errors)
   773  	}
   774  
   775  	return nil
   776  }
   777  
   778  // GetRunRequestMultiError is an error wrapping multiple validation errors
   779  // returned by GetRunRequest.ValidateAll() if the designated constraints
   780  // aren't met.
   781  type GetRunRequestMultiError []error
   782  
   783  // Error returns a concatenation of all the error messages it wraps.
   784  func (m GetRunRequestMultiError) Error() string {
   785  	var msgs []string
   786  	for _, err := range m {
   787  		msgs = append(msgs, err.Error())
   788  	}
   789  	return strings.Join(msgs, "; ")
   790  }
   791  
   792  // AllErrors returns a list of validation violation errors.
   793  func (m GetRunRequestMultiError) AllErrors() []error { return m }
   794  
   795  // GetRunRequestValidationError is the validation error returned by
   796  // GetRunRequest.Validate if the designated constraints aren't met.
   797  type GetRunRequestValidationError struct {
   798  	field  string
   799  	reason string
   800  	cause  error
   801  	key    bool
   802  }
   803  
   804  // Field function returns field value.
   805  func (e GetRunRequestValidationError) Field() string { return e.field }
   806  
   807  // Reason function returns reason value.
   808  func (e GetRunRequestValidationError) Reason() string { return e.reason }
   809  
   810  // Cause function returns cause value.
   811  func (e GetRunRequestValidationError) Cause() error { return e.cause }
   812  
   813  // Key function returns key value.
   814  func (e GetRunRequestValidationError) Key() bool { return e.key }
   815  
   816  // ErrorName returns error name.
   817  func (e GetRunRequestValidationError) ErrorName() string { return "GetRunRequestValidationError" }
   818  
   819  // Error satisfies the builtin error interface
   820  func (e GetRunRequestValidationError) Error() string {
   821  	cause := ""
   822  	if e.cause != nil {
   823  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   824  	}
   825  
   826  	key := ""
   827  	if e.key {
   828  		key = "key for "
   829  	}
   830  
   831  	return fmt.Sprintf(
   832  		"invalid %sGetRunRequest.%s: %s%s",
   833  		key,
   834  		e.field,
   835  		e.reason,
   836  		cause)
   837  }
   838  
   839  var _ error = GetRunRequestValidationError{}
   840  
   841  var _ interface {
   842  	Field() string
   843  	Reason() string
   844  	Key() bool
   845  	Cause() error
   846  	ErrorName() string
   847  } = GetRunRequestValidationError{}
   848  
   849  // Validate checks the field values on GetRunResponse with the rules defined in
   850  // the proto definition for this message. If any rules are violated, the first
   851  // error encountered is returned, or nil if there are no violations.
   852  func (m *GetRunResponse) Validate() error {
   853  	return m.validate(false)
   854  }
   855  
   856  // ValidateAll checks the field values on GetRunResponse with the rules defined
   857  // in the proto definition for this message. If any rules are violated, the
   858  // result is a list of violation errors wrapped in GetRunResponseMultiError,
   859  // or nil if none found.
   860  func (m *GetRunResponse) ValidateAll() error {
   861  	return m.validate(true)
   862  }
   863  
   864  func (m *GetRunResponse) validate(all bool) error {
   865  	if m == nil {
   866  		return nil
   867  	}
   868  
   869  	var errors []error
   870  
   871  	// no validation rules for Id
   872  
   873  	// no validation rules for Eversion
   874  
   875  	// no validation rules for Mode
   876  
   877  	// no validation rules for Status
   878  
   879  	if all {
   880  		switch v := interface{}(m.GetCreateTime()).(type) {
   881  		case interface{ ValidateAll() error }:
   882  			if err := v.ValidateAll(); err != nil {
   883  				errors = append(errors, GetRunResponseValidationError{
   884  					field:  "CreateTime",
   885  					reason: "embedded message failed validation",
   886  					cause:  err,
   887  				})
   888  			}
   889  		case interface{ Validate() error }:
   890  			if err := v.Validate(); err != nil {
   891  				errors = append(errors, GetRunResponseValidationError{
   892  					field:  "CreateTime",
   893  					reason: "embedded message failed validation",
   894  					cause:  err,
   895  				})
   896  			}
   897  		}
   898  	} else if v, ok := interface{}(m.GetCreateTime()).(interface{ Validate() error }); ok {
   899  		if err := v.Validate(); err != nil {
   900  			return GetRunResponseValidationError{
   901  				field:  "CreateTime",
   902  				reason: "embedded message failed validation",
   903  				cause:  err,
   904  			}
   905  		}
   906  	}
   907  
   908  	if all {
   909  		switch v := interface{}(m.GetStartTime()).(type) {
   910  		case interface{ ValidateAll() error }:
   911  			if err := v.ValidateAll(); err != nil {
   912  				errors = append(errors, GetRunResponseValidationError{
   913  					field:  "StartTime",
   914  					reason: "embedded message failed validation",
   915  					cause:  err,
   916  				})
   917  			}
   918  		case interface{ Validate() error }:
   919  			if err := v.Validate(); err != nil {
   920  				errors = append(errors, GetRunResponseValidationError{
   921  					field:  "StartTime",
   922  					reason: "embedded message failed validation",
   923  					cause:  err,
   924  				})
   925  			}
   926  		}
   927  	} else if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok {
   928  		if err := v.Validate(); err != nil {
   929  			return GetRunResponseValidationError{
   930  				field:  "StartTime",
   931  				reason: "embedded message failed validation",
   932  				cause:  err,
   933  			}
   934  		}
   935  	}
   936  
   937  	if all {
   938  		switch v := interface{}(m.GetUpdateTime()).(type) {
   939  		case interface{ ValidateAll() error }:
   940  			if err := v.ValidateAll(); err != nil {
   941  				errors = append(errors, GetRunResponseValidationError{
   942  					field:  "UpdateTime",
   943  					reason: "embedded message failed validation",
   944  					cause:  err,
   945  				})
   946  			}
   947  		case interface{ Validate() error }:
   948  			if err := v.Validate(); err != nil {
   949  				errors = append(errors, GetRunResponseValidationError{
   950  					field:  "UpdateTime",
   951  					reason: "embedded message failed validation",
   952  					cause:  err,
   953  				})
   954  			}
   955  		}
   956  	} else if v, ok := interface{}(m.GetUpdateTime()).(interface{ Validate() error }); ok {
   957  		if err := v.Validate(); err != nil {
   958  			return GetRunResponseValidationError{
   959  				field:  "UpdateTime",
   960  				reason: "embedded message failed validation",
   961  				cause:  err,
   962  			}
   963  		}
   964  	}
   965  
   966  	if all {
   967  		switch v := interface{}(m.GetEndTime()).(type) {
   968  		case interface{ ValidateAll() error }:
   969  			if err := v.ValidateAll(); err != nil {
   970  				errors = append(errors, GetRunResponseValidationError{
   971  					field:  "EndTime",
   972  					reason: "embedded message failed validation",
   973  					cause:  err,
   974  				})
   975  			}
   976  		case interface{ Validate() error }:
   977  			if err := v.Validate(); err != nil {
   978  				errors = append(errors, GetRunResponseValidationError{
   979  					field:  "EndTime",
   980  					reason: "embedded message failed validation",
   981  					cause:  err,
   982  				})
   983  			}
   984  		}
   985  	} else if v, ok := interface{}(m.GetEndTime()).(interface{ Validate() error }); ok {
   986  		if err := v.Validate(); err != nil {
   987  			return GetRunResponseValidationError{
   988  				field:  "EndTime",
   989  				reason: "embedded message failed validation",
   990  				cause:  err,
   991  			}
   992  		}
   993  	}
   994  
   995  	// no validation rules for Owner
   996  
   997  	// no validation rules for CreatedBy
   998  
   999  	// no validation rules for BilledTo
  1000  
  1001  	// no validation rules for ConfigGroupId
  1002  
  1003  	for idx, item := range m.GetCls() {
  1004  		_, _ = idx, item
  1005  
  1006  		if all {
  1007  			switch v := interface{}(item).(type) {
  1008  			case interface{ ValidateAll() error }:
  1009  				if err := v.ValidateAll(); err != nil {
  1010  					errors = append(errors, GetRunResponseValidationError{
  1011  						field:  fmt.Sprintf("Cls[%v]", idx),
  1012  						reason: "embedded message failed validation",
  1013  						cause:  err,
  1014  					})
  1015  				}
  1016  			case interface{ Validate() error }:
  1017  				if err := v.Validate(); err != nil {
  1018  					errors = append(errors, GetRunResponseValidationError{
  1019  						field:  fmt.Sprintf("Cls[%v]", idx),
  1020  						reason: "embedded message failed validation",
  1021  						cause:  err,
  1022  					})
  1023  				}
  1024  			}
  1025  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1026  			if err := v.Validate(); err != nil {
  1027  				return GetRunResponseValidationError{
  1028  					field:  fmt.Sprintf("Cls[%v]", idx),
  1029  					reason: "embedded message failed validation",
  1030  					cause:  err,
  1031  				}
  1032  			}
  1033  		}
  1034  
  1035  	}
  1036  
  1037  	if all {
  1038  		switch v := interface{}(m.GetOptions()).(type) {
  1039  		case interface{ ValidateAll() error }:
  1040  			if err := v.ValidateAll(); err != nil {
  1041  				errors = append(errors, GetRunResponseValidationError{
  1042  					field:  "Options",
  1043  					reason: "embedded message failed validation",
  1044  					cause:  err,
  1045  				})
  1046  			}
  1047  		case interface{ Validate() error }:
  1048  			if err := v.Validate(); err != nil {
  1049  				errors = append(errors, GetRunResponseValidationError{
  1050  					field:  "Options",
  1051  					reason: "embedded message failed validation",
  1052  					cause:  err,
  1053  				})
  1054  			}
  1055  		}
  1056  	} else if v, ok := interface{}(m.GetOptions()).(interface{ Validate() error }); ok {
  1057  		if err := v.Validate(); err != nil {
  1058  			return GetRunResponseValidationError{
  1059  				field:  "Options",
  1060  				reason: "embedded message failed validation",
  1061  				cause:  err,
  1062  			}
  1063  		}
  1064  	}
  1065  
  1066  	if all {
  1067  		switch v := interface{}(m.GetTryjobs()).(type) {
  1068  		case interface{ ValidateAll() error }:
  1069  			if err := v.ValidateAll(); err != nil {
  1070  				errors = append(errors, GetRunResponseValidationError{
  1071  					field:  "Tryjobs",
  1072  					reason: "embedded message failed validation",
  1073  					cause:  err,
  1074  				})
  1075  			}
  1076  		case interface{ Validate() error }:
  1077  			if err := v.Validate(); err != nil {
  1078  				errors = append(errors, GetRunResponseValidationError{
  1079  					field:  "Tryjobs",
  1080  					reason: "embedded message failed validation",
  1081  					cause:  err,
  1082  				})
  1083  			}
  1084  		}
  1085  	} else if v, ok := interface{}(m.GetTryjobs()).(interface{ Validate() error }); ok {
  1086  		if err := v.Validate(); err != nil {
  1087  			return GetRunResponseValidationError{
  1088  				field:  "Tryjobs",
  1089  				reason: "embedded message failed validation",
  1090  				cause:  err,
  1091  			}
  1092  		}
  1093  	}
  1094  
  1095  	if all {
  1096  		switch v := interface{}(m.GetOngoingLongOps()).(type) {
  1097  		case interface{ ValidateAll() error }:
  1098  			if err := v.ValidateAll(); err != nil {
  1099  				errors = append(errors, GetRunResponseValidationError{
  1100  					field:  "OngoingLongOps",
  1101  					reason: "embedded message failed validation",
  1102  					cause:  err,
  1103  				})
  1104  			}
  1105  		case interface{ Validate() error }:
  1106  			if err := v.Validate(); err != nil {
  1107  				errors = append(errors, GetRunResponseValidationError{
  1108  					field:  "OngoingLongOps",
  1109  					reason: "embedded message failed validation",
  1110  					cause:  err,
  1111  				})
  1112  			}
  1113  		}
  1114  	} else if v, ok := interface{}(m.GetOngoingLongOps()).(interface{ Validate() error }); ok {
  1115  		if err := v.Validate(); err != nil {
  1116  			return GetRunResponseValidationError{
  1117  				field:  "OngoingLongOps",
  1118  				reason: "embedded message failed validation",
  1119  				cause:  err,
  1120  			}
  1121  		}
  1122  	}
  1123  
  1124  	if all {
  1125  		switch v := interface{}(m.GetSubmission()).(type) {
  1126  		case interface{ ValidateAll() error }:
  1127  			if err := v.ValidateAll(); err != nil {
  1128  				errors = append(errors, GetRunResponseValidationError{
  1129  					field:  "Submission",
  1130  					reason: "embedded message failed validation",
  1131  					cause:  err,
  1132  				})
  1133  			}
  1134  		case interface{ Validate() error }:
  1135  			if err := v.Validate(); err != nil {
  1136  				errors = append(errors, GetRunResponseValidationError{
  1137  					field:  "Submission",
  1138  					reason: "embedded message failed validation",
  1139  					cause:  err,
  1140  				})
  1141  			}
  1142  		}
  1143  	} else if v, ok := interface{}(m.GetSubmission()).(interface{ Validate() error }); ok {
  1144  		if err := v.Validate(); err != nil {
  1145  			return GetRunResponseValidationError{
  1146  				field:  "Submission",
  1147  				reason: "embedded message failed validation",
  1148  				cause:  err,
  1149  			}
  1150  		}
  1151  	}
  1152  
  1153  	if all {
  1154  		switch v := interface{}(m.GetLatestClsRefresh()).(type) {
  1155  		case interface{ ValidateAll() error }:
  1156  			if err := v.ValidateAll(); err != nil {
  1157  				errors = append(errors, GetRunResponseValidationError{
  1158  					field:  "LatestClsRefresh",
  1159  					reason: "embedded message failed validation",
  1160  					cause:  err,
  1161  				})
  1162  			}
  1163  		case interface{ Validate() error }:
  1164  			if err := v.Validate(); err != nil {
  1165  				errors = append(errors, GetRunResponseValidationError{
  1166  					field:  "LatestClsRefresh",
  1167  					reason: "embedded message failed validation",
  1168  					cause:  err,
  1169  				})
  1170  			}
  1171  		}
  1172  	} else if v, ok := interface{}(m.GetLatestClsRefresh()).(interface{ Validate() error }); ok {
  1173  		if err := v.Validate(); err != nil {
  1174  			return GetRunResponseValidationError{
  1175  				field:  "LatestClsRefresh",
  1176  				reason: "embedded message failed validation",
  1177  				cause:  err,
  1178  			}
  1179  		}
  1180  	}
  1181  
  1182  	for idx, item := range m.GetLogEntries() {
  1183  		_, _ = idx, item
  1184  
  1185  		if all {
  1186  			switch v := interface{}(item).(type) {
  1187  			case interface{ ValidateAll() error }:
  1188  				if err := v.ValidateAll(); err != nil {
  1189  					errors = append(errors, GetRunResponseValidationError{
  1190  						field:  fmt.Sprintf("LogEntries[%v]", idx),
  1191  						reason: "embedded message failed validation",
  1192  						cause:  err,
  1193  					})
  1194  				}
  1195  			case interface{ Validate() error }:
  1196  				if err := v.Validate(); err != nil {
  1197  					errors = append(errors, GetRunResponseValidationError{
  1198  						field:  fmt.Sprintf("LogEntries[%v]", idx),
  1199  						reason: "embedded message failed validation",
  1200  						cause:  err,
  1201  					})
  1202  				}
  1203  			}
  1204  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1205  			if err := v.Validate(); err != nil {
  1206  				return GetRunResponseValidationError{
  1207  					field:  fmt.Sprintf("LogEntries[%v]", idx),
  1208  					reason: "embedded message failed validation",
  1209  					cause:  err,
  1210  				}
  1211  			}
  1212  		}
  1213  
  1214  	}
  1215  
  1216  	for idx, item := range m.GetEvents() {
  1217  		_, _ = idx, item
  1218  
  1219  		if all {
  1220  			switch v := interface{}(item).(type) {
  1221  			case interface{ ValidateAll() error }:
  1222  				if err := v.ValidateAll(); err != nil {
  1223  					errors = append(errors, GetRunResponseValidationError{
  1224  						field:  fmt.Sprintf("Events[%v]", idx),
  1225  						reason: "embedded message failed validation",
  1226  						cause:  err,
  1227  					})
  1228  				}
  1229  			case interface{ Validate() error }:
  1230  				if err := v.Validate(); err != nil {
  1231  					errors = append(errors, GetRunResponseValidationError{
  1232  						field:  fmt.Sprintf("Events[%v]", idx),
  1233  						reason: "embedded message failed validation",
  1234  						cause:  err,
  1235  					})
  1236  				}
  1237  			}
  1238  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  1239  			if err := v.Validate(); err != nil {
  1240  				return GetRunResponseValidationError{
  1241  					field:  fmt.Sprintf("Events[%v]", idx),
  1242  					reason: "embedded message failed validation",
  1243  					cause:  err,
  1244  				}
  1245  			}
  1246  		}
  1247  
  1248  	}
  1249  
  1250  	if len(errors) > 0 {
  1251  		return GetRunResponseMultiError(errors)
  1252  	}
  1253  
  1254  	return nil
  1255  }
  1256  
  1257  // GetRunResponseMultiError is an error wrapping multiple validation errors
  1258  // returned by GetRunResponse.ValidateAll() if the designated constraints
  1259  // aren't met.
  1260  type GetRunResponseMultiError []error
  1261  
  1262  // Error returns a concatenation of all the error messages it wraps.
  1263  func (m GetRunResponseMultiError) Error() string {
  1264  	var msgs []string
  1265  	for _, err := range m {
  1266  		msgs = append(msgs, err.Error())
  1267  	}
  1268  	return strings.Join(msgs, "; ")
  1269  }
  1270  
  1271  // AllErrors returns a list of validation violation errors.
  1272  func (m GetRunResponseMultiError) AllErrors() []error { return m }
  1273  
  1274  // GetRunResponseValidationError is the validation error returned by
  1275  // GetRunResponse.Validate if the designated constraints aren't met.
  1276  type GetRunResponseValidationError struct {
  1277  	field  string
  1278  	reason string
  1279  	cause  error
  1280  	key    bool
  1281  }
  1282  
  1283  // Field function returns field value.
  1284  func (e GetRunResponseValidationError) Field() string { return e.field }
  1285  
  1286  // Reason function returns reason value.
  1287  func (e GetRunResponseValidationError) Reason() string { return e.reason }
  1288  
  1289  // Cause function returns cause value.
  1290  func (e GetRunResponseValidationError) Cause() error { return e.cause }
  1291  
  1292  // Key function returns key value.
  1293  func (e GetRunResponseValidationError) Key() bool { return e.key }
  1294  
  1295  // ErrorName returns error name.
  1296  func (e GetRunResponseValidationError) ErrorName() string { return "GetRunResponseValidationError" }
  1297  
  1298  // Error satisfies the builtin error interface
  1299  func (e GetRunResponseValidationError) Error() string {
  1300  	cause := ""
  1301  	if e.cause != nil {
  1302  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1303  	}
  1304  
  1305  	key := ""
  1306  	if e.key {
  1307  		key = "key for "
  1308  	}
  1309  
  1310  	return fmt.Sprintf(
  1311  		"invalid %sGetRunResponse.%s: %s%s",
  1312  		key,
  1313  		e.field,
  1314  		e.reason,
  1315  		cause)
  1316  }
  1317  
  1318  var _ error = GetRunResponseValidationError{}
  1319  
  1320  var _ interface {
  1321  	Field() string
  1322  	Reason() string
  1323  	Key() bool
  1324  	Cause() error
  1325  	ErrorName() string
  1326  } = GetRunResponseValidationError{}
  1327  
  1328  // Validate checks the field values on GetCLRequest with the rules defined in
  1329  // the proto definition for this message. If any rules are violated, the first
  1330  // error encountered is returned, or nil if there are no violations.
  1331  func (m *GetCLRequest) Validate() error {
  1332  	return m.validate(false)
  1333  }
  1334  
  1335  // ValidateAll checks the field values on GetCLRequest with the rules defined
  1336  // in the proto definition for this message. If any rules are violated, the
  1337  // result is a list of violation errors wrapped in GetCLRequestMultiError, or
  1338  // nil if none found.
  1339  func (m *GetCLRequest) ValidateAll() error {
  1340  	return m.validate(true)
  1341  }
  1342  
  1343  func (m *GetCLRequest) validate(all bool) error {
  1344  	if m == nil {
  1345  		return nil
  1346  	}
  1347  
  1348  	var errors []error
  1349  
  1350  	// no validation rules for Id
  1351  
  1352  	// no validation rules for ExternalId
  1353  
  1354  	// no validation rules for GerritUrl
  1355  
  1356  	if len(errors) > 0 {
  1357  		return GetCLRequestMultiError(errors)
  1358  	}
  1359  
  1360  	return nil
  1361  }
  1362  
  1363  // GetCLRequestMultiError is an error wrapping multiple validation errors
  1364  // returned by GetCLRequest.ValidateAll() if the designated constraints aren't met.
  1365  type GetCLRequestMultiError []error
  1366  
  1367  // Error returns a concatenation of all the error messages it wraps.
  1368  func (m GetCLRequestMultiError) Error() string {
  1369  	var msgs []string
  1370  	for _, err := range m {
  1371  		msgs = append(msgs, err.Error())
  1372  	}
  1373  	return strings.Join(msgs, "; ")
  1374  }
  1375  
  1376  // AllErrors returns a list of validation violation errors.
  1377  func (m GetCLRequestMultiError) AllErrors() []error { return m }
  1378  
  1379  // GetCLRequestValidationError is the validation error returned by
  1380  // GetCLRequest.Validate if the designated constraints aren't met.
  1381  type GetCLRequestValidationError struct {
  1382  	field  string
  1383  	reason string
  1384  	cause  error
  1385  	key    bool
  1386  }
  1387  
  1388  // Field function returns field value.
  1389  func (e GetCLRequestValidationError) Field() string { return e.field }
  1390  
  1391  // Reason function returns reason value.
  1392  func (e GetCLRequestValidationError) Reason() string { return e.reason }
  1393  
  1394  // Cause function returns cause value.
  1395  func (e GetCLRequestValidationError) Cause() error { return e.cause }
  1396  
  1397  // Key function returns key value.
  1398  func (e GetCLRequestValidationError) Key() bool { return e.key }
  1399  
  1400  // ErrorName returns error name.
  1401  func (e GetCLRequestValidationError) ErrorName() string { return "GetCLRequestValidationError" }
  1402  
  1403  // Error satisfies the builtin error interface
  1404  func (e GetCLRequestValidationError) Error() string {
  1405  	cause := ""
  1406  	if e.cause != nil {
  1407  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1408  	}
  1409  
  1410  	key := ""
  1411  	if e.key {
  1412  		key = "key for "
  1413  	}
  1414  
  1415  	return fmt.Sprintf(
  1416  		"invalid %sGetCLRequest.%s: %s%s",
  1417  		key,
  1418  		e.field,
  1419  		e.reason,
  1420  		cause)
  1421  }
  1422  
  1423  var _ error = GetCLRequestValidationError{}
  1424  
  1425  var _ interface {
  1426  	Field() string
  1427  	Reason() string
  1428  	Key() bool
  1429  	Cause() error
  1430  	ErrorName() string
  1431  } = GetCLRequestValidationError{}
  1432  
  1433  // Validate checks the field values on GetCLResponse with the rules defined in
  1434  // the proto definition for this message. If any rules are violated, the first
  1435  // error encountered is returned, or nil if there are no violations.
  1436  func (m *GetCLResponse) Validate() error {
  1437  	return m.validate(false)
  1438  }
  1439  
  1440  // ValidateAll checks the field values on GetCLResponse with the rules defined
  1441  // in the proto definition for this message. If any rules are violated, the
  1442  // result is a list of violation errors wrapped in GetCLResponseMultiError, or
  1443  // nil if none found.
  1444  func (m *GetCLResponse) ValidateAll() error {
  1445  	return m.validate(true)
  1446  }
  1447  
  1448  func (m *GetCLResponse) validate(all bool) error {
  1449  	if m == nil {
  1450  		return nil
  1451  	}
  1452  
  1453  	var errors []error
  1454  
  1455  	// no validation rules for Id
  1456  
  1457  	// no validation rules for Eversion
  1458  
  1459  	// no validation rules for ExternalId
  1460  
  1461  	if all {
  1462  		switch v := interface{}(m.GetUpdateTime()).(type) {
  1463  		case interface{ ValidateAll() error }:
  1464  			if err := v.ValidateAll(); err != nil {
  1465  				errors = append(errors, GetCLResponseValidationError{
  1466  					field:  "UpdateTime",
  1467  					reason: "embedded message failed validation",
  1468  					cause:  err,
  1469  				})
  1470  			}
  1471  		case interface{ Validate() error }:
  1472  			if err := v.Validate(); err != nil {
  1473  				errors = append(errors, GetCLResponseValidationError{
  1474  					field:  "UpdateTime",
  1475  					reason: "embedded message failed validation",
  1476  					cause:  err,
  1477  				})
  1478  			}
  1479  		}
  1480  	} else if v, ok := interface{}(m.GetUpdateTime()).(interface{ Validate() error }); ok {
  1481  		if err := v.Validate(); err != nil {
  1482  			return GetCLResponseValidationError{
  1483  				field:  "UpdateTime",
  1484  				reason: "embedded message failed validation",
  1485  				cause:  err,
  1486  			}
  1487  		}
  1488  	}
  1489  
  1490  	if all {
  1491  		switch v := interface{}(m.GetSnapshot()).(type) {
  1492  		case interface{ ValidateAll() error }:
  1493  			if err := v.ValidateAll(); err != nil {
  1494  				errors = append(errors, GetCLResponseValidationError{
  1495  					field:  "Snapshot",
  1496  					reason: "embedded message failed validation",
  1497  					cause:  err,
  1498  				})
  1499  			}
  1500  		case interface{ Validate() error }:
  1501  			if err := v.Validate(); err != nil {
  1502  				errors = append(errors, GetCLResponseValidationError{
  1503  					field:  "Snapshot",
  1504  					reason: "embedded message failed validation",
  1505  					cause:  err,
  1506  				})
  1507  			}
  1508  		}
  1509  	} else if v, ok := interface{}(m.GetSnapshot()).(interface{ Validate() error }); ok {
  1510  		if err := v.Validate(); err != nil {
  1511  			return GetCLResponseValidationError{
  1512  				field:  "Snapshot",
  1513  				reason: "embedded message failed validation",
  1514  				cause:  err,
  1515  			}
  1516  		}
  1517  	}
  1518  
  1519  	if all {
  1520  		switch v := interface{}(m.GetApplicableConfig()).(type) {
  1521  		case interface{ ValidateAll() error }:
  1522  			if err := v.ValidateAll(); err != nil {
  1523  				errors = append(errors, GetCLResponseValidationError{
  1524  					field:  "ApplicableConfig",
  1525  					reason: "embedded message failed validation",
  1526  					cause:  err,
  1527  				})
  1528  			}
  1529  		case interface{ Validate() error }:
  1530  			if err := v.Validate(); err != nil {
  1531  				errors = append(errors, GetCLResponseValidationError{
  1532  					field:  "ApplicableConfig",
  1533  					reason: "embedded message failed validation",
  1534  					cause:  err,
  1535  				})
  1536  			}
  1537  		}
  1538  	} else if v, ok := interface{}(m.GetApplicableConfig()).(interface{ Validate() error }); ok {
  1539  		if err := v.Validate(); err != nil {
  1540  			return GetCLResponseValidationError{
  1541  				field:  "ApplicableConfig",
  1542  				reason: "embedded message failed validation",
  1543  				cause:  err,
  1544  			}
  1545  		}
  1546  	}
  1547  
  1548  	if all {
  1549  		switch v := interface{}(m.GetAccess()).(type) {
  1550  		case interface{ ValidateAll() error }:
  1551  			if err := v.ValidateAll(); err != nil {
  1552  				errors = append(errors, GetCLResponseValidationError{
  1553  					field:  "Access",
  1554  					reason: "embedded message failed validation",
  1555  					cause:  err,
  1556  				})
  1557  			}
  1558  		case interface{ Validate() error }:
  1559  			if err := v.Validate(); err != nil {
  1560  				errors = append(errors, GetCLResponseValidationError{
  1561  					field:  "Access",
  1562  					reason: "embedded message failed validation",
  1563  					cause:  err,
  1564  				})
  1565  			}
  1566  		}
  1567  	} else if v, ok := interface{}(m.GetAccess()).(interface{ Validate() error }); ok {
  1568  		if err := v.Validate(); err != nil {
  1569  			return GetCLResponseValidationError{
  1570  				field:  "Access",
  1571  				reason: "embedded message failed validation",
  1572  				cause:  err,
  1573  			}
  1574  		}
  1575  	}
  1576  
  1577  	if len(errors) > 0 {
  1578  		return GetCLResponseMultiError(errors)
  1579  	}
  1580  
  1581  	return nil
  1582  }
  1583  
  1584  // GetCLResponseMultiError is an error wrapping multiple validation errors
  1585  // returned by GetCLResponse.ValidateAll() if the designated constraints
  1586  // aren't met.
  1587  type GetCLResponseMultiError []error
  1588  
  1589  // Error returns a concatenation of all the error messages it wraps.
  1590  func (m GetCLResponseMultiError) Error() string {
  1591  	var msgs []string
  1592  	for _, err := range m {
  1593  		msgs = append(msgs, err.Error())
  1594  	}
  1595  	return strings.Join(msgs, "; ")
  1596  }
  1597  
  1598  // AllErrors returns a list of validation violation errors.
  1599  func (m GetCLResponseMultiError) AllErrors() []error { return m }
  1600  
  1601  // GetCLResponseValidationError is the validation error returned by
  1602  // GetCLResponse.Validate if the designated constraints aren't met.
  1603  type GetCLResponseValidationError struct {
  1604  	field  string
  1605  	reason string
  1606  	cause  error
  1607  	key    bool
  1608  }
  1609  
  1610  // Field function returns field value.
  1611  func (e GetCLResponseValidationError) Field() string { return e.field }
  1612  
  1613  // Reason function returns reason value.
  1614  func (e GetCLResponseValidationError) Reason() string { return e.reason }
  1615  
  1616  // Cause function returns cause value.
  1617  func (e GetCLResponseValidationError) Cause() error { return e.cause }
  1618  
  1619  // Key function returns key value.
  1620  func (e GetCLResponseValidationError) Key() bool { return e.key }
  1621  
  1622  // ErrorName returns error name.
  1623  func (e GetCLResponseValidationError) ErrorName() string { return "GetCLResponseValidationError" }
  1624  
  1625  // Error satisfies the builtin error interface
  1626  func (e GetCLResponseValidationError) Error() string {
  1627  	cause := ""
  1628  	if e.cause != nil {
  1629  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1630  	}
  1631  
  1632  	key := ""
  1633  	if e.key {
  1634  		key = "key for "
  1635  	}
  1636  
  1637  	return fmt.Sprintf(
  1638  		"invalid %sGetCLResponse.%s: %s%s",
  1639  		key,
  1640  		e.field,
  1641  		e.reason,
  1642  		cause)
  1643  }
  1644  
  1645  var _ error = GetCLResponseValidationError{}
  1646  
  1647  var _ interface {
  1648  	Field() string
  1649  	Reason() string
  1650  	Key() bool
  1651  	Cause() error
  1652  	ErrorName() string
  1653  } = GetCLResponseValidationError{}
  1654  
  1655  // Validate checks the field values on GetPollerRequest with the rules defined
  1656  // in the proto definition for this message. If any rules are violated, the
  1657  // first error encountered is returned, or nil if there are no violations.
  1658  func (m *GetPollerRequest) Validate() error {
  1659  	return m.validate(false)
  1660  }
  1661  
  1662  // ValidateAll checks the field values on GetPollerRequest with the rules
  1663  // defined in the proto definition for this message. If any rules are
  1664  // violated, the result is a list of violation errors wrapped in
  1665  // GetPollerRequestMultiError, or nil if none found.
  1666  func (m *GetPollerRequest) ValidateAll() error {
  1667  	return m.validate(true)
  1668  }
  1669  
  1670  func (m *GetPollerRequest) validate(all bool) error {
  1671  	if m == nil {
  1672  		return nil
  1673  	}
  1674  
  1675  	var errors []error
  1676  
  1677  	// no validation rules for Project
  1678  
  1679  	if len(errors) > 0 {
  1680  		return GetPollerRequestMultiError(errors)
  1681  	}
  1682  
  1683  	return nil
  1684  }
  1685  
  1686  // GetPollerRequestMultiError is an error wrapping multiple validation errors
  1687  // returned by GetPollerRequest.ValidateAll() if the designated constraints
  1688  // aren't met.
  1689  type GetPollerRequestMultiError []error
  1690  
  1691  // Error returns a concatenation of all the error messages it wraps.
  1692  func (m GetPollerRequestMultiError) Error() string {
  1693  	var msgs []string
  1694  	for _, err := range m {
  1695  		msgs = append(msgs, err.Error())
  1696  	}
  1697  	return strings.Join(msgs, "; ")
  1698  }
  1699  
  1700  // AllErrors returns a list of validation violation errors.
  1701  func (m GetPollerRequestMultiError) AllErrors() []error { return m }
  1702  
  1703  // GetPollerRequestValidationError is the validation error returned by
  1704  // GetPollerRequest.Validate if the designated constraints aren't met.
  1705  type GetPollerRequestValidationError struct {
  1706  	field  string
  1707  	reason string
  1708  	cause  error
  1709  	key    bool
  1710  }
  1711  
  1712  // Field function returns field value.
  1713  func (e GetPollerRequestValidationError) Field() string { return e.field }
  1714  
  1715  // Reason function returns reason value.
  1716  func (e GetPollerRequestValidationError) Reason() string { return e.reason }
  1717  
  1718  // Cause function returns cause value.
  1719  func (e GetPollerRequestValidationError) Cause() error { return e.cause }
  1720  
  1721  // Key function returns key value.
  1722  func (e GetPollerRequestValidationError) Key() bool { return e.key }
  1723  
  1724  // ErrorName returns error name.
  1725  func (e GetPollerRequestValidationError) ErrorName() string { return "GetPollerRequestValidationError" }
  1726  
  1727  // Error satisfies the builtin error interface
  1728  func (e GetPollerRequestValidationError) Error() string {
  1729  	cause := ""
  1730  	if e.cause != nil {
  1731  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1732  	}
  1733  
  1734  	key := ""
  1735  	if e.key {
  1736  		key = "key for "
  1737  	}
  1738  
  1739  	return fmt.Sprintf(
  1740  		"invalid %sGetPollerRequest.%s: %s%s",
  1741  		key,
  1742  		e.field,
  1743  		e.reason,
  1744  		cause)
  1745  }
  1746  
  1747  var _ error = GetPollerRequestValidationError{}
  1748  
  1749  var _ interface {
  1750  	Field() string
  1751  	Reason() string
  1752  	Key() bool
  1753  	Cause() error
  1754  	ErrorName() string
  1755  } = GetPollerRequestValidationError{}
  1756  
  1757  // Validate checks the field values on GetPollerResponse with the rules defined
  1758  // in the proto definition for this message. If any rules are violated, the
  1759  // first error encountered is returned, or nil if there are no violations.
  1760  func (m *GetPollerResponse) Validate() error {
  1761  	return m.validate(false)
  1762  }
  1763  
  1764  // ValidateAll checks the field values on GetPollerResponse with the rules
  1765  // defined in the proto definition for this message. If any rules are
  1766  // violated, the result is a list of violation errors wrapped in
  1767  // GetPollerResponseMultiError, or nil if none found.
  1768  func (m *GetPollerResponse) ValidateAll() error {
  1769  	return m.validate(true)
  1770  }
  1771  
  1772  func (m *GetPollerResponse) validate(all bool) error {
  1773  	if m == nil {
  1774  		return nil
  1775  	}
  1776  
  1777  	var errors []error
  1778  
  1779  	// no validation rules for Project
  1780  
  1781  	// no validation rules for Eversion
  1782  
  1783  	if all {
  1784  		switch v := interface{}(m.GetUpdateTime()).(type) {
  1785  		case interface{ ValidateAll() error }:
  1786  			if err := v.ValidateAll(); err != nil {
  1787  				errors = append(errors, GetPollerResponseValidationError{
  1788  					field:  "UpdateTime",
  1789  					reason: "embedded message failed validation",
  1790  					cause:  err,
  1791  				})
  1792  			}
  1793  		case interface{ Validate() error }:
  1794  			if err := v.Validate(); err != nil {
  1795  				errors = append(errors, GetPollerResponseValidationError{
  1796  					field:  "UpdateTime",
  1797  					reason: "embedded message failed validation",
  1798  					cause:  err,
  1799  				})
  1800  			}
  1801  		}
  1802  	} else if v, ok := interface{}(m.GetUpdateTime()).(interface{ Validate() error }); ok {
  1803  		if err := v.Validate(); err != nil {
  1804  			return GetPollerResponseValidationError{
  1805  				field:  "UpdateTime",
  1806  				reason: "embedded message failed validation",
  1807  				cause:  err,
  1808  			}
  1809  		}
  1810  	}
  1811  
  1812  	// no validation rules for ConfigHash
  1813  
  1814  	if all {
  1815  		switch v := interface{}(m.GetQueryStates()).(type) {
  1816  		case interface{ ValidateAll() error }:
  1817  			if err := v.ValidateAll(); err != nil {
  1818  				errors = append(errors, GetPollerResponseValidationError{
  1819  					field:  "QueryStates",
  1820  					reason: "embedded message failed validation",
  1821  					cause:  err,
  1822  				})
  1823  			}
  1824  		case interface{ Validate() error }:
  1825  			if err := v.Validate(); err != nil {
  1826  				errors = append(errors, GetPollerResponseValidationError{
  1827  					field:  "QueryStates",
  1828  					reason: "embedded message failed validation",
  1829  					cause:  err,
  1830  				})
  1831  			}
  1832  		}
  1833  	} else if v, ok := interface{}(m.GetQueryStates()).(interface{ Validate() error }); ok {
  1834  		if err := v.Validate(); err != nil {
  1835  			return GetPollerResponseValidationError{
  1836  				field:  "QueryStates",
  1837  				reason: "embedded message failed validation",
  1838  				cause:  err,
  1839  			}
  1840  		}
  1841  	}
  1842  
  1843  	if len(errors) > 0 {
  1844  		return GetPollerResponseMultiError(errors)
  1845  	}
  1846  
  1847  	return nil
  1848  }
  1849  
  1850  // GetPollerResponseMultiError is an error wrapping multiple validation errors
  1851  // returned by GetPollerResponse.ValidateAll() if the designated constraints
  1852  // aren't met.
  1853  type GetPollerResponseMultiError []error
  1854  
  1855  // Error returns a concatenation of all the error messages it wraps.
  1856  func (m GetPollerResponseMultiError) Error() string {
  1857  	var msgs []string
  1858  	for _, err := range m {
  1859  		msgs = append(msgs, err.Error())
  1860  	}
  1861  	return strings.Join(msgs, "; ")
  1862  }
  1863  
  1864  // AllErrors returns a list of validation violation errors.
  1865  func (m GetPollerResponseMultiError) AllErrors() []error { return m }
  1866  
  1867  // GetPollerResponseValidationError is the validation error returned by
  1868  // GetPollerResponse.Validate if the designated constraints aren't met.
  1869  type GetPollerResponseValidationError struct {
  1870  	field  string
  1871  	reason string
  1872  	cause  error
  1873  	key    bool
  1874  }
  1875  
  1876  // Field function returns field value.
  1877  func (e GetPollerResponseValidationError) Field() string { return e.field }
  1878  
  1879  // Reason function returns reason value.
  1880  func (e GetPollerResponseValidationError) Reason() string { return e.reason }
  1881  
  1882  // Cause function returns cause value.
  1883  func (e GetPollerResponseValidationError) Cause() error { return e.cause }
  1884  
  1885  // Key function returns key value.
  1886  func (e GetPollerResponseValidationError) Key() bool { return e.key }
  1887  
  1888  // ErrorName returns error name.
  1889  func (e GetPollerResponseValidationError) ErrorName() string {
  1890  	return "GetPollerResponseValidationError"
  1891  }
  1892  
  1893  // Error satisfies the builtin error interface
  1894  func (e GetPollerResponseValidationError) Error() string {
  1895  	cause := ""
  1896  	if e.cause != nil {
  1897  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  1898  	}
  1899  
  1900  	key := ""
  1901  	if e.key {
  1902  		key = "key for "
  1903  	}
  1904  
  1905  	return fmt.Sprintf(
  1906  		"invalid %sGetPollerResponse.%s: %s%s",
  1907  		key,
  1908  		e.field,
  1909  		e.reason,
  1910  		cause)
  1911  }
  1912  
  1913  var _ error = GetPollerResponseValidationError{}
  1914  
  1915  var _ interface {
  1916  	Field() string
  1917  	Reason() string
  1918  	Key() bool
  1919  	Cause() error
  1920  	ErrorName() string
  1921  } = GetPollerResponseValidationError{}
  1922  
  1923  // Validate checks the field values on DeleteProjectEventsRequest with the
  1924  // rules defined in the proto definition for this message. If any rules are
  1925  // violated, the first error encountered is returned, or nil if there are no violations.
  1926  func (m *DeleteProjectEventsRequest) Validate() error {
  1927  	return m.validate(false)
  1928  }
  1929  
  1930  // ValidateAll checks the field values on DeleteProjectEventsRequest with the
  1931  // rules defined in the proto definition for this message. If any rules are
  1932  // violated, the result is a list of violation errors wrapped in
  1933  // DeleteProjectEventsRequestMultiError, or nil if none found.
  1934  func (m *DeleteProjectEventsRequest) ValidateAll() error {
  1935  	return m.validate(true)
  1936  }
  1937  
  1938  func (m *DeleteProjectEventsRequest) validate(all bool) error {
  1939  	if m == nil {
  1940  		return nil
  1941  	}
  1942  
  1943  	var errors []error
  1944  
  1945  	// no validation rules for Project
  1946  
  1947  	// no validation rules for Limit
  1948  
  1949  	if len(errors) > 0 {
  1950  		return DeleteProjectEventsRequestMultiError(errors)
  1951  	}
  1952  
  1953  	return nil
  1954  }
  1955  
  1956  // DeleteProjectEventsRequestMultiError is an error wrapping multiple
  1957  // validation errors returned by DeleteProjectEventsRequest.ValidateAll() if
  1958  // the designated constraints aren't met.
  1959  type DeleteProjectEventsRequestMultiError []error
  1960  
  1961  // Error returns a concatenation of all the error messages it wraps.
  1962  func (m DeleteProjectEventsRequestMultiError) Error() string {
  1963  	var msgs []string
  1964  	for _, err := range m {
  1965  		msgs = append(msgs, err.Error())
  1966  	}
  1967  	return strings.Join(msgs, "; ")
  1968  }
  1969  
  1970  // AllErrors returns a list of validation violation errors.
  1971  func (m DeleteProjectEventsRequestMultiError) AllErrors() []error { return m }
  1972  
  1973  // DeleteProjectEventsRequestValidationError is the validation error returned
  1974  // by DeleteProjectEventsRequest.Validate if the designated constraints aren't met.
  1975  type DeleteProjectEventsRequestValidationError struct {
  1976  	field  string
  1977  	reason string
  1978  	cause  error
  1979  	key    bool
  1980  }
  1981  
  1982  // Field function returns field value.
  1983  func (e DeleteProjectEventsRequestValidationError) Field() string { return e.field }
  1984  
  1985  // Reason function returns reason value.
  1986  func (e DeleteProjectEventsRequestValidationError) Reason() string { return e.reason }
  1987  
  1988  // Cause function returns cause value.
  1989  func (e DeleteProjectEventsRequestValidationError) Cause() error { return e.cause }
  1990  
  1991  // Key function returns key value.
  1992  func (e DeleteProjectEventsRequestValidationError) Key() bool { return e.key }
  1993  
  1994  // ErrorName returns error name.
  1995  func (e DeleteProjectEventsRequestValidationError) ErrorName() string {
  1996  	return "DeleteProjectEventsRequestValidationError"
  1997  }
  1998  
  1999  // Error satisfies the builtin error interface
  2000  func (e DeleteProjectEventsRequestValidationError) Error() string {
  2001  	cause := ""
  2002  	if e.cause != nil {
  2003  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2004  	}
  2005  
  2006  	key := ""
  2007  	if e.key {
  2008  		key = "key for "
  2009  	}
  2010  
  2011  	return fmt.Sprintf(
  2012  		"invalid %sDeleteProjectEventsRequest.%s: %s%s",
  2013  		key,
  2014  		e.field,
  2015  		e.reason,
  2016  		cause)
  2017  }
  2018  
  2019  var _ error = DeleteProjectEventsRequestValidationError{}
  2020  
  2021  var _ interface {
  2022  	Field() string
  2023  	Reason() string
  2024  	Key() bool
  2025  	Cause() error
  2026  	ErrorName() string
  2027  } = DeleteProjectEventsRequestValidationError{}
  2028  
  2029  // Validate checks the field values on DeleteProjectEventsResponse with the
  2030  // rules defined in the proto definition for this message. If any rules are
  2031  // violated, the first error encountered is returned, or nil if there are no violations.
  2032  func (m *DeleteProjectEventsResponse) Validate() error {
  2033  	return m.validate(false)
  2034  }
  2035  
  2036  // ValidateAll checks the field values on DeleteProjectEventsResponse with the
  2037  // rules defined in the proto definition for this message. If any rules are
  2038  // violated, the result is a list of violation errors wrapped in
  2039  // DeleteProjectEventsResponseMultiError, or nil if none found.
  2040  func (m *DeleteProjectEventsResponse) ValidateAll() error {
  2041  	return m.validate(true)
  2042  }
  2043  
  2044  func (m *DeleteProjectEventsResponse) validate(all bool) error {
  2045  	if m == nil {
  2046  		return nil
  2047  	}
  2048  
  2049  	var errors []error
  2050  
  2051  	// no validation rules for Events
  2052  
  2053  	if len(errors) > 0 {
  2054  		return DeleteProjectEventsResponseMultiError(errors)
  2055  	}
  2056  
  2057  	return nil
  2058  }
  2059  
  2060  // DeleteProjectEventsResponseMultiError is an error wrapping multiple
  2061  // validation errors returned by DeleteProjectEventsResponse.ValidateAll() if
  2062  // the designated constraints aren't met.
  2063  type DeleteProjectEventsResponseMultiError []error
  2064  
  2065  // Error returns a concatenation of all the error messages it wraps.
  2066  func (m DeleteProjectEventsResponseMultiError) Error() string {
  2067  	var msgs []string
  2068  	for _, err := range m {
  2069  		msgs = append(msgs, err.Error())
  2070  	}
  2071  	return strings.Join(msgs, "; ")
  2072  }
  2073  
  2074  // AllErrors returns a list of validation violation errors.
  2075  func (m DeleteProjectEventsResponseMultiError) AllErrors() []error { return m }
  2076  
  2077  // DeleteProjectEventsResponseValidationError is the validation error returned
  2078  // by DeleteProjectEventsResponse.Validate if the designated constraints
  2079  // aren't met.
  2080  type DeleteProjectEventsResponseValidationError struct {
  2081  	field  string
  2082  	reason string
  2083  	cause  error
  2084  	key    bool
  2085  }
  2086  
  2087  // Field function returns field value.
  2088  func (e DeleteProjectEventsResponseValidationError) Field() string { return e.field }
  2089  
  2090  // Reason function returns reason value.
  2091  func (e DeleteProjectEventsResponseValidationError) Reason() string { return e.reason }
  2092  
  2093  // Cause function returns cause value.
  2094  func (e DeleteProjectEventsResponseValidationError) Cause() error { return e.cause }
  2095  
  2096  // Key function returns key value.
  2097  func (e DeleteProjectEventsResponseValidationError) Key() bool { return e.key }
  2098  
  2099  // ErrorName returns error name.
  2100  func (e DeleteProjectEventsResponseValidationError) ErrorName() string {
  2101  	return "DeleteProjectEventsResponseValidationError"
  2102  }
  2103  
  2104  // Error satisfies the builtin error interface
  2105  func (e DeleteProjectEventsResponseValidationError) Error() string {
  2106  	cause := ""
  2107  	if e.cause != nil {
  2108  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2109  	}
  2110  
  2111  	key := ""
  2112  	if e.key {
  2113  		key = "key for "
  2114  	}
  2115  
  2116  	return fmt.Sprintf(
  2117  		"invalid %sDeleteProjectEventsResponse.%s: %s%s",
  2118  		key,
  2119  		e.field,
  2120  		e.reason,
  2121  		cause)
  2122  }
  2123  
  2124  var _ error = DeleteProjectEventsResponseValidationError{}
  2125  
  2126  var _ interface {
  2127  	Field() string
  2128  	Reason() string
  2129  	Key() bool
  2130  	Cause() error
  2131  	ErrorName() string
  2132  } = DeleteProjectEventsResponseValidationError{}
  2133  
  2134  // Validate checks the field values on RefreshProjectCLsRequest with the rules
  2135  // defined in the proto definition for this message. If any rules are
  2136  // violated, the first error encountered is returned, or nil if there are no violations.
  2137  func (m *RefreshProjectCLsRequest) Validate() error {
  2138  	return m.validate(false)
  2139  }
  2140  
  2141  // ValidateAll checks the field values on RefreshProjectCLsRequest with the
  2142  // rules defined in the proto definition for this message. If any rules are
  2143  // violated, the result is a list of violation errors wrapped in
  2144  // RefreshProjectCLsRequestMultiError, or nil if none found.
  2145  func (m *RefreshProjectCLsRequest) ValidateAll() error {
  2146  	return m.validate(true)
  2147  }
  2148  
  2149  func (m *RefreshProjectCLsRequest) validate(all bool) error {
  2150  	if m == nil {
  2151  		return nil
  2152  	}
  2153  
  2154  	var errors []error
  2155  
  2156  	// no validation rules for Project
  2157  
  2158  	if len(errors) > 0 {
  2159  		return RefreshProjectCLsRequestMultiError(errors)
  2160  	}
  2161  
  2162  	return nil
  2163  }
  2164  
  2165  // RefreshProjectCLsRequestMultiError is an error wrapping multiple validation
  2166  // errors returned by RefreshProjectCLsRequest.ValidateAll() if the designated
  2167  // constraints aren't met.
  2168  type RefreshProjectCLsRequestMultiError []error
  2169  
  2170  // Error returns a concatenation of all the error messages it wraps.
  2171  func (m RefreshProjectCLsRequestMultiError) Error() string {
  2172  	var msgs []string
  2173  	for _, err := range m {
  2174  		msgs = append(msgs, err.Error())
  2175  	}
  2176  	return strings.Join(msgs, "; ")
  2177  }
  2178  
  2179  // AllErrors returns a list of validation violation errors.
  2180  func (m RefreshProjectCLsRequestMultiError) AllErrors() []error { return m }
  2181  
  2182  // RefreshProjectCLsRequestValidationError is the validation error returned by
  2183  // RefreshProjectCLsRequest.Validate if the designated constraints aren't met.
  2184  type RefreshProjectCLsRequestValidationError struct {
  2185  	field  string
  2186  	reason string
  2187  	cause  error
  2188  	key    bool
  2189  }
  2190  
  2191  // Field function returns field value.
  2192  func (e RefreshProjectCLsRequestValidationError) Field() string { return e.field }
  2193  
  2194  // Reason function returns reason value.
  2195  func (e RefreshProjectCLsRequestValidationError) Reason() string { return e.reason }
  2196  
  2197  // Cause function returns cause value.
  2198  func (e RefreshProjectCLsRequestValidationError) Cause() error { return e.cause }
  2199  
  2200  // Key function returns key value.
  2201  func (e RefreshProjectCLsRequestValidationError) Key() bool { return e.key }
  2202  
  2203  // ErrorName returns error name.
  2204  func (e RefreshProjectCLsRequestValidationError) ErrorName() string {
  2205  	return "RefreshProjectCLsRequestValidationError"
  2206  }
  2207  
  2208  // Error satisfies the builtin error interface
  2209  func (e RefreshProjectCLsRequestValidationError) Error() string {
  2210  	cause := ""
  2211  	if e.cause != nil {
  2212  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2213  	}
  2214  
  2215  	key := ""
  2216  	if e.key {
  2217  		key = "key for "
  2218  	}
  2219  
  2220  	return fmt.Sprintf(
  2221  		"invalid %sRefreshProjectCLsRequest.%s: %s%s",
  2222  		key,
  2223  		e.field,
  2224  		e.reason,
  2225  		cause)
  2226  }
  2227  
  2228  var _ error = RefreshProjectCLsRequestValidationError{}
  2229  
  2230  var _ interface {
  2231  	Field() string
  2232  	Reason() string
  2233  	Key() bool
  2234  	Cause() error
  2235  	ErrorName() string
  2236  } = RefreshProjectCLsRequestValidationError{}
  2237  
  2238  // Validate checks the field values on RefreshProjectCLsResponse with the rules
  2239  // defined in the proto definition for this message. If any rules are
  2240  // violated, the first error encountered is returned, or nil if there are no violations.
  2241  func (m *RefreshProjectCLsResponse) Validate() error {
  2242  	return m.validate(false)
  2243  }
  2244  
  2245  // ValidateAll checks the field values on RefreshProjectCLsResponse with the
  2246  // rules defined in the proto definition for this message. If any rules are
  2247  // violated, the result is a list of violation errors wrapped in
  2248  // RefreshProjectCLsResponseMultiError, or nil if none found.
  2249  func (m *RefreshProjectCLsResponse) ValidateAll() error {
  2250  	return m.validate(true)
  2251  }
  2252  
  2253  func (m *RefreshProjectCLsResponse) validate(all bool) error {
  2254  	if m == nil {
  2255  		return nil
  2256  	}
  2257  
  2258  	var errors []error
  2259  
  2260  	// no validation rules for ClVersions
  2261  
  2262  	if len(errors) > 0 {
  2263  		return RefreshProjectCLsResponseMultiError(errors)
  2264  	}
  2265  
  2266  	return nil
  2267  }
  2268  
  2269  // RefreshProjectCLsResponseMultiError is an error wrapping multiple validation
  2270  // errors returned by RefreshProjectCLsResponse.ValidateAll() if the
  2271  // designated constraints aren't met.
  2272  type RefreshProjectCLsResponseMultiError []error
  2273  
  2274  // Error returns a concatenation of all the error messages it wraps.
  2275  func (m RefreshProjectCLsResponseMultiError) Error() string {
  2276  	var msgs []string
  2277  	for _, err := range m {
  2278  		msgs = append(msgs, err.Error())
  2279  	}
  2280  	return strings.Join(msgs, "; ")
  2281  }
  2282  
  2283  // AllErrors returns a list of validation violation errors.
  2284  func (m RefreshProjectCLsResponseMultiError) AllErrors() []error { return m }
  2285  
  2286  // RefreshProjectCLsResponseValidationError is the validation error returned by
  2287  // RefreshProjectCLsResponse.Validate if the designated constraints aren't met.
  2288  type RefreshProjectCLsResponseValidationError struct {
  2289  	field  string
  2290  	reason string
  2291  	cause  error
  2292  	key    bool
  2293  }
  2294  
  2295  // Field function returns field value.
  2296  func (e RefreshProjectCLsResponseValidationError) Field() string { return e.field }
  2297  
  2298  // Reason function returns reason value.
  2299  func (e RefreshProjectCLsResponseValidationError) Reason() string { return e.reason }
  2300  
  2301  // Cause function returns cause value.
  2302  func (e RefreshProjectCLsResponseValidationError) Cause() error { return e.cause }
  2303  
  2304  // Key function returns key value.
  2305  func (e RefreshProjectCLsResponseValidationError) Key() bool { return e.key }
  2306  
  2307  // ErrorName returns error name.
  2308  func (e RefreshProjectCLsResponseValidationError) ErrorName() string {
  2309  	return "RefreshProjectCLsResponseValidationError"
  2310  }
  2311  
  2312  // Error satisfies the builtin error interface
  2313  func (e RefreshProjectCLsResponseValidationError) Error() string {
  2314  	cause := ""
  2315  	if e.cause != nil {
  2316  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2317  	}
  2318  
  2319  	key := ""
  2320  	if e.key {
  2321  		key = "key for "
  2322  	}
  2323  
  2324  	return fmt.Sprintf(
  2325  		"invalid %sRefreshProjectCLsResponse.%s: %s%s",
  2326  		key,
  2327  		e.field,
  2328  		e.reason,
  2329  		cause)
  2330  }
  2331  
  2332  var _ error = RefreshProjectCLsResponseValidationError{}
  2333  
  2334  var _ interface {
  2335  	Field() string
  2336  	Reason() string
  2337  	Key() bool
  2338  	Cause() error
  2339  	ErrorName() string
  2340  } = RefreshProjectCLsResponseValidationError{}
  2341  
  2342  // Validate checks the field values on SendProjectEventRequest with the rules
  2343  // defined in the proto definition for this message. If any rules are
  2344  // violated, the first error encountered is returned, or nil if there are no violations.
  2345  func (m *SendProjectEventRequest) Validate() error {
  2346  	return m.validate(false)
  2347  }
  2348  
  2349  // ValidateAll checks the field values on SendProjectEventRequest with the
  2350  // rules defined in the proto definition for this message. If any rules are
  2351  // violated, the result is a list of violation errors wrapped in
  2352  // SendProjectEventRequestMultiError, or nil if none found.
  2353  func (m *SendProjectEventRequest) ValidateAll() error {
  2354  	return m.validate(true)
  2355  }
  2356  
  2357  func (m *SendProjectEventRequest) validate(all bool) error {
  2358  	if m == nil {
  2359  		return nil
  2360  	}
  2361  
  2362  	var errors []error
  2363  
  2364  	// no validation rules for Project
  2365  
  2366  	if all {
  2367  		switch v := interface{}(m.GetEvent()).(type) {
  2368  		case interface{ ValidateAll() error }:
  2369  			if err := v.ValidateAll(); err != nil {
  2370  				errors = append(errors, SendProjectEventRequestValidationError{
  2371  					field:  "Event",
  2372  					reason: "embedded message failed validation",
  2373  					cause:  err,
  2374  				})
  2375  			}
  2376  		case interface{ Validate() error }:
  2377  			if err := v.Validate(); err != nil {
  2378  				errors = append(errors, SendProjectEventRequestValidationError{
  2379  					field:  "Event",
  2380  					reason: "embedded message failed validation",
  2381  					cause:  err,
  2382  				})
  2383  			}
  2384  		}
  2385  	} else if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok {
  2386  		if err := v.Validate(); err != nil {
  2387  			return SendProjectEventRequestValidationError{
  2388  				field:  "Event",
  2389  				reason: "embedded message failed validation",
  2390  				cause:  err,
  2391  			}
  2392  		}
  2393  	}
  2394  
  2395  	if len(errors) > 0 {
  2396  		return SendProjectEventRequestMultiError(errors)
  2397  	}
  2398  
  2399  	return nil
  2400  }
  2401  
  2402  // SendProjectEventRequestMultiError is an error wrapping multiple validation
  2403  // errors returned by SendProjectEventRequest.ValidateAll() if the designated
  2404  // constraints aren't met.
  2405  type SendProjectEventRequestMultiError []error
  2406  
  2407  // Error returns a concatenation of all the error messages it wraps.
  2408  func (m SendProjectEventRequestMultiError) Error() string {
  2409  	var msgs []string
  2410  	for _, err := range m {
  2411  		msgs = append(msgs, err.Error())
  2412  	}
  2413  	return strings.Join(msgs, "; ")
  2414  }
  2415  
  2416  // AllErrors returns a list of validation violation errors.
  2417  func (m SendProjectEventRequestMultiError) AllErrors() []error { return m }
  2418  
  2419  // SendProjectEventRequestValidationError is the validation error returned by
  2420  // SendProjectEventRequest.Validate if the designated constraints aren't met.
  2421  type SendProjectEventRequestValidationError struct {
  2422  	field  string
  2423  	reason string
  2424  	cause  error
  2425  	key    bool
  2426  }
  2427  
  2428  // Field function returns field value.
  2429  func (e SendProjectEventRequestValidationError) Field() string { return e.field }
  2430  
  2431  // Reason function returns reason value.
  2432  func (e SendProjectEventRequestValidationError) Reason() string { return e.reason }
  2433  
  2434  // Cause function returns cause value.
  2435  func (e SendProjectEventRequestValidationError) Cause() error { return e.cause }
  2436  
  2437  // Key function returns key value.
  2438  func (e SendProjectEventRequestValidationError) Key() bool { return e.key }
  2439  
  2440  // ErrorName returns error name.
  2441  func (e SendProjectEventRequestValidationError) ErrorName() string {
  2442  	return "SendProjectEventRequestValidationError"
  2443  }
  2444  
  2445  // Error satisfies the builtin error interface
  2446  func (e SendProjectEventRequestValidationError) Error() string {
  2447  	cause := ""
  2448  	if e.cause != nil {
  2449  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2450  	}
  2451  
  2452  	key := ""
  2453  	if e.key {
  2454  		key = "key for "
  2455  	}
  2456  
  2457  	return fmt.Sprintf(
  2458  		"invalid %sSendProjectEventRequest.%s: %s%s",
  2459  		key,
  2460  		e.field,
  2461  		e.reason,
  2462  		cause)
  2463  }
  2464  
  2465  var _ error = SendProjectEventRequestValidationError{}
  2466  
  2467  var _ interface {
  2468  	Field() string
  2469  	Reason() string
  2470  	Key() bool
  2471  	Cause() error
  2472  	ErrorName() string
  2473  } = SendProjectEventRequestValidationError{}
  2474  
  2475  // Validate checks the field values on SendRunEventRequest with the rules
  2476  // defined in the proto definition for this message. If any rules are
  2477  // violated, the first error encountered is returned, or nil if there are no violations.
  2478  func (m *SendRunEventRequest) Validate() error {
  2479  	return m.validate(false)
  2480  }
  2481  
  2482  // ValidateAll checks the field values on SendRunEventRequest with the rules
  2483  // defined in the proto definition for this message. If any rules are
  2484  // violated, the result is a list of violation errors wrapped in
  2485  // SendRunEventRequestMultiError, or nil if none found.
  2486  func (m *SendRunEventRequest) ValidateAll() error {
  2487  	return m.validate(true)
  2488  }
  2489  
  2490  func (m *SendRunEventRequest) validate(all bool) error {
  2491  	if m == nil {
  2492  		return nil
  2493  	}
  2494  
  2495  	var errors []error
  2496  
  2497  	// no validation rules for Run
  2498  
  2499  	if all {
  2500  		switch v := interface{}(m.GetEvent()).(type) {
  2501  		case interface{ ValidateAll() error }:
  2502  			if err := v.ValidateAll(); err != nil {
  2503  				errors = append(errors, SendRunEventRequestValidationError{
  2504  					field:  "Event",
  2505  					reason: "embedded message failed validation",
  2506  					cause:  err,
  2507  				})
  2508  			}
  2509  		case interface{ Validate() error }:
  2510  			if err := v.Validate(); err != nil {
  2511  				errors = append(errors, SendRunEventRequestValidationError{
  2512  					field:  "Event",
  2513  					reason: "embedded message failed validation",
  2514  					cause:  err,
  2515  				})
  2516  			}
  2517  		}
  2518  	} else if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok {
  2519  		if err := v.Validate(); err != nil {
  2520  			return SendRunEventRequestValidationError{
  2521  				field:  "Event",
  2522  				reason: "embedded message failed validation",
  2523  				cause:  err,
  2524  			}
  2525  		}
  2526  	}
  2527  
  2528  	if len(errors) > 0 {
  2529  		return SendRunEventRequestMultiError(errors)
  2530  	}
  2531  
  2532  	return nil
  2533  }
  2534  
  2535  // SendRunEventRequestMultiError is an error wrapping multiple validation
  2536  // errors returned by SendRunEventRequest.ValidateAll() if the designated
  2537  // constraints aren't met.
  2538  type SendRunEventRequestMultiError []error
  2539  
  2540  // Error returns a concatenation of all the error messages it wraps.
  2541  func (m SendRunEventRequestMultiError) Error() string {
  2542  	var msgs []string
  2543  	for _, err := range m {
  2544  		msgs = append(msgs, err.Error())
  2545  	}
  2546  	return strings.Join(msgs, "; ")
  2547  }
  2548  
  2549  // AllErrors returns a list of validation violation errors.
  2550  func (m SendRunEventRequestMultiError) AllErrors() []error { return m }
  2551  
  2552  // SendRunEventRequestValidationError is the validation error returned by
  2553  // SendRunEventRequest.Validate if the designated constraints aren't met.
  2554  type SendRunEventRequestValidationError struct {
  2555  	field  string
  2556  	reason string
  2557  	cause  error
  2558  	key    bool
  2559  }
  2560  
  2561  // Field function returns field value.
  2562  func (e SendRunEventRequestValidationError) Field() string { return e.field }
  2563  
  2564  // Reason function returns reason value.
  2565  func (e SendRunEventRequestValidationError) Reason() string { return e.reason }
  2566  
  2567  // Cause function returns cause value.
  2568  func (e SendRunEventRequestValidationError) Cause() error { return e.cause }
  2569  
  2570  // Key function returns key value.
  2571  func (e SendRunEventRequestValidationError) Key() bool { return e.key }
  2572  
  2573  // ErrorName returns error name.
  2574  func (e SendRunEventRequestValidationError) ErrorName() string {
  2575  	return "SendRunEventRequestValidationError"
  2576  }
  2577  
  2578  // Error satisfies the builtin error interface
  2579  func (e SendRunEventRequestValidationError) Error() string {
  2580  	cause := ""
  2581  	if e.cause != nil {
  2582  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2583  	}
  2584  
  2585  	key := ""
  2586  	if e.key {
  2587  		key = "key for "
  2588  	}
  2589  
  2590  	return fmt.Sprintf(
  2591  		"invalid %sSendRunEventRequest.%s: %s%s",
  2592  		key,
  2593  		e.field,
  2594  		e.reason,
  2595  		cause)
  2596  }
  2597  
  2598  var _ error = SendRunEventRequestValidationError{}
  2599  
  2600  var _ interface {
  2601  	Field() string
  2602  	Reason() string
  2603  	Key() bool
  2604  	Cause() error
  2605  	ErrorName() string
  2606  } = SendRunEventRequestValidationError{}
  2607  
  2608  // Validate checks the field values on SearchRunsRequest with the rules defined
  2609  // in the proto definition for this message. If any rules are violated, the
  2610  // first error encountered is returned, or nil if there are no violations.
  2611  func (m *SearchRunsRequest) Validate() error {
  2612  	return m.validate(false)
  2613  }
  2614  
  2615  // ValidateAll checks the field values on SearchRunsRequest with the rules
  2616  // defined in the proto definition for this message. If any rules are
  2617  // violated, the result is a list of violation errors wrapped in
  2618  // SearchRunsRequestMultiError, or nil if none found.
  2619  func (m *SearchRunsRequest) ValidateAll() error {
  2620  	return m.validate(true)
  2621  }
  2622  
  2623  func (m *SearchRunsRequest) validate(all bool) error {
  2624  	if m == nil {
  2625  		return nil
  2626  	}
  2627  
  2628  	var errors []error
  2629  
  2630  	// no validation rules for PageSize
  2631  
  2632  	// no validation rules for PageToken
  2633  
  2634  	// no validation rules for Project
  2635  
  2636  	// no validation rules for Status
  2637  
  2638  	if all {
  2639  		switch v := interface{}(m.GetCl()).(type) {
  2640  		case interface{ ValidateAll() error }:
  2641  			if err := v.ValidateAll(); err != nil {
  2642  				errors = append(errors, SearchRunsRequestValidationError{
  2643  					field:  "Cl",
  2644  					reason: "embedded message failed validation",
  2645  					cause:  err,
  2646  				})
  2647  			}
  2648  		case interface{ Validate() error }:
  2649  			if err := v.Validate(); err != nil {
  2650  				errors = append(errors, SearchRunsRequestValidationError{
  2651  					field:  "Cl",
  2652  					reason: "embedded message failed validation",
  2653  					cause:  err,
  2654  				})
  2655  			}
  2656  		}
  2657  	} else if v, ok := interface{}(m.GetCl()).(interface{ Validate() error }); ok {
  2658  		if err := v.Validate(); err != nil {
  2659  			return SearchRunsRequestValidationError{
  2660  				field:  "Cl",
  2661  				reason: "embedded message failed validation",
  2662  				cause:  err,
  2663  			}
  2664  		}
  2665  	}
  2666  
  2667  	// no validation rules for Mode
  2668  
  2669  	if len(errors) > 0 {
  2670  		return SearchRunsRequestMultiError(errors)
  2671  	}
  2672  
  2673  	return nil
  2674  }
  2675  
  2676  // SearchRunsRequestMultiError is an error wrapping multiple validation errors
  2677  // returned by SearchRunsRequest.ValidateAll() if the designated constraints
  2678  // aren't met.
  2679  type SearchRunsRequestMultiError []error
  2680  
  2681  // Error returns a concatenation of all the error messages it wraps.
  2682  func (m SearchRunsRequestMultiError) Error() string {
  2683  	var msgs []string
  2684  	for _, err := range m {
  2685  		msgs = append(msgs, err.Error())
  2686  	}
  2687  	return strings.Join(msgs, "; ")
  2688  }
  2689  
  2690  // AllErrors returns a list of validation violation errors.
  2691  func (m SearchRunsRequestMultiError) AllErrors() []error { return m }
  2692  
  2693  // SearchRunsRequestValidationError is the validation error returned by
  2694  // SearchRunsRequest.Validate if the designated constraints aren't met.
  2695  type SearchRunsRequestValidationError struct {
  2696  	field  string
  2697  	reason string
  2698  	cause  error
  2699  	key    bool
  2700  }
  2701  
  2702  // Field function returns field value.
  2703  func (e SearchRunsRequestValidationError) Field() string { return e.field }
  2704  
  2705  // Reason function returns reason value.
  2706  func (e SearchRunsRequestValidationError) Reason() string { return e.reason }
  2707  
  2708  // Cause function returns cause value.
  2709  func (e SearchRunsRequestValidationError) Cause() error { return e.cause }
  2710  
  2711  // Key function returns key value.
  2712  func (e SearchRunsRequestValidationError) Key() bool { return e.key }
  2713  
  2714  // ErrorName returns error name.
  2715  func (e SearchRunsRequestValidationError) ErrorName() string {
  2716  	return "SearchRunsRequestValidationError"
  2717  }
  2718  
  2719  // Error satisfies the builtin error interface
  2720  func (e SearchRunsRequestValidationError) Error() string {
  2721  	cause := ""
  2722  	if e.cause != nil {
  2723  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2724  	}
  2725  
  2726  	key := ""
  2727  	if e.key {
  2728  		key = "key for "
  2729  	}
  2730  
  2731  	return fmt.Sprintf(
  2732  		"invalid %sSearchRunsRequest.%s: %s%s",
  2733  		key,
  2734  		e.field,
  2735  		e.reason,
  2736  		cause)
  2737  }
  2738  
  2739  var _ error = SearchRunsRequestValidationError{}
  2740  
  2741  var _ interface {
  2742  	Field() string
  2743  	Reason() string
  2744  	Key() bool
  2745  	Cause() error
  2746  	ErrorName() string
  2747  } = SearchRunsRequestValidationError{}
  2748  
  2749  // Validate checks the field values on RunsResponse with the rules defined in
  2750  // the proto definition for this message. If any rules are violated, the first
  2751  // error encountered is returned, or nil if there are no violations.
  2752  func (m *RunsResponse) Validate() error {
  2753  	return m.validate(false)
  2754  }
  2755  
  2756  // ValidateAll checks the field values on RunsResponse with the rules defined
  2757  // in the proto definition for this message. If any rules are violated, the
  2758  // result is a list of violation errors wrapped in RunsResponseMultiError, or
  2759  // nil if none found.
  2760  func (m *RunsResponse) ValidateAll() error {
  2761  	return m.validate(true)
  2762  }
  2763  
  2764  func (m *RunsResponse) validate(all bool) error {
  2765  	if m == nil {
  2766  		return nil
  2767  	}
  2768  
  2769  	var errors []error
  2770  
  2771  	for idx, item := range m.GetRuns() {
  2772  		_, _ = idx, item
  2773  
  2774  		if all {
  2775  			switch v := interface{}(item).(type) {
  2776  			case interface{ ValidateAll() error }:
  2777  				if err := v.ValidateAll(); err != nil {
  2778  					errors = append(errors, RunsResponseValidationError{
  2779  						field:  fmt.Sprintf("Runs[%v]", idx),
  2780  						reason: "embedded message failed validation",
  2781  						cause:  err,
  2782  					})
  2783  				}
  2784  			case interface{ Validate() error }:
  2785  				if err := v.Validate(); err != nil {
  2786  					errors = append(errors, RunsResponseValidationError{
  2787  						field:  fmt.Sprintf("Runs[%v]", idx),
  2788  						reason: "embedded message failed validation",
  2789  						cause:  err,
  2790  					})
  2791  				}
  2792  			}
  2793  		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
  2794  			if err := v.Validate(); err != nil {
  2795  				return RunsResponseValidationError{
  2796  					field:  fmt.Sprintf("Runs[%v]", idx),
  2797  					reason: "embedded message failed validation",
  2798  					cause:  err,
  2799  				}
  2800  			}
  2801  		}
  2802  
  2803  	}
  2804  
  2805  	// no validation rules for NextPageToken
  2806  
  2807  	if len(errors) > 0 {
  2808  		return RunsResponseMultiError(errors)
  2809  	}
  2810  
  2811  	return nil
  2812  }
  2813  
  2814  // RunsResponseMultiError is an error wrapping multiple validation errors
  2815  // returned by RunsResponse.ValidateAll() if the designated constraints aren't met.
  2816  type RunsResponseMultiError []error
  2817  
  2818  // Error returns a concatenation of all the error messages it wraps.
  2819  func (m RunsResponseMultiError) Error() string {
  2820  	var msgs []string
  2821  	for _, err := range m {
  2822  		msgs = append(msgs, err.Error())
  2823  	}
  2824  	return strings.Join(msgs, "; ")
  2825  }
  2826  
  2827  // AllErrors returns a list of validation violation errors.
  2828  func (m RunsResponseMultiError) AllErrors() []error { return m }
  2829  
  2830  // RunsResponseValidationError is the validation error returned by
  2831  // RunsResponse.Validate if the designated constraints aren't met.
  2832  type RunsResponseValidationError struct {
  2833  	field  string
  2834  	reason string
  2835  	cause  error
  2836  	key    bool
  2837  }
  2838  
  2839  // Field function returns field value.
  2840  func (e RunsResponseValidationError) Field() string { return e.field }
  2841  
  2842  // Reason function returns reason value.
  2843  func (e RunsResponseValidationError) Reason() string { return e.reason }
  2844  
  2845  // Cause function returns cause value.
  2846  func (e RunsResponseValidationError) Cause() error { return e.cause }
  2847  
  2848  // Key function returns key value.
  2849  func (e RunsResponseValidationError) Key() bool { return e.key }
  2850  
  2851  // ErrorName returns error name.
  2852  func (e RunsResponseValidationError) ErrorName() string { return "RunsResponseValidationError" }
  2853  
  2854  // Error satisfies the builtin error interface
  2855  func (e RunsResponseValidationError) Error() string {
  2856  	cause := ""
  2857  	if e.cause != nil {
  2858  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  2859  	}
  2860  
  2861  	key := ""
  2862  	if e.key {
  2863  		key = "key for "
  2864  	}
  2865  
  2866  	return fmt.Sprintf(
  2867  		"invalid %sRunsResponse.%s: %s%s",
  2868  		key,
  2869  		e.field,
  2870  		e.reason,
  2871  		cause)
  2872  }
  2873  
  2874  var _ error = RunsResponseValidationError{}
  2875  
  2876  var _ interface {
  2877  	Field() string
  2878  	Reason() string
  2879  	Key() bool
  2880  	Cause() error
  2881  	ErrorName() string
  2882  } = RunsResponseValidationError{}
  2883  
  2884  // Validate checks the field values on ScheduleTaskRequest with the rules
  2885  // defined in the proto definition for this message. If any rules are
  2886  // violated, the first error encountered is returned, or nil if there are no violations.
  2887  func (m *ScheduleTaskRequest) Validate() error {
  2888  	return m.validate(false)
  2889  }
  2890  
  2891  // ValidateAll checks the field values on ScheduleTaskRequest with the rules
  2892  // defined in the proto definition for this message. If any rules are
  2893  // violated, the result is a list of violation errors wrapped in
  2894  // ScheduleTaskRequestMultiError, or nil if none found.
  2895  func (m *ScheduleTaskRequest) ValidateAll() error {
  2896  	return m.validate(true)
  2897  }
  2898  
  2899  func (m *ScheduleTaskRequest) validate(all bool) error {
  2900  	if m == nil {
  2901  		return nil
  2902  	}
  2903  
  2904  	var errors []error
  2905  
  2906  	if all {
  2907  		switch v := interface{}(m.GetUpdateCl()).(type) {
  2908  		case interface{ ValidateAll() error }:
  2909  			if err := v.ValidateAll(); err != nil {
  2910  				errors = append(errors, ScheduleTaskRequestValidationError{
  2911  					field:  "UpdateCl",
  2912  					reason: "embedded message failed validation",
  2913  					cause:  err,
  2914  				})
  2915  			}
  2916  		case interface{ Validate() error }:
  2917  			if err := v.Validate(); err != nil {
  2918  				errors = append(errors, ScheduleTaskRequestValidationError{
  2919  					field:  "UpdateCl",
  2920  					reason: "embedded message failed validation",
  2921  					cause:  err,
  2922  				})
  2923  			}
  2924  		}
  2925  	} else if v, ok := interface{}(m.GetUpdateCl()).(interface{ Validate() error }); ok {
  2926  		if err := v.Validate(); err != nil {
  2927  			return ScheduleTaskRequestValidationError{
  2928  				field:  "UpdateCl",
  2929  				reason: "embedded message failed validation",
  2930  				cause:  err,
  2931  			}
  2932  		}
  2933  	}
  2934  
  2935  	if all {
  2936  		switch v := interface{}(m.GetBatchUpdateCl()).(type) {
  2937  		case interface{ ValidateAll() error }:
  2938  			if err := v.ValidateAll(); err != nil {
  2939  				errors = append(errors, ScheduleTaskRequestValidationError{
  2940  					field:  "BatchUpdateCl",
  2941  					reason: "embedded message failed validation",
  2942  					cause:  err,
  2943  				})
  2944  			}
  2945  		case interface{ Validate() error }:
  2946  			if err := v.Validate(); err != nil {
  2947  				errors = append(errors, ScheduleTaskRequestValidationError{
  2948  					field:  "BatchUpdateCl",
  2949  					reason: "embedded message failed validation",
  2950  					cause:  err,
  2951  				})
  2952  			}
  2953  		}
  2954  	} else if v, ok := interface{}(m.GetBatchUpdateCl()).(interface{ Validate() error }); ok {
  2955  		if err := v.Validate(); err != nil {
  2956  			return ScheduleTaskRequestValidationError{
  2957  				field:  "BatchUpdateCl",
  2958  				reason: "embedded message failed validation",
  2959  				cause:  err,
  2960  			}
  2961  		}
  2962  	}
  2963  
  2964  	if all {
  2965  		switch v := interface{}(m.GetBatchOnClUpdated()).(type) {
  2966  		case interface{ ValidateAll() error }:
  2967  			if err := v.ValidateAll(); err != nil {
  2968  				errors = append(errors, ScheduleTaskRequestValidationError{
  2969  					field:  "BatchOnClUpdated",
  2970  					reason: "embedded message failed validation",
  2971  					cause:  err,
  2972  				})
  2973  			}
  2974  		case interface{ Validate() error }:
  2975  			if err := v.Validate(); err != nil {
  2976  				errors = append(errors, ScheduleTaskRequestValidationError{
  2977  					field:  "BatchOnClUpdated",
  2978  					reason: "embedded message failed validation",
  2979  					cause:  err,
  2980  				})
  2981  			}
  2982  		}
  2983  	} else if v, ok := interface{}(m.GetBatchOnClUpdated()).(interface{ Validate() error }); ok {
  2984  		if err := v.Validate(); err != nil {
  2985  			return ScheduleTaskRequestValidationError{
  2986  				field:  "BatchOnClUpdated",
  2987  				reason: "embedded message failed validation",
  2988  				cause:  err,
  2989  			}
  2990  		}
  2991  	}
  2992  
  2993  	if all {
  2994  		switch v := interface{}(m.GetRefreshProjectConfig()).(type) {
  2995  		case interface{ ValidateAll() error }:
  2996  			if err := v.ValidateAll(); err != nil {
  2997  				errors = append(errors, ScheduleTaskRequestValidationError{
  2998  					field:  "RefreshProjectConfig",
  2999  					reason: "embedded message failed validation",
  3000  					cause:  err,
  3001  				})
  3002  			}
  3003  		case interface{ Validate() error }:
  3004  			if err := v.Validate(); err != nil {
  3005  				errors = append(errors, ScheduleTaskRequestValidationError{
  3006  					field:  "RefreshProjectConfig",
  3007  					reason: "embedded message failed validation",
  3008  					cause:  err,
  3009  				})
  3010  			}
  3011  		}
  3012  	} else if v, ok := interface{}(m.GetRefreshProjectConfig()).(interface{ Validate() error }); ok {
  3013  		if err := v.Validate(); err != nil {
  3014  			return ScheduleTaskRequestValidationError{
  3015  				field:  "RefreshProjectConfig",
  3016  				reason: "embedded message failed validation",
  3017  				cause:  err,
  3018  			}
  3019  		}
  3020  	}
  3021  
  3022  	if all {
  3023  		switch v := interface{}(m.GetPollGerrit()).(type) {
  3024  		case interface{ ValidateAll() error }:
  3025  			if err := v.ValidateAll(); err != nil {
  3026  				errors = append(errors, ScheduleTaskRequestValidationError{
  3027  					field:  "PollGerrit",
  3028  					reason: "embedded message failed validation",
  3029  					cause:  err,
  3030  				})
  3031  			}
  3032  		case interface{ Validate() error }:
  3033  			if err := v.Validate(); err != nil {
  3034  				errors = append(errors, ScheduleTaskRequestValidationError{
  3035  					field:  "PollGerrit",
  3036  					reason: "embedded message failed validation",
  3037  					cause:  err,
  3038  				})
  3039  			}
  3040  		}
  3041  	} else if v, ok := interface{}(m.GetPollGerrit()).(interface{ Validate() error }); ok {
  3042  		if err := v.Validate(); err != nil {
  3043  			return ScheduleTaskRequestValidationError{
  3044  				field:  "PollGerrit",
  3045  				reason: "embedded message failed validation",
  3046  				cause:  err,
  3047  			}
  3048  		}
  3049  	}
  3050  
  3051  	if all {
  3052  		switch v := interface{}(m.GetManageProject()).(type) {
  3053  		case interface{ ValidateAll() error }:
  3054  			if err := v.ValidateAll(); err != nil {
  3055  				errors = append(errors, ScheduleTaskRequestValidationError{
  3056  					field:  "ManageProject",
  3057  					reason: "embedded message failed validation",
  3058  					cause:  err,
  3059  				})
  3060  			}
  3061  		case interface{ Validate() error }:
  3062  			if err := v.Validate(); err != nil {
  3063  				errors = append(errors, ScheduleTaskRequestValidationError{
  3064  					field:  "ManageProject",
  3065  					reason: "embedded message failed validation",
  3066  					cause:  err,
  3067  				})
  3068  			}
  3069  		}
  3070  	} else if v, ok := interface{}(m.GetManageProject()).(interface{ Validate() error }); ok {
  3071  		if err := v.Validate(); err != nil {
  3072  			return ScheduleTaskRequestValidationError{
  3073  				field:  "ManageProject",
  3074  				reason: "embedded message failed validation",
  3075  				cause:  err,
  3076  			}
  3077  		}
  3078  	}
  3079  
  3080  	if all {
  3081  		switch v := interface{}(m.GetKickManageProject()).(type) {
  3082  		case interface{ ValidateAll() error }:
  3083  			if err := v.ValidateAll(); err != nil {
  3084  				errors = append(errors, ScheduleTaskRequestValidationError{
  3085  					field:  "KickManageProject",
  3086  					reason: "embedded message failed validation",
  3087  					cause:  err,
  3088  				})
  3089  			}
  3090  		case interface{ Validate() error }:
  3091  			if err := v.Validate(); err != nil {
  3092  				errors = append(errors, ScheduleTaskRequestValidationError{
  3093  					field:  "KickManageProject",
  3094  					reason: "embedded message failed validation",
  3095  					cause:  err,
  3096  				})
  3097  			}
  3098  		}
  3099  	} else if v, ok := interface{}(m.GetKickManageProject()).(interface{ Validate() error }); ok {
  3100  		if err := v.Validate(); err != nil {
  3101  			return ScheduleTaskRequestValidationError{
  3102  				field:  "KickManageProject",
  3103  				reason: "embedded message failed validation",
  3104  				cause:  err,
  3105  			}
  3106  		}
  3107  	}
  3108  
  3109  	if all {
  3110  		switch v := interface{}(m.GetPurgeCl()).(type) {
  3111  		case interface{ ValidateAll() error }:
  3112  			if err := v.ValidateAll(); err != nil {
  3113  				errors = append(errors, ScheduleTaskRequestValidationError{
  3114  					field:  "PurgeCl",
  3115  					reason: "embedded message failed validation",
  3116  					cause:  err,
  3117  				})
  3118  			}
  3119  		case interface{ Validate() error }:
  3120  			if err := v.Validate(); err != nil {
  3121  				errors = append(errors, ScheduleTaskRequestValidationError{
  3122  					field:  "PurgeCl",
  3123  					reason: "embedded message failed validation",
  3124  					cause:  err,
  3125  				})
  3126  			}
  3127  		}
  3128  	} else if v, ok := interface{}(m.GetPurgeCl()).(interface{ Validate() error }); ok {
  3129  		if err := v.Validate(); err != nil {
  3130  			return ScheduleTaskRequestValidationError{
  3131  				field:  "PurgeCl",
  3132  				reason: "embedded message failed validation",
  3133  				cause:  err,
  3134  			}
  3135  		}
  3136  	}
  3137  
  3138  	if all {
  3139  		switch v := interface{}(m.GetExportRunToBq()).(type) {
  3140  		case interface{ ValidateAll() error }:
  3141  			if err := v.ValidateAll(); err != nil {
  3142  				errors = append(errors, ScheduleTaskRequestValidationError{
  3143  					field:  "ExportRunToBq",
  3144  					reason: "embedded message failed validation",
  3145  					cause:  err,
  3146  				})
  3147  			}
  3148  		case interface{ Validate() error }:
  3149  			if err := v.Validate(); err != nil {
  3150  				errors = append(errors, ScheduleTaskRequestValidationError{
  3151  					field:  "ExportRunToBq",
  3152  					reason: "embedded message failed validation",
  3153  					cause:  err,
  3154  				})
  3155  			}
  3156  		}
  3157  	} else if v, ok := interface{}(m.GetExportRunToBq()).(interface{ Validate() error }); ok {
  3158  		if err := v.Validate(); err != nil {
  3159  			return ScheduleTaskRequestValidationError{
  3160  				field:  "ExportRunToBq",
  3161  				reason: "embedded message failed validation",
  3162  				cause:  err,
  3163  			}
  3164  		}
  3165  	}
  3166  
  3167  	if all {
  3168  		switch v := interface{}(m.GetManageRun()).(type) {
  3169  		case interface{ ValidateAll() error }:
  3170  			if err := v.ValidateAll(); err != nil {
  3171  				errors = append(errors, ScheduleTaskRequestValidationError{
  3172  					field:  "ManageRun",
  3173  					reason: "embedded message failed validation",
  3174  					cause:  err,
  3175  				})
  3176  			}
  3177  		case interface{ Validate() error }:
  3178  			if err := v.Validate(); err != nil {
  3179  				errors = append(errors, ScheduleTaskRequestValidationError{
  3180  					field:  "ManageRun",
  3181  					reason: "embedded message failed validation",
  3182  					cause:  err,
  3183  				})
  3184  			}
  3185  		}
  3186  	} else if v, ok := interface{}(m.GetManageRun()).(interface{ Validate() error }); ok {
  3187  		if err := v.Validate(); err != nil {
  3188  			return ScheduleTaskRequestValidationError{
  3189  				field:  "ManageRun",
  3190  				reason: "embedded message failed validation",
  3191  				cause:  err,
  3192  			}
  3193  		}
  3194  	}
  3195  
  3196  	if all {
  3197  		switch v := interface{}(m.GetKickManageRun()).(type) {
  3198  		case interface{ ValidateAll() error }:
  3199  			if err := v.ValidateAll(); err != nil {
  3200  				errors = append(errors, ScheduleTaskRequestValidationError{
  3201  					field:  "KickManageRun",
  3202  					reason: "embedded message failed validation",
  3203  					cause:  err,
  3204  				})
  3205  			}
  3206  		case interface{ Validate() error }:
  3207  			if err := v.Validate(); err != nil {
  3208  				errors = append(errors, ScheduleTaskRequestValidationError{
  3209  					field:  "KickManageRun",
  3210  					reason: "embedded message failed validation",
  3211  					cause:  err,
  3212  				})
  3213  			}
  3214  		}
  3215  	} else if v, ok := interface{}(m.GetKickManageRun()).(interface{ Validate() error }); ok {
  3216  		if err := v.Validate(); err != nil {
  3217  			return ScheduleTaskRequestValidationError{
  3218  				field:  "KickManageRun",
  3219  				reason: "embedded message failed validation",
  3220  				cause:  err,
  3221  			}
  3222  		}
  3223  	}
  3224  
  3225  	if all {
  3226  		switch v := interface{}(m.GetManageRunLongOp()).(type) {
  3227  		case interface{ ValidateAll() error }:
  3228  			if err := v.ValidateAll(); err != nil {
  3229  				errors = append(errors, ScheduleTaskRequestValidationError{
  3230  					field:  "ManageRunLongOp",
  3231  					reason: "embedded message failed validation",
  3232  					cause:  err,
  3233  				})
  3234  			}
  3235  		case interface{ Validate() error }:
  3236  			if err := v.Validate(); err != nil {
  3237  				errors = append(errors, ScheduleTaskRequestValidationError{
  3238  					field:  "ManageRunLongOp",
  3239  					reason: "embedded message failed validation",
  3240  					cause:  err,
  3241  				})
  3242  			}
  3243  		}
  3244  	} else if v, ok := interface{}(m.GetManageRunLongOp()).(interface{ Validate() error }); ok {
  3245  		if err := v.Validate(); err != nil {
  3246  			return ScheduleTaskRequestValidationError{
  3247  				field:  "ManageRunLongOp",
  3248  				reason: "embedded message failed validation",
  3249  				cause:  err,
  3250  			}
  3251  		}
  3252  	}
  3253  
  3254  	// no validation rules for DeduplicationKey
  3255  
  3256  	if len(errors) > 0 {
  3257  		return ScheduleTaskRequestMultiError(errors)
  3258  	}
  3259  
  3260  	return nil
  3261  }
  3262  
  3263  // ScheduleTaskRequestMultiError is an error wrapping multiple validation
  3264  // errors returned by ScheduleTaskRequest.ValidateAll() if the designated
  3265  // constraints aren't met.
  3266  type ScheduleTaskRequestMultiError []error
  3267  
  3268  // Error returns a concatenation of all the error messages it wraps.
  3269  func (m ScheduleTaskRequestMultiError) Error() string {
  3270  	var msgs []string
  3271  	for _, err := range m {
  3272  		msgs = append(msgs, err.Error())
  3273  	}
  3274  	return strings.Join(msgs, "; ")
  3275  }
  3276  
  3277  // AllErrors returns a list of validation violation errors.
  3278  func (m ScheduleTaskRequestMultiError) AllErrors() []error { return m }
  3279  
  3280  // ScheduleTaskRequestValidationError is the validation error returned by
  3281  // ScheduleTaskRequest.Validate if the designated constraints aren't met.
  3282  type ScheduleTaskRequestValidationError struct {
  3283  	field  string
  3284  	reason string
  3285  	cause  error
  3286  	key    bool
  3287  }
  3288  
  3289  // Field function returns field value.
  3290  func (e ScheduleTaskRequestValidationError) Field() string { return e.field }
  3291  
  3292  // Reason function returns reason value.
  3293  func (e ScheduleTaskRequestValidationError) Reason() string { return e.reason }
  3294  
  3295  // Cause function returns cause value.
  3296  func (e ScheduleTaskRequestValidationError) Cause() error { return e.cause }
  3297  
  3298  // Key function returns key value.
  3299  func (e ScheduleTaskRequestValidationError) Key() bool { return e.key }
  3300  
  3301  // ErrorName returns error name.
  3302  func (e ScheduleTaskRequestValidationError) ErrorName() string {
  3303  	return "ScheduleTaskRequestValidationError"
  3304  }
  3305  
  3306  // Error satisfies the builtin error interface
  3307  func (e ScheduleTaskRequestValidationError) Error() string {
  3308  	cause := ""
  3309  	if e.cause != nil {
  3310  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3311  	}
  3312  
  3313  	key := ""
  3314  	if e.key {
  3315  		key = "key for "
  3316  	}
  3317  
  3318  	return fmt.Sprintf(
  3319  		"invalid %sScheduleTaskRequest.%s: %s%s",
  3320  		key,
  3321  		e.field,
  3322  		e.reason,
  3323  		cause)
  3324  }
  3325  
  3326  var _ error = ScheduleTaskRequestValidationError{}
  3327  
  3328  var _ interface {
  3329  	Field() string
  3330  	Reason() string
  3331  	Key() bool
  3332  	Cause() error
  3333  	ErrorName() string
  3334  } = ScheduleTaskRequestValidationError{}
  3335  
  3336  // Validate checks the field values on DSMLaunchJobRequest with the rules
  3337  // defined in the proto definition for this message. If any rules are
  3338  // violated, the first error encountered is returned, or nil if there are no violations.
  3339  func (m *DSMLaunchJobRequest) Validate() error {
  3340  	return m.validate(false)
  3341  }
  3342  
  3343  // ValidateAll checks the field values on DSMLaunchJobRequest with the rules
  3344  // defined in the proto definition for this message. If any rules are
  3345  // violated, the result is a list of violation errors wrapped in
  3346  // DSMLaunchJobRequestMultiError, or nil if none found.
  3347  func (m *DSMLaunchJobRequest) ValidateAll() error {
  3348  	return m.validate(true)
  3349  }
  3350  
  3351  func (m *DSMLaunchJobRequest) validate(all bool) error {
  3352  	if m == nil {
  3353  		return nil
  3354  	}
  3355  
  3356  	var errors []error
  3357  
  3358  	// no validation rules for Name
  3359  
  3360  	if len(errors) > 0 {
  3361  		return DSMLaunchJobRequestMultiError(errors)
  3362  	}
  3363  
  3364  	return nil
  3365  }
  3366  
  3367  // DSMLaunchJobRequestMultiError is an error wrapping multiple validation
  3368  // errors returned by DSMLaunchJobRequest.ValidateAll() if the designated
  3369  // constraints aren't met.
  3370  type DSMLaunchJobRequestMultiError []error
  3371  
  3372  // Error returns a concatenation of all the error messages it wraps.
  3373  func (m DSMLaunchJobRequestMultiError) Error() string {
  3374  	var msgs []string
  3375  	for _, err := range m {
  3376  		msgs = append(msgs, err.Error())
  3377  	}
  3378  	return strings.Join(msgs, "; ")
  3379  }
  3380  
  3381  // AllErrors returns a list of validation violation errors.
  3382  func (m DSMLaunchJobRequestMultiError) AllErrors() []error { return m }
  3383  
  3384  // DSMLaunchJobRequestValidationError is the validation error returned by
  3385  // DSMLaunchJobRequest.Validate if the designated constraints aren't met.
  3386  type DSMLaunchJobRequestValidationError struct {
  3387  	field  string
  3388  	reason string
  3389  	cause  error
  3390  	key    bool
  3391  }
  3392  
  3393  // Field function returns field value.
  3394  func (e DSMLaunchJobRequestValidationError) Field() string { return e.field }
  3395  
  3396  // Reason function returns reason value.
  3397  func (e DSMLaunchJobRequestValidationError) Reason() string { return e.reason }
  3398  
  3399  // Cause function returns cause value.
  3400  func (e DSMLaunchJobRequestValidationError) Cause() error { return e.cause }
  3401  
  3402  // Key function returns key value.
  3403  func (e DSMLaunchJobRequestValidationError) Key() bool { return e.key }
  3404  
  3405  // ErrorName returns error name.
  3406  func (e DSMLaunchJobRequestValidationError) ErrorName() string {
  3407  	return "DSMLaunchJobRequestValidationError"
  3408  }
  3409  
  3410  // Error satisfies the builtin error interface
  3411  func (e DSMLaunchJobRequestValidationError) Error() string {
  3412  	cause := ""
  3413  	if e.cause != nil {
  3414  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3415  	}
  3416  
  3417  	key := ""
  3418  	if e.key {
  3419  		key = "key for "
  3420  	}
  3421  
  3422  	return fmt.Sprintf(
  3423  		"invalid %sDSMLaunchJobRequest.%s: %s%s",
  3424  		key,
  3425  		e.field,
  3426  		e.reason,
  3427  		cause)
  3428  }
  3429  
  3430  var _ error = DSMLaunchJobRequestValidationError{}
  3431  
  3432  var _ interface {
  3433  	Field() string
  3434  	Reason() string
  3435  	Key() bool
  3436  	Cause() error
  3437  	ErrorName() string
  3438  } = DSMLaunchJobRequestValidationError{}
  3439  
  3440  // Validate checks the field values on DSMJobID with the rules defined in the
  3441  // proto definition for this message. If any rules are violated, the first
  3442  // error encountered is returned, or nil if there are no violations.
  3443  func (m *DSMJobID) Validate() error {
  3444  	return m.validate(false)
  3445  }
  3446  
  3447  // ValidateAll checks the field values on DSMJobID with the rules defined in
  3448  // the proto definition for this message. If any rules are violated, the
  3449  // result is a list of violation errors wrapped in DSMJobIDMultiError, or nil
  3450  // if none found.
  3451  func (m *DSMJobID) ValidateAll() error {
  3452  	return m.validate(true)
  3453  }
  3454  
  3455  func (m *DSMJobID) validate(all bool) error {
  3456  	if m == nil {
  3457  		return nil
  3458  	}
  3459  
  3460  	var errors []error
  3461  
  3462  	// no validation rules for Id
  3463  
  3464  	if len(errors) > 0 {
  3465  		return DSMJobIDMultiError(errors)
  3466  	}
  3467  
  3468  	return nil
  3469  }
  3470  
  3471  // DSMJobIDMultiError is an error wrapping multiple validation errors returned
  3472  // by DSMJobID.ValidateAll() if the designated constraints aren't met.
  3473  type DSMJobIDMultiError []error
  3474  
  3475  // Error returns a concatenation of all the error messages it wraps.
  3476  func (m DSMJobIDMultiError) Error() string {
  3477  	var msgs []string
  3478  	for _, err := range m {
  3479  		msgs = append(msgs, err.Error())
  3480  	}
  3481  	return strings.Join(msgs, "; ")
  3482  }
  3483  
  3484  // AllErrors returns a list of validation violation errors.
  3485  func (m DSMJobIDMultiError) AllErrors() []error { return m }
  3486  
  3487  // DSMJobIDValidationError is the validation error returned by
  3488  // DSMJobID.Validate if the designated constraints aren't met.
  3489  type DSMJobIDValidationError struct {
  3490  	field  string
  3491  	reason string
  3492  	cause  error
  3493  	key    bool
  3494  }
  3495  
  3496  // Field function returns field value.
  3497  func (e DSMJobIDValidationError) Field() string { return e.field }
  3498  
  3499  // Reason function returns reason value.
  3500  func (e DSMJobIDValidationError) Reason() string { return e.reason }
  3501  
  3502  // Cause function returns cause value.
  3503  func (e DSMJobIDValidationError) Cause() error { return e.cause }
  3504  
  3505  // Key function returns key value.
  3506  func (e DSMJobIDValidationError) Key() bool { return e.key }
  3507  
  3508  // ErrorName returns error name.
  3509  func (e DSMJobIDValidationError) ErrorName() string { return "DSMJobIDValidationError" }
  3510  
  3511  // Error satisfies the builtin error interface
  3512  func (e DSMJobIDValidationError) Error() string {
  3513  	cause := ""
  3514  	if e.cause != nil {
  3515  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3516  	}
  3517  
  3518  	key := ""
  3519  	if e.key {
  3520  		key = "key for "
  3521  	}
  3522  
  3523  	return fmt.Sprintf(
  3524  		"invalid %sDSMJobID.%s: %s%s",
  3525  		key,
  3526  		e.field,
  3527  		e.reason,
  3528  		cause)
  3529  }
  3530  
  3531  var _ error = DSMJobIDValidationError{}
  3532  
  3533  var _ interface {
  3534  	Field() string
  3535  	Reason() string
  3536  	Key() bool
  3537  	Cause() error
  3538  	ErrorName() string
  3539  } = DSMJobIDValidationError{}
  3540  
  3541  // Validate checks the field values on DSMJob with the rules defined in the
  3542  // proto definition for this message. If any rules are violated, the first
  3543  // error encountered is returned, or nil if there are no violations.
  3544  func (m *DSMJob) Validate() error {
  3545  	return m.validate(false)
  3546  }
  3547  
  3548  // ValidateAll checks the field values on DSMJob with the rules defined in the
  3549  // proto definition for this message. If any rules are violated, the result is
  3550  // a list of violation errors wrapped in DSMJobMultiError, or nil if none found.
  3551  func (m *DSMJob) ValidateAll() error {
  3552  	return m.validate(true)
  3553  }
  3554  
  3555  func (m *DSMJob) validate(all bool) error {
  3556  	if m == nil {
  3557  		return nil
  3558  	}
  3559  
  3560  	var errors []error
  3561  
  3562  	// no validation rules for Name
  3563  
  3564  	if all {
  3565  		switch v := interface{}(m.GetInfo()).(type) {
  3566  		case interface{ ValidateAll() error }:
  3567  			if err := v.ValidateAll(); err != nil {
  3568  				errors = append(errors, DSMJobValidationError{
  3569  					field:  "Info",
  3570  					reason: "embedded message failed validation",
  3571  					cause:  err,
  3572  				})
  3573  			}
  3574  		case interface{ Validate() error }:
  3575  			if err := v.Validate(); err != nil {
  3576  				errors = append(errors, DSMJobValidationError{
  3577  					field:  "Info",
  3578  					reason: "embedded message failed validation",
  3579  					cause:  err,
  3580  				})
  3581  			}
  3582  		}
  3583  	} else if v, ok := interface{}(m.GetInfo()).(interface{ Validate() error }); ok {
  3584  		if err := v.Validate(); err != nil {
  3585  			return DSMJobValidationError{
  3586  				field:  "Info",
  3587  				reason: "embedded message failed validation",
  3588  				cause:  err,
  3589  			}
  3590  		}
  3591  	}
  3592  
  3593  	if len(errors) > 0 {
  3594  		return DSMJobMultiError(errors)
  3595  	}
  3596  
  3597  	return nil
  3598  }
  3599  
  3600  // DSMJobMultiError is an error wrapping multiple validation errors returned by
  3601  // DSMJob.ValidateAll() if the designated constraints aren't met.
  3602  type DSMJobMultiError []error
  3603  
  3604  // Error returns a concatenation of all the error messages it wraps.
  3605  func (m DSMJobMultiError) Error() string {
  3606  	var msgs []string
  3607  	for _, err := range m {
  3608  		msgs = append(msgs, err.Error())
  3609  	}
  3610  	return strings.Join(msgs, "; ")
  3611  }
  3612  
  3613  // AllErrors returns a list of validation violation errors.
  3614  func (m DSMJobMultiError) AllErrors() []error { return m }
  3615  
  3616  // DSMJobValidationError is the validation error returned by DSMJob.Validate if
  3617  // the designated constraints aren't met.
  3618  type DSMJobValidationError struct {
  3619  	field  string
  3620  	reason string
  3621  	cause  error
  3622  	key    bool
  3623  }
  3624  
  3625  // Field function returns field value.
  3626  func (e DSMJobValidationError) Field() string { return e.field }
  3627  
  3628  // Reason function returns reason value.
  3629  func (e DSMJobValidationError) Reason() string { return e.reason }
  3630  
  3631  // Cause function returns cause value.
  3632  func (e DSMJobValidationError) Cause() error { return e.cause }
  3633  
  3634  // Key function returns key value.
  3635  func (e DSMJobValidationError) Key() bool { return e.key }
  3636  
  3637  // ErrorName returns error name.
  3638  func (e DSMJobValidationError) ErrorName() string { return "DSMJobValidationError" }
  3639  
  3640  // Error satisfies the builtin error interface
  3641  func (e DSMJobValidationError) Error() string {
  3642  	cause := ""
  3643  	if e.cause != nil {
  3644  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3645  	}
  3646  
  3647  	key := ""
  3648  	if e.key {
  3649  		key = "key for "
  3650  	}
  3651  
  3652  	return fmt.Sprintf(
  3653  		"invalid %sDSMJob.%s: %s%s",
  3654  		key,
  3655  		e.field,
  3656  		e.reason,
  3657  		cause)
  3658  }
  3659  
  3660  var _ error = DSMJobValidationError{}
  3661  
  3662  var _ interface {
  3663  	Field() string
  3664  	Reason() string
  3665  	Key() bool
  3666  	Cause() error
  3667  	ErrorName() string
  3668  } = DSMJobValidationError{}
  3669  
  3670  // Validate checks the field values on GetRunResponse_CL with the rules defined
  3671  // in the proto definition for this message. If any rules are violated, the
  3672  // first error encountered is returned, or nil if there are no violations.
  3673  func (m *GetRunResponse_CL) Validate() error {
  3674  	return m.validate(false)
  3675  }
  3676  
  3677  // ValidateAll checks the field values on GetRunResponse_CL with the rules
  3678  // defined in the proto definition for this message. If any rules are
  3679  // violated, the result is a list of violation errors wrapped in
  3680  // GetRunResponse_CLMultiError, or nil if none found.
  3681  func (m *GetRunResponse_CL) ValidateAll() error {
  3682  	return m.validate(true)
  3683  }
  3684  
  3685  func (m *GetRunResponse_CL) validate(all bool) error {
  3686  	if m == nil {
  3687  		return nil
  3688  	}
  3689  
  3690  	var errors []error
  3691  
  3692  	// no validation rules for Id
  3693  
  3694  	// no validation rules for ExternalId
  3695  
  3696  	if all {
  3697  		switch v := interface{}(m.GetDetail()).(type) {
  3698  		case interface{ ValidateAll() error }:
  3699  			if err := v.ValidateAll(); err != nil {
  3700  				errors = append(errors, GetRunResponse_CLValidationError{
  3701  					field:  "Detail",
  3702  					reason: "embedded message failed validation",
  3703  					cause:  err,
  3704  				})
  3705  			}
  3706  		case interface{ Validate() error }:
  3707  			if err := v.Validate(); err != nil {
  3708  				errors = append(errors, GetRunResponse_CLValidationError{
  3709  					field:  "Detail",
  3710  					reason: "embedded message failed validation",
  3711  					cause:  err,
  3712  				})
  3713  			}
  3714  		}
  3715  	} else if v, ok := interface{}(m.GetDetail()).(interface{ Validate() error }); ok {
  3716  		if err := v.Validate(); err != nil {
  3717  			return GetRunResponse_CLValidationError{
  3718  				field:  "Detail",
  3719  				reason: "embedded message failed validation",
  3720  				cause:  err,
  3721  			}
  3722  		}
  3723  	}
  3724  
  3725  	if all {
  3726  		switch v := interface{}(m.GetTrigger()).(type) {
  3727  		case interface{ ValidateAll() error }:
  3728  			if err := v.ValidateAll(); err != nil {
  3729  				errors = append(errors, GetRunResponse_CLValidationError{
  3730  					field:  "Trigger",
  3731  					reason: "embedded message failed validation",
  3732  					cause:  err,
  3733  				})
  3734  			}
  3735  		case interface{ Validate() error }:
  3736  			if err := v.Validate(); err != nil {
  3737  				errors = append(errors, GetRunResponse_CLValidationError{
  3738  					field:  "Trigger",
  3739  					reason: "embedded message failed validation",
  3740  					cause:  err,
  3741  				})
  3742  			}
  3743  		}
  3744  	} else if v, ok := interface{}(m.GetTrigger()).(interface{ Validate() error }); ok {
  3745  		if err := v.Validate(); err != nil {
  3746  			return GetRunResponse_CLValidationError{
  3747  				field:  "Trigger",
  3748  				reason: "embedded message failed validation",
  3749  				cause:  err,
  3750  			}
  3751  		}
  3752  	}
  3753  
  3754  	if len(errors) > 0 {
  3755  		return GetRunResponse_CLMultiError(errors)
  3756  	}
  3757  
  3758  	return nil
  3759  }
  3760  
  3761  // GetRunResponse_CLMultiError is an error wrapping multiple validation errors
  3762  // returned by GetRunResponse_CL.ValidateAll() if the designated constraints
  3763  // aren't met.
  3764  type GetRunResponse_CLMultiError []error
  3765  
  3766  // Error returns a concatenation of all the error messages it wraps.
  3767  func (m GetRunResponse_CLMultiError) Error() string {
  3768  	var msgs []string
  3769  	for _, err := range m {
  3770  		msgs = append(msgs, err.Error())
  3771  	}
  3772  	return strings.Join(msgs, "; ")
  3773  }
  3774  
  3775  // AllErrors returns a list of validation violation errors.
  3776  func (m GetRunResponse_CLMultiError) AllErrors() []error { return m }
  3777  
  3778  // GetRunResponse_CLValidationError is the validation error returned by
  3779  // GetRunResponse_CL.Validate if the designated constraints aren't met.
  3780  type GetRunResponse_CLValidationError struct {
  3781  	field  string
  3782  	reason string
  3783  	cause  error
  3784  	key    bool
  3785  }
  3786  
  3787  // Field function returns field value.
  3788  func (e GetRunResponse_CLValidationError) Field() string { return e.field }
  3789  
  3790  // Reason function returns reason value.
  3791  func (e GetRunResponse_CLValidationError) Reason() string { return e.reason }
  3792  
  3793  // Cause function returns cause value.
  3794  func (e GetRunResponse_CLValidationError) Cause() error { return e.cause }
  3795  
  3796  // Key function returns key value.
  3797  func (e GetRunResponse_CLValidationError) Key() bool { return e.key }
  3798  
  3799  // ErrorName returns error name.
  3800  func (e GetRunResponse_CLValidationError) ErrorName() string {
  3801  	return "GetRunResponse_CLValidationError"
  3802  }
  3803  
  3804  // Error satisfies the builtin error interface
  3805  func (e GetRunResponse_CLValidationError) Error() string {
  3806  	cause := ""
  3807  	if e.cause != nil {
  3808  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
  3809  	}
  3810  
  3811  	key := ""
  3812  	if e.key {
  3813  		key = "key for "
  3814  	}
  3815  
  3816  	return fmt.Sprintf(
  3817  		"invalid %sGetRunResponse_CL.%s: %s%s",
  3818  		key,
  3819  		e.field,
  3820  		e.reason,
  3821  		cause)
  3822  }
  3823  
  3824  var _ error = GetRunResponse_CLValidationError{}
  3825  
  3826  var _ interface {
  3827  	Field() string
  3828  	Reason() string
  3829  	Key() bool
  3830  	Cause() error
  3831  	ErrorName() string
  3832  } = GetRunResponse_CLValidationError{}