fonchain-artistinfo/pb/artistinfoStatement/artistinfoStatement.pb.validate.go

1590 lines
45 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: pb/artistinfoStatement.proto
2023-03-16 10:17:12 +00:00
package artistinfoStatement
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 StatementPageInfo 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 *StatementPageInfo) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on StatementPageInfo 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
// StatementPageInfoMultiError, or nil if none found.
func (m *StatementPageInfo) ValidateAll() error {
return m.validate(true)
}
func (m *StatementPageInfo) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for Page
// no validation rules for PageSize
// no validation rules for Total
if len(errors) > 0 {
return StatementPageInfoMultiError(errors)
}
return nil
}
// StatementPageInfoMultiError is an error wrapping multiple validation errors
// returned by StatementPageInfo.ValidateAll() if the designated constraints
// aren't met.
type StatementPageInfoMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m StatementPageInfoMultiError) 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 StatementPageInfoMultiError) AllErrors() []error { return m }
// StatementPageInfoValidationError is the validation error returned by
// StatementPageInfo.Validate if the designated constraints aren't met.
type StatementPageInfoValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e StatementPageInfoValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e StatementPageInfoValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e StatementPageInfoValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e StatementPageInfoValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e StatementPageInfoValidationError) ErrorName() string {
return "StatementPageInfoValidationError"
}
// Error satisfies the builtin error interface
func (e StatementPageInfoValidationError) 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 %sStatementPageInfo.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = StatementPageInfoValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StatementPageInfoValidationError{}
// Validate checks the field values on StatementBatchRequest 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 *StatementBatchRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on StatementBatchRequest 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
// StatementBatchRequestMultiError, or nil if none found.
func (m *StatementBatchRequest) ValidateAll() error {
return m.validate(true)
}
func (m *StatementBatchRequest) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for StType
// no validation rules for ArtistUid
// no validation rules for ArtistRealName
// no validation rules for FlowStatus
// no validation rules for BatchTime
// no validation rules for MinPrice
// no validation rules for GuaranteePrice
// no validation rules for Id
// no validation rules for CreatedAt
// no validation rules for UpdatedAt
// no validation rules for DeletedAt
// no validation rules for FileUrl
if len(errors) > 0 {
return StatementBatchRequestMultiError(errors)
}
return nil
}
// StatementBatchRequestMultiError is an error wrapping multiple validation
// errors returned by StatementBatchRequest.ValidateAll() if the designated
// constraints aren't met.
type StatementBatchRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m StatementBatchRequestMultiError) 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 StatementBatchRequestMultiError) AllErrors() []error { return m }
// StatementBatchRequestValidationError is the validation error returned by
// StatementBatchRequest.Validate if the designated constraints aren't met.
type StatementBatchRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e StatementBatchRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e StatementBatchRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e StatementBatchRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e StatementBatchRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e StatementBatchRequestValidationError) ErrorName() string {
return "StatementBatchRequestValidationError"
}
// Error satisfies the builtin error interface
func (e StatementBatchRequestValidationError) 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 %sStatementBatchRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = StatementBatchRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StatementBatchRequestValidationError{}
// Validate checks the field values on CreateStatementBatchResponse 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 *CreateStatementBatchResponse) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CreateStatementBatchResponse 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
// CreateStatementBatchResponseMultiError, or nil if none found.
func (m *CreateStatementBatchResponse) ValidateAll() error {
return m.validate(true)
}
func (m *CreateStatementBatchResponse) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for Id
if len(errors) > 0 {
return CreateStatementBatchResponseMultiError(errors)
}
return nil
}
// CreateStatementBatchResponseMultiError is an error wrapping multiple
// validation errors returned by CreateStatementBatchResponse.ValidateAll() if
// the designated constraints aren't met.
type CreateStatementBatchResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateStatementBatchResponseMultiError) 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 CreateStatementBatchResponseMultiError) AllErrors() []error { return m }
// CreateStatementBatchResponseValidationError is the validation error returned
// by CreateStatementBatchResponse.Validate if the designated constraints
// aren't met.
type CreateStatementBatchResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CreateStatementBatchResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CreateStatementBatchResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CreateStatementBatchResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CreateStatementBatchResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CreateStatementBatchResponseValidationError) ErrorName() string {
return "CreateStatementBatchResponseValidationError"
}
// Error satisfies the builtin error interface
func (e CreateStatementBatchResponseValidationError) 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 %sCreateStatementBatchResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CreateStatementBatchResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CreateStatementBatchResponseValidationError{}
// Validate checks the field values on BatchCreateStatementBatchRequest 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 *BatchCreateStatementBatchRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on BatchCreateStatementBatchRequest 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
// BatchCreateStatementBatchRequestMultiError, or nil if none found.
func (m *BatchCreateStatementBatchRequest) ValidateAll() error {
return m.validate(true)
}
func (m *BatchCreateStatementBatchRequest) 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, BatchCreateStatementBatchRequestValidationError{
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, BatchCreateStatementBatchRequestValidationError{
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 BatchCreateStatementBatchRequestValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if len(errors) > 0 {
return BatchCreateStatementBatchRequestMultiError(errors)
}
return nil
}
// BatchCreateStatementBatchRequestMultiError is an error wrapping multiple
// validation errors returned by
// BatchCreateStatementBatchRequest.ValidateAll() if the designated
// constraints aren't met.
type BatchCreateStatementBatchRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatchCreateStatementBatchRequestMultiError) 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 BatchCreateStatementBatchRequestMultiError) AllErrors() []error { return m }
// BatchCreateStatementBatchRequestValidationError is the validation error
// returned by BatchCreateStatementBatchRequest.Validate if the designated
// constraints aren't met.
type BatchCreateStatementBatchRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e BatchCreateStatementBatchRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e BatchCreateStatementBatchRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e BatchCreateStatementBatchRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e BatchCreateStatementBatchRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e BatchCreateStatementBatchRequestValidationError) ErrorName() string {
return "BatchCreateStatementBatchRequestValidationError"
}
// Error satisfies the builtin error interface
func (e BatchCreateStatementBatchRequestValidationError) 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 %sBatchCreateStatementBatchRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = BatchCreateStatementBatchRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = BatchCreateStatementBatchRequestValidationError{}
// Validate checks the field values on StatementDetailRequest 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 *StatementDetailRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on StatementDetailRequest 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
// StatementDetailRequestMultiError, or nil if none found.
func (m *StatementDetailRequest) ValidateAll() error {
return m.validate(true)
}
func (m *StatementDetailRequest) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for BatchId
// no validation rules for TfNum
// no validation rules for ArtworkName
// no validation rules for Ruler
// no validation rules for SaleNo
// no validation rules for CompleteDate
// no validation rules for Id
// no validation rules for CreatedAt
// no validation rules for UpdatedAt
// no validation rules for DeletedAt
if len(errors) > 0 {
return StatementDetailRequestMultiError(errors)
}
return nil
}
// StatementDetailRequestMultiError is an error wrapping multiple validation
// errors returned by StatementDetailRequest.ValidateAll() if the designated
// constraints aren't met.
type StatementDetailRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m StatementDetailRequestMultiError) 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 StatementDetailRequestMultiError) AllErrors() []error { return m }
// StatementDetailRequestValidationError is the validation error returned by
// StatementDetailRequest.Validate if the designated constraints aren't met.
type StatementDetailRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e StatementDetailRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e StatementDetailRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e StatementDetailRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e StatementDetailRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e StatementDetailRequestValidationError) ErrorName() string {
return "StatementDetailRequestValidationError"
}
// Error satisfies the builtin error interface
func (e StatementDetailRequestValidationError) 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 %sStatementDetailRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = StatementDetailRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StatementDetailRequestValidationError{}
// Validate checks the field values on CreateStatementDetailResponse 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 *CreateStatementDetailResponse) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on CreateStatementDetailResponse 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
// CreateStatementDetailResponseMultiError, or nil if none found.
func (m *CreateStatementDetailResponse) ValidateAll() error {
return m.validate(true)
}
func (m *CreateStatementDetailResponse) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for Id
if len(errors) > 0 {
return CreateStatementDetailResponseMultiError(errors)
}
return nil
}
// CreateStatementDetailResponseMultiError is an error wrapping multiple
// validation errors returned by CreateStatementDetailResponse.ValidateAll()
// if the designated constraints aren't met.
type CreateStatementDetailResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateStatementDetailResponseMultiError) 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 CreateStatementDetailResponseMultiError) AllErrors() []error { return m }
// CreateStatementDetailResponseValidationError is the validation error
// returned by CreateStatementDetailResponse.Validate if the designated
// constraints aren't met.
type CreateStatementDetailResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CreateStatementDetailResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CreateStatementDetailResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CreateStatementDetailResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CreateStatementDetailResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CreateStatementDetailResponseValidationError) ErrorName() string {
return "CreateStatementDetailResponseValidationError"
}
// Error satisfies the builtin error interface
func (e CreateStatementDetailResponseValidationError) 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 %sCreateStatementDetailResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CreateStatementDetailResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CreateStatementDetailResponseValidationError{}
// Validate checks the field values on BatchCreateStatementDetailRequest 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 *BatchCreateStatementDetailRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on BatchCreateStatementDetailRequest
// 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
// BatchCreateStatementDetailRequestMultiError, or nil if none found.
func (m *BatchCreateStatementDetailRequest) ValidateAll() error {
return m.validate(true)
}
func (m *BatchCreateStatementDetailRequest) 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, BatchCreateStatementDetailRequestValidationError{
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, BatchCreateStatementDetailRequestValidationError{
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 BatchCreateStatementDetailRequestValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if len(errors) > 0 {
return BatchCreateStatementDetailRequestMultiError(errors)
}
return nil
}
// BatchCreateStatementDetailRequestMultiError is an error wrapping multiple
// validation errors returned by
// BatchCreateStatementDetailRequest.ValidateAll() if the designated
// constraints aren't met.
type BatchCreateStatementDetailRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatchCreateStatementDetailRequestMultiError) 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 BatchCreateStatementDetailRequestMultiError) AllErrors() []error { return m }
// BatchCreateStatementDetailRequestValidationError is the validation error
// returned by BatchCreateStatementDetailRequest.Validate if the designated
// constraints aren't met.
type BatchCreateStatementDetailRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e BatchCreateStatementDetailRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e BatchCreateStatementDetailRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e BatchCreateStatementDetailRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e BatchCreateStatementDetailRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e BatchCreateStatementDetailRequestValidationError) ErrorName() string {
return "BatchCreateStatementDetailRequestValidationError"
}
// Error satisfies the builtin error interface
func (e BatchCreateStatementDetailRequestValidationError) 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 %sBatchCreateStatementDetailRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = BatchCreateStatementDetailRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = BatchCreateStatementDetailRequestValidationError{}
// Validate checks the field values on GetStatementBatchListRequest 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 *GetStatementBatchListRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on GetStatementBatchListRequest 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
// GetStatementBatchListRequestMultiError, or nil if none found.
func (m *GetStatementBatchListRequest) ValidateAll() error {
return m.validate(true)
}
func (m *GetStatementBatchListRequest) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if all {
switch v := interface{}(m.GetCondition()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, GetStatementBatchListRequestValidationError{
field: "Condition",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, GetStatementBatchListRequestValidationError{
field: "Condition",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return GetStatementBatchListRequestValidationError{
field: "Condition",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Page
// no validation rules for PageSize
if len(errors) > 0 {
return GetStatementBatchListRequestMultiError(errors)
}
return nil
}
// GetStatementBatchListRequestMultiError is an error wrapping multiple
// validation errors returned by GetStatementBatchListRequest.ValidateAll() if
// the designated constraints aren't met.
type GetStatementBatchListRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GetStatementBatchListRequestMultiError) 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 GetStatementBatchListRequestMultiError) AllErrors() []error { return m }
// GetStatementBatchListRequestValidationError is the validation error returned
// by GetStatementBatchListRequest.Validate if the designated constraints
// aren't met.
type GetStatementBatchListRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e GetStatementBatchListRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e GetStatementBatchListRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e GetStatementBatchListRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e GetStatementBatchListRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e GetStatementBatchListRequestValidationError) ErrorName() string {
return "GetStatementBatchListRequestValidationError"
}
// Error satisfies the builtin error interface
func (e GetStatementBatchListRequestValidationError) 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 %sGetStatementBatchListRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = GetStatementBatchListRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = GetStatementBatchListRequestValidationError{}
// Validate checks the field values on GetStatementBatchListResponse 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 *GetStatementBatchListResponse) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on GetStatementBatchListResponse 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
// GetStatementBatchListResponseMultiError, or nil if none found.
func (m *GetStatementBatchListResponse) ValidateAll() error {
return m.validate(true)
}
func (m *GetStatementBatchListResponse) 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, GetStatementBatchListResponseValidationError{
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, GetStatementBatchListResponseValidationError{
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 GetStatementBatchListResponseValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if all {
switch v := interface{}(m.GetPage()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, GetStatementBatchListResponseValidationError{
field: "Page",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, GetStatementBatchListResponseValidationError{
field: "Page",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return GetStatementBatchListResponseValidationError{
field: "Page",
reason: "embedded message failed validation",
cause: err,
}
}
}
if len(errors) > 0 {
return GetStatementBatchListResponseMultiError(errors)
}
return nil
}
// GetStatementBatchListResponseMultiError is an error wrapping multiple
// validation errors returned by GetStatementBatchListResponse.ValidateAll()
// if the designated constraints aren't met.
type GetStatementBatchListResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GetStatementBatchListResponseMultiError) 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 GetStatementBatchListResponseMultiError) AllErrors() []error { return m }
// GetStatementBatchListResponseValidationError is the validation error
// returned by GetStatementBatchListResponse.Validate if the designated
// constraints aren't met.
type GetStatementBatchListResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e GetStatementBatchListResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e GetStatementBatchListResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e GetStatementBatchListResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e GetStatementBatchListResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e GetStatementBatchListResponseValidationError) ErrorName() string {
return "GetStatementBatchListResponseValidationError"
}
// Error satisfies the builtin error interface
func (e GetStatementBatchListResponseValidationError) 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 %sGetStatementBatchListResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = GetStatementBatchListResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = GetStatementBatchListResponseValidationError{}
// Validate checks the field values on GetStatementDetailListRequest 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 *GetStatementDetailListRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on GetStatementDetailListRequest 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
// GetStatementDetailListRequestMultiError, or nil if none found.
func (m *GetStatementDetailListRequest) ValidateAll() error {
return m.validate(true)
}
func (m *GetStatementDetailListRequest) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if all {
switch v := interface{}(m.GetCondition()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, GetStatementDetailListRequestValidationError{
field: "Condition",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, GetStatementDetailListRequestValidationError{
field: "Condition",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return GetStatementDetailListRequestValidationError{
field: "Condition",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Page
// no validation rules for PageSize
if len(errors) > 0 {
return GetStatementDetailListRequestMultiError(errors)
}
return nil
}
// GetStatementDetailListRequestMultiError is an error wrapping multiple
// validation errors returned by GetStatementDetailListRequest.ValidateAll()
// if the designated constraints aren't met.
type GetStatementDetailListRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GetStatementDetailListRequestMultiError) 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 GetStatementDetailListRequestMultiError) AllErrors() []error { return m }
// GetStatementDetailListRequestValidationError is the validation error
// returned by GetStatementDetailListRequest.Validate if the designated
// constraints aren't met.
type GetStatementDetailListRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e GetStatementDetailListRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e GetStatementDetailListRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e GetStatementDetailListRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e GetStatementDetailListRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e GetStatementDetailListRequestValidationError) ErrorName() string {
return "GetStatementDetailListRequestValidationError"
}
// Error satisfies the builtin error interface
func (e GetStatementDetailListRequestValidationError) 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 %sGetStatementDetailListRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = GetStatementDetailListRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = GetStatementDetailListRequestValidationError{}
// Validate checks the field values on GetStatementDetailListResponse 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 *GetStatementDetailListResponse) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on GetStatementDetailListResponse 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
// GetStatementDetailListResponseMultiError, or nil if none found.
func (m *GetStatementDetailListResponse) ValidateAll() error {
return m.validate(true)
}
func (m *GetStatementDetailListResponse) 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, GetStatementDetailListResponseValidationError{
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, GetStatementDetailListResponseValidationError{
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 GetStatementDetailListResponseValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if all {
switch v := interface{}(m.GetPage()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, GetStatementDetailListResponseValidationError{
field: "Page",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, GetStatementDetailListResponseValidationError{
field: "Page",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return GetStatementDetailListResponseValidationError{
field: "Page",
reason: "embedded message failed validation",
cause: err,
}
}
}
if len(errors) > 0 {
return GetStatementDetailListResponseMultiError(errors)
}
return nil
}
// GetStatementDetailListResponseMultiError is an error wrapping multiple
// validation errors returned by GetStatementDetailListResponse.ValidateAll()
// if the designated constraints aren't met.
type GetStatementDetailListResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GetStatementDetailListResponseMultiError) 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 GetStatementDetailListResponseMultiError) AllErrors() []error { return m }
// GetStatementDetailListResponseValidationError is the validation error
// returned by GetStatementDetailListResponse.Validate if the designated
// constraints aren't met.
type GetStatementDetailListResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e GetStatementDetailListResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e GetStatementDetailListResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e GetStatementDetailListResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e GetStatementDetailListResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e GetStatementDetailListResponseValidationError) ErrorName() string {
return "GetStatementDetailListResponseValidationError"
}
// Error satisfies the builtin error interface
func (e GetStatementDetailListResponseValidationError) 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 %sGetStatementDetailListResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = GetStatementDetailListResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = GetStatementDetailListResponseValidationError{}
2023-03-17 06:36:55 +00:00
// Validate checks the field values on GetStatementBatchTimeMenusResponse 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 *GetStatementBatchTimeMenusResponse) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on GetStatementBatchTimeMenusResponse
// 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
// GetStatementBatchTimeMenusResponseMultiError, or nil if none found.
func (m *GetStatementBatchTimeMenusResponse) ValidateAll() error {
return m.validate(true)
}
func (m *GetStatementBatchTimeMenusResponse) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if len(errors) > 0 {
return GetStatementBatchTimeMenusResponseMultiError(errors)
}
return nil
}
// GetStatementBatchTimeMenusResponseMultiError is an error wrapping multiple
// validation errors returned by
// GetStatementBatchTimeMenusResponse.ValidateAll() if the designated
// constraints aren't met.
type GetStatementBatchTimeMenusResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GetStatementBatchTimeMenusResponseMultiError) 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 GetStatementBatchTimeMenusResponseMultiError) AllErrors() []error { return m }
// GetStatementBatchTimeMenusResponseValidationError is the validation error
// returned by GetStatementBatchTimeMenusResponse.Validate if the designated
// constraints aren't met.
type GetStatementBatchTimeMenusResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e GetStatementBatchTimeMenusResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e GetStatementBatchTimeMenusResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e GetStatementBatchTimeMenusResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e GetStatementBatchTimeMenusResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e GetStatementBatchTimeMenusResponseValidationError) ErrorName() string {
return "GetStatementBatchTimeMenusResponseValidationError"
}
// Error satisfies the builtin error interface
func (e GetStatementBatchTimeMenusResponseValidationError) 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 %sGetStatementBatchTimeMenusResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = GetStatementBatchTimeMenusResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = GetStatementBatchTimeMenusResponseValidationError{}