zitadel/pkg/grpc/auth/auth.pb.validate.go

3435 lines
83 KiB
Go
Raw Normal View History

feat: split users into human and machine (#470) * feat(management): service accounts * chore: current go version * init * refactor: apis * feat(internal): start impl of service account * chore: start impl of machine/human users * code compiles * fix: tests * fix: tests * fix: add new event types to switches * chore: add cases to event types * fix(management): definitive proto messages * fix: machine/human * fix: add missing tables as todos * fix: remove unused permissions * fix: refactoring * fix: refactor * fix: human registered * fix: user id * fix: logid * fix: proto remove //equal * chore(management): remove no comment * fix: human mfas * fix: user subobjects * chore: rename existing to better name * fix: username in user (#634) * fix: username in user * fix: username * fix remove unused code * fix add validations * fix: use new user in all apis * fix: regexp for username in api * fix: fill user data for human and machine (#638) * fix: fill Display name grant/member handlers fix: add description to grant/member objects in api fix: check if user is human in login * fix: remove description from member and grant * chore: remove todos * feat: machine keys * fix: implement missing parts * feat: machine key management view * fix: remove keys from machine view * fix: set default expiration date * fix: get key by ids * feat: add machine keys in proto * feat: machine keys * fix: add migration * fix: mig * fix: correct method name * feat: user search * feat: user search * fix: log ids * fix partial authconfig prompt, domain c perm * membership read check * contributor refresh trigger, observe org write * fix: migrations * fix(console): machine build (#660) * frontend 1 * fix html bindings * trailing comma * user permissions, project deactivate * fix(console): human view (#661) * fix search user view, user detail form * rm log * feat(console): user services list and create (#663) * fix search user view, user detail form * rm log * machine list * generic table component * create user service * proove table for undefined values * tmp disable user link if machine * lint * lint styles * user table lint * Update console/src/assets/i18n/de.json Co-authored-by: Florian Forster <florian@caos.ch> * feat(console): service user detail view, keys cr_d, fix search user autocomplete (#664) * service users for sidenav, routing * i18n * back routes * machine detail form * update machine detail, fix svc user grants * keys table * add key dialog, timestamp creation * check permission on create, delete, fix selection * lint ts, scss * Update console/src/assets/i18n/de.json * Apply suggestions from code review Co-authored-by: Florian Forster <florian@caos.ch> * allow user grants for project.write * management service * fix mgmt service * feat: Machine keys (#655) * fix: memberships (#633) * feat: add iam members to memberships * fix: search project grants * fix: rename * feat: idp and login policy configurations (#619) * feat: oidc config * fix: oidc configurations * feat: oidc idp config * feat: add oidc config test * fix: tests * fix: tests * feat: translate new events * feat: idp eventstore * feat: idp eventstore * fix: tests * feat: command side idp * feat: query side idp * feat: idp config on org * fix: tests * feat: authz idp on org * feat: org idps * feat: login policy * feat: login policy * feat: login policy * feat: add idp func on login policy * feat: add validation to loginpolicy and idp provider * feat: add default login policy * feat: login policy on org * feat: login policy on org * fix: id config handlers * fix: id config handlers * fix: create idp on org * fix: create idp on org * fix: not existing idp config * fix: default login policy * fix: add login policy on org * fix: idp provider search on org * fix: test * fix: remove idp on org * fix: test * fix: test * fix: remove admin idp * fix: logo src as byte * fix: migration * fix: tests * Update internal/iam/repository/eventsourcing/iam.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/iam/repository/eventsourcing/iam_test.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/iam/repository/eventsourcing/iam_test.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/iam/repository/eventsourcing/model/login_policy.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/iam/repository/eventsourcing/model/login_policy.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/org/repository/eventsourcing/org_test.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/iam/repository/eventsourcing/model/login_policy_test.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/iam/repository/eventsourcing/model/login_policy_test.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * fix: pr comments * fix: tests * Update types.go * fix: merge request changes * fix: reduce optimization Co-authored-by: Silvan <silvan.reusser@gmail.com> Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: reread user mfas, preferred loginname as otp account name (#636) * fix: reread user mfas * fix: use preferred login name as otp account name * fix: tests * fix: reduce (#635) * fix: management reduce optimization * fix: reduce optimization * fix: reduce optimization * fix: merge master * chore(deps): bump github.com/gorilla/schema from 1.1.0 to 1.2.0 (#627) Bumps [github.com/gorilla/schema](https://github.com/gorilla/schema) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/gorilla/schema/releases) - [Commits](https://github.com/gorilla/schema/compare/v1.1.0...v1.2.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/gorilla/mux from 1.7.4 to 1.8.0 (#624) Bumps [github.com/gorilla/mux](https://github.com/gorilla/mux) from 1.7.4 to 1.8.0. - [Release notes](https://github.com/gorilla/mux/releases) - [Commits](https://github.com/gorilla/mux/compare/v1.7.4...v1.8.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/DATA-DOG/go-sqlmock from 1.4.1 to 1.5.0 (#591) Bumps [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/DATA-DOG/go-sqlmock/releases) - [Commits](https://github.com/DATA-DOG/go-sqlmock/compare/v1.4.1...v1.5.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: auto assign issues and PR to ZTIADEL project board (#643) * Create main.yml * Update main.yml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix(console): project grant members, update deps (#645) * fix: searchprojectgrantmembers * chore(deps-dev): bump @angular/cli from 10.0.6 to 10.0.7 in /console (#622) Bumps [@angular/cli](https://github.com/angular/angular-cli) from 10.0.6 to 10.0.7. - [Release notes](https://github.com/angular/angular-cli/releases) - [Commits](https://github.com/angular/angular-cli/compare/v10.0.6...v10.0.7) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump @angular-devkit/build-angular in /console (#626) Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 0.1000.6 to 0.1000.7. - [Release notes](https://github.com/angular/angular-cli/releases) - [Commits](https://github.com/angular/angular-cli/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Max Peintner <max@caos.ch> * chore(deps-dev): bump @types/jasmine from 3.5.12 to 3.5.13 in /console (#623) Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.5.12 to 3.5.13. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump ts-node from 8.10.2 to 9.0.0 in /console (#629) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.10.2 to 9.0.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.10.2...v9.0.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update packlock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: delete main.yml (#648) * fix: usergrant (#650) * fix(console): mfa refresh after verification, member eventemitter (#651) * refresh mfa * fix: detail link from contributors * lint * feat: add domain verification notification (#649) * fix: dont (re)generate client secret with auth type none * fix(cors): allow Origin from request * feat: add origin allow list and fix some core issues * rename migration * fix UserIDsByDomain * feat: send email to users after domain claim * username * check origin on userinfo * update oidc pkg * fix: add migration 1.6 * change username * change username * remove unique email aggregate * change username in mgmt * search global user by login name * fix test * change user search in angular * fix tests * merge * userview in angular * fix merge * Update pkg/grpc/management/proto/management.proto Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * Update internal/notification/static/i18n/de.yaml Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * fix Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * fix: translation (#647) * fix: translation * fix: translation * fix: translation * fix: remove unused code * fix: log err * fix: migration numbers (#652) * chore: issue / feature templates (#642) * feat: machine keys * fix: implement missing parts * feat: machine key management view * fix: remove keys from machine view * feat: global org read (#657) * fix: set default expiration date * fix: get key by ids * feat: add machine keys in proto * feat: machine keys * fix: add migration * fix: mig * fix: correct method name * feat: user search * feat: user search * fix: log ids * fix: migrations * fix(console): machine build (#660) * frontend 1 * fix html bindings * trailing comma * fix(console): human view (#661) * fix search user view, user detail form * rm log * feat(console): user services list and create (#663) * fix search user view, user detail form * rm log * machine list * generic table component * create user service * proove table for undefined values * tmp disable user link if machine * lint * lint styles * user table lint * Update console/src/assets/i18n/de.json Co-authored-by: Florian Forster <florian@caos.ch> * feat(console): service user detail view, keys cr_d, fix search user autocomplete (#664) * service users for sidenav, routing * i18n * back routes * machine detail form * update machine detail, fix svc user grants * keys table * add key dialog, timestamp creation * check permission on create, delete, fix selection * lint ts, scss * Update console/src/assets/i18n/de.json * Apply suggestions from code review Co-authored-by: Florian Forster <florian@caos.ch> * refactor: protos * fix(management): key expiration date * fix: check if user is human * fix: marshal key details * fix: correct generate login names * fix: logid Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com> Co-authored-by: Florian Forster <florian@caos.ch> * fix: naming * refactor: findings * fix: username * fix: mfa upper case * fix: tests * fix: add translations * reactivatemyorg req typeö * fix: projectType for console * fix: user changes * fix: translate events * fix: event type translation * fix: remove unused types Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com> Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-31 15:48:01 +00:00
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: auth.proto
package auth
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _auth_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// Validate checks the field values on UserSessionViews with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *UserSessionViews) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetUserSessions() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserSessionViewsValidationError{
field: fmt.Sprintf("UserSessions[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// UserSessionViewsValidationError is the validation error returned by
// UserSessionViews.Validate if the designated constraints aren't met.
type UserSessionViewsValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserSessionViewsValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserSessionViewsValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserSessionViewsValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserSessionViewsValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserSessionViewsValidationError) ErrorName() string { return "UserSessionViewsValidationError" }
// Error satisfies the builtin error interface
func (e UserSessionViewsValidationError) 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 %sUserSessionViews.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserSessionViewsValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserSessionViewsValidationError{}
// Validate checks the field values on UserSessionView with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *UserSessionView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for AgentId
// no validation rules for AuthState
// no validation rules for UserId
// no validation rules for UserName
// no validation rules for Sequence
// no validation rules for LoginName
// no validation rules for DisplayName
return nil
}
// UserSessionViewValidationError is the validation error returned by
// UserSessionView.Validate if the designated constraints aren't met.
type UserSessionViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserSessionViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserSessionViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserSessionViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserSessionViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserSessionViewValidationError) ErrorName() string { return "UserSessionViewValidationError" }
// Error satisfies the builtin error interface
func (e UserSessionViewValidationError) 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 %sUserSessionView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserSessionViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserSessionViewValidationError{}
// Validate checks the field values on UserView with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *UserView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for State
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserViewValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserViewValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Sequence
// no validation rules for PreferredLoginName
if v, ok := interface{}(m.GetLastLogin()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserViewValidationError{
field: "LastLogin",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for ResourceOwner
// no validation rules for UserName
switch m.User.(type) {
case *UserView_Human:
if v, ok := interface{}(m.GetHuman()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserViewValidationError{
field: "Human",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *UserView_Machine:
if v, ok := interface{}(m.GetMachine()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserViewValidationError{
field: "Machine",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return UserViewValidationError{
field: "User",
reason: "value is required",
}
}
return nil
}
// UserViewValidationError is the validation error returned by
// UserView.Validate if the designated constraints aren't met.
type UserViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserViewValidationError) ErrorName() string { return "UserViewValidationError" }
// Error satisfies the builtin error interface
func (e UserViewValidationError) 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 %sUserView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserViewValidationError{}
// Validate checks the field values on MachineView with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MachineView) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetLastKeyAdded()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MachineViewValidationError{
field: "LastKeyAdded",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Name
// no validation rules for Description
return nil
}
// MachineViewValidationError is the validation error returned by
// MachineView.Validate if the designated constraints aren't met.
type MachineViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MachineViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MachineViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MachineViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MachineViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MachineViewValidationError) ErrorName() string { return "MachineViewValidationError" }
// Error satisfies the builtin error interface
func (e MachineViewValidationError) 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 %sMachineView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MachineViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MachineViewValidationError{}
// Validate checks the field values on MachineKeyView with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MachineKeyView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Type
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MachineKeyViewValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetExpirationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MachineKeyViewValidationError{
field: "ExpirationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// MachineKeyViewValidationError is the validation error returned by
// MachineKeyView.Validate if the designated constraints aren't met.
type MachineKeyViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MachineKeyViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MachineKeyViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MachineKeyViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MachineKeyViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MachineKeyViewValidationError) ErrorName() string { return "MachineKeyViewValidationError" }
// Error satisfies the builtin error interface
func (e MachineKeyViewValidationError) 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 %sMachineKeyView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MachineKeyViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MachineKeyViewValidationError{}
// Validate checks the field values on HumanView with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *HumanView) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetPasswordChanged()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return HumanViewValidationError{
field: "PasswordChanged",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for FirstName
// no validation rules for LastName
// no validation rules for DisplayName
// no validation rules for NickName
// no validation rules for PreferredLanguage
// no validation rules for Gender
// no validation rules for Email
// no validation rules for IsEmailVerified
// no validation rules for Phone
// no validation rules for IsPhoneVerified
// no validation rules for Country
// no validation rules for Locality
// no validation rules for PostalCode
// no validation rules for Region
// no validation rules for StreetAddress
return nil
}
// HumanViewValidationError is the validation error returned by
// HumanView.Validate if the designated constraints aren't met.
type HumanViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e HumanViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e HumanViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e HumanViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e HumanViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e HumanViewValidationError) ErrorName() string { return "HumanViewValidationError" }
// Error satisfies the builtin error interface
func (e HumanViewValidationError) 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 %sHumanView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = HumanViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = HumanViewValidationError{}
// Validate checks the field values on UserProfile with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UserProfile) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for FirstName
// no validation rules for LastName
// no validation rules for NickName
// no validation rules for DisplayName
// no validation rules for PreferredLanguage
// no validation rules for Gender
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserProfileValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserProfileValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserProfileValidationError is the validation error returned by
// UserProfile.Validate if the designated constraints aren't met.
type UserProfileValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserProfileValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserProfileValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserProfileValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserProfileValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserProfileValidationError) ErrorName() string { return "UserProfileValidationError" }
// Error satisfies the builtin error interface
func (e UserProfileValidationError) 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 %sUserProfile.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserProfileValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserProfileValidationError{}
// Validate checks the field values on UserProfileView with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *UserProfileView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for FirstName
// no validation rules for LastName
// no validation rules for NickName
// no validation rules for DisplayName
// no validation rules for PreferredLanguage
// no validation rules for Gender
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserProfileViewValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserProfileViewValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for PreferredLoginName
return nil
}
// UserProfileViewValidationError is the validation error returned by
// UserProfileView.Validate if the designated constraints aren't met.
type UserProfileViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserProfileViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserProfileViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserProfileViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserProfileViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserProfileViewValidationError) ErrorName() string { return "UserProfileViewValidationError" }
// Error satisfies the builtin error interface
func (e UserProfileViewValidationError) 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 %sUserProfileView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserProfileViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserProfileViewValidationError{}
// Validate checks the field values on UpdateUserProfileRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UpdateUserProfileRequest) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetFirstName()); l < 1 || l > 200 {
return UpdateUserProfileRequestValidationError{
field: "FirstName",
reason: "value length must be between 1 and 200 runes, inclusive",
}
}
if l := utf8.RuneCountInString(m.GetLastName()); l < 1 || l > 200 {
return UpdateUserProfileRequestValidationError{
field: "LastName",
reason: "value length must be between 1 and 200 runes, inclusive",
}
}
if utf8.RuneCountInString(m.GetNickName()) > 200 {
return UpdateUserProfileRequestValidationError{
field: "NickName",
reason: "value length must be at most 200 runes",
}
}
if l := utf8.RuneCountInString(m.GetPreferredLanguage()); l < 1 || l > 200 {
return UpdateUserProfileRequestValidationError{
field: "PreferredLanguage",
reason: "value length must be between 1 and 200 runes, inclusive",
}
}
// no validation rules for Gender
return nil
}
// UpdateUserProfileRequestValidationError is the validation error returned by
// UpdateUserProfileRequest.Validate if the designated constraints aren't met.
type UpdateUserProfileRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateUserProfileRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateUserProfileRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateUserProfileRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateUserProfileRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateUserProfileRequestValidationError) ErrorName() string {
return "UpdateUserProfileRequestValidationError"
}
// Error satisfies the builtin error interface
func (e UpdateUserProfileRequestValidationError) 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 %sUpdateUserProfileRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateUserProfileRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateUserProfileRequestValidationError{}
// Validate checks the field values on ChangeUserNameRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *ChangeUserNameRequest) Validate() error {
if m == nil {
return nil
}
if !_ChangeUserNameRequest_UserName_Pattern.MatchString(m.GetUserName()) {
return ChangeUserNameRequestValidationError{
field: "UserName",
reason: "value does not match regex pattern \"^[^[:space:]]{1,200}$\"",
}
}
return nil
}
// ChangeUserNameRequestValidationError is the validation error returned by
// ChangeUserNameRequest.Validate if the designated constraints aren't met.
type ChangeUserNameRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ChangeUserNameRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ChangeUserNameRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ChangeUserNameRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ChangeUserNameRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ChangeUserNameRequestValidationError) ErrorName() string {
return "ChangeUserNameRequestValidationError"
}
// Error satisfies the builtin error interface
func (e ChangeUserNameRequestValidationError) 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 %sChangeUserNameRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ChangeUserNameRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ChangeUserNameRequestValidationError{}
var _ChangeUserNameRequest_UserName_Pattern = regexp.MustCompile("^[^[:space:]]{1,200}$")
// Validate checks the field values on UserEmail with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *UserEmail) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Email
// no validation rules for IsEmailVerified
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserEmailValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserEmailValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserEmailValidationError is the validation error returned by
// UserEmail.Validate if the designated constraints aren't met.
type UserEmailValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserEmailValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserEmailValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserEmailValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserEmailValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserEmailValidationError) ErrorName() string { return "UserEmailValidationError" }
// Error satisfies the builtin error interface
func (e UserEmailValidationError) 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 %sUserEmail.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserEmailValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserEmailValidationError{}
// Validate checks the field values on UserEmailView with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UserEmailView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Email
// no validation rules for IsEmailVerified
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserEmailViewValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserEmailViewValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserEmailViewValidationError is the validation error returned by
// UserEmailView.Validate if the designated constraints aren't met.
type UserEmailViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserEmailViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserEmailViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserEmailViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserEmailViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserEmailViewValidationError) ErrorName() string { return "UserEmailViewValidationError" }
// Error satisfies the builtin error interface
func (e UserEmailViewValidationError) 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 %sUserEmailView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserEmailViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserEmailViewValidationError{}
// Validate checks the field values on VerifyMyUserEmailRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *VerifyMyUserEmailRequest) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetCode()); l < 1 || l > 200 {
return VerifyMyUserEmailRequestValidationError{
field: "Code",
reason: "value length must be between 1 and 200 runes, inclusive",
}
}
return nil
}
// VerifyMyUserEmailRequestValidationError is the validation error returned by
// VerifyMyUserEmailRequest.Validate if the designated constraints aren't met.
type VerifyMyUserEmailRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e VerifyMyUserEmailRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e VerifyMyUserEmailRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e VerifyMyUserEmailRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e VerifyMyUserEmailRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e VerifyMyUserEmailRequestValidationError) ErrorName() string {
return "VerifyMyUserEmailRequestValidationError"
}
// Error satisfies the builtin error interface
func (e VerifyMyUserEmailRequestValidationError) 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 %sVerifyMyUserEmailRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = VerifyMyUserEmailRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = VerifyMyUserEmailRequestValidationError{}
// Validate checks the field values on UpdateUserEmailRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UpdateUserEmailRequest) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetEmail()); l < 1 || l > 200 {
return UpdateUserEmailRequestValidationError{
field: "Email",
reason: "value length must be between 1 and 200 runes, inclusive",
}
}
return nil
}
// UpdateUserEmailRequestValidationError is the validation error returned by
// UpdateUserEmailRequest.Validate if the designated constraints aren't met.
type UpdateUserEmailRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateUserEmailRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateUserEmailRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateUserEmailRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateUserEmailRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateUserEmailRequestValidationError) ErrorName() string {
return "UpdateUserEmailRequestValidationError"
}
// Error satisfies the builtin error interface
func (e UpdateUserEmailRequestValidationError) 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 %sUpdateUserEmailRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateUserEmailRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateUserEmailRequestValidationError{}
// Validate checks the field values on UserPhone with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *UserPhone) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Phone
// no validation rules for IsPhoneVerified
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserPhoneValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserPhoneValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserPhoneValidationError is the validation error returned by
// UserPhone.Validate if the designated constraints aren't met.
type UserPhoneValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserPhoneValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserPhoneValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserPhoneValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserPhoneValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserPhoneValidationError) ErrorName() string { return "UserPhoneValidationError" }
// Error satisfies the builtin error interface
func (e UserPhoneValidationError) 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 %sUserPhone.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserPhoneValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserPhoneValidationError{}
// Validate checks the field values on UserPhoneView with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UserPhoneView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Phone
// no validation rules for IsPhoneVerified
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserPhoneViewValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserPhoneViewValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserPhoneViewValidationError is the validation error returned by
// UserPhoneView.Validate if the designated constraints aren't met.
type UserPhoneViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserPhoneViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserPhoneViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserPhoneViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserPhoneViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserPhoneViewValidationError) ErrorName() string { return "UserPhoneViewValidationError" }
// Error satisfies the builtin error interface
func (e UserPhoneViewValidationError) 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 %sUserPhoneView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserPhoneViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserPhoneViewValidationError{}
// Validate checks the field values on UpdateUserPhoneRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UpdateUserPhoneRequest) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetPhone()); l < 1 || l > 20 {
return UpdateUserPhoneRequestValidationError{
field: "Phone",
reason: "value length must be between 1 and 20 runes, inclusive",
}
}
return nil
}
// UpdateUserPhoneRequestValidationError is the validation error returned by
// UpdateUserPhoneRequest.Validate if the designated constraints aren't met.
type UpdateUserPhoneRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateUserPhoneRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateUserPhoneRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateUserPhoneRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateUserPhoneRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateUserPhoneRequestValidationError) ErrorName() string {
return "UpdateUserPhoneRequestValidationError"
}
// Error satisfies the builtin error interface
func (e UpdateUserPhoneRequestValidationError) 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 %sUpdateUserPhoneRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateUserPhoneRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateUserPhoneRequestValidationError{}
// Validate checks the field values on VerifyUserPhoneRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *VerifyUserPhoneRequest) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetCode()); l < 1 || l > 200 {
return VerifyUserPhoneRequestValidationError{
field: "Code",
reason: "value length must be between 1 and 200 runes, inclusive",
}
}
return nil
}
// VerifyUserPhoneRequestValidationError is the validation error returned by
// VerifyUserPhoneRequest.Validate if the designated constraints aren't met.
type VerifyUserPhoneRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e VerifyUserPhoneRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e VerifyUserPhoneRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e VerifyUserPhoneRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e VerifyUserPhoneRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e VerifyUserPhoneRequestValidationError) ErrorName() string {
return "VerifyUserPhoneRequestValidationError"
}
// Error satisfies the builtin error interface
func (e VerifyUserPhoneRequestValidationError) 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 %sVerifyUserPhoneRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = VerifyUserPhoneRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = VerifyUserPhoneRequestValidationError{}
// Validate checks the field values on UserAddress with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UserAddress) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Country
// no validation rules for Locality
// no validation rules for PostalCode
// no validation rules for Region
// no validation rules for StreetAddress
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserAddressValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserAddressValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserAddressValidationError is the validation error returned by
// UserAddress.Validate if the designated constraints aren't met.
type UserAddressValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserAddressValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserAddressValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserAddressValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserAddressValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserAddressValidationError) ErrorName() string { return "UserAddressValidationError" }
// Error satisfies the builtin error interface
func (e UserAddressValidationError) 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 %sUserAddress.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserAddressValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserAddressValidationError{}
// Validate checks the field values on UserAddressView with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *UserAddressView) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Country
// no validation rules for Locality
// no validation rules for PostalCode
// no validation rules for Region
// no validation rules for StreetAddress
// no validation rules for Sequence
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserAddressViewValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserAddressViewValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserAddressViewValidationError is the validation error returned by
// UserAddressView.Validate if the designated constraints aren't met.
type UserAddressViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserAddressViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserAddressViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserAddressViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserAddressViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserAddressViewValidationError) ErrorName() string { return "UserAddressViewValidationError" }
// Error satisfies the builtin error interface
func (e UserAddressViewValidationError) 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 %sUserAddressView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserAddressViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserAddressViewValidationError{}
// Validate checks the field values on UpdateUserAddressRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UpdateUserAddressRequest) Validate() error {
if m == nil {
return nil
}
if utf8.RuneCountInString(m.GetCountry()) > 200 {
return UpdateUserAddressRequestValidationError{
field: "Country",
reason: "value length must be at most 200 runes",
}
}
if utf8.RuneCountInString(m.GetLocality()) > 200 {
return UpdateUserAddressRequestValidationError{
field: "Locality",
reason: "value length must be at most 200 runes",
}
}
if utf8.RuneCountInString(m.GetPostalCode()) > 200 {
return UpdateUserAddressRequestValidationError{
field: "PostalCode",
reason: "value length must be at most 200 runes",
}
}
if utf8.RuneCountInString(m.GetRegion()) > 200 {
return UpdateUserAddressRequestValidationError{
field: "Region",
reason: "value length must be at most 200 runes",
}
}
if utf8.RuneCountInString(m.GetStreetAddress()) > 200 {
return UpdateUserAddressRequestValidationError{
field: "StreetAddress",
reason: "value length must be at most 200 runes",
}
}
return nil
}
// UpdateUserAddressRequestValidationError is the validation error returned by
// UpdateUserAddressRequest.Validate if the designated constraints aren't met.
type UpdateUserAddressRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateUserAddressRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateUserAddressRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateUserAddressRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateUserAddressRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateUserAddressRequestValidationError) ErrorName() string {
return "UpdateUserAddressRequestValidationError"
}
// Error satisfies the builtin error interface
func (e UpdateUserAddressRequestValidationError) 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 %sUpdateUserAddressRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateUserAddressRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateUserAddressRequestValidationError{}
// Validate checks the field values on PasswordChange with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *PasswordChange) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetOldPassword()); l < 1 || l > 72 {
return PasswordChangeValidationError{
field: "OldPassword",
reason: "value length must be between 1 and 72 runes, inclusive",
}
}
if l := utf8.RuneCountInString(m.GetNewPassword()); l < 1 || l > 72 {
return PasswordChangeValidationError{
field: "NewPassword",
reason: "value length must be between 1 and 72 runes, inclusive",
}
}
return nil
}
// PasswordChangeValidationError is the validation error returned by
// PasswordChange.Validate if the designated constraints aren't met.
type PasswordChangeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e PasswordChangeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e PasswordChangeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e PasswordChangeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e PasswordChangeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e PasswordChangeValidationError) ErrorName() string { return "PasswordChangeValidationError" }
// Error satisfies the builtin error interface
func (e PasswordChangeValidationError) 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 %sPasswordChange.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = PasswordChangeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = PasswordChangeValidationError{}
// Validate checks the field values on VerifyMfaOtp with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *VerifyMfaOtp) Validate() error {
if m == nil {
return nil
}
if utf8.RuneCountInString(m.GetCode()) < 1 {
return VerifyMfaOtpValidationError{
field: "Code",
reason: "value length must be at least 1 runes",
}
}
return nil
}
// VerifyMfaOtpValidationError is the validation error returned by
// VerifyMfaOtp.Validate if the designated constraints aren't met.
type VerifyMfaOtpValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e VerifyMfaOtpValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e VerifyMfaOtpValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e VerifyMfaOtpValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e VerifyMfaOtpValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e VerifyMfaOtpValidationError) ErrorName() string { return "VerifyMfaOtpValidationError" }
// Error satisfies the builtin error interface
func (e VerifyMfaOtpValidationError) 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 %sVerifyMfaOtp.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = VerifyMfaOtpValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = VerifyMfaOtpValidationError{}
// Validate checks the field values on MultiFactors with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MultiFactors) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetMfas() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MultiFactorsValidationError{
field: fmt.Sprintf("Mfas[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// MultiFactorsValidationError is the validation error returned by
// MultiFactors.Validate if the designated constraints aren't met.
type MultiFactorsValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MultiFactorsValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MultiFactorsValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MultiFactorsValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MultiFactorsValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MultiFactorsValidationError) ErrorName() string { return "MultiFactorsValidationError" }
// Error satisfies the builtin error interface
func (e MultiFactorsValidationError) 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 %sMultiFactors.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MultiFactorsValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MultiFactorsValidationError{}
// Validate checks the field values on MultiFactor with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MultiFactor) Validate() error {
if m == nil {
return nil
}
// no validation rules for Type
// no validation rules for State
return nil
}
// MultiFactorValidationError is the validation error returned by
// MultiFactor.Validate if the designated constraints aren't met.
type MultiFactorValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MultiFactorValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MultiFactorValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MultiFactorValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MultiFactorValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MultiFactorValidationError) ErrorName() string { return "MultiFactorValidationError" }
// Error satisfies the builtin error interface
func (e MultiFactorValidationError) 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 %sMultiFactor.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MultiFactorValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MultiFactorValidationError{}
// Validate checks the field values on MfaOtpResponse with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MfaOtpResponse) Validate() error {
if m == nil {
return nil
}
// no validation rules for UserId
// no validation rules for Url
// no validation rules for Secret
// no validation rules for State
return nil
}
// MfaOtpResponseValidationError is the validation error returned by
// MfaOtpResponse.Validate if the designated constraints aren't met.
type MfaOtpResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MfaOtpResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MfaOtpResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MfaOtpResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MfaOtpResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MfaOtpResponseValidationError) ErrorName() string { return "MfaOtpResponseValidationError" }
// Error satisfies the builtin error interface
func (e MfaOtpResponseValidationError) 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 %sMfaOtpResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MfaOtpResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MfaOtpResponseValidationError{}
// Validate checks the field values on UserGrantSearchRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UserGrantSearchRequest) Validate() error {
if m == nil {
return nil
}
// no validation rules for Offset
// no validation rules for Limit
if _, ok := _UserGrantSearchRequest_SortingColumn_NotInLookup[m.GetSortingColumn()]; ok {
return UserGrantSearchRequestValidationError{
field: "SortingColumn",
reason: "value must not be in list [0]",
}
}
// no validation rules for Asc
for idx, item := range m.GetQueries() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserGrantSearchRequestValidationError{
field: fmt.Sprintf("Queries[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// UserGrantSearchRequestValidationError is the validation error returned by
// UserGrantSearchRequest.Validate if the designated constraints aren't met.
type UserGrantSearchRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserGrantSearchRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserGrantSearchRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserGrantSearchRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserGrantSearchRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserGrantSearchRequestValidationError) ErrorName() string {
return "UserGrantSearchRequestValidationError"
}
// Error satisfies the builtin error interface
func (e UserGrantSearchRequestValidationError) 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 %sUserGrantSearchRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserGrantSearchRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserGrantSearchRequestValidationError{}
var _UserGrantSearchRequest_SortingColumn_NotInLookup = map[UserGrantSearchKey]struct{}{
0: {},
}
// Validate checks the field values on UserGrantSearchQuery with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UserGrantSearchQuery) Validate() error {
if m == nil {
return nil
}
if _, ok := _UserGrantSearchQuery_Key_NotInLookup[m.GetKey()]; ok {
return UserGrantSearchQueryValidationError{
field: "Key",
reason: "value must not be in list [0]",
}
}
// no validation rules for Method
// no validation rules for Value
return nil
}
// UserGrantSearchQueryValidationError is the validation error returned by
// UserGrantSearchQuery.Validate if the designated constraints aren't met.
type UserGrantSearchQueryValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserGrantSearchQueryValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserGrantSearchQueryValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserGrantSearchQueryValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserGrantSearchQueryValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserGrantSearchQueryValidationError) ErrorName() string {
return "UserGrantSearchQueryValidationError"
}
// Error satisfies the builtin error interface
func (e UserGrantSearchQueryValidationError) 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 %sUserGrantSearchQuery.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserGrantSearchQueryValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserGrantSearchQueryValidationError{}
var _UserGrantSearchQuery_Key_NotInLookup = map[UserGrantSearchKey]struct{}{
0: {},
}
// Validate checks the field values on UserGrantSearchResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UserGrantSearchResponse) Validate() error {
if m == nil {
return nil
}
// no validation rules for Offset
// no validation rules for Limit
// no validation rules for TotalResult
for idx, item := range m.GetResult() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserGrantSearchResponseValidationError{
field: fmt.Sprintf("Result[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
// no validation rules for ProcessedSequence
if v, ok := interface{}(m.GetViewTimestamp()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return UserGrantSearchResponseValidationError{
field: "ViewTimestamp",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// UserGrantSearchResponseValidationError is the validation error returned by
// UserGrantSearchResponse.Validate if the designated constraints aren't met.
type UserGrantSearchResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserGrantSearchResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserGrantSearchResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserGrantSearchResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserGrantSearchResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserGrantSearchResponseValidationError) ErrorName() string {
return "UserGrantSearchResponseValidationError"
}
// Error satisfies the builtin error interface
func (e UserGrantSearchResponseValidationError) 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 %sUserGrantSearchResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserGrantSearchResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserGrantSearchResponseValidationError{}
// Validate checks the field values on UserGrantView with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UserGrantView) Validate() error {
if m == nil {
return nil
}
// no validation rules for OrgId
// no validation rules for ProjectId
// no validation rules for UserId
// no validation rules for OrgName
// no validation rules for GrantId
return nil
}
// UserGrantViewValidationError is the validation error returned by
// UserGrantView.Validate if the designated constraints aren't met.
type UserGrantViewValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UserGrantViewValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UserGrantViewValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UserGrantViewValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UserGrantViewValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UserGrantViewValidationError) ErrorName() string { return "UserGrantViewValidationError" }
// Error satisfies the builtin error interface
func (e UserGrantViewValidationError) 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 %sUserGrantView.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UserGrantViewValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UserGrantViewValidationError{}
// Validate checks the field values on MyProjectOrgSearchRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *MyProjectOrgSearchRequest) Validate() error {
if m == nil {
return nil
}
// no validation rules for Offset
// no validation rules for Limit
// no validation rules for Asc
for idx, item := range m.GetQueries() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MyProjectOrgSearchRequestValidationError{
field: fmt.Sprintf("Queries[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// MyProjectOrgSearchRequestValidationError is the validation error returned by
// MyProjectOrgSearchRequest.Validate if the designated constraints aren't met.
type MyProjectOrgSearchRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MyProjectOrgSearchRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MyProjectOrgSearchRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MyProjectOrgSearchRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MyProjectOrgSearchRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MyProjectOrgSearchRequestValidationError) ErrorName() string {
return "MyProjectOrgSearchRequestValidationError"
}
// Error satisfies the builtin error interface
func (e MyProjectOrgSearchRequestValidationError) 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 %sMyProjectOrgSearchRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MyProjectOrgSearchRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MyProjectOrgSearchRequestValidationError{}
// Validate checks the field values on MyProjectOrgSearchQuery with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *MyProjectOrgSearchQuery) Validate() error {
if m == nil {
return nil
}
if _, ok := _MyProjectOrgSearchQuery_Key_NotInLookup[m.GetKey()]; ok {
return MyProjectOrgSearchQueryValidationError{
field: "Key",
reason: "value must not be in list [0]",
}
}
// no validation rules for Method
// no validation rules for Value
return nil
}
// MyProjectOrgSearchQueryValidationError is the validation error returned by
// MyProjectOrgSearchQuery.Validate if the designated constraints aren't met.
type MyProjectOrgSearchQueryValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MyProjectOrgSearchQueryValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MyProjectOrgSearchQueryValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MyProjectOrgSearchQueryValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MyProjectOrgSearchQueryValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MyProjectOrgSearchQueryValidationError) ErrorName() string {
return "MyProjectOrgSearchQueryValidationError"
}
// Error satisfies the builtin error interface
func (e MyProjectOrgSearchQueryValidationError) 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 %sMyProjectOrgSearchQuery.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MyProjectOrgSearchQueryValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MyProjectOrgSearchQueryValidationError{}
var _MyProjectOrgSearchQuery_Key_NotInLookup = map[MyProjectOrgSearchKey]struct{}{
0: {},
}
// Validate checks the field values on MyProjectOrgSearchResponse with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *MyProjectOrgSearchResponse) Validate() error {
if m == nil {
return nil
}
// no validation rules for Offset
// no validation rules for Limit
// no validation rules for TotalResult
for idx, item := range m.GetResult() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MyProjectOrgSearchResponseValidationError{
field: fmt.Sprintf("Result[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// MyProjectOrgSearchResponseValidationError is the validation error returned
// by MyProjectOrgSearchResponse.Validate if the designated constraints aren't met.
type MyProjectOrgSearchResponseValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MyProjectOrgSearchResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MyProjectOrgSearchResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MyProjectOrgSearchResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MyProjectOrgSearchResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MyProjectOrgSearchResponseValidationError) ErrorName() string {
return "MyProjectOrgSearchResponseValidationError"
}
// Error satisfies the builtin error interface
func (e MyProjectOrgSearchResponseValidationError) 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 %sMyProjectOrgSearchResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MyProjectOrgSearchResponseValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MyProjectOrgSearchResponseValidationError{}
// Validate checks the field values on Org with the rules defined in the proto
// definition for this message. If any rules are violated, an error is returned.
func (m *Org) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Name
return nil
}
// OrgValidationError is the validation error returned by Org.Validate if the
// designated constraints aren't met.
type OrgValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e OrgValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e OrgValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e OrgValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e OrgValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e OrgValidationError) ErrorName() string { return "OrgValidationError" }
// Error satisfies the builtin error interface
func (e OrgValidationError) 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 %sOrg.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = OrgValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = OrgValidationError{}
// Validate checks the field values on MyPermissions with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MyPermissions) Validate() error {
if m == nil {
return nil
}
return nil
}
// MyPermissionsValidationError is the validation error returned by
// MyPermissions.Validate if the designated constraints aren't met.
type MyPermissionsValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MyPermissionsValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MyPermissionsValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MyPermissionsValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MyPermissionsValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MyPermissionsValidationError) ErrorName() string { return "MyPermissionsValidationError" }
// Error satisfies the builtin error interface
func (e MyPermissionsValidationError) 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 %sMyPermissions.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MyPermissionsValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MyPermissionsValidationError{}
// Validate checks the field values on ChangesRequest with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *ChangesRequest) Validate() error {
if m == nil {
return nil
}
// no validation rules for Limit
// no validation rules for SequenceOffset
// no validation rules for Asc
return nil
}
// ChangesRequestValidationError is the validation error returned by
// ChangesRequest.Validate if the designated constraints aren't met.
type ChangesRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ChangesRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ChangesRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ChangesRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ChangesRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ChangesRequestValidationError) ErrorName() string { return "ChangesRequestValidationError" }
// Error satisfies the builtin error interface
func (e ChangesRequestValidationError) 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 %sChangesRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ChangesRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ChangesRequestValidationError{}
// Validate checks the field values on Changes with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Changes) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetChanges() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ChangesValidationError{
field: fmt.Sprintf("Changes[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
// no validation rules for Offset
// no validation rules for Limit
return nil
}
// ChangesValidationError is the validation error returned by Changes.Validate
// if the designated constraints aren't met.
type ChangesValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ChangesValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ChangesValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ChangesValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ChangesValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ChangesValidationError) ErrorName() string { return "ChangesValidationError" }
// Error satisfies the builtin error interface
func (e ChangesValidationError) 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 %sChanges.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ChangesValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ChangesValidationError{}
// Validate checks the field values on Change with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Change) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ChangeValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetEventType()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ChangeValidationError{
field: "EventType",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Sequence
// no validation rules for EditorId
// no validation rules for Editor
if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ChangeValidationError{
field: "Data",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// ChangeValidationError is the validation error returned by Change.Validate if
// the designated constraints aren't met.
type ChangeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ChangeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ChangeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ChangeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ChangeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ChangeValidationError) ErrorName() string { return "ChangeValidationError" }
// Error satisfies the builtin error interface
func (e ChangeValidationError) 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 %sChange.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ChangeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ChangeValidationError{}
// Validate checks the field values on PasswordComplexityPolicy with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *PasswordComplexityPolicy) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Description
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return PasswordComplexityPolicyValidationError{
field: "CreationDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return PasswordComplexityPolicyValidationError{
field: "ChangeDate",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for MinLength
// no validation rules for HasLowercase
// no validation rules for HasUppercase
// no validation rules for HasNumber
// no validation rules for HasSymbol
// no validation rules for Sequence
// no validation rules for IsDefault
return nil
}
// PasswordComplexityPolicyValidationError is the validation error returned by
// PasswordComplexityPolicy.Validate if the designated constraints aren't met.
type PasswordComplexityPolicyValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e PasswordComplexityPolicyValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e PasswordComplexityPolicyValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e PasswordComplexityPolicyValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e PasswordComplexityPolicyValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e PasswordComplexityPolicyValidationError) ErrorName() string {
return "PasswordComplexityPolicyValidationError"
}
// Error satisfies the builtin error interface
func (e PasswordComplexityPolicyValidationError) 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 %sPasswordComplexityPolicy.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = PasswordComplexityPolicyValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = PasswordComplexityPolicyValidationError{}