// Code generated by protoc-gen-validate. DO NOT EDIT. // source: pkg/apis/inference/v1/grpc_service.proto package inference import ( "bytes" "errors" "fmt" "net" "net/mail" "net/url" "regexp" "sort" "strings" "time" "unicode/utf8" "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used var ( _ = bytes.MinRead _ = errors.New("") _ = fmt.Print _ = utf8.UTFMax _ = (*regexp.Regexp)(nil) _ = (*strings.Reader)(nil) _ = net.IPv4len _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) _ = anypb.Any{} _ = sort.Sort ) // Validate checks the field values on ServerLiveRequest with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *ServerLiveRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ServerLiveRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ServerLiveRequestMultiError, or nil if none found. func (m *ServerLiveRequest) ValidateAll() error { return m.validate(true) } func (m *ServerLiveRequest) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return ServerLiveRequestMultiError(errors) } return nil } // ServerLiveRequestMultiError is an error wrapping multiple validation errors // returned by ServerLiveRequest.ValidateAll() if the designated constraints // aren't met. type ServerLiveRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ServerLiveRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ServerLiveRequestMultiError) AllErrors() []error { return m } // ServerLiveRequestValidationError is the validation error returned by // ServerLiveRequest.Validate if the designated constraints aren't met. type ServerLiveRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ServerLiveRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ServerLiveRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ServerLiveRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ServerLiveRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ServerLiveRequestValidationError) ErrorName() string { return "ServerLiveRequestValidationError" } // Error satisfies the builtin error interface func (e ServerLiveRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sServerLiveRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ServerLiveRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ServerLiveRequestValidationError{} // Validate checks the field values on ServerLiveResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ServerLiveResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ServerLiveResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ServerLiveResponseMultiError, or nil if none found. func (m *ServerLiveResponse) ValidateAll() error { return m.validate(true) } func (m *ServerLiveResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Live if len(errors) > 0 { return ServerLiveResponseMultiError(errors) } return nil } // ServerLiveResponseMultiError is an error wrapping multiple validation errors // returned by ServerLiveResponse.ValidateAll() if the designated constraints // aren't met. type ServerLiveResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ServerLiveResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ServerLiveResponseMultiError) AllErrors() []error { return m } // ServerLiveResponseValidationError is the validation error returned by // ServerLiveResponse.Validate if the designated constraints aren't met. type ServerLiveResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ServerLiveResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ServerLiveResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ServerLiveResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ServerLiveResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ServerLiveResponseValidationError) ErrorName() string { return "ServerLiveResponseValidationError" } // Error satisfies the builtin error interface func (e ServerLiveResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sServerLiveResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ServerLiveResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ServerLiveResponseValidationError{} // Validate checks the field values on ServerReadyRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ServerReadyRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ServerReadyRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ServerReadyRequestMultiError, or nil if none found. func (m *ServerReadyRequest) ValidateAll() error { return m.validate(true) } func (m *ServerReadyRequest) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return ServerReadyRequestMultiError(errors) } return nil } // ServerReadyRequestMultiError is an error wrapping multiple validation errors // returned by ServerReadyRequest.ValidateAll() if the designated constraints // aren't met. type ServerReadyRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ServerReadyRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ServerReadyRequestMultiError) AllErrors() []error { return m } // ServerReadyRequestValidationError is the validation error returned by // ServerReadyRequest.Validate if the designated constraints aren't met. type ServerReadyRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ServerReadyRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ServerReadyRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ServerReadyRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ServerReadyRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ServerReadyRequestValidationError) ErrorName() string { return "ServerReadyRequestValidationError" } // Error satisfies the builtin error interface func (e ServerReadyRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sServerReadyRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ServerReadyRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ServerReadyRequestValidationError{} // Validate checks the field values on ServerReadyResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ServerReadyResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ServerReadyResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ServerReadyResponseMultiError, or nil if none found. func (m *ServerReadyResponse) ValidateAll() error { return m.validate(true) } func (m *ServerReadyResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Ready if len(errors) > 0 { return ServerReadyResponseMultiError(errors) } return nil } // ServerReadyResponseMultiError is an error wrapping multiple validation // errors returned by ServerReadyResponse.ValidateAll() if the designated // constraints aren't met. type ServerReadyResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ServerReadyResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ServerReadyResponseMultiError) AllErrors() []error { return m } // ServerReadyResponseValidationError is the validation error returned by // ServerReadyResponse.Validate if the designated constraints aren't met. type ServerReadyResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ServerReadyResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ServerReadyResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ServerReadyResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ServerReadyResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ServerReadyResponseValidationError) ErrorName() string { return "ServerReadyResponseValidationError" } // Error satisfies the builtin error interface func (e ServerReadyResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sServerReadyResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ServerReadyResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ServerReadyResponseValidationError{} // Validate checks the field values on ModelReadyRequest with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *ModelReadyRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelReadyRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelReadyRequestMultiError, or nil if none found. func (m *ModelReadyRequest) ValidateAll() error { return m.validate(true) } func (m *ModelReadyRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version if len(errors) > 0 { return ModelReadyRequestMultiError(errors) } return nil } // ModelReadyRequestMultiError is an error wrapping multiple validation errors // returned by ModelReadyRequest.ValidateAll() if the designated constraints // aren't met. type ModelReadyRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelReadyRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelReadyRequestMultiError) AllErrors() []error { return m } // ModelReadyRequestValidationError is the validation error returned by // ModelReadyRequest.Validate if the designated constraints aren't met. type ModelReadyRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelReadyRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelReadyRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelReadyRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelReadyRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelReadyRequestValidationError) ErrorName() string { return "ModelReadyRequestValidationError" } // Error satisfies the builtin error interface func (e ModelReadyRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelReadyRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelReadyRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelReadyRequestValidationError{} // Validate checks the field values on ModelReadyResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelReadyResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelReadyResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelReadyResponseMultiError, or nil if none found. func (m *ModelReadyResponse) ValidateAll() error { return m.validate(true) } func (m *ModelReadyResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Ready if len(errors) > 0 { return ModelReadyResponseMultiError(errors) } return nil } // ModelReadyResponseMultiError is an error wrapping multiple validation errors // returned by ModelReadyResponse.ValidateAll() if the designated constraints // aren't met. type ModelReadyResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelReadyResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelReadyResponseMultiError) AllErrors() []error { return m } // ModelReadyResponseValidationError is the validation error returned by // ModelReadyResponse.Validate if the designated constraints aren't met. type ModelReadyResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelReadyResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelReadyResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelReadyResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelReadyResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelReadyResponseValidationError) ErrorName() string { return "ModelReadyResponseValidationError" } // Error satisfies the builtin error interface func (e ModelReadyResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelReadyResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelReadyResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelReadyResponseValidationError{} // Validate checks the field values on ServerMetadataRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ServerMetadataRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ServerMetadataRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ServerMetadataRequestMultiError, or nil if none found. func (m *ServerMetadataRequest) ValidateAll() error { return m.validate(true) } func (m *ServerMetadataRequest) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return ServerMetadataRequestMultiError(errors) } return nil } // ServerMetadataRequestMultiError is an error wrapping multiple validation // errors returned by ServerMetadataRequest.ValidateAll() if the designated // constraints aren't met. type ServerMetadataRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ServerMetadataRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ServerMetadataRequestMultiError) AllErrors() []error { return m } // ServerMetadataRequestValidationError is the validation error returned by // ServerMetadataRequest.Validate if the designated constraints aren't met. type ServerMetadataRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ServerMetadataRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ServerMetadataRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ServerMetadataRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ServerMetadataRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ServerMetadataRequestValidationError) ErrorName() string { return "ServerMetadataRequestValidationError" } // Error satisfies the builtin error interface func (e ServerMetadataRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sServerMetadataRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ServerMetadataRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ServerMetadataRequestValidationError{} // Validate checks the field values on ServerMetadataResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ServerMetadataResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ServerMetadataResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ServerMetadataResponseMultiError, or nil if none found. func (m *ServerMetadataResponse) ValidateAll() error { return m.validate(true) } func (m *ServerMetadataResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version if len(errors) > 0 { return ServerMetadataResponseMultiError(errors) } return nil } // ServerMetadataResponseMultiError is an error wrapping multiple validation // errors returned by ServerMetadataResponse.ValidateAll() if the designated // constraints aren't met. type ServerMetadataResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ServerMetadataResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ServerMetadataResponseMultiError) AllErrors() []error { return m } // ServerMetadataResponseValidationError is the validation error returned by // ServerMetadataResponse.Validate if the designated constraints aren't met. type ServerMetadataResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ServerMetadataResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ServerMetadataResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ServerMetadataResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ServerMetadataResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ServerMetadataResponseValidationError) ErrorName() string { return "ServerMetadataResponseValidationError" } // Error satisfies the builtin error interface func (e ServerMetadataResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sServerMetadataResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ServerMetadataResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ServerMetadataResponseValidationError{} // Validate checks the field values on ModelMetadataRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelMetadataRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelMetadataRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelMetadataRequestMultiError, or nil if none found. func (m *ModelMetadataRequest) ValidateAll() error { return m.validate(true) } func (m *ModelMetadataRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version if len(errors) > 0 { return ModelMetadataRequestMultiError(errors) } return nil } // ModelMetadataRequestMultiError is an error wrapping multiple validation // errors returned by ModelMetadataRequest.ValidateAll() if the designated // constraints aren't met. type ModelMetadataRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelMetadataRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelMetadataRequestMultiError) AllErrors() []error { return m } // ModelMetadataRequestValidationError is the validation error returned by // ModelMetadataRequest.Validate if the designated constraints aren't met. type ModelMetadataRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelMetadataRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelMetadataRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelMetadataRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelMetadataRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelMetadataRequestValidationError) ErrorName() string { return "ModelMetadataRequestValidationError" } // Error satisfies the builtin error interface func (e ModelMetadataRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelMetadataRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelMetadataRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelMetadataRequestValidationError{} // Validate checks the field values on ModelMetadataResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelMetadataResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelMetadataResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelMetadataResponseMultiError, or nil if none found. func (m *ModelMetadataResponse) ValidateAll() error { return m.validate(true) } func (m *ModelMetadataResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Platform for idx, item := range m.GetInputs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelMetadataResponseValidationError{ field: fmt.Sprintf("Inputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelMetadataResponseValidationError{ field: fmt.Sprintf("Inputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelMetadataResponseValidationError{ field: fmt.Sprintf("Inputs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetOutputs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelMetadataResponseValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelMetadataResponseValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelMetadataResponseValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ModelMetadataResponseMultiError(errors) } return nil } // ModelMetadataResponseMultiError is an error wrapping multiple validation // errors returned by ModelMetadataResponse.ValidateAll() if the designated // constraints aren't met. type ModelMetadataResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelMetadataResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelMetadataResponseMultiError) AllErrors() []error { return m } // ModelMetadataResponseValidationError is the validation error returned by // ModelMetadataResponse.Validate if the designated constraints aren't met. type ModelMetadataResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelMetadataResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelMetadataResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelMetadataResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelMetadataResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelMetadataResponseValidationError) ErrorName() string { return "ModelMetadataResponseValidationError" } // Error satisfies the builtin error interface func (e ModelMetadataResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelMetadataResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelMetadataResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelMetadataResponseValidationError{} // Validate checks the field values on InferParameter with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *InferParameter) Validate() error { return m.validate(false) } // ValidateAll checks the field values on InferParameter with the rules defined // in the proto definition for this message. If any rules are violated, the // result is a list of violation errors wrapped in InferParameterMultiError, // or nil if none found. func (m *InferParameter) ValidateAll() error { return m.validate(true) } func (m *InferParameter) validate(all bool) error { if m == nil { return nil } var errors []error switch v := m.ParameterChoice.(type) { case *InferParameter_BoolParam: if v == nil { err := InferParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for BoolParam case *InferParameter_Int64Param: if v == nil { err := InferParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for Int64Param case *InferParameter_StringParam: if v == nil { err := InferParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for StringParam case *InferParameter_DoubleParam: if v == nil { err := InferParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for DoubleParam case *InferParameter_Uint64Param: if v == nil { err := InferParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for Uint64Param default: _ = v // ensures v is used } if len(errors) > 0 { return InferParameterMultiError(errors) } return nil } // InferParameterMultiError is an error wrapping multiple validation errors // returned by InferParameter.ValidateAll() if the designated constraints // aren't met. type InferParameterMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m InferParameterMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m InferParameterMultiError) AllErrors() []error { return m } // InferParameterValidationError is the validation error returned by // InferParameter.Validate if the designated constraints aren't met. type InferParameterValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e InferParameterValidationError) Field() string { return e.field } // Reason function returns reason value. func (e InferParameterValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e InferParameterValidationError) Cause() error { return e.cause } // Key function returns key value. func (e InferParameterValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e InferParameterValidationError) ErrorName() string { return "InferParameterValidationError" } // Error satisfies the builtin error interface func (e InferParameterValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sInferParameter.%s: %s%s", key, e.field, e.reason, cause) } var _ error = InferParameterValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = InferParameterValidationError{} // Validate checks the field values on InferTensorContents with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *InferTensorContents) Validate() error { return m.validate(false) } // ValidateAll checks the field values on InferTensorContents with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // InferTensorContentsMultiError, or nil if none found. func (m *InferTensorContents) ValidateAll() error { return m.validate(true) } func (m *InferTensorContents) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return InferTensorContentsMultiError(errors) } return nil } // InferTensorContentsMultiError is an error wrapping multiple validation // errors returned by InferTensorContents.ValidateAll() if the designated // constraints aren't met. type InferTensorContentsMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m InferTensorContentsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m InferTensorContentsMultiError) AllErrors() []error { return m } // InferTensorContentsValidationError is the validation error returned by // InferTensorContents.Validate if the designated constraints aren't met. type InferTensorContentsValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e InferTensorContentsValidationError) Field() string { return e.field } // Reason function returns reason value. func (e InferTensorContentsValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e InferTensorContentsValidationError) Cause() error { return e.cause } // Key function returns key value. func (e InferTensorContentsValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e InferTensorContentsValidationError) ErrorName() string { return "InferTensorContentsValidationError" } // Error satisfies the builtin error interface func (e InferTensorContentsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sInferTensorContents.%s: %s%s", key, e.field, e.reason, cause) } var _ error = InferTensorContentsValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = InferTensorContentsValidationError{} // Validate checks the field values on ModelInferRequest with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *ModelInferRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelInferRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelInferRequestMultiError, or nil if none found. func (m *ModelInferRequest) ValidateAll() error { return m.validate(true) } func (m *ModelInferRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ModelName // no validation rules for ModelVersion // no validation rules for Id { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetInputs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferRequestValidationError{ field: fmt.Sprintf("Inputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferRequestValidationError{ field: fmt.Sprintf("Inputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferRequestValidationError{ field: fmt.Sprintf("Inputs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetOutputs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferRequestValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferRequestValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferRequestValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ModelInferRequestMultiError(errors) } return nil } // ModelInferRequestMultiError is an error wrapping multiple validation errors // returned by ModelInferRequest.ValidateAll() if the designated constraints // aren't met. type ModelInferRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelInferRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelInferRequestMultiError) AllErrors() []error { return m } // ModelInferRequestValidationError is the validation error returned by // ModelInferRequest.Validate if the designated constraints aren't met. type ModelInferRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelInferRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelInferRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelInferRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelInferRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelInferRequestValidationError) ErrorName() string { return "ModelInferRequestValidationError" } // Error satisfies the builtin error interface func (e ModelInferRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelInferRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelInferRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelInferRequestValidationError{} // Validate checks the field values on ModelInferResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelInferResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelInferResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelInferResponseMultiError, or nil if none found. func (m *ModelInferResponse) ValidateAll() error { return m.validate(true) } func (m *ModelInferResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ModelName // no validation rules for ModelVersion // no validation rules for Id { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferResponseValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferResponseValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferResponseValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetOutputs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferResponseValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferResponseValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferResponseValidationError{ field: fmt.Sprintf("Outputs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ModelInferResponseMultiError(errors) } return nil } // ModelInferResponseMultiError is an error wrapping multiple validation errors // returned by ModelInferResponse.ValidateAll() if the designated constraints // aren't met. type ModelInferResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelInferResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelInferResponseMultiError) AllErrors() []error { return m } // ModelInferResponseValidationError is the validation error returned by // ModelInferResponse.Validate if the designated constraints aren't met. type ModelInferResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelInferResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelInferResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelInferResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelInferResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelInferResponseValidationError) ErrorName() string { return "ModelInferResponseValidationError" } // Error satisfies the builtin error interface func (e ModelInferResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelInferResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelInferResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelInferResponseValidationError{} // Validate checks the field values on ModelStreamInferResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelStreamInferResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelStreamInferResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelStreamInferResponseMultiError, or nil if none found. func (m *ModelStreamInferResponse) ValidateAll() error { return m.validate(true) } func (m *ModelStreamInferResponse) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ErrorMessage if all { switch v := interface{}(m.GetInferResponse()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelStreamInferResponseValidationError{ field: "InferResponse", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelStreamInferResponseValidationError{ field: "InferResponse", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetInferResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelStreamInferResponseValidationError{ field: "InferResponse", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ModelStreamInferResponseMultiError(errors) } return nil } // ModelStreamInferResponseMultiError is an error wrapping multiple validation // errors returned by ModelStreamInferResponse.ValidateAll() if the designated // constraints aren't met. type ModelStreamInferResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelStreamInferResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelStreamInferResponseMultiError) AllErrors() []error { return m } // ModelStreamInferResponseValidationError is the validation error returned by // ModelStreamInferResponse.Validate if the designated constraints aren't met. type ModelStreamInferResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelStreamInferResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelStreamInferResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelStreamInferResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelStreamInferResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelStreamInferResponseValidationError) ErrorName() string { return "ModelStreamInferResponseValidationError" } // Error satisfies the builtin error interface func (e ModelStreamInferResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelStreamInferResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelStreamInferResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelStreamInferResponseValidationError{} // Validate checks the field values on ModelConfigRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelConfigRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelConfigRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelConfigRequestMultiError, or nil if none found. func (m *ModelConfigRequest) ValidateAll() error { return m.validate(true) } func (m *ModelConfigRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version if len(errors) > 0 { return ModelConfigRequestMultiError(errors) } return nil } // ModelConfigRequestMultiError is an error wrapping multiple validation errors // returned by ModelConfigRequest.ValidateAll() if the designated constraints // aren't met. type ModelConfigRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelConfigRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelConfigRequestMultiError) AllErrors() []error { return m } // ModelConfigRequestValidationError is the validation error returned by // ModelConfigRequest.Validate if the designated constraints aren't met. type ModelConfigRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelConfigRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelConfigRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelConfigRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelConfigRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelConfigRequestValidationError) ErrorName() string { return "ModelConfigRequestValidationError" } // Error satisfies the builtin error interface func (e ModelConfigRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelConfigRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelConfigRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelConfigRequestValidationError{} // Validate checks the field values on ModelConfigResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelConfigResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelConfigResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelConfigResponseMultiError, or nil if none found. func (m *ModelConfigResponse) ValidateAll() error { return m.validate(true) } func (m *ModelConfigResponse) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetConfig()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelConfigResponseValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelConfigResponseValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelConfigResponseValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ModelConfigResponseMultiError(errors) } return nil } // ModelConfigResponseMultiError is an error wrapping multiple validation // errors returned by ModelConfigResponse.ValidateAll() if the designated // constraints aren't met. type ModelConfigResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelConfigResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelConfigResponseMultiError) AllErrors() []error { return m } // ModelConfigResponseValidationError is the validation error returned by // ModelConfigResponse.Validate if the designated constraints aren't met. type ModelConfigResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelConfigResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelConfigResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelConfigResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelConfigResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelConfigResponseValidationError) ErrorName() string { return "ModelConfigResponseValidationError" } // Error satisfies the builtin error interface func (e ModelConfigResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelConfigResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelConfigResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelConfigResponseValidationError{} // Validate checks the field values on ModelStatisticsRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelStatisticsRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelStatisticsRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelStatisticsRequestMultiError, or nil if none found. func (m *ModelStatisticsRequest) ValidateAll() error { return m.validate(true) } func (m *ModelStatisticsRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version if len(errors) > 0 { return ModelStatisticsRequestMultiError(errors) } return nil } // ModelStatisticsRequestMultiError is an error wrapping multiple validation // errors returned by ModelStatisticsRequest.ValidateAll() if the designated // constraints aren't met. type ModelStatisticsRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelStatisticsRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelStatisticsRequestMultiError) AllErrors() []error { return m } // ModelStatisticsRequestValidationError is the validation error returned by // ModelStatisticsRequest.Validate if the designated constraints aren't met. type ModelStatisticsRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelStatisticsRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelStatisticsRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelStatisticsRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelStatisticsRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelStatisticsRequestValidationError) ErrorName() string { return "ModelStatisticsRequestValidationError" } // Error satisfies the builtin error interface func (e ModelStatisticsRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelStatisticsRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelStatisticsRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelStatisticsRequestValidationError{} // Validate checks the field values on StatisticDuration with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *StatisticDuration) Validate() error { return m.validate(false) } // ValidateAll checks the field values on StatisticDuration with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // StatisticDurationMultiError, or nil if none found. func (m *StatisticDuration) ValidateAll() error { return m.validate(true) } func (m *StatisticDuration) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Count // no validation rules for Ns if len(errors) > 0 { return StatisticDurationMultiError(errors) } return nil } // StatisticDurationMultiError is an error wrapping multiple validation errors // returned by StatisticDuration.ValidateAll() if the designated constraints // aren't met. type StatisticDurationMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m StatisticDurationMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m StatisticDurationMultiError) AllErrors() []error { return m } // StatisticDurationValidationError is the validation error returned by // StatisticDuration.Validate if the designated constraints aren't met. type StatisticDurationValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e StatisticDurationValidationError) Field() string { return e.field } // Reason function returns reason value. func (e StatisticDurationValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e StatisticDurationValidationError) Cause() error { return e.cause } // Key function returns key value. func (e StatisticDurationValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e StatisticDurationValidationError) ErrorName() string { return "StatisticDurationValidationError" } // Error satisfies the builtin error interface func (e StatisticDurationValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sStatisticDuration.%s: %s%s", key, e.field, e.reason, cause) } var _ error = StatisticDurationValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = StatisticDurationValidationError{} // Validate checks the field values on InferStatistics with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *InferStatistics) Validate() error { return m.validate(false) } // ValidateAll checks the field values on InferStatistics with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // InferStatisticsMultiError, or nil if none found. func (m *InferStatistics) ValidateAll() error { return m.validate(true) } func (m *InferStatistics) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetSuccess()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "Success", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "Success", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetSuccess()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "Success", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetFail()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "Fail", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "Fail", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetFail()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "Fail", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetQueue()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "Queue", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "Queue", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetQueue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "Queue", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetComputeInput()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "ComputeInput", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "ComputeInput", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetComputeInput()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "ComputeInput", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetComputeInfer()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "ComputeInfer", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "ComputeInfer", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetComputeInfer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "ComputeInfer", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetComputeOutput()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "ComputeOutput", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "ComputeOutput", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetComputeOutput()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "ComputeOutput", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetCacheHit()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "CacheHit", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "CacheHit", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetCacheHit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "CacheHit", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetCacheMiss()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "CacheMiss", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferStatisticsValidationError{ field: "CacheMiss", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetCacheMiss()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferStatisticsValidationError{ field: "CacheMiss", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return InferStatisticsMultiError(errors) } return nil } // InferStatisticsMultiError is an error wrapping multiple validation errors // returned by InferStatistics.ValidateAll() if the designated constraints // aren't met. type InferStatisticsMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m InferStatisticsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m InferStatisticsMultiError) AllErrors() []error { return m } // InferStatisticsValidationError is the validation error returned by // InferStatistics.Validate if the designated constraints aren't met. type InferStatisticsValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e InferStatisticsValidationError) Field() string { return e.field } // Reason function returns reason value. func (e InferStatisticsValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e InferStatisticsValidationError) Cause() error { return e.cause } // Key function returns key value. func (e InferStatisticsValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e InferStatisticsValidationError) ErrorName() string { return "InferStatisticsValidationError" } // Error satisfies the builtin error interface func (e InferStatisticsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sInferStatistics.%s: %s%s", key, e.field, e.reason, cause) } var _ error = InferStatisticsValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = InferStatisticsValidationError{} // Validate checks the field values on InferBatchStatistics with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *InferBatchStatistics) Validate() error { return m.validate(false) } // ValidateAll checks the field values on InferBatchStatistics with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // InferBatchStatisticsMultiError, or nil if none found. func (m *InferBatchStatistics) ValidateAll() error { return m.validate(true) } func (m *InferBatchStatistics) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for BatchSize if all { switch v := interface{}(m.GetComputeInput()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferBatchStatisticsValidationError{ field: "ComputeInput", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferBatchStatisticsValidationError{ field: "ComputeInput", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetComputeInput()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferBatchStatisticsValidationError{ field: "ComputeInput", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetComputeInfer()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferBatchStatisticsValidationError{ field: "ComputeInfer", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferBatchStatisticsValidationError{ field: "ComputeInfer", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetComputeInfer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferBatchStatisticsValidationError{ field: "ComputeInfer", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetComputeOutput()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, InferBatchStatisticsValidationError{ field: "ComputeOutput", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, InferBatchStatisticsValidationError{ field: "ComputeOutput", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetComputeOutput()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InferBatchStatisticsValidationError{ field: "ComputeOutput", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return InferBatchStatisticsMultiError(errors) } return nil } // InferBatchStatisticsMultiError is an error wrapping multiple validation // errors returned by InferBatchStatistics.ValidateAll() if the designated // constraints aren't met. type InferBatchStatisticsMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m InferBatchStatisticsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m InferBatchStatisticsMultiError) AllErrors() []error { return m } // InferBatchStatisticsValidationError is the validation error returned by // InferBatchStatistics.Validate if the designated constraints aren't met. type InferBatchStatisticsValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e InferBatchStatisticsValidationError) Field() string { return e.field } // Reason function returns reason value. func (e InferBatchStatisticsValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e InferBatchStatisticsValidationError) Cause() error { return e.cause } // Key function returns key value. func (e InferBatchStatisticsValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e InferBatchStatisticsValidationError) ErrorName() string { return "InferBatchStatisticsValidationError" } // Error satisfies the builtin error interface func (e InferBatchStatisticsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sInferBatchStatistics.%s: %s%s", key, e.field, e.reason, cause) } var _ error = InferBatchStatisticsValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = InferBatchStatisticsValidationError{} // Validate checks the field values on MemoryUsage with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *MemoryUsage) Validate() error { return m.validate(false) } // ValidateAll checks the field values on MemoryUsage with the rules defined in // the proto definition for this message. If any rules are violated, the // result is a list of violation errors wrapped in MemoryUsageMultiError, or // nil if none found. func (m *MemoryUsage) ValidateAll() error { return m.validate(true) } func (m *MemoryUsage) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Type // no validation rules for Id // no validation rules for ByteSize if len(errors) > 0 { return MemoryUsageMultiError(errors) } return nil } // MemoryUsageMultiError is an error wrapping multiple validation errors // returned by MemoryUsage.ValidateAll() if the designated constraints aren't met. type MemoryUsageMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m MemoryUsageMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m MemoryUsageMultiError) AllErrors() []error { return m } // MemoryUsageValidationError is the validation error returned by // MemoryUsage.Validate if the designated constraints aren't met. type MemoryUsageValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e MemoryUsageValidationError) Field() string { return e.field } // Reason function returns reason value. func (e MemoryUsageValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e MemoryUsageValidationError) Cause() error { return e.cause } // Key function returns key value. func (e MemoryUsageValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e MemoryUsageValidationError) ErrorName() string { return "MemoryUsageValidationError" } // Error satisfies the builtin error interface func (e MemoryUsageValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sMemoryUsage.%s: %s%s", key, e.field, e.reason, cause) } var _ error = MemoryUsageValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = MemoryUsageValidationError{} // Validate checks the field values on ModelStatistics with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *ModelStatistics) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelStatistics with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelStatisticsMultiError, or nil if none found. func (m *ModelStatistics) ValidateAll() error { return m.validate(true) } func (m *ModelStatistics) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version // no validation rules for LastInference // no validation rules for InferenceCount // no validation rules for ExecutionCount if all { switch v := interface{}(m.GetInferenceStats()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelStatisticsValidationError{ field: "InferenceStats", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelStatisticsValidationError{ field: "InferenceStats", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetInferenceStats()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelStatisticsValidationError{ field: "InferenceStats", reason: "embedded message failed validation", cause: err, } } } for idx, item := range m.GetBatchStats() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelStatisticsValidationError{ field: fmt.Sprintf("BatchStats[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelStatisticsValidationError{ field: fmt.Sprintf("BatchStats[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelStatisticsValidationError{ field: fmt.Sprintf("BatchStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetMemoryUsage() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelStatisticsValidationError{ field: fmt.Sprintf("MemoryUsage[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelStatisticsValidationError{ field: fmt.Sprintf("MemoryUsage[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelStatisticsValidationError{ field: fmt.Sprintf("MemoryUsage[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ModelStatisticsMultiError(errors) } return nil } // ModelStatisticsMultiError is an error wrapping multiple validation errors // returned by ModelStatistics.ValidateAll() if the designated constraints // aren't met. type ModelStatisticsMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelStatisticsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelStatisticsMultiError) AllErrors() []error { return m } // ModelStatisticsValidationError is the validation error returned by // ModelStatistics.Validate if the designated constraints aren't met. type ModelStatisticsValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelStatisticsValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelStatisticsValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelStatisticsValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelStatisticsValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelStatisticsValidationError) ErrorName() string { return "ModelStatisticsValidationError" } // Error satisfies the builtin error interface func (e ModelStatisticsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelStatistics.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelStatisticsValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelStatisticsValidationError{} // Validate checks the field values on ModelStatisticsResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelStatisticsResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelStatisticsResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelStatisticsResponseMultiError, or nil if none found. func (m *ModelStatisticsResponse) ValidateAll() error { return m.validate(true) } func (m *ModelStatisticsResponse) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetModelStats() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelStatisticsResponseValidationError{ field: fmt.Sprintf("ModelStats[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelStatisticsResponseValidationError{ field: fmt.Sprintf("ModelStats[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelStatisticsResponseValidationError{ field: fmt.Sprintf("ModelStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ModelStatisticsResponseMultiError(errors) } return nil } // ModelStatisticsResponseMultiError is an error wrapping multiple validation // errors returned by ModelStatisticsResponse.ValidateAll() if the designated // constraints aren't met. type ModelStatisticsResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelStatisticsResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelStatisticsResponseMultiError) AllErrors() []error { return m } // ModelStatisticsResponseValidationError is the validation error returned by // ModelStatisticsResponse.Validate if the designated constraints aren't met. type ModelStatisticsResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelStatisticsResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelStatisticsResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelStatisticsResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelStatisticsResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelStatisticsResponseValidationError) ErrorName() string { return "ModelStatisticsResponseValidationError" } // Error satisfies the builtin error interface func (e ModelStatisticsResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelStatisticsResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelStatisticsResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelStatisticsResponseValidationError{} // Validate checks the field values on ModelRepositoryParameter with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ModelRepositoryParameter) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelRepositoryParameter with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ModelRepositoryParameterMultiError, or nil if none found. func (m *ModelRepositoryParameter) ValidateAll() error { return m.validate(true) } func (m *ModelRepositoryParameter) validate(all bool) error { if m == nil { return nil } var errors []error switch v := m.ParameterChoice.(type) { case *ModelRepositoryParameter_BoolParam: if v == nil { err := ModelRepositoryParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for BoolParam case *ModelRepositoryParameter_Int64Param: if v == nil { err := ModelRepositoryParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for Int64Param case *ModelRepositoryParameter_StringParam: if v == nil { err := ModelRepositoryParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for StringParam case *ModelRepositoryParameter_BytesParam: if v == nil { err := ModelRepositoryParameterValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for BytesParam default: _ = v // ensures v is used } if len(errors) > 0 { return ModelRepositoryParameterMultiError(errors) } return nil } // ModelRepositoryParameterMultiError is an error wrapping multiple validation // errors returned by ModelRepositoryParameter.ValidateAll() if the designated // constraints aren't met. type ModelRepositoryParameterMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelRepositoryParameterMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelRepositoryParameterMultiError) AllErrors() []error { return m } // ModelRepositoryParameterValidationError is the validation error returned by // ModelRepositoryParameter.Validate if the designated constraints aren't met. type ModelRepositoryParameterValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelRepositoryParameterValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelRepositoryParameterValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelRepositoryParameterValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelRepositoryParameterValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelRepositoryParameterValidationError) ErrorName() string { return "ModelRepositoryParameterValidationError" } // Error satisfies the builtin error interface func (e ModelRepositoryParameterValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelRepositoryParameter.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelRepositoryParameterValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelRepositoryParameterValidationError{} // Validate checks the field values on RepositoryIndexRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *RepositoryIndexRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryIndexRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // RepositoryIndexRequestMultiError, or nil if none found. func (m *RepositoryIndexRequest) ValidateAll() error { return m.validate(true) } func (m *RepositoryIndexRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for RepositoryName // no validation rules for Ready if len(errors) > 0 { return RepositoryIndexRequestMultiError(errors) } return nil } // RepositoryIndexRequestMultiError is an error wrapping multiple validation // errors returned by RepositoryIndexRequest.ValidateAll() if the designated // constraints aren't met. type RepositoryIndexRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryIndexRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryIndexRequestMultiError) AllErrors() []error { return m } // RepositoryIndexRequestValidationError is the validation error returned by // RepositoryIndexRequest.Validate if the designated constraints aren't met. type RepositoryIndexRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryIndexRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryIndexRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryIndexRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryIndexRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryIndexRequestValidationError) ErrorName() string { return "RepositoryIndexRequestValidationError" } // Error satisfies the builtin error interface func (e RepositoryIndexRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryIndexRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryIndexRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryIndexRequestValidationError{} // Validate checks the field values on RepositoryIndexResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *RepositoryIndexResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryIndexResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // RepositoryIndexResponseMultiError, or nil if none found. func (m *RepositoryIndexResponse) ValidateAll() error { return m.validate(true) } func (m *RepositoryIndexResponse) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetModels() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RepositoryIndexResponseValidationError{ field: fmt.Sprintf("Models[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RepositoryIndexResponseValidationError{ field: fmt.Sprintf("Models[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RepositoryIndexResponseValidationError{ field: fmt.Sprintf("Models[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return RepositoryIndexResponseMultiError(errors) } return nil } // RepositoryIndexResponseMultiError is an error wrapping multiple validation // errors returned by RepositoryIndexResponse.ValidateAll() if the designated // constraints aren't met. type RepositoryIndexResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryIndexResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryIndexResponseMultiError) AllErrors() []error { return m } // RepositoryIndexResponseValidationError is the validation error returned by // RepositoryIndexResponse.Validate if the designated constraints aren't met. type RepositoryIndexResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryIndexResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryIndexResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryIndexResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryIndexResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryIndexResponseValidationError) ErrorName() string { return "RepositoryIndexResponseValidationError" } // Error satisfies the builtin error interface func (e RepositoryIndexResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryIndexResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryIndexResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryIndexResponseValidationError{} // Validate checks the field values on RepositoryModelLoadRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *RepositoryModelLoadRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryModelLoadRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // RepositoryModelLoadRequestMultiError, or nil if none found. func (m *RepositoryModelLoadRequest) ValidateAll() error { return m.validate(true) } func (m *RepositoryModelLoadRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for RepositoryName // no validation rules for ModelName { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RepositoryModelLoadRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RepositoryModelLoadRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RepositoryModelLoadRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return RepositoryModelLoadRequestMultiError(errors) } return nil } // RepositoryModelLoadRequestMultiError is an error wrapping multiple // validation errors returned by RepositoryModelLoadRequest.ValidateAll() if // the designated constraints aren't met. type RepositoryModelLoadRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryModelLoadRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryModelLoadRequestMultiError) AllErrors() []error { return m } // RepositoryModelLoadRequestValidationError is the validation error returned // by RepositoryModelLoadRequest.Validate if the designated constraints aren't met. type RepositoryModelLoadRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryModelLoadRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryModelLoadRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryModelLoadRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryModelLoadRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryModelLoadRequestValidationError) ErrorName() string { return "RepositoryModelLoadRequestValidationError" } // Error satisfies the builtin error interface func (e RepositoryModelLoadRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryModelLoadRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryModelLoadRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryModelLoadRequestValidationError{} // Validate checks the field values on RepositoryModelLoadResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *RepositoryModelLoadResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryModelLoadResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // RepositoryModelLoadResponseMultiError, or nil if none found. func (m *RepositoryModelLoadResponse) ValidateAll() error { return m.validate(true) } func (m *RepositoryModelLoadResponse) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return RepositoryModelLoadResponseMultiError(errors) } return nil } // RepositoryModelLoadResponseMultiError is an error wrapping multiple // validation errors returned by RepositoryModelLoadResponse.ValidateAll() if // the designated constraints aren't met. type RepositoryModelLoadResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryModelLoadResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryModelLoadResponseMultiError) AllErrors() []error { return m } // RepositoryModelLoadResponseValidationError is the validation error returned // by RepositoryModelLoadResponse.Validate if the designated constraints // aren't met. type RepositoryModelLoadResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryModelLoadResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryModelLoadResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryModelLoadResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryModelLoadResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryModelLoadResponseValidationError) ErrorName() string { return "RepositoryModelLoadResponseValidationError" } // Error satisfies the builtin error interface func (e RepositoryModelLoadResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryModelLoadResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryModelLoadResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryModelLoadResponseValidationError{} // Validate checks the field values on RepositoryModelUnloadRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *RepositoryModelUnloadRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryModelUnloadRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // RepositoryModelUnloadRequestMultiError, or nil if none found. func (m *RepositoryModelUnloadRequest) ValidateAll() error { return m.validate(true) } func (m *RepositoryModelUnloadRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for RepositoryName // no validation rules for ModelName { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RepositoryModelUnloadRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RepositoryModelUnloadRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RepositoryModelUnloadRequestValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return RepositoryModelUnloadRequestMultiError(errors) } return nil } // RepositoryModelUnloadRequestMultiError is an error wrapping multiple // validation errors returned by RepositoryModelUnloadRequest.ValidateAll() if // the designated constraints aren't met. type RepositoryModelUnloadRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryModelUnloadRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryModelUnloadRequestMultiError) AllErrors() []error { return m } // RepositoryModelUnloadRequestValidationError is the validation error returned // by RepositoryModelUnloadRequest.Validate if the designated constraints // aren't met. type RepositoryModelUnloadRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryModelUnloadRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryModelUnloadRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryModelUnloadRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryModelUnloadRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryModelUnloadRequestValidationError) ErrorName() string { return "RepositoryModelUnloadRequestValidationError" } // Error satisfies the builtin error interface func (e RepositoryModelUnloadRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryModelUnloadRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryModelUnloadRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryModelUnloadRequestValidationError{} // Validate checks the field values on RepositoryModelUnloadResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *RepositoryModelUnloadResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryModelUnloadResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // RepositoryModelUnloadResponseMultiError, or nil if none found. func (m *RepositoryModelUnloadResponse) ValidateAll() error { return m.validate(true) } func (m *RepositoryModelUnloadResponse) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return RepositoryModelUnloadResponseMultiError(errors) } return nil } // RepositoryModelUnloadResponseMultiError is an error wrapping multiple // validation errors returned by RepositoryModelUnloadResponse.ValidateAll() // if the designated constraints aren't met. type RepositoryModelUnloadResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryModelUnloadResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryModelUnloadResponseMultiError) AllErrors() []error { return m } // RepositoryModelUnloadResponseValidationError is the validation error // returned by RepositoryModelUnloadResponse.Validate if the designated // constraints aren't met. type RepositoryModelUnloadResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryModelUnloadResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryModelUnloadResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryModelUnloadResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryModelUnloadResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryModelUnloadResponseValidationError) ErrorName() string { return "RepositoryModelUnloadResponseValidationError" } // Error satisfies the builtin error interface func (e RepositoryModelUnloadResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryModelUnloadResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryModelUnloadResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryModelUnloadResponseValidationError{} // Validate checks the field values on SystemSharedMemoryStatusRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *SystemSharedMemoryStatusRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SystemSharedMemoryStatusRequest with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // SystemSharedMemoryStatusRequestMultiError, or nil if none found. func (m *SystemSharedMemoryStatusRequest) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryStatusRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name if len(errors) > 0 { return SystemSharedMemoryStatusRequestMultiError(errors) } return nil } // SystemSharedMemoryStatusRequestMultiError is an error wrapping multiple // validation errors returned by SystemSharedMemoryStatusRequest.ValidateAll() // if the designated constraints aren't met. type SystemSharedMemoryStatusRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryStatusRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryStatusRequestMultiError) AllErrors() []error { return m } // SystemSharedMemoryStatusRequestValidationError is the validation error // returned by SystemSharedMemoryStatusRequest.Validate if the designated // constraints aren't met. type SystemSharedMemoryStatusRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryStatusRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryStatusRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryStatusRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryStatusRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryStatusRequestValidationError) ErrorName() string { return "SystemSharedMemoryStatusRequestValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryStatusRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryStatusRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryStatusRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryStatusRequestValidationError{} // Validate checks the field values on SystemSharedMemoryStatusResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *SystemSharedMemoryStatusResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SystemSharedMemoryStatusResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // SystemSharedMemoryStatusResponseMultiError, or nil if none found. func (m *SystemSharedMemoryStatusResponse) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryStatusResponse) validate(all bool) error { if m == nil { return nil } var errors []error { sorted_keys := make([]string, len(m.GetRegions())) i := 0 for key := range m.GetRegions() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetRegions()[key] _ = val // no validation rules for Regions[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SystemSharedMemoryStatusResponseValidationError{ field: fmt.Sprintf("Regions[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SystemSharedMemoryStatusResponseValidationError{ field: fmt.Sprintf("Regions[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SystemSharedMemoryStatusResponseValidationError{ field: fmt.Sprintf("Regions[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return SystemSharedMemoryStatusResponseMultiError(errors) } return nil } // SystemSharedMemoryStatusResponseMultiError is an error wrapping multiple // validation errors returned by // SystemSharedMemoryStatusResponse.ValidateAll() if the designated // constraints aren't met. type SystemSharedMemoryStatusResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryStatusResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryStatusResponseMultiError) AllErrors() []error { return m } // SystemSharedMemoryStatusResponseValidationError is the validation error // returned by SystemSharedMemoryStatusResponse.Validate if the designated // constraints aren't met. type SystemSharedMemoryStatusResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryStatusResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryStatusResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryStatusResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryStatusResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryStatusResponseValidationError) ErrorName() string { return "SystemSharedMemoryStatusResponseValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryStatusResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryStatusResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryStatusResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryStatusResponseValidationError{} // Validate checks the field values on SystemSharedMemoryRegisterRequest with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *SystemSharedMemoryRegisterRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SystemSharedMemoryRegisterRequest // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // SystemSharedMemoryRegisterRequestMultiError, or nil if none found. func (m *SystemSharedMemoryRegisterRequest) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryRegisterRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Key // no validation rules for Offset // no validation rules for ByteSize if len(errors) > 0 { return SystemSharedMemoryRegisterRequestMultiError(errors) } return nil } // SystemSharedMemoryRegisterRequestMultiError is an error wrapping multiple // validation errors returned by // SystemSharedMemoryRegisterRequest.ValidateAll() if the designated // constraints aren't met. type SystemSharedMemoryRegisterRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryRegisterRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryRegisterRequestMultiError) AllErrors() []error { return m } // SystemSharedMemoryRegisterRequestValidationError is the validation error // returned by SystemSharedMemoryRegisterRequest.Validate if the designated // constraints aren't met. type SystemSharedMemoryRegisterRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryRegisterRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryRegisterRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryRegisterRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryRegisterRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryRegisterRequestValidationError) ErrorName() string { return "SystemSharedMemoryRegisterRequestValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryRegisterRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryRegisterRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryRegisterRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryRegisterRequestValidationError{} // Validate checks the field values on SystemSharedMemoryRegisterResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *SystemSharedMemoryRegisterResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SystemSharedMemoryRegisterResponse // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // SystemSharedMemoryRegisterResponseMultiError, or nil if none found. func (m *SystemSharedMemoryRegisterResponse) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryRegisterResponse) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return SystemSharedMemoryRegisterResponseMultiError(errors) } return nil } // SystemSharedMemoryRegisterResponseMultiError is an error wrapping multiple // validation errors returned by // SystemSharedMemoryRegisterResponse.ValidateAll() if the designated // constraints aren't met. type SystemSharedMemoryRegisterResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryRegisterResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryRegisterResponseMultiError) AllErrors() []error { return m } // SystemSharedMemoryRegisterResponseValidationError is the validation error // returned by SystemSharedMemoryRegisterResponse.Validate if the designated // constraints aren't met. type SystemSharedMemoryRegisterResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryRegisterResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryRegisterResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryRegisterResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryRegisterResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryRegisterResponseValidationError) ErrorName() string { return "SystemSharedMemoryRegisterResponseValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryRegisterResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryRegisterResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryRegisterResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryRegisterResponseValidationError{} // Validate checks the field values on SystemSharedMemoryUnregisterRequest with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *SystemSharedMemoryUnregisterRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SystemSharedMemoryUnregisterRequest // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // SystemSharedMemoryUnregisterRequestMultiError, or nil if none found. func (m *SystemSharedMemoryUnregisterRequest) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryUnregisterRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name if len(errors) > 0 { return SystemSharedMemoryUnregisterRequestMultiError(errors) } return nil } // SystemSharedMemoryUnregisterRequestMultiError is an error wrapping multiple // validation errors returned by // SystemSharedMemoryUnregisterRequest.ValidateAll() if the designated // constraints aren't met. type SystemSharedMemoryUnregisterRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryUnregisterRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryUnregisterRequestMultiError) AllErrors() []error { return m } // SystemSharedMemoryUnregisterRequestValidationError is the validation error // returned by SystemSharedMemoryUnregisterRequest.Validate if the designated // constraints aren't met. type SystemSharedMemoryUnregisterRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryUnregisterRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryUnregisterRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryUnregisterRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryUnregisterRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryUnregisterRequestValidationError) ErrorName() string { return "SystemSharedMemoryUnregisterRequestValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryUnregisterRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryUnregisterRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryUnregisterRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryUnregisterRequestValidationError{} // Validate checks the field values on SystemSharedMemoryUnregisterResponse // with the rules defined in the proto definition for this message. If any // rules are violated, the first error encountered is returned, or nil if // there are no violations. func (m *SystemSharedMemoryUnregisterResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SystemSharedMemoryUnregisterResponse // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // SystemSharedMemoryUnregisterResponseMultiError, or nil if none found. func (m *SystemSharedMemoryUnregisterResponse) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryUnregisterResponse) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return SystemSharedMemoryUnregisterResponseMultiError(errors) } return nil } // SystemSharedMemoryUnregisterResponseMultiError is an error wrapping multiple // validation errors returned by // SystemSharedMemoryUnregisterResponse.ValidateAll() if the designated // constraints aren't met. type SystemSharedMemoryUnregisterResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryUnregisterResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryUnregisterResponseMultiError) AllErrors() []error { return m } // SystemSharedMemoryUnregisterResponseValidationError is the validation error // returned by SystemSharedMemoryUnregisterResponse.Validate if the designated // constraints aren't met. type SystemSharedMemoryUnregisterResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryUnregisterResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryUnregisterResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryUnregisterResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryUnregisterResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryUnregisterResponseValidationError) ErrorName() string { return "SystemSharedMemoryUnregisterResponseValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryUnregisterResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryUnregisterResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryUnregisterResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryUnregisterResponseValidationError{} // Validate checks the field values on CudaSharedMemoryStatusRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *CudaSharedMemoryStatusRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CudaSharedMemoryStatusRequest with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // CudaSharedMemoryStatusRequestMultiError, or nil if none found. func (m *CudaSharedMemoryStatusRequest) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryStatusRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name if len(errors) > 0 { return CudaSharedMemoryStatusRequestMultiError(errors) } return nil } // CudaSharedMemoryStatusRequestMultiError is an error wrapping multiple // validation errors returned by CudaSharedMemoryStatusRequest.ValidateAll() // if the designated constraints aren't met. type CudaSharedMemoryStatusRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryStatusRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryStatusRequestMultiError) AllErrors() []error { return m } // CudaSharedMemoryStatusRequestValidationError is the validation error // returned by CudaSharedMemoryStatusRequest.Validate if the designated // constraints aren't met. type CudaSharedMemoryStatusRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryStatusRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryStatusRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryStatusRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryStatusRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryStatusRequestValidationError) ErrorName() string { return "CudaSharedMemoryStatusRequestValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryStatusRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryStatusRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryStatusRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryStatusRequestValidationError{} // Validate checks the field values on CudaSharedMemoryStatusResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *CudaSharedMemoryStatusResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CudaSharedMemoryStatusResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // CudaSharedMemoryStatusResponseMultiError, or nil if none found. func (m *CudaSharedMemoryStatusResponse) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryStatusResponse) validate(all bool) error { if m == nil { return nil } var errors []error { sorted_keys := make([]string, len(m.GetRegions())) i := 0 for key := range m.GetRegions() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetRegions()[key] _ = val // no validation rules for Regions[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, CudaSharedMemoryStatusResponseValidationError{ field: fmt.Sprintf("Regions[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, CudaSharedMemoryStatusResponseValidationError{ field: fmt.Sprintf("Regions[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CudaSharedMemoryStatusResponseValidationError{ field: fmt.Sprintf("Regions[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return CudaSharedMemoryStatusResponseMultiError(errors) } return nil } // CudaSharedMemoryStatusResponseMultiError is an error wrapping multiple // validation errors returned by CudaSharedMemoryStatusResponse.ValidateAll() // if the designated constraints aren't met. type CudaSharedMemoryStatusResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryStatusResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryStatusResponseMultiError) AllErrors() []error { return m } // CudaSharedMemoryStatusResponseValidationError is the validation error // returned by CudaSharedMemoryStatusResponse.Validate if the designated // constraints aren't met. type CudaSharedMemoryStatusResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryStatusResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryStatusResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryStatusResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryStatusResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryStatusResponseValidationError) ErrorName() string { return "CudaSharedMemoryStatusResponseValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryStatusResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryStatusResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryStatusResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryStatusResponseValidationError{} // Validate checks the field values on CudaSharedMemoryRegisterRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *CudaSharedMemoryRegisterRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CudaSharedMemoryRegisterRequest with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // CudaSharedMemoryRegisterRequestMultiError, or nil if none found. func (m *CudaSharedMemoryRegisterRequest) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryRegisterRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for RawHandle // no validation rules for DeviceId // no validation rules for ByteSize if len(errors) > 0 { return CudaSharedMemoryRegisterRequestMultiError(errors) } return nil } // CudaSharedMemoryRegisterRequestMultiError is an error wrapping multiple // validation errors returned by CudaSharedMemoryRegisterRequest.ValidateAll() // if the designated constraints aren't met. type CudaSharedMemoryRegisterRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryRegisterRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryRegisterRequestMultiError) AllErrors() []error { return m } // CudaSharedMemoryRegisterRequestValidationError is the validation error // returned by CudaSharedMemoryRegisterRequest.Validate if the designated // constraints aren't met. type CudaSharedMemoryRegisterRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryRegisterRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryRegisterRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryRegisterRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryRegisterRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryRegisterRequestValidationError) ErrorName() string { return "CudaSharedMemoryRegisterRequestValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryRegisterRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryRegisterRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryRegisterRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryRegisterRequestValidationError{} // Validate checks the field values on CudaSharedMemoryRegisterResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *CudaSharedMemoryRegisterResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CudaSharedMemoryRegisterResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // CudaSharedMemoryRegisterResponseMultiError, or nil if none found. func (m *CudaSharedMemoryRegisterResponse) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryRegisterResponse) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return CudaSharedMemoryRegisterResponseMultiError(errors) } return nil } // CudaSharedMemoryRegisterResponseMultiError is an error wrapping multiple // validation errors returned by // CudaSharedMemoryRegisterResponse.ValidateAll() if the designated // constraints aren't met. type CudaSharedMemoryRegisterResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryRegisterResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryRegisterResponseMultiError) AllErrors() []error { return m } // CudaSharedMemoryRegisterResponseValidationError is the validation error // returned by CudaSharedMemoryRegisterResponse.Validate if the designated // constraints aren't met. type CudaSharedMemoryRegisterResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryRegisterResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryRegisterResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryRegisterResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryRegisterResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryRegisterResponseValidationError) ErrorName() string { return "CudaSharedMemoryRegisterResponseValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryRegisterResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryRegisterResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryRegisterResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryRegisterResponseValidationError{} // Validate checks the field values on CudaSharedMemoryUnregisterRequest with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *CudaSharedMemoryUnregisterRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CudaSharedMemoryUnregisterRequest // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // CudaSharedMemoryUnregisterRequestMultiError, or nil if none found. func (m *CudaSharedMemoryUnregisterRequest) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryUnregisterRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name if len(errors) > 0 { return CudaSharedMemoryUnregisterRequestMultiError(errors) } return nil } // CudaSharedMemoryUnregisterRequestMultiError is an error wrapping multiple // validation errors returned by // CudaSharedMemoryUnregisterRequest.ValidateAll() if the designated // constraints aren't met. type CudaSharedMemoryUnregisterRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryUnregisterRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryUnregisterRequestMultiError) AllErrors() []error { return m } // CudaSharedMemoryUnregisterRequestValidationError is the validation error // returned by CudaSharedMemoryUnregisterRequest.Validate if the designated // constraints aren't met. type CudaSharedMemoryUnregisterRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryUnregisterRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryUnregisterRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryUnregisterRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryUnregisterRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryUnregisterRequestValidationError) ErrorName() string { return "CudaSharedMemoryUnregisterRequestValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryUnregisterRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryUnregisterRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryUnregisterRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryUnregisterRequestValidationError{} // Validate checks the field values on CudaSharedMemoryUnregisterResponse with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *CudaSharedMemoryUnregisterResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CudaSharedMemoryUnregisterResponse // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // CudaSharedMemoryUnregisterResponseMultiError, or nil if none found. func (m *CudaSharedMemoryUnregisterResponse) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryUnregisterResponse) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return CudaSharedMemoryUnregisterResponseMultiError(errors) } return nil } // CudaSharedMemoryUnregisterResponseMultiError is an error wrapping multiple // validation errors returned by // CudaSharedMemoryUnregisterResponse.ValidateAll() if the designated // constraints aren't met. type CudaSharedMemoryUnregisterResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryUnregisterResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryUnregisterResponseMultiError) AllErrors() []error { return m } // CudaSharedMemoryUnregisterResponseValidationError is the validation error // returned by CudaSharedMemoryUnregisterResponse.Validate if the designated // constraints aren't met. type CudaSharedMemoryUnregisterResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryUnregisterResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryUnregisterResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryUnregisterResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryUnregisterResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryUnregisterResponseValidationError) ErrorName() string { return "CudaSharedMemoryUnregisterResponseValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryUnregisterResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryUnregisterResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryUnregisterResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryUnregisterResponseValidationError{} // Validate checks the field values on TraceSettingRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *TraceSettingRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on TraceSettingRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // TraceSettingRequestMultiError, or nil if none found. func (m *TraceSettingRequest) ValidateAll() error { return m.validate(true) } func (m *TraceSettingRequest) validate(all bool) error { if m == nil { return nil } var errors []error { sorted_keys := make([]string, len(m.GetSettings())) i := 0 for key := range m.GetSettings() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetSettings()[key] _ = val // no validation rules for Settings[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, TraceSettingRequestValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, TraceSettingRequestValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceSettingRequestValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for ModelName if len(errors) > 0 { return TraceSettingRequestMultiError(errors) } return nil } // TraceSettingRequestMultiError is an error wrapping multiple validation // errors returned by TraceSettingRequest.ValidateAll() if the designated // constraints aren't met. type TraceSettingRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m TraceSettingRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m TraceSettingRequestMultiError) AllErrors() []error { return m } // TraceSettingRequestValidationError is the validation error returned by // TraceSettingRequest.Validate if the designated constraints aren't met. type TraceSettingRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e TraceSettingRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e TraceSettingRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e TraceSettingRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e TraceSettingRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e TraceSettingRequestValidationError) ErrorName() string { return "TraceSettingRequestValidationError" } // Error satisfies the builtin error interface func (e TraceSettingRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sTraceSettingRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = TraceSettingRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = TraceSettingRequestValidationError{} // Validate checks the field values on TraceSettingResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *TraceSettingResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on TraceSettingResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // TraceSettingResponseMultiError, or nil if none found. func (m *TraceSettingResponse) ValidateAll() error { return m.validate(true) } func (m *TraceSettingResponse) validate(all bool) error { if m == nil { return nil } var errors []error { sorted_keys := make([]string, len(m.GetSettings())) i := 0 for key := range m.GetSettings() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetSettings()[key] _ = val // no validation rules for Settings[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, TraceSettingResponseValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, TraceSettingResponseValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceSettingResponseValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return TraceSettingResponseMultiError(errors) } return nil } // TraceSettingResponseMultiError is an error wrapping multiple validation // errors returned by TraceSettingResponse.ValidateAll() if the designated // constraints aren't met. type TraceSettingResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m TraceSettingResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m TraceSettingResponseMultiError) AllErrors() []error { return m } // TraceSettingResponseValidationError is the validation error returned by // TraceSettingResponse.Validate if the designated constraints aren't met. type TraceSettingResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e TraceSettingResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e TraceSettingResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e TraceSettingResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e TraceSettingResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e TraceSettingResponseValidationError) ErrorName() string { return "TraceSettingResponseValidationError" } // Error satisfies the builtin error interface func (e TraceSettingResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sTraceSettingResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = TraceSettingResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = TraceSettingResponseValidationError{} // Validate checks the field values on LogSettingsRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *LogSettingsRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on LogSettingsRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // LogSettingsRequestMultiError, or nil if none found. func (m *LogSettingsRequest) ValidateAll() error { return m.validate(true) } func (m *LogSettingsRequest) validate(all bool) error { if m == nil { return nil } var errors []error { sorted_keys := make([]string, len(m.GetSettings())) i := 0 for key := range m.GetSettings() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetSettings()[key] _ = val // no validation rules for Settings[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, LogSettingsRequestValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, LogSettingsRequestValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LogSettingsRequestValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return LogSettingsRequestMultiError(errors) } return nil } // LogSettingsRequestMultiError is an error wrapping multiple validation errors // returned by LogSettingsRequest.ValidateAll() if the designated constraints // aren't met. type LogSettingsRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m LogSettingsRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m LogSettingsRequestMultiError) AllErrors() []error { return m } // LogSettingsRequestValidationError is the validation error returned by // LogSettingsRequest.Validate if the designated constraints aren't met. type LogSettingsRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e LogSettingsRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e LogSettingsRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e LogSettingsRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e LogSettingsRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e LogSettingsRequestValidationError) ErrorName() string { return "LogSettingsRequestValidationError" } // Error satisfies the builtin error interface func (e LogSettingsRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sLogSettingsRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = LogSettingsRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = LogSettingsRequestValidationError{} // Validate checks the field values on LogSettingsResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *LogSettingsResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on LogSettingsResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // LogSettingsResponseMultiError, or nil if none found. func (m *LogSettingsResponse) ValidateAll() error { return m.validate(true) } func (m *LogSettingsResponse) validate(all bool) error { if m == nil { return nil } var errors []error { sorted_keys := make([]string, len(m.GetSettings())) i := 0 for key := range m.GetSettings() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetSettings()[key] _ = val // no validation rules for Settings[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, LogSettingsResponseValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, LogSettingsResponseValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LogSettingsResponseValidationError{ field: fmt.Sprintf("Settings[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return LogSettingsResponseMultiError(errors) } return nil } // LogSettingsResponseMultiError is an error wrapping multiple validation // errors returned by LogSettingsResponse.ValidateAll() if the designated // constraints aren't met. type LogSettingsResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m LogSettingsResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m LogSettingsResponseMultiError) AllErrors() []error { return m } // LogSettingsResponseValidationError is the validation error returned by // LogSettingsResponse.Validate if the designated constraints aren't met. type LogSettingsResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e LogSettingsResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e LogSettingsResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e LogSettingsResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e LogSettingsResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e LogSettingsResponseValidationError) ErrorName() string { return "LogSettingsResponseValidationError" } // Error satisfies the builtin error interface func (e LogSettingsResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sLogSettingsResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = LogSettingsResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = LogSettingsResponseValidationError{} // Validate checks the field values on ModelMetadataResponse_TensorMetadata // with the rules defined in the proto definition for this message. If any // rules are violated, the first error encountered is returned, or nil if // there are no violations. func (m *ModelMetadataResponse_TensorMetadata) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelMetadataResponse_TensorMetadata // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // ModelMetadataResponse_TensorMetadataMultiError, or nil if none found. func (m *ModelMetadataResponse_TensorMetadata) ValidateAll() error { return m.validate(true) } func (m *ModelMetadataResponse_TensorMetadata) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Datatype if len(errors) > 0 { return ModelMetadataResponse_TensorMetadataMultiError(errors) } return nil } // ModelMetadataResponse_TensorMetadataMultiError is an error wrapping multiple // validation errors returned by // ModelMetadataResponse_TensorMetadata.ValidateAll() if the designated // constraints aren't met. type ModelMetadataResponse_TensorMetadataMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelMetadataResponse_TensorMetadataMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelMetadataResponse_TensorMetadataMultiError) AllErrors() []error { return m } // ModelMetadataResponse_TensorMetadataValidationError is the validation error // returned by ModelMetadataResponse_TensorMetadata.Validate if the designated // constraints aren't met. type ModelMetadataResponse_TensorMetadataValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelMetadataResponse_TensorMetadataValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelMetadataResponse_TensorMetadataValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelMetadataResponse_TensorMetadataValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelMetadataResponse_TensorMetadataValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelMetadataResponse_TensorMetadataValidationError) ErrorName() string { return "ModelMetadataResponse_TensorMetadataValidationError" } // Error satisfies the builtin error interface func (e ModelMetadataResponse_TensorMetadataValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelMetadataResponse_TensorMetadata.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelMetadataResponse_TensorMetadataValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelMetadataResponse_TensorMetadataValidationError{} // Validate checks the field values on ModelInferRequest_InferInputTensor with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *ModelInferRequest_InferInputTensor) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelInferRequest_InferInputTensor // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // ModelInferRequest_InferInputTensorMultiError, or nil if none found. func (m *ModelInferRequest_InferInputTensor) ValidateAll() error { return m.validate(true) } func (m *ModelInferRequest_InferInputTensor) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Datatype { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferRequest_InferInputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferRequest_InferInputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferRequest_InferInputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if all { switch v := interface{}(m.GetContents()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferRequest_InferInputTensorValidationError{ field: "Contents", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferRequest_InferInputTensorValidationError{ field: "Contents", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetContents()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferRequest_InferInputTensorValidationError{ field: "Contents", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ModelInferRequest_InferInputTensorMultiError(errors) } return nil } // ModelInferRequest_InferInputTensorMultiError is an error wrapping multiple // validation errors returned by // ModelInferRequest_InferInputTensor.ValidateAll() if the designated // constraints aren't met. type ModelInferRequest_InferInputTensorMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelInferRequest_InferInputTensorMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelInferRequest_InferInputTensorMultiError) AllErrors() []error { return m } // ModelInferRequest_InferInputTensorValidationError is the validation error // returned by ModelInferRequest_InferInputTensor.Validate if the designated // constraints aren't met. type ModelInferRequest_InferInputTensorValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelInferRequest_InferInputTensorValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelInferRequest_InferInputTensorValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelInferRequest_InferInputTensorValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelInferRequest_InferInputTensorValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelInferRequest_InferInputTensorValidationError) ErrorName() string { return "ModelInferRequest_InferInputTensorValidationError" } // Error satisfies the builtin error interface func (e ModelInferRequest_InferInputTensorValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelInferRequest_InferInputTensor.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelInferRequest_InferInputTensorValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelInferRequest_InferInputTensorValidationError{} // Validate checks the field values on // ModelInferRequest_InferRequestedOutputTensor with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *ModelInferRequest_InferRequestedOutputTensor) Validate() error { return m.validate(false) } // ValidateAll checks the field values on // ModelInferRequest_InferRequestedOutputTensor with the rules defined in the // proto definition for this message. If any rules are violated, the result is // a list of violation errors wrapped in // ModelInferRequest_InferRequestedOutputTensorMultiError, or nil if none found. func (m *ModelInferRequest_InferRequestedOutputTensor) ValidateAll() error { return m.validate(true) } func (m *ModelInferRequest_InferRequestedOutputTensor) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferRequest_InferRequestedOutputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferRequest_InferRequestedOutputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferRequest_InferRequestedOutputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if len(errors) > 0 { return ModelInferRequest_InferRequestedOutputTensorMultiError(errors) } return nil } // ModelInferRequest_InferRequestedOutputTensorMultiError is an error wrapping // multiple validation errors returned by // ModelInferRequest_InferRequestedOutputTensor.ValidateAll() if the // designated constraints aren't met. type ModelInferRequest_InferRequestedOutputTensorMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelInferRequest_InferRequestedOutputTensorMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelInferRequest_InferRequestedOutputTensorMultiError) AllErrors() []error { return m } // ModelInferRequest_InferRequestedOutputTensorValidationError is the // validation error returned by // ModelInferRequest_InferRequestedOutputTensor.Validate if the designated // constraints aren't met. type ModelInferRequest_InferRequestedOutputTensorValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelInferRequest_InferRequestedOutputTensorValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelInferRequest_InferRequestedOutputTensorValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelInferRequest_InferRequestedOutputTensorValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelInferRequest_InferRequestedOutputTensorValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelInferRequest_InferRequestedOutputTensorValidationError) ErrorName() string { return "ModelInferRequest_InferRequestedOutputTensorValidationError" } // Error satisfies the builtin error interface func (e ModelInferRequest_InferRequestedOutputTensorValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelInferRequest_InferRequestedOutputTensor.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelInferRequest_InferRequestedOutputTensorValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelInferRequest_InferRequestedOutputTensorValidationError{} // Validate checks the field values on ModelInferResponse_InferOutputTensor // with the rules defined in the proto definition for this message. If any // rules are violated, the first error encountered is returned, or nil if // there are no violations. func (m *ModelInferResponse_InferOutputTensor) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ModelInferResponse_InferOutputTensor // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // ModelInferResponse_InferOutputTensorMultiError, or nil if none found. func (m *ModelInferResponse_InferOutputTensor) ValidateAll() error { return m.validate(true) } func (m *ModelInferResponse_InferOutputTensor) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Datatype { sorted_keys := make([]string, len(m.GetParameters())) i := 0 for key := range m.GetParameters() { sorted_keys[i] = key i++ } sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) for _, key := range sorted_keys { val := m.GetParameters()[key] _ = val // no validation rules for Parameters[key] if all { switch v := interface{}(val).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferResponse_InferOutputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferResponse_InferOutputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferResponse_InferOutputTensorValidationError{ field: fmt.Sprintf("Parameters[%v]", key), reason: "embedded message failed validation", cause: err, } } } } } if all { switch v := interface{}(m.GetContents()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ModelInferResponse_InferOutputTensorValidationError{ field: "Contents", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ModelInferResponse_InferOutputTensorValidationError{ field: "Contents", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetContents()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ModelInferResponse_InferOutputTensorValidationError{ field: "Contents", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ModelInferResponse_InferOutputTensorMultiError(errors) } return nil } // ModelInferResponse_InferOutputTensorMultiError is an error wrapping multiple // validation errors returned by // ModelInferResponse_InferOutputTensor.ValidateAll() if the designated // constraints aren't met. type ModelInferResponse_InferOutputTensorMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ModelInferResponse_InferOutputTensorMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ModelInferResponse_InferOutputTensorMultiError) AllErrors() []error { return m } // ModelInferResponse_InferOutputTensorValidationError is the validation error // returned by ModelInferResponse_InferOutputTensor.Validate if the designated // constraints aren't met. type ModelInferResponse_InferOutputTensorValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ModelInferResponse_InferOutputTensorValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ModelInferResponse_InferOutputTensorValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ModelInferResponse_InferOutputTensorValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ModelInferResponse_InferOutputTensorValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ModelInferResponse_InferOutputTensorValidationError) ErrorName() string { return "ModelInferResponse_InferOutputTensorValidationError" } // Error satisfies the builtin error interface func (e ModelInferResponse_InferOutputTensorValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sModelInferResponse_InferOutputTensor.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ModelInferResponse_InferOutputTensorValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ModelInferResponse_InferOutputTensorValidationError{} // Validate checks the field values on RepositoryIndexResponse_ModelIndex with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *RepositoryIndexResponse_ModelIndex) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RepositoryIndexResponse_ModelIndex // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // RepositoryIndexResponse_ModelIndexMultiError, or nil if none found. func (m *RepositoryIndexResponse_ModelIndex) ValidateAll() error { return m.validate(true) } func (m *RepositoryIndexResponse_ModelIndex) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Version // no validation rules for State // no validation rules for Reason if len(errors) > 0 { return RepositoryIndexResponse_ModelIndexMultiError(errors) } return nil } // RepositoryIndexResponse_ModelIndexMultiError is an error wrapping multiple // validation errors returned by // RepositoryIndexResponse_ModelIndex.ValidateAll() if the designated // constraints aren't met. type RepositoryIndexResponse_ModelIndexMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RepositoryIndexResponse_ModelIndexMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RepositoryIndexResponse_ModelIndexMultiError) AllErrors() []error { return m } // RepositoryIndexResponse_ModelIndexValidationError is the validation error // returned by RepositoryIndexResponse_ModelIndex.Validate if the designated // constraints aren't met. type RepositoryIndexResponse_ModelIndexValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RepositoryIndexResponse_ModelIndexValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RepositoryIndexResponse_ModelIndexValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RepositoryIndexResponse_ModelIndexValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RepositoryIndexResponse_ModelIndexValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RepositoryIndexResponse_ModelIndexValidationError) ErrorName() string { return "RepositoryIndexResponse_ModelIndexValidationError" } // Error satisfies the builtin error interface func (e RepositoryIndexResponse_ModelIndexValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sRepositoryIndexResponse_ModelIndex.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RepositoryIndexResponse_ModelIndexValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RepositoryIndexResponse_ModelIndexValidationError{} // Validate checks the field values on // SystemSharedMemoryStatusResponse_RegionStatus with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *SystemSharedMemoryStatusResponse_RegionStatus) Validate() error { return m.validate(false) } // ValidateAll checks the field values on // SystemSharedMemoryStatusResponse_RegionStatus with the rules defined in the // proto definition for this message. If any rules are violated, the result is // a list of violation errors wrapped in // SystemSharedMemoryStatusResponse_RegionStatusMultiError, or nil if none found. func (m *SystemSharedMemoryStatusResponse_RegionStatus) ValidateAll() error { return m.validate(true) } func (m *SystemSharedMemoryStatusResponse_RegionStatus) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for Key // no validation rules for Offset // no validation rules for ByteSize if len(errors) > 0 { return SystemSharedMemoryStatusResponse_RegionStatusMultiError(errors) } return nil } // SystemSharedMemoryStatusResponse_RegionStatusMultiError is an error wrapping // multiple validation errors returned by // SystemSharedMemoryStatusResponse_RegionStatus.ValidateAll() if the // designated constraints aren't met. type SystemSharedMemoryStatusResponse_RegionStatusMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SystemSharedMemoryStatusResponse_RegionStatusMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SystemSharedMemoryStatusResponse_RegionStatusMultiError) AllErrors() []error { return m } // SystemSharedMemoryStatusResponse_RegionStatusValidationError is the // validation error returned by // SystemSharedMemoryStatusResponse_RegionStatus.Validate if the designated // constraints aren't met. type SystemSharedMemoryStatusResponse_RegionStatusValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SystemSharedMemoryStatusResponse_RegionStatusValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SystemSharedMemoryStatusResponse_RegionStatusValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SystemSharedMemoryStatusResponse_RegionStatusValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SystemSharedMemoryStatusResponse_RegionStatusValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SystemSharedMemoryStatusResponse_RegionStatusValidationError) ErrorName() string { return "SystemSharedMemoryStatusResponse_RegionStatusValidationError" } // Error satisfies the builtin error interface func (e SystemSharedMemoryStatusResponse_RegionStatusValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSystemSharedMemoryStatusResponse_RegionStatus.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SystemSharedMemoryStatusResponse_RegionStatusValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SystemSharedMemoryStatusResponse_RegionStatusValidationError{} // Validate checks the field values on // CudaSharedMemoryStatusResponse_RegionStatus with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *CudaSharedMemoryStatusResponse_RegionStatus) Validate() error { return m.validate(false) } // ValidateAll checks the field values on // CudaSharedMemoryStatusResponse_RegionStatus with the rules defined in the // proto definition for this message. If any rules are violated, the result is // a list of violation errors wrapped in // CudaSharedMemoryStatusResponse_RegionStatusMultiError, or nil if none found. func (m *CudaSharedMemoryStatusResponse_RegionStatus) ValidateAll() error { return m.validate(true) } func (m *CudaSharedMemoryStatusResponse_RegionStatus) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for DeviceId // no validation rules for ByteSize if len(errors) > 0 { return CudaSharedMemoryStatusResponse_RegionStatusMultiError(errors) } return nil } // CudaSharedMemoryStatusResponse_RegionStatusMultiError is an error wrapping // multiple validation errors returned by // CudaSharedMemoryStatusResponse_RegionStatus.ValidateAll() if the designated // constraints aren't met. type CudaSharedMemoryStatusResponse_RegionStatusMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CudaSharedMemoryStatusResponse_RegionStatusMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m CudaSharedMemoryStatusResponse_RegionStatusMultiError) AllErrors() []error { return m } // CudaSharedMemoryStatusResponse_RegionStatusValidationError is the validation // error returned by CudaSharedMemoryStatusResponse_RegionStatus.Validate if // the designated constraints aren't met. type CudaSharedMemoryStatusResponse_RegionStatusValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CudaSharedMemoryStatusResponse_RegionStatusValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CudaSharedMemoryStatusResponse_RegionStatusValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CudaSharedMemoryStatusResponse_RegionStatusValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CudaSharedMemoryStatusResponse_RegionStatusValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CudaSharedMemoryStatusResponse_RegionStatusValidationError) ErrorName() string { return "CudaSharedMemoryStatusResponse_RegionStatusValidationError" } // Error satisfies the builtin error interface func (e CudaSharedMemoryStatusResponse_RegionStatusValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCudaSharedMemoryStatusResponse_RegionStatus.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CudaSharedMemoryStatusResponse_RegionStatusValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CudaSharedMemoryStatusResponse_RegionStatusValidationError{} // Validate checks the field values on TraceSettingRequest_SettingValue with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *TraceSettingRequest_SettingValue) Validate() error { return m.validate(false) } // ValidateAll checks the field values on TraceSettingRequest_SettingValue with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // TraceSettingRequest_SettingValueMultiError, or nil if none found. func (m *TraceSettingRequest_SettingValue) ValidateAll() error { return m.validate(true) } func (m *TraceSettingRequest_SettingValue) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return TraceSettingRequest_SettingValueMultiError(errors) } return nil } // TraceSettingRequest_SettingValueMultiError is an error wrapping multiple // validation errors returned by // TraceSettingRequest_SettingValue.ValidateAll() if the designated // constraints aren't met. type TraceSettingRequest_SettingValueMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m TraceSettingRequest_SettingValueMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m TraceSettingRequest_SettingValueMultiError) AllErrors() []error { return m } // TraceSettingRequest_SettingValueValidationError is the validation error // returned by TraceSettingRequest_SettingValue.Validate if the designated // constraints aren't met. type TraceSettingRequest_SettingValueValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e TraceSettingRequest_SettingValueValidationError) Field() string { return e.field } // Reason function returns reason value. func (e TraceSettingRequest_SettingValueValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e TraceSettingRequest_SettingValueValidationError) Cause() error { return e.cause } // Key function returns key value. func (e TraceSettingRequest_SettingValueValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e TraceSettingRequest_SettingValueValidationError) ErrorName() string { return "TraceSettingRequest_SettingValueValidationError" } // Error satisfies the builtin error interface func (e TraceSettingRequest_SettingValueValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sTraceSettingRequest_SettingValue.%s: %s%s", key, e.field, e.reason, cause) } var _ error = TraceSettingRequest_SettingValueValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = TraceSettingRequest_SettingValueValidationError{} // Validate checks the field values on TraceSettingResponse_SettingValue with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *TraceSettingResponse_SettingValue) Validate() error { return m.validate(false) } // ValidateAll checks the field values on TraceSettingResponse_SettingValue // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // TraceSettingResponse_SettingValueMultiError, or nil if none found. func (m *TraceSettingResponse_SettingValue) ValidateAll() error { return m.validate(true) } func (m *TraceSettingResponse_SettingValue) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return TraceSettingResponse_SettingValueMultiError(errors) } return nil } // TraceSettingResponse_SettingValueMultiError is an error wrapping multiple // validation errors returned by // TraceSettingResponse_SettingValue.ValidateAll() if the designated // constraints aren't met. type TraceSettingResponse_SettingValueMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m TraceSettingResponse_SettingValueMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m TraceSettingResponse_SettingValueMultiError) AllErrors() []error { return m } // TraceSettingResponse_SettingValueValidationError is the validation error // returned by TraceSettingResponse_SettingValue.Validate if the designated // constraints aren't met. type TraceSettingResponse_SettingValueValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e TraceSettingResponse_SettingValueValidationError) Field() string { return e.field } // Reason function returns reason value. func (e TraceSettingResponse_SettingValueValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e TraceSettingResponse_SettingValueValidationError) Cause() error { return e.cause } // Key function returns key value. func (e TraceSettingResponse_SettingValueValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e TraceSettingResponse_SettingValueValidationError) ErrorName() string { return "TraceSettingResponse_SettingValueValidationError" } // Error satisfies the builtin error interface func (e TraceSettingResponse_SettingValueValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sTraceSettingResponse_SettingValue.%s: %s%s", key, e.field, e.reason, cause) } var _ error = TraceSettingResponse_SettingValueValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = TraceSettingResponse_SettingValueValidationError{} // Validate checks the field values on LogSettingsRequest_SettingValue with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *LogSettingsRequest_SettingValue) Validate() error { return m.validate(false) } // ValidateAll checks the field values on LogSettingsRequest_SettingValue with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // LogSettingsRequest_SettingValueMultiError, or nil if none found. func (m *LogSettingsRequest_SettingValue) ValidateAll() error { return m.validate(true) } func (m *LogSettingsRequest_SettingValue) validate(all bool) error { if m == nil { return nil } var errors []error switch v := m.ParameterChoice.(type) { case *LogSettingsRequest_SettingValue_BoolParam: if v == nil { err := LogSettingsRequest_SettingValueValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for BoolParam case *LogSettingsRequest_SettingValue_Uint32Param: if v == nil { err := LogSettingsRequest_SettingValueValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for Uint32Param case *LogSettingsRequest_SettingValue_StringParam: if v == nil { err := LogSettingsRequest_SettingValueValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for StringParam default: _ = v // ensures v is used } if len(errors) > 0 { return LogSettingsRequest_SettingValueMultiError(errors) } return nil } // LogSettingsRequest_SettingValueMultiError is an error wrapping multiple // validation errors returned by LogSettingsRequest_SettingValue.ValidateAll() // if the designated constraints aren't met. type LogSettingsRequest_SettingValueMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m LogSettingsRequest_SettingValueMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m LogSettingsRequest_SettingValueMultiError) AllErrors() []error { return m } // LogSettingsRequest_SettingValueValidationError is the validation error // returned by LogSettingsRequest_SettingValue.Validate if the designated // constraints aren't met. type LogSettingsRequest_SettingValueValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e LogSettingsRequest_SettingValueValidationError) Field() string { return e.field } // Reason function returns reason value. func (e LogSettingsRequest_SettingValueValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e LogSettingsRequest_SettingValueValidationError) Cause() error { return e.cause } // Key function returns key value. func (e LogSettingsRequest_SettingValueValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e LogSettingsRequest_SettingValueValidationError) ErrorName() string { return "LogSettingsRequest_SettingValueValidationError" } // Error satisfies the builtin error interface func (e LogSettingsRequest_SettingValueValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sLogSettingsRequest_SettingValue.%s: %s%s", key, e.field, e.reason, cause) } var _ error = LogSettingsRequest_SettingValueValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = LogSettingsRequest_SettingValueValidationError{} // Validate checks the field values on LogSettingsResponse_SettingValue with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *LogSettingsResponse_SettingValue) Validate() error { return m.validate(false) } // ValidateAll checks the field values on LogSettingsResponse_SettingValue with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // LogSettingsResponse_SettingValueMultiError, or nil if none found. func (m *LogSettingsResponse_SettingValue) ValidateAll() error { return m.validate(true) } func (m *LogSettingsResponse_SettingValue) validate(all bool) error { if m == nil { return nil } var errors []error switch v := m.ParameterChoice.(type) { case *LogSettingsResponse_SettingValue_BoolParam: if v == nil { err := LogSettingsResponse_SettingValueValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for BoolParam case *LogSettingsResponse_SettingValue_Uint32Param: if v == nil { err := LogSettingsResponse_SettingValueValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for Uint32Param case *LogSettingsResponse_SettingValue_StringParam: if v == nil { err := LogSettingsResponse_SettingValueValidationError{ field: "ParameterChoice", reason: "oneof value cannot be a typed-nil", } if !all { return err } errors = append(errors, err) } // no validation rules for StringParam default: _ = v // ensures v is used } if len(errors) > 0 { return LogSettingsResponse_SettingValueMultiError(errors) } return nil } // LogSettingsResponse_SettingValueMultiError is an error wrapping multiple // validation errors returned by // LogSettingsResponse_SettingValue.ValidateAll() if the designated // constraints aren't met. type LogSettingsResponse_SettingValueMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m LogSettingsResponse_SettingValueMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m LogSettingsResponse_SettingValueMultiError) AllErrors() []error { return m } // LogSettingsResponse_SettingValueValidationError is the validation error // returned by LogSettingsResponse_SettingValue.Validate if the designated // constraints aren't met. type LogSettingsResponse_SettingValueValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e LogSettingsResponse_SettingValueValidationError) Field() string { return e.field } // Reason function returns reason value. func (e LogSettingsResponse_SettingValueValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e LogSettingsResponse_SettingValueValidationError) Cause() error { return e.cause } // Key function returns key value. func (e LogSettingsResponse_SettingValueValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e LogSettingsResponse_SettingValueValidationError) ErrorName() string { return "LogSettingsResponse_SettingValueValidationError" } // Error satisfies the builtin error interface func (e LogSettingsResponse_SettingValueValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sLogSettingsResponse_SettingValue.%s: %s%s", key, e.field, e.reason, cause) } var _ error = LogSettingsResponse_SettingValueValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = LogSettingsResponse_SettingValueValidationError{}