// Code generated by protoc-gen-validate. DO NOT EDIT. // source: pb/artistinfoArtshow.proto package artistinfoArtshow 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 VideoPagination 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 *VideoPagination) Validate() error { return m.validate(false) } // ValidateAll checks the field values on VideoPagination 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 // VideoPaginationMultiError, or nil if none found. func (m *VideoPagination) ValidateAll() error { return m.validate(true) } func (m *VideoPagination) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Page // no validation rules for PageSize // no validation rules for Total if len(errors) > 0 { return VideoPaginationMultiError(errors) } return nil } // VideoPaginationMultiError is an error wrapping multiple validation errors // returned by VideoPagination.ValidateAll() if the designated constraints // aren't met. type VideoPaginationMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m VideoPaginationMultiError) 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 VideoPaginationMultiError) AllErrors() []error { return m } // VideoPaginationValidationError is the validation error returned by // VideoPagination.Validate if the designated constraints aren't met. type VideoPaginationValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e VideoPaginationValidationError) Field() string { return e.field } // Reason function returns reason value. func (e VideoPaginationValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e VideoPaginationValidationError) Cause() error { return e.cause } // Key function returns key value. func (e VideoPaginationValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e VideoPaginationValidationError) ErrorName() string { return "VideoPaginationValidationError" } // Error satisfies the builtin error interface func (e VideoPaginationValidationError) 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 %sVideoPagination.%s: %s%s", key, e.field, e.reason, cause) } var _ error = VideoPaginationValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = VideoPaginationValidationError{} // Validate checks the field values on GetArtshowVideoListRequst 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 *GetArtshowVideoListRequst) Validate() error { return m.validate(false) } // ValidateAll checks the field values on GetArtshowVideoListRequst 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 // GetArtshowVideoListRequstMultiError, or nil if none found. func (m *GetArtshowVideoListRequst) ValidateAll() error { return m.validate(true) } func (m *GetArtshowVideoListRequst) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Page // no validation rules for PageSize // no validation rules for ArtistName // no validation rules for ArtistUid // no validation rules for LockTime // no validation rules for AuditStatus // no validation rules for Status if len(errors) > 0 { return GetArtshowVideoListRequstMultiError(errors) } return nil } // GetArtshowVideoListRequstMultiError is an error wrapping multiple validation // errors returned by GetArtshowVideoListRequst.ValidateAll() if the // designated constraints aren't met. type GetArtshowVideoListRequstMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GetArtshowVideoListRequstMultiError) 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 GetArtshowVideoListRequstMultiError) AllErrors() []error { return m } // GetArtshowVideoListRequstValidationError is the validation error returned by // GetArtshowVideoListRequst.Validate if the designated constraints aren't met. type GetArtshowVideoListRequstValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e GetArtshowVideoListRequstValidationError) Field() string { return e.field } // Reason function returns reason value. func (e GetArtshowVideoListRequstValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e GetArtshowVideoListRequstValidationError) Cause() error { return e.cause } // Key function returns key value. func (e GetArtshowVideoListRequstValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e GetArtshowVideoListRequstValidationError) ErrorName() string { return "GetArtshowVideoListRequstValidationError" } // Error satisfies the builtin error interface func (e GetArtshowVideoListRequstValidationError) 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 %sGetArtshowVideoListRequst.%s: %s%s", key, e.field, e.reason, cause) } var _ error = GetArtshowVideoListRequstValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = GetArtshowVideoListRequstValidationError{} // Validate checks the field values on ArtshowVideoInfo 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 *ArtshowVideoInfo) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ArtshowVideoInfo 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 // ArtshowVideoInfoMultiError, or nil if none found. func (m *ArtshowVideoInfo) ValidateAll() error { return m.validate(true) } func (m *ArtshowVideoInfo) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Id // no validation rules for ArtistUid // no validation rules for LockTime // no validation rules for VideoUrl // no validation rules for AuditStatus // no validation rules for AuditMark1 // no validation rules for AuditMark2 // no validation rules for CreatedAt // no validation rules for UpdatedAt // no validation rules for DeletedAt // no validation rules for ArtistName // no validation rules for Status if len(errors) > 0 { return ArtshowVideoInfoMultiError(errors) } return nil } // ArtshowVideoInfoMultiError is an error wrapping multiple validation errors // returned by ArtshowVideoInfo.ValidateAll() if the designated constraints // aren't met. type ArtshowVideoInfoMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ArtshowVideoInfoMultiError) 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 ArtshowVideoInfoMultiError) AllErrors() []error { return m } // ArtshowVideoInfoValidationError is the validation error returned by // ArtshowVideoInfo.Validate if the designated constraints aren't met. type ArtshowVideoInfoValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ArtshowVideoInfoValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ArtshowVideoInfoValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ArtshowVideoInfoValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ArtshowVideoInfoValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ArtshowVideoInfoValidationError) ErrorName() string { return "ArtshowVideoInfoValidationError" } // Error satisfies the builtin error interface func (e ArtshowVideoInfoValidationError) 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 %sArtshowVideoInfo.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ArtshowVideoInfoValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ArtshowVideoInfoValidationError{} // Validate checks the field values on GetArtshowVideoListResponse 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 *GetArtshowVideoListResponse) Validate() error { return m.validate(false) } // ValidateAll checks the field values on GetArtshowVideoListResponse 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 // GetArtshowVideoListResponseMultiError, or nil if none found. func (m *GetArtshowVideoListResponse) ValidateAll() error { return m.validate(true) } func (m *GetArtshowVideoListResponse) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetData() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, GetArtshowVideoListResponseValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, GetArtshowVideoListResponseValidationError{ field: fmt.Sprintf("Data[%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 GetArtshowVideoListResponseValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if all { switch v := interface{}(m.GetPage()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, GetArtshowVideoListResponseValidationError{ field: "Page", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, GetArtshowVideoListResponseValidationError{ field: "Page", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GetArtshowVideoListResponseValidationError{ field: "Page", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return GetArtshowVideoListResponseMultiError(errors) } return nil } // GetArtshowVideoListResponseMultiError is an error wrapping multiple // validation errors returned by GetArtshowVideoListResponse.ValidateAll() if // the designated constraints aren't met. type GetArtshowVideoListResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GetArtshowVideoListResponseMultiError) 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 GetArtshowVideoListResponseMultiError) AllErrors() []error { return m } // GetArtshowVideoListResponseValidationError is the validation error returned // by GetArtshowVideoListResponse.Validate if the designated constraints // aren't met. type GetArtshowVideoListResponseValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e GetArtshowVideoListResponseValidationError) Field() string { return e.field } // Reason function returns reason value. func (e GetArtshowVideoListResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e GetArtshowVideoListResponseValidationError) Cause() error { return e.cause } // Key function returns key value. func (e GetArtshowVideoListResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e GetArtshowVideoListResponseValidationError) ErrorName() string { return "GetArtshowVideoListResponseValidationError" } // Error satisfies the builtin error interface func (e GetArtshowVideoListResponseValidationError) 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 %sGetArtshowVideoListResponse.%s: %s%s", key, e.field, e.reason, cause) } var _ error = GetArtshowVideoListResponseValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = GetArtshowVideoListResponseValidationError{} // Validate checks the field values on AuditArtshowVideoRequest 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 *AuditArtshowVideoRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on AuditArtshowVideoRequest 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 // AuditArtshowVideoRequestMultiError, or nil if none found. func (m *AuditArtshowVideoRequest) ValidateAll() error { return m.validate(true) } func (m *AuditArtshowVideoRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for AuditStatus // no validation rules for AuditMark1 // no validation rules for AuditMark2 if len(errors) > 0 { return AuditArtshowVideoRequestMultiError(errors) } return nil } // AuditArtshowVideoRequestMultiError is an error wrapping multiple validation // errors returned by AuditArtshowVideoRequest.ValidateAll() if the designated // constraints aren't met. type AuditArtshowVideoRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m AuditArtshowVideoRequestMultiError) 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 AuditArtshowVideoRequestMultiError) AllErrors() []error { return m } // AuditArtshowVideoRequestValidationError is the validation error returned by // AuditArtshowVideoRequest.Validate if the designated constraints aren't met. type AuditArtshowVideoRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e AuditArtshowVideoRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e AuditArtshowVideoRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e AuditArtshowVideoRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e AuditArtshowVideoRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e AuditArtshowVideoRequestValidationError) ErrorName() string { return "AuditArtshowVideoRequestValidationError" } // Error satisfies the builtin error interface func (e AuditArtshowVideoRequestValidationError) 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 %sAuditArtshowVideoRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = AuditArtshowVideoRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = AuditArtshowVideoRequestValidationError{} // Validate checks the field values on UpdateArtshowVideoRequest 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 *UpdateArtshowVideoRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on UpdateArtshowVideoRequest 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 // UpdateArtshowVideoRequestMultiError, or nil if none found. func (m *UpdateArtshowVideoRequest) ValidateAll() error { return m.validate(true) } func (m *UpdateArtshowVideoRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Id // no validation rules for ArtistUid // no validation rules for LockTime // no validation rules for VideoUrl // no validation rules for AuditStatus // no validation rules for AuditMark1 // no validation rules for AuditMark2 // no validation rules for ArtistName // no validation rules for Status if len(errors) > 0 { return UpdateArtshowVideoRequestMultiError(errors) } return nil } // UpdateArtshowVideoRequestMultiError is an error wrapping multiple validation // errors returned by UpdateArtshowVideoRequest.ValidateAll() if the // designated constraints aren't met. type UpdateArtshowVideoRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m UpdateArtshowVideoRequestMultiError) 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 UpdateArtshowVideoRequestMultiError) AllErrors() []error { return m } // UpdateArtshowVideoRequestValidationError is the validation error returned by // UpdateArtshowVideoRequest.Validate if the designated constraints aren't met. type UpdateArtshowVideoRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e UpdateArtshowVideoRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e UpdateArtshowVideoRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e UpdateArtshowVideoRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e UpdateArtshowVideoRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e UpdateArtshowVideoRequestValidationError) ErrorName() string { return "UpdateArtshowVideoRequestValidationError" } // Error satisfies the builtin error interface func (e UpdateArtshowVideoRequestValidationError) 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 %sUpdateArtshowVideoRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = UpdateArtshowVideoRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = UpdateArtshowVideoRequestValidationError{} // Validate checks the field values on DeletedArtshowVideoRequest 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 *DeletedArtshowVideoRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on DeletedArtshowVideoRequest 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 // DeletedArtshowVideoRequestMultiError, or nil if none found. func (m *DeletedArtshowVideoRequest) ValidateAll() error { return m.validate(true) } func (m *DeletedArtshowVideoRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Id if len(errors) > 0 { return DeletedArtshowVideoRequestMultiError(errors) } return nil } // DeletedArtshowVideoRequestMultiError is an error wrapping multiple // validation errors returned by DeletedArtshowVideoRequest.ValidateAll() if // the designated constraints aren't met. type DeletedArtshowVideoRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m DeletedArtshowVideoRequestMultiError) 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 DeletedArtshowVideoRequestMultiError) AllErrors() []error { return m } // DeletedArtshowVideoRequestValidationError is the validation error returned // by DeletedArtshowVideoRequest.Validate if the designated constraints aren't met. type DeletedArtshowVideoRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e DeletedArtshowVideoRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e DeletedArtshowVideoRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e DeletedArtshowVideoRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e DeletedArtshowVideoRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e DeletedArtshowVideoRequestValidationError) ErrorName() string { return "DeletedArtshowVideoRequestValidationError" } // Error satisfies the builtin error interface func (e DeletedArtshowVideoRequestValidationError) 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 %sDeletedArtshowVideoRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = DeletedArtshowVideoRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = DeletedArtshowVideoRequestValidationError{} // Validate checks the field values on BatchCreateArtshowVideoRequest 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 *BatchCreateArtshowVideoRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on BatchCreateArtshowVideoRequest 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 // BatchCreateArtshowVideoRequestMultiError, or nil if none found. func (m *BatchCreateArtshowVideoRequest) ValidateAll() error { return m.validate(true) } func (m *BatchCreateArtshowVideoRequest) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetData() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, BatchCreateArtshowVideoRequestValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, BatchCreateArtshowVideoRequestValidationError{ field: fmt.Sprintf("Data[%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 BatchCreateArtshowVideoRequestValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return BatchCreateArtshowVideoRequestMultiError(errors) } return nil } // BatchCreateArtshowVideoRequestMultiError is an error wrapping multiple // validation errors returned by BatchCreateArtshowVideoRequest.ValidateAll() // if the designated constraints aren't met. type BatchCreateArtshowVideoRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m BatchCreateArtshowVideoRequestMultiError) 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 BatchCreateArtshowVideoRequestMultiError) AllErrors() []error { return m } // BatchCreateArtshowVideoRequestValidationError is the validation error // returned by BatchCreateArtshowVideoRequest.Validate if the designated // constraints aren't met. type BatchCreateArtshowVideoRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e BatchCreateArtshowVideoRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e BatchCreateArtshowVideoRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e BatchCreateArtshowVideoRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e BatchCreateArtshowVideoRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e BatchCreateArtshowVideoRequestValidationError) ErrorName() string { return "BatchCreateArtshowVideoRequestValidationError" } // Error satisfies the builtin error interface func (e BatchCreateArtshowVideoRequestValidationError) 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 %sBatchCreateArtshowVideoRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = BatchCreateArtshowVideoRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = BatchCreateArtshowVideoRequestValidationError{} // Validate checks the field values on CheckeExistsRequest 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 *CheckeExistsRequest) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CheckeExistsRequest 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 // CheckeExistsRequestMultiError, or nil if none found. func (m *CheckeExistsRequest) ValidateAll() error { return m.validate(true) } func (m *CheckeExistsRequest) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ArtistUid // no validation rules for LockTime if len(errors) > 0 { return CheckeExistsRequestMultiError(errors) } return nil } // CheckeExistsRequestMultiError is an error wrapping multiple validation // errors returned by CheckeExistsRequest.ValidateAll() if the designated // constraints aren't met. type CheckeExistsRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CheckeExistsRequestMultiError) 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 CheckeExistsRequestMultiError) AllErrors() []error { return m } // CheckeExistsRequestValidationError is the validation error returned by // CheckeExistsRequest.Validate if the designated constraints aren't met. type CheckeExistsRequestValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CheckeExistsRequestValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CheckeExistsRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CheckeExistsRequestValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CheckeExistsRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CheckeExistsRequestValidationError) ErrorName() string { return "CheckeExistsRequestValidationError" } // Error satisfies the builtin error interface func (e CheckeExistsRequestValidationError) 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 %sCheckeExistsRequest.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CheckeExistsRequestValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CheckeExistsRequestValidationError{}