fonchain-fiee/api/cast/cast.pb.validate.go
2025-06-06 11:45:47 +08:00

679 lines
18 KiB
Go

// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: pb/fiee/cast.proto
package cast
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 MediaUserListReq 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 *MediaUserListReq) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on MediaUserListReq 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
// MediaUserListReqMultiError, or nil if none found.
func (m *MediaUserListReq) ValidateAll() error {
return m.validate(true)
}
func (m *MediaUserListReq) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for Phone
// no validation rules for UserPlatformName
// no validation rules for ManagerName
// no validation rules for PlatformType
if len(errors) > 0 {
return MediaUserListReqMultiError(errors)
}
return nil
}
// MediaUserListReqMultiError is an error wrapping multiple validation errors
// returned by MediaUserListReq.ValidateAll() if the designated constraints
// aren't met.
type MediaUserListReqMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m MediaUserListReqMultiError) 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 MediaUserListReqMultiError) AllErrors() []error { return m }
// MediaUserListReqValidationError is the validation error returned by
// MediaUserListReq.Validate if the designated constraints aren't met.
type MediaUserListReqValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MediaUserListReqValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MediaUserListReqValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MediaUserListReqValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MediaUserListReqValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MediaUserListReqValidationError) ErrorName() string { return "MediaUserListReqValidationError" }
// Error satisfies the builtin error interface
func (e MediaUserListReqValidationError) 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 %sMediaUserListReq.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MediaUserListReqValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MediaUserListReqValidationError{}
// Validate checks the field values on MediaUserListResp 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 *MediaUserListResp) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on MediaUserListResp 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
// MediaUserListRespMultiError, or nil if none found.
func (m *MediaUserListResp) ValidateAll() error {
return m.validate(true)
}
func (m *MediaUserListResp) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if len(errors) > 0 {
return MediaUserListRespMultiError(errors)
}
return nil
}
// MediaUserListRespMultiError is an error wrapping multiple validation errors
// returned by MediaUserListResp.ValidateAll() if the designated constraints
// aren't met.
type MediaUserListRespMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m MediaUserListRespMultiError) 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 MediaUserListRespMultiError) AllErrors() []error { return m }
// MediaUserListRespValidationError is the validation error returned by
// MediaUserListResp.Validate if the designated constraints aren't met.
type MediaUserListRespValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MediaUserListRespValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MediaUserListRespValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MediaUserListRespValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MediaUserListRespValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MediaUserListRespValidationError) ErrorName() string {
return "MediaUserListRespValidationError"
}
// Error satisfies the builtin error interface
func (e MediaUserListRespValidationError) 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 %sMediaUserListResp.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MediaUserListRespValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MediaUserListRespValidationError{}
// Validate checks the field values on UpdateMediaAccountReq 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 *UpdateMediaAccountReq) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on UpdateMediaAccountReq 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
// UpdateMediaAccountReqMultiError, or nil if none found.
func (m *UpdateMediaAccountReq) ValidateAll() error {
return m.validate(true)
}
func (m *UpdateMediaAccountReq) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for PlatformType
// no validation rules for PlatformUserName
// no validation rules for PlatformUserID
// no validation rules for ArtistUuid
// no validation rules for ArtistUserName
// no validation rules for ArtistPhone
// no validation rules for MediaAccountUuid
// no validation rules for ManagerUuid
// no validation rules for ManagerUserName
if len(errors) > 0 {
return UpdateMediaAccountReqMultiError(errors)
}
return nil
}
// UpdateMediaAccountReqMultiError is an error wrapping multiple validation
// errors returned by UpdateMediaAccountReq.ValidateAll() if the designated
// constraints aren't met.
type UpdateMediaAccountReqMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UpdateMediaAccountReqMultiError) 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 UpdateMediaAccountReqMultiError) AllErrors() []error { return m }
// UpdateMediaAccountReqValidationError is the validation error returned by
// UpdateMediaAccountReq.Validate if the designated constraints aren't met.
type UpdateMediaAccountReqValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateMediaAccountReqValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateMediaAccountReqValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateMediaAccountReqValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateMediaAccountReqValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateMediaAccountReqValidationError) ErrorName() string {
return "UpdateMediaAccountReqValidationError"
}
// Error satisfies the builtin error interface
func (e UpdateMediaAccountReqValidationError) 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 %sUpdateMediaAccountReq.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateMediaAccountReqValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateMediaAccountReqValidationError{}
// Validate checks the field values on UpdateMediaAccountResp 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 *UpdateMediaAccountResp) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on UpdateMediaAccountResp 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
// UpdateMediaAccountRespMultiError, or nil if none found.
func (m *UpdateMediaAccountResp) ValidateAll() error {
return m.validate(true)
}
func (m *UpdateMediaAccountResp) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for MediaAccountUuid
if len(errors) > 0 {
return UpdateMediaAccountRespMultiError(errors)
}
return nil
}
// UpdateMediaAccountRespMultiError is an error wrapping multiple validation
// errors returned by UpdateMediaAccountResp.ValidateAll() if the designated
// constraints aren't met.
type UpdateMediaAccountRespMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UpdateMediaAccountRespMultiError) 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 UpdateMediaAccountRespMultiError) AllErrors() []error { return m }
// UpdateMediaAccountRespValidationError is the validation error returned by
// UpdateMediaAccountResp.Validate if the designated constraints aren't met.
type UpdateMediaAccountRespValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateMediaAccountRespValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateMediaAccountRespValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateMediaAccountRespValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateMediaAccountRespValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateMediaAccountRespValidationError) ErrorName() string {
return "UpdateMediaAccountRespValidationError"
}
// Error satisfies the builtin error interface
func (e UpdateMediaAccountRespValidationError) 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 %sUpdateMediaAccountResp.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateMediaAccountRespValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateMediaAccountRespValidationError{}
// Validate checks the field values on UpdateWorkReq 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 *UpdateWorkReq) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on UpdateWorkReq 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 UpdateWorkReqMultiError, or
// nil if none found.
func (m *UpdateWorkReq) ValidateAll() error {
return m.validate(true)
}
func (m *UpdateWorkReq) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for Title
// no validation rules for Content
// no validation rules for Image
if len(errors) > 0 {
return UpdateWorkReqMultiError(errors)
}
return nil
}
// UpdateWorkReqMultiError is an error wrapping multiple validation errors
// returned by UpdateWorkReq.ValidateAll() if the designated constraints
// aren't met.
type UpdateWorkReqMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UpdateWorkReqMultiError) 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 UpdateWorkReqMultiError) AllErrors() []error { return m }
// UpdateWorkReqValidationError is the validation error returned by
// UpdateWorkReq.Validate if the designated constraints aren't met.
type UpdateWorkReqValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateWorkReqValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateWorkReqValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateWorkReqValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateWorkReqValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateWorkReqValidationError) ErrorName() string { return "UpdateWorkReqValidationError" }
// Error satisfies the builtin error interface
func (e UpdateWorkReqValidationError) 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 %sUpdateWorkReq.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateWorkReqValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateWorkReqValidationError{}
// Validate checks the field values on UpdateWorkResp 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 *UpdateWorkResp) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on UpdateWorkResp 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 UpdateWorkRespMultiError,
// or nil if none found.
func (m *UpdateWorkResp) ValidateAll() error {
return m.validate(true)
}
func (m *UpdateWorkResp) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for WorkUuid
if len(errors) > 0 {
return UpdateWorkRespMultiError(errors)
}
return nil
}
// UpdateWorkRespMultiError is an error wrapping multiple validation errors
// returned by UpdateWorkResp.ValidateAll() if the designated constraints
// aren't met.
type UpdateWorkRespMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UpdateWorkRespMultiError) 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 UpdateWorkRespMultiError) AllErrors() []error { return m }
// UpdateWorkRespValidationError is the validation error returned by
// UpdateWorkResp.Validate if the designated constraints aren't met.
type UpdateWorkRespValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateWorkRespValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateWorkRespValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateWorkRespValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateWorkRespValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateWorkRespValidationError) ErrorName() string { return "UpdateWorkRespValidationError" }
// Error satisfies the builtin error interface
func (e UpdateWorkRespValidationError) 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 %sUpdateWorkResp.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateWorkRespValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateWorkRespValidationError{}