4198 lines
106 KiB
Go
4198 lines
106 KiB
Go
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
|
// source: api/eonline/v1/pagsmile.proto
|
|
|
|
package v1
|
|
|
|
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 PayInitReq 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 *PayInitReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayInitReq 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 PayInitReqMultiError, or
|
|
// nil if none found.
|
|
func (m *PayInitReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayInitReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := PayInitReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := PayInitReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := PayInitReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Ip
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := PayInitReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := PayInitReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PayInitReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayInitReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PayInitReq.ValidateAll() if the designated constraints aren't met.
|
|
type PayInitReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayInitReqMultiError) 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 PayInitReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PayInitReqValidationError is the validation error returned by
|
|
// PayInitReq.Validate if the designated constraints aren't met.
|
|
type PayInitReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayInitReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayInitReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayInitReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayInitReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayInitReqValidationError) ErrorName() string { return "PayInitReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayInitReqValidationError) 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 %sPayInitReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayInitReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayInitReqValidationError{}
|
|
|
|
// Validate checks the field values on PayInitReply 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 *PayInitReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayInitReply 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 PayInitReplyMultiError, or
|
|
// nil if none found.
|
|
func (m *PayInitReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayInitReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Uuid
|
|
|
|
// no validation rules for Days
|
|
|
|
for idx, item := range m.GetItems() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PayInitReplyValidationError{
|
|
field: fmt.Sprintf("Items[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PayInitReplyValidationError{
|
|
field: fmt.Sprintf("Items[%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 PayInitReplyValidationError{
|
|
field: fmt.Sprintf("Items[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// no validation rules for CanCheckSubmit
|
|
|
|
// no validation rules for CheckSubmit
|
|
|
|
// no validation rules for CheckResult
|
|
|
|
// no validation rules for CheckPayout
|
|
|
|
// no validation rules for CheckCoin
|
|
|
|
// no validation rules for CanCheckPayOut
|
|
|
|
// no validation rules for CheckResultFailedDesc
|
|
|
|
// no validation rules for Error
|
|
|
|
// no validation rules for ClientData
|
|
|
|
if len(errors) > 0 {
|
|
return PayInitReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayInitReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by PayInitReply.ValidateAll() if the designated constraints aren't met.
|
|
type PayInitReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayInitReplyMultiError) 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 PayInitReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// PayInitReplyValidationError is the validation error returned by
|
|
// PayInitReply.Validate if the designated constraints aren't met.
|
|
type PayInitReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayInitReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayInitReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayInitReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayInitReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayInitReplyValidationError) ErrorName() string { return "PayInitReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayInitReplyValidationError) 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 %sPayInitReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayInitReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayInitReplyValidationError{}
|
|
|
|
// Validate checks the field values on PbReportDataAdjust 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 *PbReportDataAdjust) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbReportDataAdjust 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
|
|
// PbReportDataAdjustMultiError, or nil if none found.
|
|
func (m *PbReportDataAdjust) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbReportDataAdjust) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for GpsAdid
|
|
|
|
// no validation rules for AndroidId
|
|
|
|
// no validation rules for Adid
|
|
|
|
// no validation rules for UserAgent
|
|
|
|
// no validation rules for Price
|
|
|
|
// no validation rules for Currency
|
|
|
|
if len(errors) > 0 {
|
|
return PbReportDataAdjustMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbReportDataAdjustMultiError is an error wrapping multiple validation errors
|
|
// returned by PbReportDataAdjust.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PbReportDataAdjustMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbReportDataAdjustMultiError) 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 PbReportDataAdjustMultiError) AllErrors() []error { return m }
|
|
|
|
// PbReportDataAdjustValidationError is the validation error returned by
|
|
// PbReportDataAdjust.Validate if the designated constraints aren't met.
|
|
type PbReportDataAdjustValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbReportDataAdjustValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbReportDataAdjustValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbReportDataAdjustValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbReportDataAdjustValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbReportDataAdjustValidationError) ErrorName() string {
|
|
return "PbReportDataAdjustValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbReportDataAdjustValidationError) 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 %sPbReportDataAdjust.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbReportDataAdjustValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbReportDataAdjustValidationError{}
|
|
|
|
// Validate checks the field values on PbReportDataShuShu 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 *PbReportDataShuShu) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbReportDataShuShu 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
|
|
// PbReportDataShuShuMultiError, or nil if none found.
|
|
func (m *PbReportDataShuShu) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbReportDataShuShu) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for GpsGaid
|
|
|
|
// no validation rules for AndroidId
|
|
|
|
// no validation rules for Adid
|
|
|
|
// no validation rules for UserAgent
|
|
|
|
// no validation rules for Price
|
|
|
|
// no validation rules for Currency
|
|
|
|
// no validation rules for PaymentMethod
|
|
|
|
// no validation rules for PaymentType
|
|
|
|
// no validation rules for PaymentNumber
|
|
|
|
// no validation rules for IapName
|
|
|
|
// no validation rules for GamecoinNumber
|
|
|
|
// no validation rules for GamecoinType
|
|
|
|
// no validation rules for SsAccountId
|
|
|
|
// no validation rules for SsDistinctId
|
|
|
|
// no validation rules for SsSuperProperties
|
|
|
|
if len(errors) > 0 {
|
|
return PbReportDataShuShuMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbReportDataShuShuMultiError is an error wrapping multiple validation errors
|
|
// returned by PbReportDataShuShu.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PbReportDataShuShuMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbReportDataShuShuMultiError) 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 PbReportDataShuShuMultiError) AllErrors() []error { return m }
|
|
|
|
// PbReportDataShuShuValidationError is the validation error returned by
|
|
// PbReportDataShuShu.Validate if the designated constraints aren't met.
|
|
type PbReportDataShuShuValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbReportDataShuShuValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbReportDataShuShuValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbReportDataShuShuValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbReportDataShuShuValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbReportDataShuShuValidationError) ErrorName() string {
|
|
return "PbReportDataShuShuValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbReportDataShuShuValidationError) 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 %sPbReportDataShuShu.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbReportDataShuShuValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbReportDataShuShuValidationError{}
|
|
|
|
// Validate checks the field values on PayoutReq 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 *PayoutReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutReq 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 PayoutReqMultiError, or nil
|
|
// if none found.
|
|
func (m *PayoutReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetAccount()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Account",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if val := m.GetItemId(); val < 1 || val > 3 {
|
|
err := PayoutReqValidationError{
|
|
field: "ItemId",
|
|
reason: "value must be inside range [1, 3]",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if val := m.GetAmount(); val < 0.1 || val > 50 {
|
|
err := PayoutReqValidationError{
|
|
field: "Amount",
|
|
reason: "value must be inside range [0.1, 50]",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetAdditionalRemark()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "AdditionalRemark",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetUuid()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Uuid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Ip
|
|
|
|
if l := utf8.RuneCountInString(m.GetAccountType()); l < 0 || l > 5 {
|
|
err := PayoutReqValidationError{
|
|
field: "AccountType",
|
|
reason: "value length must be between 0 and 5 runes, inclusive",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if l := utf8.RuneCountInString(m.GetDocumentType()); l < 0 || l > 4 {
|
|
err := PayoutReqValidationError{
|
|
field: "DocumentType",
|
|
reason: "value length must be between 0 and 4 runes, inclusive",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if l := utf8.RuneCountInString(m.GetDocumentId()); l < 0 || l > 100 {
|
|
err := PayoutReqValidationError{
|
|
field: "DocumentId",
|
|
reason: "value length must be between 0 and 100 runes, inclusive",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if l := utf8.RuneCountInString(m.GetName()); l < 0 || l > 100 {
|
|
err := PayoutReqValidationError{
|
|
field: "Name",
|
|
reason: "value length must be between 0 and 100 runes, inclusive",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetDataAdjust()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PayoutReqValidationError{
|
|
field: "DataAdjust",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PayoutReqValidationError{
|
|
field: "DataAdjust",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetDataAdjust()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PayoutReqValidationError{
|
|
field: "DataAdjust",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetDataShuShu()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PayoutReqValidationError{
|
|
field: "DataShuShu",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PayoutReqValidationError{
|
|
field: "DataShuShu",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetDataShuShu()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PayoutReqValidationError{
|
|
field: "DataShuShu",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
// no validation rules for ClientData
|
|
|
|
// no validation rules for ClientName
|
|
|
|
if utf8.RuneCountInString(m.GetEmail()) < 1 {
|
|
err := PayoutReqValidationError{
|
|
field: "Email",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutReqMultiError is an error wrapping multiple validation errors returned
|
|
// by PayoutReq.ValidateAll() if the designated constraints aren't met.
|
|
type PayoutReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutReqMultiError) 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 PayoutReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutReqValidationError is the validation error returned by
|
|
// PayoutReq.Validate if the designated constraints aren't met.
|
|
type PayoutReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutReqValidationError) ErrorName() string { return "PayoutReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutReqValidationError) 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 %sPayoutReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutReqValidationError{}
|
|
|
|
// Validate checks the field values on PayoutReply 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 *PayoutReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutReply 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 PayoutReplyMultiError, or
|
|
// nil if none found.
|
|
func (m *PayoutReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
// no validation rules for RecordNo
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutReply.ValidateAll() if the designated constraints aren't met.
|
|
type PayoutReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutReplyMultiError) 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 PayoutReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutReplyValidationError is the validation error returned by
|
|
// PayoutReply.Validate if the designated constraints aren't met.
|
|
type PayoutReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutReplyValidationError) ErrorName() string { return "PayoutReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutReplyValidationError) 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 %sPayoutReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutReplyValidationError{}
|
|
|
|
// Validate checks the field values on PayoutCallbackReq 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 *PayoutCallbackReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutCallbackReq 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
|
|
// PayoutCallbackReqMultiError, or nil if none found.
|
|
func (m *PayoutCallbackReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutCallbackReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for PayoutId
|
|
|
|
// no validation rules for CustomCode
|
|
|
|
// no validation rules for Status
|
|
|
|
// no validation rules for Msg
|
|
|
|
// no validation rules for Timestamp
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutCallbackReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutCallbackReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutCallbackReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutCallbackReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutCallbackReqMultiError) 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 PayoutCallbackReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutCallbackReqValidationError is the validation error returned by
|
|
// PayoutCallbackReq.Validate if the designated constraints aren't met.
|
|
type PayoutCallbackReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutCallbackReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutCallbackReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutCallbackReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutCallbackReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutCallbackReqValidationError) ErrorName() string {
|
|
return "PayoutCallbackReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutCallbackReqValidationError) 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 %sPayoutCallbackReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutCallbackReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutCallbackReqValidationError{}
|
|
|
|
// Validate checks the field values on PayoutCallbackReply 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 *PayoutCallbackReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutCallbackReply 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
|
|
// PayoutCallbackReplyMultiError, or nil if none found.
|
|
func (m *PayoutCallbackReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutCallbackReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Message
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutCallbackReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutCallbackReplyMultiError is an error wrapping multiple validation
|
|
// errors returned by PayoutCallbackReply.ValidateAll() if the designated
|
|
// constraints aren't met.
|
|
type PayoutCallbackReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutCallbackReplyMultiError) 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 PayoutCallbackReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutCallbackReplyValidationError is the validation error returned by
|
|
// PayoutCallbackReply.Validate if the designated constraints aren't met.
|
|
type PayoutCallbackReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutCallbackReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutCallbackReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutCallbackReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutCallbackReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutCallbackReplyValidationError) ErrorName() string {
|
|
return "PayoutCallbackReplyValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutCallbackReplyValidationError) 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 %sPayoutCallbackReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutCallbackReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutCallbackReplyValidationError{}
|
|
|
|
// Validate checks the field values on PayoutCheckReq 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 *PayoutCheckReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutCheckReq 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 PayoutCheckReqMultiError,
|
|
// or nil if none found.
|
|
func (m *PayoutCheckReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutCheckReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := PayoutCheckReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := PayoutCheckReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := PayoutCheckReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := PayoutCheckReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := PayoutCheckReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Ip
|
|
|
|
if utf8.RuneCountInString(m.GetRecordNo()) < 1 {
|
|
err := PayoutCheckReqValidationError{
|
|
field: "RecordNo",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutCheckReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutCheckReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutCheckReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutCheckReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutCheckReqMultiError) 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 PayoutCheckReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutCheckReqValidationError is the validation error returned by
|
|
// PayoutCheckReq.Validate if the designated constraints aren't met.
|
|
type PayoutCheckReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutCheckReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutCheckReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutCheckReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutCheckReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutCheckReqValidationError) ErrorName() string { return "PayoutCheckReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutCheckReqValidationError) 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 %sPayoutCheckReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutCheckReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutCheckReqValidationError{}
|
|
|
|
// Validate checks the field values on PayoutCheckReply 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 *PayoutCheckReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutCheckReply 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
|
|
// PayoutCheckReplyMultiError, or nil if none found.
|
|
func (m *PayoutCheckReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutCheckReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Status
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutCheckReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutCheckReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutCheckReply.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutCheckReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutCheckReplyMultiError) 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 PayoutCheckReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutCheckReplyValidationError is the validation error returned by
|
|
// PayoutCheckReply.Validate if the designated constraints aren't met.
|
|
type PayoutCheckReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutCheckReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutCheckReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutCheckReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutCheckReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutCheckReplyValidationError) ErrorName() string { return "PayoutCheckReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutCheckReplyValidationError) 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 %sPayoutCheckReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutCheckReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutCheckReplyValidationError{}
|
|
|
|
// Validate checks the field values on PayoutUserLstReq 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 *PayoutUserLstReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutUserLstReq 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
|
|
// PayoutUserLstReqMultiError, or nil if none found.
|
|
func (m *PayoutUserLstReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutUserLstReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := PayoutUserLstReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := PayoutUserLstReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := PayoutUserLstReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := PayoutUserLstReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := PayoutUserLstReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if val := m.GetStatus(); val < 1 || val > 3 {
|
|
err := PayoutUserLstReqValidationError{
|
|
field: "Status",
|
|
reason: "value must be inside range [1, 3]",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for PageIndex
|
|
|
|
// no validation rules for PageSize
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutUserLstReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutUserLstReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutUserLstReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutUserLstReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutUserLstReqMultiError) 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 PayoutUserLstReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutUserLstReqValidationError is the validation error returned by
|
|
// PayoutUserLstReq.Validate if the designated constraints aren't met.
|
|
type PayoutUserLstReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutUserLstReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutUserLstReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutUserLstReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutUserLstReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutUserLstReqValidationError) ErrorName() string { return "PayoutUserLstReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutUserLstReqValidationError) 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 %sPayoutUserLstReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutUserLstReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutUserLstReqValidationError{}
|
|
|
|
// Validate checks the field values on PayoutUserLstReply 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 *PayoutUserLstReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutUserLstReply 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
|
|
// PayoutUserLstReplyMultiError, or nil if none found.
|
|
func (m *PayoutUserLstReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutUserLstReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
for idx, item := range m.GetLst() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PayoutUserLstReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PayoutUserLstReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%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 PayoutUserLstReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutUserLstReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutUserLstReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutUserLstReply.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutUserLstReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutUserLstReplyMultiError) 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 PayoutUserLstReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutUserLstReplyValidationError is the validation error returned by
|
|
// PayoutUserLstReply.Validate if the designated constraints aren't met.
|
|
type PayoutUserLstReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutUserLstReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutUserLstReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutUserLstReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutUserLstReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutUserLstReplyValidationError) ErrorName() string {
|
|
return "PayoutUserLstReplyValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutUserLstReplyValidationError) 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 %sPayoutUserLstReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutUserLstReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutUserLstReplyValidationError{}
|
|
|
|
// Validate checks the field values on PayoutUserOne 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 *PayoutUserOne) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutUserOne 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 PayoutUserOneMultiError, or
|
|
// nil if none found.
|
|
func (m *PayoutUserOne) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutUserOne) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Email
|
|
|
|
// no validation rules for RecordNo
|
|
|
|
// no validation rules for Account
|
|
|
|
// no validation rules for Status
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutUserOneMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutUserOneMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutUserOne.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutUserOneMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutUserOneMultiError) 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 PayoutUserOneMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutUserOneValidationError is the validation error returned by
|
|
// PayoutUserOne.Validate if the designated constraints aren't met.
|
|
type PayoutUserOneValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutUserOneValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutUserOneValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutUserOneValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutUserOneValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutUserOneValidationError) ErrorName() string { return "PayoutUserOneValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutUserOneValidationError) 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 %sPayoutUserOne.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutUserOneValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutUserOneValidationError{}
|
|
|
|
// Validate checks the field values on PayoutStatusReq 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 *PayoutStatusReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutStatusReq 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
|
|
// PayoutStatusReqMultiError, or nil if none found.
|
|
func (m *PayoutStatusReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutStatusReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetRecordNo()) < 1 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "RecordNo",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Fail
|
|
|
|
if val := m.GetStatus(); val < 2 || val > 3 {
|
|
err := PayoutStatusReqValidationError{
|
|
field: "Status",
|
|
reason: "value must be inside range [2, 3]",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutStatusReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutStatusReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutStatusReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutStatusReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutStatusReqMultiError) 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 PayoutStatusReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutStatusReqValidationError is the validation error returned by
|
|
// PayoutStatusReq.Validate if the designated constraints aren't met.
|
|
type PayoutStatusReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutStatusReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutStatusReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutStatusReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutStatusReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutStatusReqValidationError) ErrorName() string { return "PayoutStatusReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutStatusReqValidationError) 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 %sPayoutStatusReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutStatusReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutStatusReqValidationError{}
|
|
|
|
// Validate checks the field values on PayoutStatusReply 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 *PayoutStatusReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayoutStatusReply 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
|
|
// PayoutStatusReplyMultiError, or nil if none found.
|
|
func (m *PayoutStatusReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayoutStatusReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for RecordNo
|
|
|
|
// no validation rules for Status
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return PayoutStatusReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayoutStatusReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by PayoutStatusReply.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayoutStatusReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayoutStatusReplyMultiError) 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 PayoutStatusReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// PayoutStatusReplyValidationError is the validation error returned by
|
|
// PayoutStatusReply.Validate if the designated constraints aren't met.
|
|
type PayoutStatusReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayoutStatusReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayoutStatusReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayoutStatusReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayoutStatusReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayoutStatusReplyValidationError) ErrorName() string {
|
|
return "PayoutStatusReplyValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayoutStatusReplyValidationError) 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 %sPayoutStatusReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayoutStatusReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayoutStatusReplyValidationError{}
|
|
|
|
// Validate checks the field values on SubmitCheckReq 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 *SubmitCheckReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on SubmitCheckReq 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 SubmitCheckReqMultiError,
|
|
// or nil if none found.
|
|
func (m *SubmitCheckReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *SubmitCheckReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetAccount()) < 1 {
|
|
err := SubmitCheckReqValidationError{
|
|
field: "Account",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetUuid()) < 1 {
|
|
err := SubmitCheckReqValidationError{
|
|
field: "Uuid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return SubmitCheckReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// SubmitCheckReqMultiError is an error wrapping multiple validation errors
|
|
// returned by SubmitCheckReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type SubmitCheckReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m SubmitCheckReqMultiError) 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 SubmitCheckReqMultiError) AllErrors() []error { return m }
|
|
|
|
// SubmitCheckReqValidationError is the validation error returned by
|
|
// SubmitCheckReq.Validate if the designated constraints aren't met.
|
|
type SubmitCheckReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e SubmitCheckReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e SubmitCheckReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e SubmitCheckReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e SubmitCheckReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e SubmitCheckReqValidationError) ErrorName() string { return "SubmitCheckReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e SubmitCheckReqValidationError) 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 %sSubmitCheckReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = SubmitCheckReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = SubmitCheckReqValidationError{}
|
|
|
|
// Validate checks the field values on SubmitCheckReply 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 *SubmitCheckReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on SubmitCheckReply 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
|
|
// SubmitCheckReplyMultiError, or nil if none found.
|
|
func (m *SubmitCheckReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *SubmitCheckReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Result
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return SubmitCheckReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// SubmitCheckReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by SubmitCheckReply.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type SubmitCheckReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m SubmitCheckReplyMultiError) 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 SubmitCheckReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// SubmitCheckReplyValidationError is the validation error returned by
|
|
// SubmitCheckReply.Validate if the designated constraints aren't met.
|
|
type SubmitCheckReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e SubmitCheckReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e SubmitCheckReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e SubmitCheckReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e SubmitCheckReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e SubmitCheckReplyValidationError) ErrorName() string { return "SubmitCheckReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e SubmitCheckReplyValidationError) 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 %sSubmitCheckReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = SubmitCheckReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = SubmitCheckReplyValidationError{}
|
|
|
|
// Validate checks the field values on CheckInfoReq 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 *CheckInfoReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CheckInfoReq 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 CheckInfoReqMultiError, or
|
|
// nil if none found.
|
|
func (m *CheckInfoReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CheckInfoReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := CheckInfoReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := CheckInfoReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := CheckInfoReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Ip
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := CheckInfoReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := CheckInfoReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Uuid
|
|
|
|
// no validation rules for IsVerificationShow
|
|
|
|
if len(errors) > 0 {
|
|
return CheckInfoReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// CheckInfoReqMultiError is an error wrapping multiple validation errors
|
|
// returned by CheckInfoReq.ValidateAll() if the designated constraints aren't met.
|
|
type CheckInfoReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CheckInfoReqMultiError) 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 CheckInfoReqMultiError) AllErrors() []error { return m }
|
|
|
|
// CheckInfoReqValidationError is the validation error returned by
|
|
// CheckInfoReq.Validate if the designated constraints aren't met.
|
|
type CheckInfoReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CheckInfoReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CheckInfoReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CheckInfoReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CheckInfoReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CheckInfoReqValidationError) ErrorName() string { return "CheckInfoReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CheckInfoReqValidationError) 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 %sCheckInfoReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CheckInfoReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CheckInfoReqValidationError{}
|
|
|
|
// Validate checks the field values on CheckInfoReply 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 *CheckInfoReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CheckInfoReply 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 CheckInfoReplyMultiError,
|
|
// or nil if none found.
|
|
func (m *CheckInfoReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CheckInfoReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for CanCheckSubmit
|
|
|
|
// no validation rules for CheckSubmit
|
|
|
|
// no validation rules for CheckResult
|
|
|
|
// no validation rules for CheckPayout
|
|
|
|
// no validation rules for CheckCoin
|
|
|
|
// no validation rules for CanCheckPayOut
|
|
|
|
// no validation rules for CheckResultFailedDesc
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return CheckInfoReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// CheckInfoReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by CheckInfoReply.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CheckInfoReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CheckInfoReplyMultiError) 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 CheckInfoReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// CheckInfoReplyValidationError is the validation error returned by
|
|
// CheckInfoReply.Validate if the designated constraints aren't met.
|
|
type CheckInfoReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CheckInfoReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CheckInfoReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CheckInfoReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CheckInfoReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CheckInfoReplyValidationError) ErrorName() string { return "CheckInfoReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CheckInfoReplyValidationError) 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 %sCheckInfoReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CheckInfoReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CheckInfoReplyValidationError{}
|
|
|
|
// Validate checks the field values on PbMsgOne 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 *PbMsgOne) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbMsgOne 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 PbMsgOneMultiError, or nil
|
|
// if none found.
|
|
func (m *PbMsgOne) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbMsgOne) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for TimeStamp
|
|
|
|
// no validation rules for Uuid
|
|
|
|
// no validation rules for Name
|
|
|
|
// no validation rules for Msg
|
|
|
|
if len(errors) > 0 {
|
|
return PbMsgOneMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbMsgOneMultiError is an error wrapping multiple validation errors returned
|
|
// by PbMsgOne.ValidateAll() if the designated constraints aren't met.
|
|
type PbMsgOneMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbMsgOneMultiError) 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 PbMsgOneMultiError) AllErrors() []error { return m }
|
|
|
|
// PbMsgOneValidationError is the validation error returned by
|
|
// PbMsgOne.Validate if the designated constraints aren't met.
|
|
type PbMsgOneValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbMsgOneValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbMsgOneValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbMsgOneValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbMsgOneValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbMsgOneValidationError) ErrorName() string { return "PbMsgOneValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbMsgOneValidationError) 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 %sPbMsgOne.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbMsgOneValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbMsgOneValidationError{}
|
|
|
|
// Validate checks the field values on AddChatReq 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 *AddChatReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on AddChatReq 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 AddChatReqMultiError, or
|
|
// nil if none found.
|
|
func (m *AddChatReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *AddChatReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for TimeStamp
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := AddChatReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := AddChatReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := AddChatReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Ip
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := AddChatReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := AddChatReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Uuid
|
|
|
|
// no validation rules for Msg
|
|
|
|
if len(errors) > 0 {
|
|
return AddChatReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// AddChatReqMultiError is an error wrapping multiple validation errors
|
|
// returned by AddChatReq.ValidateAll() if the designated constraints aren't met.
|
|
type AddChatReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m AddChatReqMultiError) 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 AddChatReqMultiError) AllErrors() []error { return m }
|
|
|
|
// AddChatReqValidationError is the validation error returned by
|
|
// AddChatReq.Validate if the designated constraints aren't met.
|
|
type AddChatReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e AddChatReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e AddChatReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e AddChatReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e AddChatReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e AddChatReqValidationError) ErrorName() string { return "AddChatReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e AddChatReqValidationError) 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 %sAddChatReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = AddChatReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = AddChatReqValidationError{}
|
|
|
|
// Validate checks the field values on AddChatReply 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 *AddChatReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on AddChatReply 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 AddChatReplyMultiError, or
|
|
// nil if none found.
|
|
func (m *AddChatReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *AddChatReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Result
|
|
|
|
// no validation rules for Uuid
|
|
|
|
for idx, item := range m.GetLst() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, AddChatReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, AddChatReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%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 AddChatReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return AddChatReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// AddChatReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by AddChatReply.ValidateAll() if the designated constraints aren't met.
|
|
type AddChatReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m AddChatReplyMultiError) 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 AddChatReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// AddChatReplyValidationError is the validation error returned by
|
|
// AddChatReply.Validate if the designated constraints aren't met.
|
|
type AddChatReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e AddChatReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e AddChatReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e AddChatReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e AddChatReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e AddChatReplyValidationError) ErrorName() string { return "AddChatReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e AddChatReplyValidationError) 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 %sAddChatReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = AddChatReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = AddChatReplyValidationError{}
|
|
|
|
// Validate checks the field values on GetChatReq 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 *GetChatReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on GetChatReq 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 GetChatReqMultiError, or
|
|
// nil if none found.
|
|
func (m *GetChatReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *GetChatReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for TimeStamp
|
|
|
|
if utf8.RuneCountInString(m.GetPlatform()) < 1 {
|
|
err := GetChatReqValidationError{
|
|
field: "Platform",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDeviceid()) < 1 {
|
|
err := GetChatReqValidationError{
|
|
field: "Deviceid",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := GetChatReqValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Ip
|
|
|
|
if utf8.RuneCountInString(m.GetTs()) < 1 {
|
|
err := GetChatReqValidationError{
|
|
field: "Ts",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetSign()) < 1 {
|
|
err := GetChatReqValidationError{
|
|
field: "Sign",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Uuid
|
|
|
|
if len(errors) > 0 {
|
|
return GetChatReqMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// GetChatReqMultiError is an error wrapping multiple validation errors
|
|
// returned by GetChatReq.ValidateAll() if the designated constraints aren't met.
|
|
type GetChatReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m GetChatReqMultiError) 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 GetChatReqMultiError) AllErrors() []error { return m }
|
|
|
|
// GetChatReqValidationError is the validation error returned by
|
|
// GetChatReq.Validate if the designated constraints aren't met.
|
|
type GetChatReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e GetChatReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e GetChatReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e GetChatReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e GetChatReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e GetChatReqValidationError) ErrorName() string { return "GetChatReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e GetChatReqValidationError) 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 %sGetChatReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = GetChatReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = GetChatReqValidationError{}
|
|
|
|
// Validate checks the field values on GetChatReply 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 *GetChatReply) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on GetChatReply 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 GetChatReplyMultiError, or
|
|
// nil if none found.
|
|
func (m *GetChatReply) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *GetChatReply) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Uuid
|
|
|
|
for idx, item := range m.GetLst() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, GetChatReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, GetChatReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%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 GetChatReplyValidationError{
|
|
field: fmt.Sprintf("Lst[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// no validation rules for Error
|
|
|
|
if len(errors) > 0 {
|
|
return GetChatReplyMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// GetChatReplyMultiError is an error wrapping multiple validation errors
|
|
// returned by GetChatReply.ValidateAll() if the designated constraints aren't met.
|
|
type GetChatReplyMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m GetChatReplyMultiError) 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 GetChatReplyMultiError) AllErrors() []error { return m }
|
|
|
|
// GetChatReplyValidationError is the validation error returned by
|
|
// GetChatReply.Validate if the designated constraints aren't met.
|
|
type GetChatReplyValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e GetChatReplyValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e GetChatReplyValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e GetChatReplyValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e GetChatReplyValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e GetChatReplyValidationError) ErrorName() string { return "GetChatReplyValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e GetChatReplyValidationError) 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 %sGetChatReply.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = GetChatReplyValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = GetChatReplyValidationError{}
|
|
|
|
// Validate checks the field values on PbSvrData 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 *PbSvrData) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbSvrData 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 PbSvrDataMultiError, or nil
|
|
// if none found.
|
|
func (m *PbSvrData) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbSvrData) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
for idx, item := range m.GetLstChat() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PbSvrDataValidationError{
|
|
field: fmt.Sprintf("LstChat[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PbSvrDataValidationError{
|
|
field: fmt.Sprintf("LstChat[%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 PbSvrDataValidationError{
|
|
field: fmt.Sprintf("LstChat[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PbSvrDataMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbSvrDataMultiError is an error wrapping multiple validation errors returned
|
|
// by PbSvrData.ValidateAll() if the designated constraints aren't met.
|
|
type PbSvrDataMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbSvrDataMultiError) 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 PbSvrDataMultiError) AllErrors() []error { return m }
|
|
|
|
// PbSvrDataValidationError is the validation error returned by
|
|
// PbSvrData.Validate if the designated constraints aren't met.
|
|
type PbSvrDataValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbSvrDataValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbSvrDataValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbSvrDataValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbSvrDataValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbSvrDataValidationError) ErrorName() string { return "PbSvrDataValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbSvrDataValidationError) 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 %sPbSvrData.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbSvrDataValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbSvrDataValidationError{}
|
|
|
|
// Validate checks the field values on PbUserData 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 *PbUserData) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbUserData 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 PbUserDataMultiError, or
|
|
// nil if none found.
|
|
func (m *PbUserData) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbUserData) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if len(errors) > 0 {
|
|
return PbUserDataMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbUserDataMultiError is an error wrapping multiple validation errors
|
|
// returned by PbUserData.ValidateAll() if the designated constraints aren't met.
|
|
type PbUserDataMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbUserDataMultiError) 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 PbUserDataMultiError) AllErrors() []error { return m }
|
|
|
|
// PbUserDataValidationError is the validation error returned by
|
|
// PbUserData.Validate if the designated constraints aren't met.
|
|
type PbUserDataValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbUserDataValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbUserDataValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbUserDataValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbUserDataValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbUserDataValidationError) ErrorName() string { return "PbUserDataValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbUserDataValidationError) 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 %sPbUserData.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbUserDataValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbUserDataValidationError{}
|
|
|
|
// Validate checks the field values on PbReportData 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 *PbReportData) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbReportData 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 PbReportDataMultiError, or
|
|
// nil if none found.
|
|
func (m *PbReportData) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbReportData) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetAdjust()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PbReportDataValidationError{
|
|
field: "Adjust",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PbReportDataValidationError{
|
|
field: "Adjust",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetAdjust()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PbReportDataValidationError{
|
|
field: "Adjust",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetShuShu()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PbReportDataValidationError{
|
|
field: "ShuShu",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PbReportDataValidationError{
|
|
field: "ShuShu",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetShuShu()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PbReportDataValidationError{
|
|
field: "ShuShu",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
// no validation rules for Rf
|
|
|
|
if len(errors) > 0 {
|
|
return PbReportDataMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbReportDataMultiError is an error wrapping multiple validation errors
|
|
// returned by PbReportData.ValidateAll() if the designated constraints aren't met.
|
|
type PbReportDataMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbReportDataMultiError) 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 PbReportDataMultiError) AllErrors() []error { return m }
|
|
|
|
// PbReportDataValidationError is the validation error returned by
|
|
// PbReportData.Validate if the designated constraints aren't met.
|
|
type PbReportDataValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbReportDataValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbReportDataValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbReportDataValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbReportDataValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbReportDataValidationError) ErrorName() string { return "PbReportDataValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbReportDataValidationError) 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 %sPbReportData.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbReportDataValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbReportDataValidationError{}
|
|
|
|
// Validate checks the field values on PbAdjustData 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 *PbAdjustData) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbAdjustData 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 PbAdjustDataMultiError, or
|
|
// nil if none found.
|
|
func (m *PbAdjustData) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbAdjustData) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for GpsAdid
|
|
|
|
// no validation rules for Adid
|
|
|
|
// no validation rules for AndroidId
|
|
|
|
// no validation rules for IpAddress
|
|
|
|
// no validation rules for CreatedAtUnix
|
|
|
|
// no validation rules for Currency
|
|
|
|
// no validation rules for Environment
|
|
|
|
// no validation rules for UserAgent
|
|
|
|
// no validation rules for Price
|
|
|
|
// no validation rules for FailReason
|
|
|
|
// no validation rules for AppToken
|
|
|
|
// no validation rules for EventToken
|
|
|
|
// no validation rules for S2S
|
|
|
|
// no validation rules for ClientName
|
|
|
|
if len(errors) > 0 {
|
|
return PbAdjustDataMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbAdjustDataMultiError is an error wrapping multiple validation errors
|
|
// returned by PbAdjustData.ValidateAll() if the designated constraints aren't met.
|
|
type PbAdjustDataMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbAdjustDataMultiError) 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 PbAdjustDataMultiError) AllErrors() []error { return m }
|
|
|
|
// PbAdjustDataValidationError is the validation error returned by
|
|
// PbAdjustData.Validate if the designated constraints aren't met.
|
|
type PbAdjustDataValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbAdjustDataValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbAdjustDataValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbAdjustDataValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbAdjustDataValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbAdjustDataValidationError) ErrorName() string { return "PbAdjustDataValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbAdjustDataValidationError) 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 %sPbAdjustData.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbAdjustDataValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbAdjustDataValidationError{}
|
|
|
|
// Validate checks the field values on PbShuShuData 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 *PbShuShuData) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PbShuShuData 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 PbShuShuDataMultiError, or
|
|
// nil if none found.
|
|
func (m *PbShuShuData) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PbShuShuData) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for GpsAdid
|
|
|
|
// no validation rules for AppToken
|
|
|
|
// no validation rules for EventToken
|
|
|
|
// no validation rules for S2S
|
|
|
|
// no validation rules for AndroidId
|
|
|
|
// no validation rules for Adid
|
|
|
|
// no validation rules for IpAddress
|
|
|
|
// no validation rules for CreatedAtUnix
|
|
|
|
// no validation rules for UserAgent
|
|
|
|
// no validation rules for Price
|
|
|
|
// no validation rules for Currency
|
|
|
|
// no validation rules for FailReason
|
|
|
|
// no validation rules for PayoutId
|
|
|
|
// no validation rules for MerchantReference
|
|
|
|
// no validation rules for PaymentMethod
|
|
|
|
// no validation rules for PaymentType
|
|
|
|
// no validation rules for PaymentNumber
|
|
|
|
// no validation rules for IapName
|
|
|
|
// no validation rules for GamecoinNumber
|
|
|
|
// no validation rules for GamecoinType
|
|
|
|
// no validation rules for SsAccountId
|
|
|
|
// no validation rules for SsDistinctId
|
|
|
|
// no validation rules for SsSuperProperties
|
|
|
|
// no validation rules for ClientName
|
|
|
|
if len(errors) > 0 {
|
|
return PbShuShuDataMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PbShuShuDataMultiError is an error wrapping multiple validation errors
|
|
// returned by PbShuShuData.ValidateAll() if the designated constraints aren't met.
|
|
type PbShuShuDataMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PbShuShuDataMultiError) 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 PbShuShuDataMultiError) AllErrors() []error { return m }
|
|
|
|
// PbShuShuDataValidationError is the validation error returned by
|
|
// PbShuShuData.Validate if the designated constraints aren't met.
|
|
type PbShuShuDataValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PbShuShuDataValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PbShuShuDataValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PbShuShuDataValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PbShuShuDataValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PbShuShuDataValidationError) ErrorName() string { return "PbShuShuDataValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PbShuShuDataValidationError) 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 %sPbShuShuData.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PbShuShuDataValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PbShuShuDataValidationError{}
|
|
|
|
// Validate checks the field values on PayInitReply_Item 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 *PayInitReply_Item) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PayInitReply_Item 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
|
|
// PayInitReply_ItemMultiError, or nil if none found.
|
|
func (m *PayInitReply_Item) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PayInitReply_Item) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
// no validation rules for Amount
|
|
|
|
// no validation rules for Status
|
|
|
|
if len(errors) > 0 {
|
|
return PayInitReply_ItemMultiError(errors)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// PayInitReply_ItemMultiError is an error wrapping multiple validation errors
|
|
// returned by PayInitReply_Item.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PayInitReply_ItemMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PayInitReply_ItemMultiError) 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 PayInitReply_ItemMultiError) AllErrors() []error { return m }
|
|
|
|
// PayInitReply_ItemValidationError is the validation error returned by
|
|
// PayInitReply_Item.Validate if the designated constraints aren't met.
|
|
type PayInitReply_ItemValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PayInitReply_ItemValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PayInitReply_ItemValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PayInitReply_ItemValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PayInitReply_ItemValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PayInitReply_ItemValidationError) ErrorName() string {
|
|
return "PayInitReply_ItemValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PayInitReply_ItemValidationError) 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 %sPayInitReply_Item.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PayInitReply_ItemValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PayInitReply_ItemValidationError{}
|