fonchain-artistinfo/pb/artistInfoArtwork/artistinfoArtwork.pb.validate.go
2023-02-25 00:30:57 +08:00

802 lines
22 KiB
Go

// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: pb/artistinfoArtwork.proto
package artistInfoArtwork
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 CommonNoParams 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 *CommonNoParams) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CommonNoParams 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 CommonNoParamsMultiError,
// or nil if none found.
func (m *CommonNoParams) ValidateAll() error {
return m.validate(true)
}
func (m *CommonNoParams) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if len(errors) > 0 {
return CommonNoParamsMultiError(errors)
}
return nil
}
// CommonNoParamsMultiError is an error wrapping multiple validation errors
// returned by CommonNoParams.ValidateAll() if the designated constraints
// aren't met.
type CommonNoParamsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CommonNoParamsMultiError) 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 CommonNoParamsMultiError) AllErrors() []error { return m }
// CommonNoParamsValidationError is the validation error returned by
// CommonNoParams.Validate if the designated constraints aren't met.
type CommonNoParamsValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CommonNoParamsValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CommonNoParamsValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CommonNoParamsValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CommonNoParamsValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CommonNoParamsValidationError) ErrorName() string { return "CommonNoParamsValidationError" }
// Error satisfies the builtin error interface
func (e CommonNoParamsValidationError) 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 %sCommonNoParams.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CommonNoParamsValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CommonNoParamsValidationError{}
// Validate checks the field values on CreateArtworkLockRecordReq 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 *CreateArtworkLockRecordReq) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CreateArtworkLockRecordReq 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
// CreateArtworkLockRecordReqMultiError, or nil if none found.
func (m *CreateArtworkLockRecordReq) ValidateAll() error {
return m.validate(true)
}
func (m *CreateArtworkLockRecordReq) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for ArtistUid
// no validation rules for ArtworkUid
// no validation rules for Status
// no validation rules for LockTime
if len(errors) > 0 {
return CreateArtworkLockRecordReqMultiError(errors)
}
return nil
}
// CreateArtworkLockRecordReqMultiError is an error wrapping multiple
// validation errors returned by CreateArtworkLockRecordReq.ValidateAll() if
// the designated constraints aren't met.
type CreateArtworkLockRecordReqMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateArtworkLockRecordReqMultiError) 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 CreateArtworkLockRecordReqMultiError) AllErrors() []error { return m }
// CreateArtworkLockRecordReqValidationError is the validation error returned
// by CreateArtworkLockRecordReq.Validate if the designated constraints aren't met.
type CreateArtworkLockRecordReqValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CreateArtworkLockRecordReqValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CreateArtworkLockRecordReqValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CreateArtworkLockRecordReqValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CreateArtworkLockRecordReqValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CreateArtworkLockRecordReqValidationError) ErrorName() string {
return "CreateArtworkLockRecordReqValidationError"
}
// Error satisfies the builtin error interface
func (e CreateArtworkLockRecordReqValidationError) 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 %sCreateArtworkLockRecordReq.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CreateArtworkLockRecordReqValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CreateArtworkLockRecordReqValidationError{}
// Validate checks the field values on ArtworkLockActionRequest 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 *ArtworkLockActionRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on ArtworkLockActionRequest 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
// ArtworkLockActionRequestMultiError, or nil if none found.
func (m *ArtworkLockActionRequest) ValidateAll() error {
return m.validate(true)
}
func (m *ArtworkLockActionRequest) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for ArtistUid
// no validation rules for Lock
if len(errors) > 0 {
return ArtworkLockActionRequestMultiError(errors)
}
return nil
}
// ArtworkLockActionRequestMultiError is an error wrapping multiple validation
// errors returned by ArtworkLockActionRequest.ValidateAll() if the designated
// constraints aren't met.
type ArtworkLockActionRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ArtworkLockActionRequestMultiError) 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 ArtworkLockActionRequestMultiError) AllErrors() []error { return m }
// ArtworkLockActionRequestValidationError is the validation error returned by
// ArtworkLockActionRequest.Validate if the designated constraints aren't met.
type ArtworkLockActionRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ArtworkLockActionRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ArtworkLockActionRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ArtworkLockActionRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ArtworkLockActionRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ArtworkLockActionRequestValidationError) ErrorName() string {
return "ArtworkLockActionRequestValidationError"
}
// Error satisfies the builtin error interface
func (e ArtworkLockActionRequestValidationError) 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 %sArtworkLockActionRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ArtworkLockActionRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ArtworkLockActionRequestValidationError{}
// Validate checks the field values on GetArtworkLockRecordsRequest 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 *GetArtworkLockRecordsRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on GetArtworkLockRecordsRequest 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
// GetArtworkLockRecordsRequestMultiError, or nil if none found.
func (m *GetArtworkLockRecordsRequest) ValidateAll() error {
return m.validate(true)
}
func (m *GetArtworkLockRecordsRequest) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for ArtistUid
// no validation rules for QueryType
if len(errors) > 0 {
return GetArtworkLockRecordsRequestMultiError(errors)
}
return nil
}
// GetArtworkLockRecordsRequestMultiError is an error wrapping multiple
// validation errors returned by GetArtworkLockRecordsRequest.ValidateAll() if
// the designated constraints aren't met.
type GetArtworkLockRecordsRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GetArtworkLockRecordsRequestMultiError) 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 GetArtworkLockRecordsRequestMultiError) AllErrors() []error { return m }
// GetArtworkLockRecordsRequestValidationError is the validation error returned
// by GetArtworkLockRecordsRequest.Validate if the designated constraints
// aren't met.
type GetArtworkLockRecordsRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e GetArtworkLockRecordsRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e GetArtworkLockRecordsRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e GetArtworkLockRecordsRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e GetArtworkLockRecordsRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e GetArtworkLockRecordsRequestValidationError) ErrorName() string {
return "GetArtworkLockRecordsRequestValidationError"
}
// Error satisfies the builtin error interface
func (e GetArtworkLockRecordsRequestValidationError) 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 %sGetArtworkLockRecordsRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = GetArtworkLockRecordsRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = GetArtworkLockRecordsRequestValidationError{}
// Validate checks the field values on ArtistLockInfo 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 *ArtistLockInfo) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on ArtistLockInfo 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 ArtistLockInfoMultiError,
// or nil if none found.
func (m *ArtistLockInfo) ValidateAll() error {
return m.validate(true)
}
func (m *ArtistLockInfo) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for ArtistUid
// no validation rules for ArtworkUid
// no validation rules for Status
// no validation rules for LockTime
if len(errors) > 0 {
return ArtistLockInfoMultiError(errors)
}
return nil
}
// ArtistLockInfoMultiError is an error wrapping multiple validation errors
// returned by ArtistLockInfo.ValidateAll() if the designated constraints
// aren't met.
type ArtistLockInfoMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ArtistLockInfoMultiError) 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 ArtistLockInfoMultiError) AllErrors() []error { return m }
// ArtistLockInfoValidationError is the validation error returned by
// ArtistLockInfo.Validate if the designated constraints aren't met.
type ArtistLockInfoValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ArtistLockInfoValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ArtistLockInfoValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ArtistLockInfoValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ArtistLockInfoValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ArtistLockInfoValidationError) ErrorName() string { return "ArtistLockInfoValidationError" }
// Error satisfies the builtin error interface
func (e ArtistLockInfoValidationError) 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 %sArtistLockInfo.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ArtistLockInfoValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ArtistLockInfoValidationError{}
// Validate checks the field values on ArtworkLockList 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 *ArtworkLockList) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on ArtworkLockList 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
// ArtworkLockListMultiError, or nil if none found.
func (m *ArtworkLockList) ValidateAll() error {
return m.validate(true)
}
func (m *ArtworkLockList) 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, ArtworkLockListValidationError{
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, ArtworkLockListValidationError{
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 ArtworkLockListValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if len(errors) > 0 {
return ArtworkLockListMultiError(errors)
}
return nil
}
// ArtworkLockListMultiError is an error wrapping multiple validation errors
// returned by ArtworkLockList.ValidateAll() if the designated constraints
// aren't met.
type ArtworkLockListMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ArtworkLockListMultiError) 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 ArtworkLockListMultiError) AllErrors() []error { return m }
// ArtworkLockListValidationError is the validation error returned by
// ArtworkLockList.Validate if the designated constraints aren't met.
type ArtworkLockListValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ArtworkLockListValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ArtworkLockListValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ArtworkLockListValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ArtworkLockListValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ArtworkLockListValidationError) ErrorName() string { return "ArtworkLockListValidationError" }
// Error satisfies the builtin error interface
func (e ArtworkLockListValidationError) 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 %sArtworkLockList.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ArtworkLockListValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ArtworkLockListValidationError{}
// Validate checks the field values on ArtworkUidList 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 *ArtworkUidList) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on ArtworkUidList 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 ArtworkUidListMultiError,
// or nil if none found.
func (m *ArtworkUidList) ValidateAll() error {
return m.validate(true)
}
func (m *ArtworkUidList) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if len(errors) > 0 {
return ArtworkUidListMultiError(errors)
}
return nil
}
// ArtworkUidListMultiError is an error wrapping multiple validation errors
// returned by ArtworkUidList.ValidateAll() if the designated constraints
// aren't met.
type ArtworkUidListMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ArtworkUidListMultiError) 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 ArtworkUidListMultiError) AllErrors() []error { return m }
// ArtworkUidListValidationError is the validation error returned by
// ArtworkUidList.Validate if the designated constraints aren't met.
type ArtworkUidListValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ArtworkUidListValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ArtworkUidListValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ArtworkUidListValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ArtworkUidListValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ArtworkUidListValidationError) ErrorName() string { return "ArtworkUidListValidationError" }
// Error satisfies the builtin error interface
func (e ArtworkUidListValidationError) 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 %sArtworkUidList.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ArtworkUidListValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ArtworkUidListValidationError{}