// Code generated by protoc-gen-validate. DO NOT EDIT. // source: pb/artshow.proto package artShow 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 SaveShowReq 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 *SaveShowReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SaveShowReq 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 SaveShowReqMultiError, or // nil if none found. func (m *SaveShowReq) ValidateAll() error { return m.validate(true) } func (m *SaveShowReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ShowName // no validation rules for ArtistName // no validation rules for ArtistUID // no validation rules for ArtworkNum // no validation rules for Ruler // no validation rules for Price // no validation rules for Reward // no validation rules for IsShow // no validation rules for ShowTime // no validation rules for ShowUID for idx, item := range m.GetShowArtwork() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SaveShowReqValidationError{ field: fmt.Sprintf("ShowArtwork[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SaveShowReqValidationError{ field: fmt.Sprintf("ShowArtwork[%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 SaveShowReqValidationError{ field: fmt.Sprintf("ShowArtwork[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDelShowArtwork() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SaveShowReqValidationError{ field: fmt.Sprintf("DelShowArtwork[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SaveShowReqValidationError{ field: fmt.Sprintf("DelShowArtwork[%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 SaveShowReqValidationError{ field: fmt.Sprintf("DelShowArtwork[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return SaveShowReqMultiError(errors) } return nil } // SaveShowReqMultiError is an error wrapping multiple validation errors // returned by SaveShowReq.ValidateAll() if the designated constraints aren't met. type SaveShowReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SaveShowReqMultiError) 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 SaveShowReqMultiError) AllErrors() []error { return m } // SaveShowReqValidationError is the validation error returned by // SaveShowReq.Validate if the designated constraints aren't met. type SaveShowReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SaveShowReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SaveShowReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SaveShowReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SaveShowReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SaveShowReqValidationError) ErrorName() string { return "SaveShowReqValidationError" } // Error satisfies the builtin error interface func (e SaveShowReqValidationError) 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 %sSaveShowReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SaveShowReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SaveShowReqValidationError{} // Validate checks the field values on SaveShowRes 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 *SaveShowRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SaveShowRes 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 SaveShowResMultiError, or // nil if none found. func (m *SaveShowRes) ValidateAll() error { return m.validate(true) } func (m *SaveShowRes) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Msg // no validation rules for ShowUID if len(errors) > 0 { return SaveShowResMultiError(errors) } return nil } // SaveShowResMultiError is an error wrapping multiple validation errors // returned by SaveShowRes.ValidateAll() if the designated constraints aren't met. type SaveShowResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SaveShowResMultiError) 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 SaveShowResMultiError) AllErrors() []error { return m } // SaveShowResValidationError is the validation error returned by // SaveShowRes.Validate if the designated constraints aren't met. type SaveShowResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SaveShowResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SaveShowResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SaveShowResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SaveShowResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SaveShowResValidationError) ErrorName() string { return "SaveShowResValidationError" } // Error satisfies the builtin error interface func (e SaveShowResValidationError) 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 %sSaveShowRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SaveShowResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SaveShowResValidationError{} // Validate checks the field values on CommonRes 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 *CommonRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on CommonRes 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 CommonResMultiError, or nil // if none found. func (m *CommonRes) ValidateAll() error { return m.validate(true) } func (m *CommonRes) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Msg if len(errors) > 0 { return CommonResMultiError(errors) } return nil } // CommonResMultiError is an error wrapping multiple validation errors returned // by CommonRes.ValidateAll() if the designated constraints aren't met. type CommonResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m CommonResMultiError) 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 CommonResMultiError) AllErrors() []error { return m } // CommonResValidationError is the validation error returned by // CommonRes.Validate if the designated constraints aren't met. type CommonResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e CommonResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e CommonResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e CommonResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e CommonResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e CommonResValidationError) ErrorName() string { return "CommonResValidationError" } // Error satisfies the builtin error interface func (e CommonResValidationError) 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 %sCommonRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = CommonResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = CommonResValidationError{} // Validate checks the field values on ShowDetailReq 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 *ShowDetailReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowDetailReq 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 ShowDetailReqMultiError, or // nil if none found. func (m *ShowDetailReq) ValidateAll() error { return m.validate(true) } func (m *ShowDetailReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ShowUID if len(errors) > 0 { return ShowDetailReqMultiError(errors) } return nil } // ShowDetailReqMultiError is an error wrapping multiple validation errors // returned by ShowDetailReq.ValidateAll() if the designated constraints // aren't met. type ShowDetailReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowDetailReqMultiError) 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 ShowDetailReqMultiError) AllErrors() []error { return m } // ShowDetailReqValidationError is the validation error returned by // ShowDetailReq.Validate if the designated constraints aren't met. type ShowDetailReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowDetailReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowDetailReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowDetailReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowDetailReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowDetailReqValidationError) ErrorName() string { return "ShowDetailReqValidationError" } // Error satisfies the builtin error interface func (e ShowDetailReqValidationError) 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 %sShowDetailReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowDetailReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowDetailReqValidationError{} // Validate checks the field values on ShowDetail 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 *ShowDetail) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowDetail 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 ShowDetailMultiError, or // nil if none found. func (m *ShowDetail) ValidateAll() error { return m.validate(true) } func (m *ShowDetail) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ShowUID // no validation rules for ShowSeq // no validation rules for ShowName // no validation rules for ArtistName // no validation rules for ArtistUID // no validation rules for ArtworkNum // no validation rules for Ruler // no validation rules for Price // no validation rules for Reward // no validation rules for ShowTime // no validation rules for IsShow if len(errors) > 0 { return ShowDetailMultiError(errors) } return nil } // ShowDetailMultiError is an error wrapping multiple validation errors // returned by ShowDetail.ValidateAll() if the designated constraints aren't met. type ShowDetailMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowDetailMultiError) 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 ShowDetailMultiError) AllErrors() []error { return m } // ShowDetailValidationError is the validation error returned by // ShowDetail.Validate if the designated constraints aren't met. type ShowDetailValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowDetailValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowDetailValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowDetailValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowDetailValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowDetailValidationError) ErrorName() string { return "ShowDetailValidationError" } // Error satisfies the builtin error interface func (e ShowDetailValidationError) 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 %sShowDetail.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowDetailValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowDetailValidationError{} // Validate checks the field values on ShowDetailRes 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 *ShowDetailRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowDetailRes 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 ShowDetailResMultiError, or // nil if none found. func (m *ShowDetailRes) ValidateAll() error { return m.validate(true) } func (m *ShowDetailRes) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetData()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ShowDetailResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ShowDetailResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ShowDetailResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } // no validation rules for Msg if len(errors) > 0 { return ShowDetailResMultiError(errors) } return nil } // ShowDetailResMultiError is an error wrapping multiple validation errors // returned by ShowDetailRes.ValidateAll() if the designated constraints // aren't met. type ShowDetailResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowDetailResMultiError) 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 ShowDetailResMultiError) AllErrors() []error { return m } // ShowDetailResValidationError is the validation error returned by // ShowDetailRes.Validate if the designated constraints aren't met. type ShowDetailResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowDetailResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowDetailResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowDetailResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowDetailResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowDetailResValidationError) ErrorName() string { return "ShowDetailResValidationError" } // Error satisfies the builtin error interface func (e ShowDetailResValidationError) 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 %sShowDetailRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowDetailResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowDetailResValidationError{} // Validate checks the field values on ShowArtworkDetailRes 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 *ShowArtworkDetailRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowArtworkDetailRes 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 // ShowArtworkDetailResMultiError, or nil if none found. func (m *ShowArtworkDetailRes) ValidateAll() error { return m.validate(true) } func (m *ShowArtworkDetailRes) 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, ShowArtworkDetailResValidationError{ 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, ShowArtworkDetailResValidationError{ 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 ShowArtworkDetailResValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Msg if len(errors) > 0 { return ShowArtworkDetailResMultiError(errors) } return nil } // ShowArtworkDetailResMultiError is an error wrapping multiple validation // errors returned by ShowArtworkDetailRes.ValidateAll() if the designated // constraints aren't met. type ShowArtworkDetailResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowArtworkDetailResMultiError) 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 ShowArtworkDetailResMultiError) AllErrors() []error { return m } // ShowArtworkDetailResValidationError is the validation error returned by // ShowArtworkDetailRes.Validate if the designated constraints aren't met. type ShowArtworkDetailResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowArtworkDetailResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowArtworkDetailResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowArtworkDetailResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowArtworkDetailResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowArtworkDetailResValidationError) ErrorName() string { return "ShowArtworkDetailResValidationError" } // Error satisfies the builtin error interface func (e ShowArtworkDetailResValidationError) 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 %sShowArtworkDetailRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowArtworkDetailResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowArtworkDetailResValidationError{} // Validate checks the field values on ShowListReq 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 *ShowListReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowListReq 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 ShowListReqMultiError, or // nil if none found. func (m *ShowListReq) ValidateAll() error { return m.validate(true) } func (m *ShowListReq) 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 StartTime // no validation rules for EndTime // no validation rules for ArtistUID // no validation rules for IsShow if len(errors) > 0 { return ShowListReqMultiError(errors) } return nil } // ShowListReqMultiError is an error wrapping multiple validation errors // returned by ShowListReq.ValidateAll() if the designated constraints aren't met. type ShowListReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowListReqMultiError) 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 ShowListReqMultiError) AllErrors() []error { return m } // ShowListReqValidationError is the validation error returned by // ShowListReq.Validate if the designated constraints aren't met. type ShowListReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowListReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowListReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowListReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowListReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowListReqValidationError) ErrorName() string { return "ShowListReqValidationError" } // Error satisfies the builtin error interface func (e ShowListReqValidationError) 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 %sShowListReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowListReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowListReqValidationError{} // Validate checks the field values on ShowListRes 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 *ShowListRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowListRes 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 ShowListResMultiError, or // nil if none found. func (m *ShowListRes) ValidateAll() error { return m.validate(true) } func (m *ShowListRes) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Total // no validation rules for TotalPackageNum // no validation rules for TotalArtistNum 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, ShowListResValidationError{ 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, ShowListResValidationError{ 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 ShowListResValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Msg if len(errors) > 0 { return ShowListResMultiError(errors) } return nil } // ShowListResMultiError is an error wrapping multiple validation errors // returned by ShowListRes.ValidateAll() if the designated constraints aren't met. type ShowListResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowListResMultiError) 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 ShowListResMultiError) AllErrors() []error { return m } // ShowListResValidationError is the validation error returned by // ShowListRes.Validate if the designated constraints aren't met. type ShowListResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowListResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowListResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowListResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowListResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowListResValidationError) ErrorName() string { return "ShowListResValidationError" } // Error satisfies the builtin error interface func (e ShowListResValidationError) 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 %sShowListRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowListResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowListResValidationError{} // Validate checks the field values on DelShowReq 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 *DelShowReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on DelShowReq 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 DelShowReqMultiError, or // nil if none found. func (m *DelShowReq) ValidateAll() error { return m.validate(true) } func (m *DelShowReq) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return DelShowReqMultiError(errors) } return nil } // DelShowReqMultiError is an error wrapping multiple validation errors // returned by DelShowReq.ValidateAll() if the designated constraints aren't met. type DelShowReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m DelShowReqMultiError) 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 DelShowReqMultiError) AllErrors() []error { return m } // DelShowReqValidationError is the validation error returned by // DelShowReq.Validate if the designated constraints aren't met. type DelShowReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e DelShowReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e DelShowReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e DelShowReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e DelShowReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e DelShowReqValidationError) ErrorName() string { return "DelShowReqValidationError" } // Error satisfies the builtin error interface func (e DelShowReqValidationError) 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 %sDelShowReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = DelShowReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = DelShowReqValidationError{} // Validate checks the field values on ShowArtworkDetail 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 *ShowArtworkDetail) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowArtworkDetail 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 // ShowArtworkDetailMultiError, or nil if none found. func (m *ShowArtworkDetail) ValidateAll() error { return m.validate(true) } func (m *ShowArtworkDetail) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ArtworkPriceUID // no validation rules for ShowUID // no validation rules for ArtworkUID // no validation rules for ArtworkName // no validation rules for ArtistName // no validation rules for Length // no validation rules for Width // no validation rules for Ruler // no validation rules for SmallPic if len(errors) > 0 { return ShowArtworkDetailMultiError(errors) } return nil } // ShowArtworkDetailMultiError is an error wrapping multiple validation errors // returned by ShowArtworkDetail.ValidateAll() if the designated constraints // aren't met. type ShowArtworkDetailMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowArtworkDetailMultiError) 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 ShowArtworkDetailMultiError) AllErrors() []error { return m } // ShowArtworkDetailValidationError is the validation error returned by // ShowArtworkDetail.Validate if the designated constraints aren't met. type ShowArtworkDetailValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowArtworkDetailValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowArtworkDetailValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowArtworkDetailValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowArtworkDetailValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowArtworkDetailValidationError) ErrorName() string { return "ShowArtworkDetailValidationError" } // Error satisfies the builtin error interface func (e ShowArtworkDetailValidationError) 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 %sShowArtworkDetail.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowArtworkDetailValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowArtworkDetailValidationError{} // Validate checks the field values on DelArtworkDetail 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 *DelArtworkDetail) Validate() error { return m.validate(false) } // ValidateAll checks the field values on DelArtworkDetail 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 // DelArtworkDetailMultiError, or nil if none found. func (m *DelArtworkDetail) ValidateAll() error { return m.validate(true) } func (m *DelArtworkDetail) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ArtworkPriceUID // no validation rules for ArtworkUID if len(errors) > 0 { return DelArtworkDetailMultiError(errors) } return nil } // DelArtworkDetailMultiError is an error wrapping multiple validation errors // returned by DelArtworkDetail.ValidateAll() if the designated constraints // aren't met. type DelArtworkDetailMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m DelArtworkDetailMultiError) 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 DelArtworkDetailMultiError) AllErrors() []error { return m } // DelArtworkDetailValidationError is the validation error returned by // DelArtworkDetail.Validate if the designated constraints aren't met. type DelArtworkDetailValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e DelArtworkDetailValidationError) Field() string { return e.field } // Reason function returns reason value. func (e DelArtworkDetailValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e DelArtworkDetailValidationError) Cause() error { return e.cause } // Key function returns key value. func (e DelArtworkDetailValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e DelArtworkDetailValidationError) ErrorName() string { return "DelArtworkDetailValidationError" } // Error satisfies the builtin error interface func (e DelArtworkDetailValidationError) 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 %sDelArtworkDetail.%s: %s%s", key, e.field, e.reason, cause) } var _ error = DelArtworkDetailValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = DelArtworkDetailValidationError{} // Validate checks the field values on ShowStatisticalInfoReq 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 *ShowStatisticalInfoReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowStatisticalInfoReq 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 // ShowStatisticalInfoReqMultiError, or nil if none found. func (m *ShowStatisticalInfoReq) ValidateAll() error { return m.validate(true) } func (m *ShowStatisticalInfoReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for IsShow if len(errors) > 0 { return ShowStatisticalInfoReqMultiError(errors) } return nil } // ShowStatisticalInfoReqMultiError is an error wrapping multiple validation // errors returned by ShowStatisticalInfoReq.ValidateAll() if the designated // constraints aren't met. type ShowStatisticalInfoReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowStatisticalInfoReqMultiError) 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 ShowStatisticalInfoReqMultiError) AllErrors() []error { return m } // ShowStatisticalInfoReqValidationError is the validation error returned by // ShowStatisticalInfoReq.Validate if the designated constraints aren't met. type ShowStatisticalInfoReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowStatisticalInfoReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowStatisticalInfoReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowStatisticalInfoReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowStatisticalInfoReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowStatisticalInfoReqValidationError) ErrorName() string { return "ShowStatisticalInfoReqValidationError" } // Error satisfies the builtin error interface func (e ShowStatisticalInfoReqValidationError) 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 %sShowStatisticalInfoReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowStatisticalInfoReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowStatisticalInfoReqValidationError{} // Validate checks the field values on ShowStatisticalInfoRes 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 *ShowStatisticalInfoRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowStatisticalInfoRes 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 // ShowStatisticalInfoResMultiError, or nil if none found. func (m *ShowStatisticalInfoRes) ValidateAll() error { return m.validate(true) } func (m *ShowStatisticalInfoRes) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetData()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ShowStatisticalInfoResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ShowStatisticalInfoResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ShowStatisticalInfoResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } // no validation rules for Msg if len(errors) > 0 { return ShowStatisticalInfoResMultiError(errors) } return nil } // ShowStatisticalInfoResMultiError is an error wrapping multiple validation // errors returned by ShowStatisticalInfoRes.ValidateAll() if the designated // constraints aren't met. type ShowStatisticalInfoResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowStatisticalInfoResMultiError) 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 ShowStatisticalInfoResMultiError) AllErrors() []error { return m } // ShowStatisticalInfoResValidationError is the validation error returned by // ShowStatisticalInfoRes.Validate if the designated constraints aren't met. type ShowStatisticalInfoResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowStatisticalInfoResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowStatisticalInfoResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowStatisticalInfoResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowStatisticalInfoResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowStatisticalInfoResValidationError) ErrorName() string { return "ShowStatisticalInfoResValidationError" } // Error satisfies the builtin error interface func (e ShowStatisticalInfoResValidationError) 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 %sShowStatisticalInfoRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowStatisticalInfoResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowStatisticalInfoResValidationError{} // Validate checks the field values on ArtworkPriceReq 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 *ArtworkPriceReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ArtworkPriceReq 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 // ArtworkPriceReqMultiError, or nil if none found. func (m *ArtworkPriceReq) ValidateAll() error { return m.validate(true) } func (m *ArtworkPriceReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ArtworkUID if len(errors) > 0 { return ArtworkPriceReqMultiError(errors) } return nil } // ArtworkPriceReqMultiError is an error wrapping multiple validation errors // returned by ArtworkPriceReq.ValidateAll() if the designated constraints // aren't met. type ArtworkPriceReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ArtworkPriceReqMultiError) 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 ArtworkPriceReqMultiError) AllErrors() []error { return m } // ArtworkPriceReqValidationError is the validation error returned by // ArtworkPriceReq.Validate if the designated constraints aren't met. type ArtworkPriceReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ArtworkPriceReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ArtworkPriceReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ArtworkPriceReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ArtworkPriceReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ArtworkPriceReqValidationError) ErrorName() string { return "ArtworkPriceReqValidationError" } // Error satisfies the builtin error interface func (e ArtworkPriceReqValidationError) 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 %sArtworkPriceReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ArtworkPriceReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ArtworkPriceReqValidationError{} // Validate checks the field values on ArtworkPriceRes 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 *ArtworkPriceRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ArtworkPriceRes 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 // ArtworkPriceResMultiError, or nil if none found. func (m *ArtworkPriceRes) ValidateAll() error { return m.validate(true) } func (m *ArtworkPriceRes) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetData()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ArtworkPriceResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ArtworkPriceResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ArtworkPriceResValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } // no validation rules for Msg if len(errors) > 0 { return ArtworkPriceResMultiError(errors) } return nil } // ArtworkPriceResMultiError is an error wrapping multiple validation errors // returned by ArtworkPriceRes.ValidateAll() if the designated constraints // aren't met. type ArtworkPriceResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ArtworkPriceResMultiError) 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 ArtworkPriceResMultiError) AllErrors() []error { return m } // ArtworkPriceResValidationError is the validation error returned by // ArtworkPriceRes.Validate if the designated constraints aren't met. type ArtworkPriceResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ArtworkPriceResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ArtworkPriceResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ArtworkPriceResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ArtworkPriceResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ArtworkPriceResValidationError) ErrorName() string { return "ArtworkPriceResValidationError" } // Error satisfies the builtin error interface func (e ArtworkPriceResValidationError) 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 %sArtworkPriceRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ArtworkPriceResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ArtworkPriceResValidationError{} // Validate checks the field values on ShowRel 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 *ShowRel) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowRel 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 ShowRelMultiError, or nil if none found. func (m *ShowRel) ValidateAll() error { return m.validate(true) } func (m *ShowRel) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ShowRelUID // no validation rules for ApplyUID // no validation rules for ShowUID // no validation rules for Index // no validation rules for Address if len(errors) > 0 { return ShowRelMultiError(errors) } return nil } // ShowRelMultiError is an error wrapping multiple validation errors returned // by ShowRel.ValidateAll() if the designated constraints aren't met. type ShowRelMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowRelMultiError) 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 ShowRelMultiError) AllErrors() []error { return m } // ShowRelValidationError is the validation error returned by ShowRel.Validate // if the designated constraints aren't met. type ShowRelValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowRelValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowRelValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowRelValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowRelValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowRelValidationError) ErrorName() string { return "ShowRelValidationError" } // Error satisfies the builtin error interface func (e ShowRelValidationError) 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 %sShowRel.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowRelValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowRelValidationError{} // Validate checks the field values on DelShowRel 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 *DelShowRel) Validate() error { return m.validate(false) } // ValidateAll checks the field values on DelShowRel 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 DelShowRelMultiError, or // nil if none found. func (m *DelShowRel) ValidateAll() error { return m.validate(true) } func (m *DelShowRel) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ShowRelUID // no validation rules for ShowUID if len(errors) > 0 { return DelShowRelMultiError(errors) } return nil } // DelShowRelMultiError is an error wrapping multiple validation errors // returned by DelShowRel.ValidateAll() if the designated constraints aren't met. type DelShowRelMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m DelShowRelMultiError) 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 DelShowRelMultiError) AllErrors() []error { return m } // DelShowRelValidationError is the validation error returned by // DelShowRel.Validate if the designated constraints aren't met. type DelShowRelValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e DelShowRelValidationError) Field() string { return e.field } // Reason function returns reason value. func (e DelShowRelValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e DelShowRelValidationError) Cause() error { return e.cause } // Key function returns key value. func (e DelShowRelValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e DelShowRelValidationError) ErrorName() string { return "DelShowRelValidationError" } // Error satisfies the builtin error interface func (e DelShowRelValidationError) 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 %sDelShowRel.%s: %s%s", key, e.field, e.reason, cause) } var _ error = DelShowRelValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = DelShowRelValidationError{} // Validate checks the field values on SaveApplyReq 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 *SaveApplyReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SaveApplyReq 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 SaveApplyReqMultiError, or // nil if none found. func (m *SaveApplyReq) ValidateAll() error { return m.validate(true) } func (m *SaveApplyReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Applicant // no validation rules for ApplicantID // no validation rules for Num // no validation rules for ApplyTime // no validation rules for ApplyUID // no validation rules for Status // no validation rules for Remark for idx, item := range m.GetRel() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SaveApplyReqValidationError{ field: fmt.Sprintf("Rel[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SaveApplyReqValidationError{ field: fmt.Sprintf("Rel[%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 SaveApplyReqValidationError{ field: fmt.Sprintf("Rel[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDelRel() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SaveApplyReqValidationError{ field: fmt.Sprintf("DelRel[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SaveApplyReqValidationError{ field: fmt.Sprintf("DelRel[%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 SaveApplyReqValidationError{ field: fmt.Sprintf("DelRel[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return SaveApplyReqMultiError(errors) } return nil } // SaveApplyReqMultiError is an error wrapping multiple validation errors // returned by SaveApplyReq.ValidateAll() if the designated constraints aren't met. type SaveApplyReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SaveApplyReqMultiError) 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 SaveApplyReqMultiError) AllErrors() []error { return m } // SaveApplyReqValidationError is the validation error returned by // SaveApplyReq.Validate if the designated constraints aren't met. type SaveApplyReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SaveApplyReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SaveApplyReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SaveApplyReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SaveApplyReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SaveApplyReqValidationError) ErrorName() string { return "SaveApplyReqValidationError" } // Error satisfies the builtin error interface func (e SaveApplyReqValidationError) 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 %sSaveApplyReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SaveApplyReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SaveApplyReqValidationError{} // Validate checks the field values on SaveApplyRes 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 *SaveApplyRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SaveApplyRes 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 SaveApplyResMultiError, or // nil if none found. func (m *SaveApplyRes) ValidateAll() error { return m.validate(true) } func (m *SaveApplyRes) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Msg // no validation rules for ApplyUID if len(errors) > 0 { return SaveApplyResMultiError(errors) } return nil } // SaveApplyResMultiError is an error wrapping multiple validation errors // returned by SaveApplyRes.ValidateAll() if the designated constraints aren't met. type SaveApplyResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SaveApplyResMultiError) 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 SaveApplyResMultiError) AllErrors() []error { return m } // SaveApplyResValidationError is the validation error returned by // SaveApplyRes.Validate if the designated constraints aren't met. type SaveApplyResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SaveApplyResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SaveApplyResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SaveApplyResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SaveApplyResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SaveApplyResValidationError) ErrorName() string { return "SaveApplyResValidationError" } // Error satisfies the builtin error interface func (e SaveApplyResValidationError) 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 %sSaveApplyRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SaveApplyResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SaveApplyResValidationError{} // Validate checks the field values on ApplyListReq 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 *ApplyListReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ApplyListReq 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 ApplyListReqMultiError, or // nil if none found. func (m *ApplyListReq) ValidateAll() error { return m.validate(true) } func (m *ApplyListReq) 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 Status if len(errors) > 0 { return ApplyListReqMultiError(errors) } return nil } // ApplyListReqMultiError is an error wrapping multiple validation errors // returned by ApplyListReq.ValidateAll() if the designated constraints aren't met. type ApplyListReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ApplyListReqMultiError) 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 ApplyListReqMultiError) AllErrors() []error { return m } // ApplyListReqValidationError is the validation error returned by // ApplyListReq.Validate if the designated constraints aren't met. type ApplyListReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ApplyListReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ApplyListReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ApplyListReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ApplyListReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ApplyListReqValidationError) ErrorName() string { return "ApplyListReqValidationError" } // Error satisfies the builtin error interface func (e ApplyListReqValidationError) 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 %sApplyListReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ApplyListReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ApplyListReqValidationError{} // Validate checks the field values on ApplyListRes 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 *ApplyListRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ApplyListRes 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 ApplyListResMultiError, or // nil if none found. func (m *ApplyListRes) ValidateAll() error { return m.validate(true) } func (m *ApplyListRes) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Total 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, ApplyListResValidationError{ 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, ApplyListResValidationError{ 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 ApplyListResValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Msg if len(errors) > 0 { return ApplyListResMultiError(errors) } return nil } // ApplyListResMultiError is an error wrapping multiple validation errors // returned by ApplyListRes.ValidateAll() if the designated constraints aren't met. type ApplyListResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ApplyListResMultiError) 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 ApplyListResMultiError) AllErrors() []error { return m } // ApplyListResValidationError is the validation error returned by // ApplyListRes.Validate if the designated constraints aren't met. type ApplyListResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ApplyListResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ApplyListResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ApplyListResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ApplyListResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ApplyListResValidationError) ErrorName() string { return "ApplyListResValidationError" } // Error satisfies the builtin error interface func (e ApplyListResValidationError) 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 %sApplyListRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ApplyListResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ApplyListResValidationError{} // Validate checks the field values on ApplyShowReq 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 *ApplyShowReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ApplyShowReq 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 ApplyShowReqMultiError, or // nil if none found. func (m *ApplyShowReq) ValidateAll() error { return m.validate(true) } func (m *ApplyShowReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ApplyUID if len(errors) > 0 { return ApplyShowReqMultiError(errors) } return nil } // ApplyShowReqMultiError is an error wrapping multiple validation errors // returned by ApplyShowReq.ValidateAll() if the designated constraints aren't met. type ApplyShowReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ApplyShowReqMultiError) 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 ApplyShowReqMultiError) AllErrors() []error { return m } // ApplyShowReqValidationError is the validation error returned by // ApplyShowReq.Validate if the designated constraints aren't met. type ApplyShowReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ApplyShowReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ApplyShowReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ApplyShowReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ApplyShowReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ApplyShowReqValidationError) ErrorName() string { return "ApplyShowReqValidationError" } // Error satisfies the builtin error interface func (e ApplyShowReqValidationError) 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 %sApplyShowReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ApplyShowReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ApplyShowReqValidationError{} // Validate checks the field values on ApplyShowRes 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 *ApplyShowRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ApplyShowRes 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 ApplyShowResMultiError, or // nil if none found. func (m *ApplyShowRes) ValidateAll() error { return m.validate(true) } func (m *ApplyShowRes) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetApply()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ApplyShowResValidationError{ field: "Apply", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ApplyShowResValidationError{ field: "Apply", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetApply()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApplyShowResValidationError{ field: "Apply", reason: "embedded message failed validation", cause: err, } } } for idx, item := range m.GetShow() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ApplyShowResValidationError{ field: fmt.Sprintf("Show[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ApplyShowResValidationError{ field: fmt.Sprintf("Show[%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 ApplyShowResValidationError{ field: fmt.Sprintf("Show[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Msg if len(errors) > 0 { return ApplyShowResMultiError(errors) } return nil } // ApplyShowResMultiError is an error wrapping multiple validation errors // returned by ApplyShowRes.ValidateAll() if the designated constraints aren't met. type ApplyShowResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ApplyShowResMultiError) 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 ApplyShowResMultiError) AllErrors() []error { return m } // ApplyShowResValidationError is the validation error returned by // ApplyShowRes.Validate if the designated constraints aren't met. type ApplyShowResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ApplyShowResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ApplyShowResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ApplyShowResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ApplyShowResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ApplyShowResValidationError) ErrorName() string { return "ApplyShowResValidationError" } // Error satisfies the builtin error interface func (e ApplyShowResValidationError) 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 %sApplyShowRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ApplyShowResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ApplyShowResValidationError{} // Validate checks the field values on ApplyDetail 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 *ApplyDetail) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ApplyDetail 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 ApplyDetailMultiError, or // nil if none found. func (m *ApplyDetail) ValidateAll() error { return m.validate(true) } func (m *ApplyDetail) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ApplyUID // no validation rules for ApplySeq // no validation rules for Applicant // no validation rules for ApplicantID // no validation rules for Num // no validation rules for ApplyTime // no validation rules for Status // no validation rules for Remark if len(errors) > 0 { return ApplyDetailMultiError(errors) } return nil } // ApplyDetailMultiError is an error wrapping multiple validation errors // returned by ApplyDetail.ValidateAll() if the designated constraints aren't met. type ApplyDetailMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ApplyDetailMultiError) 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 ApplyDetailMultiError) AllErrors() []error { return m } // ApplyDetailValidationError is the validation error returned by // ApplyDetail.Validate if the designated constraints aren't met. type ApplyDetailValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ApplyDetailValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ApplyDetailValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ApplyDetailValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ApplyDetailValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ApplyDetailValidationError) ErrorName() string { return "ApplyDetailValidationError" } // Error satisfies the builtin error interface func (e ApplyDetailValidationError) 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 %sApplyDetail.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ApplyDetailValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ApplyDetailValidationError{} // Validate checks the field values on ShowRelListReq 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 *ShowRelListReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowRelListReq 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 ShowRelListReqMultiError, // or nil if none found. func (m *ShowRelListReq) ValidateAll() error { return m.validate(true) } func (m *ShowRelListReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ApplyUID if len(errors) > 0 { return ShowRelListReqMultiError(errors) } return nil } // ShowRelListReqMultiError is an error wrapping multiple validation errors // returned by ShowRelListReq.ValidateAll() if the designated constraints // aren't met. type ShowRelListReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowRelListReqMultiError) 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 ShowRelListReqMultiError) AllErrors() []error { return m } // ShowRelListReqValidationError is the validation error returned by // ShowRelListReq.Validate if the designated constraints aren't met. type ShowRelListReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowRelListReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowRelListReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowRelListReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowRelListReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowRelListReqValidationError) ErrorName() string { return "ShowRelListReqValidationError" } // Error satisfies the builtin error interface func (e ShowRelListReqValidationError) 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 %sShowRelListReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowRelListReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowRelListReqValidationError{} // Validate checks the field values on ShowRelListRes 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 *ShowRelListRes) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowRelListRes 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 ShowRelListResMultiError, // or nil if none found. func (m *ShowRelListRes) ValidateAll() error { return m.validate(true) } func (m *ShowRelListRes) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Msg 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, ShowRelListResValidationError{ 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, ShowRelListResValidationError{ 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 ShowRelListResValidationError{ field: fmt.Sprintf("Data[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ShowRelListResMultiError(errors) } return nil } // ShowRelListResMultiError is an error wrapping multiple validation errors // returned by ShowRelListRes.ValidateAll() if the designated constraints // aren't met. type ShowRelListResMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowRelListResMultiError) 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 ShowRelListResMultiError) AllErrors() []error { return m } // ShowRelListResValidationError is the validation error returned by // ShowRelListRes.Validate if the designated constraints aren't met. type ShowRelListResValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowRelListResValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowRelListResValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowRelListResValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowRelListResValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowRelListResValidationError) ErrorName() string { return "ShowRelListResValidationError" } // Error satisfies the builtin error interface func (e ShowRelListResValidationError) 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 %sShowRelListRes.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowRelListResValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowRelListResValidationError{} // Validate checks the field values on UpdateApplyStatusReq 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 *UpdateApplyStatusReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on UpdateApplyStatusReq 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 // UpdateApplyStatusReqMultiError, or nil if none found. func (m *UpdateApplyStatusReq) ValidateAll() error { return m.validate(true) } func (m *UpdateApplyStatusReq) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Status // no validation rules for Remark // no validation rules for ApplyUID if len(errors) > 0 { return UpdateApplyStatusReqMultiError(errors) } return nil } // UpdateApplyStatusReqMultiError is an error wrapping multiple validation // errors returned by UpdateApplyStatusReq.ValidateAll() if the designated // constraints aren't met. type UpdateApplyStatusReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m UpdateApplyStatusReqMultiError) 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 UpdateApplyStatusReqMultiError) AllErrors() []error { return m } // UpdateApplyStatusReqValidationError is the validation error returned by // UpdateApplyStatusReq.Validate if the designated constraints aren't met. type UpdateApplyStatusReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e UpdateApplyStatusReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e UpdateApplyStatusReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e UpdateApplyStatusReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e UpdateApplyStatusReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e UpdateApplyStatusReqValidationError) ErrorName() string { return "UpdateApplyStatusReqValidationError" } // Error satisfies the builtin error interface func (e UpdateApplyStatusReqValidationError) 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 %sUpdateApplyStatusReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = UpdateApplyStatusReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = UpdateApplyStatusReqValidationError{} // Validate checks the field values on DelApplyReq 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 *DelApplyReq) Validate() error { return m.validate(false) } // ValidateAll checks the field values on DelApplyReq 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 DelApplyReqMultiError, or // nil if none found. func (m *DelApplyReq) ValidateAll() error { return m.validate(true) } func (m *DelApplyReq) validate(all bool) error { if m == nil { return nil } var errors []error if len(errors) > 0 { return DelApplyReqMultiError(errors) } return nil } // DelApplyReqMultiError is an error wrapping multiple validation errors // returned by DelApplyReq.ValidateAll() if the designated constraints aren't met. type DelApplyReqMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m DelApplyReqMultiError) 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 DelApplyReqMultiError) AllErrors() []error { return m } // DelApplyReqValidationError is the validation error returned by // DelApplyReq.Validate if the designated constraints aren't met. type DelApplyReqValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e DelApplyReqValidationError) Field() string { return e.field } // Reason function returns reason value. func (e DelApplyReqValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e DelApplyReqValidationError) Cause() error { return e.cause } // Key function returns key value. func (e DelApplyReqValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e DelApplyReqValidationError) ErrorName() string { return "DelApplyReqValidationError" } // Error satisfies the builtin error interface func (e DelApplyReqValidationError) 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 %sDelApplyReq.%s: %s%s", key, e.field, e.reason, cause) } var _ error = DelApplyReqValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = DelApplyReqValidationError{} // Validate checks the field values on ShowStatisticalInfoRes_Num 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 *ShowStatisticalInfoRes_Num) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ShowStatisticalInfoRes_Num 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 // ShowStatisticalInfoRes_NumMultiError, or nil if none found. func (m *ShowStatisticalInfoRes_Num) ValidateAll() error { return m.validate(true) } func (m *ShowStatisticalInfoRes_Num) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for ArtistNum // no validation rules for PackageNum // no validation rules for TotalNum // no validation rules for NotShowNum // no validation rules for ShowHisNum if len(errors) > 0 { return ShowStatisticalInfoRes_NumMultiError(errors) } return nil } // ShowStatisticalInfoRes_NumMultiError is an error wrapping multiple // validation errors returned by ShowStatisticalInfoRes_Num.ValidateAll() if // the designated constraints aren't met. type ShowStatisticalInfoRes_NumMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ShowStatisticalInfoRes_NumMultiError) 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 ShowStatisticalInfoRes_NumMultiError) AllErrors() []error { return m } // ShowStatisticalInfoRes_NumValidationError is the validation error returned // by ShowStatisticalInfoRes_Num.Validate if the designated constraints aren't met. type ShowStatisticalInfoRes_NumValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ShowStatisticalInfoRes_NumValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ShowStatisticalInfoRes_NumValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ShowStatisticalInfoRes_NumValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ShowStatisticalInfoRes_NumValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ShowStatisticalInfoRes_NumValidationError) ErrorName() string { return "ShowStatisticalInfoRes_NumValidationError" } // Error satisfies the builtin error interface func (e ShowStatisticalInfoRes_NumValidationError) 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 %sShowStatisticalInfoRes_Num.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ShowStatisticalInfoRes_NumValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ShowStatisticalInfoRes_NumValidationError{} // Validate checks the field values on ArtworkPriceRes_PriceInfo 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 *ArtworkPriceRes_PriceInfo) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ArtworkPriceRes_PriceInfo 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 // ArtworkPriceRes_PriceInfoMultiError, or nil if none found. func (m *ArtworkPriceRes_PriceInfo) ValidateAll() error { return m.validate(true) } func (m *ArtworkPriceRes_PriceInfo) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Price // no validation rules for RulerPrice // no validation rules for ArtworkPrice // no validation rules for MarketPrice // no validation rules for CopyrightPrice if len(errors) > 0 { return ArtworkPriceRes_PriceInfoMultiError(errors) } return nil } // ArtworkPriceRes_PriceInfoMultiError is an error wrapping multiple validation // errors returned by ArtworkPriceRes_PriceInfo.ValidateAll() if the // designated constraints aren't met. type ArtworkPriceRes_PriceInfoMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ArtworkPriceRes_PriceInfoMultiError) 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 ArtworkPriceRes_PriceInfoMultiError) AllErrors() []error { return m } // ArtworkPriceRes_PriceInfoValidationError is the validation error returned by // ArtworkPriceRes_PriceInfo.Validate if the designated constraints aren't met. type ArtworkPriceRes_PriceInfoValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ArtworkPriceRes_PriceInfoValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ArtworkPriceRes_PriceInfoValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ArtworkPriceRes_PriceInfoValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ArtworkPriceRes_PriceInfoValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ArtworkPriceRes_PriceInfoValidationError) ErrorName() string { return "ArtworkPriceRes_PriceInfoValidationError" } // Error satisfies the builtin error interface func (e ArtworkPriceRes_PriceInfoValidationError) 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 %sArtworkPriceRes_PriceInfo.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ArtworkPriceRes_PriceInfoValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ArtworkPriceRes_PriceInfoValidationError{}