// Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/config_dump.proto package v2alpha import ( "bytes" "errors" "fmt" "net" "net/mail" "net/url" "regexp" "sort" "strings" "time" "unicode/utf8" "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used var ( _ = bytes.MinRead _ = errors.New("") _ = fmt.Print _ = utf8.UTFMax _ = (*regexp.Regexp)(nil) _ = (*strings.Reader)(nil) _ = net.IPv4len _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) _ = anypb.Any{} _ = sort.Sort ) // Validate checks the field values on ConfigDump with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *ConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ConfigDump with the rules defined in // the proto definition for this message. If any rules are violated, the // result is a list of violation errors wrapped in ConfigDumpMultiError, or // nil if none found. func (m *ConfigDump) ValidateAll() error { return m.validate(true) } func (m *ConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ConfigDumpValidationError{ field: fmt.Sprintf("Configs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ConfigDumpValidationError{ field: fmt.Sprintf("Configs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigDumpValidationError{ field: fmt.Sprintf("Configs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ConfigDumpMultiError(errors) } return nil } // ConfigDumpMultiError is an error wrapping multiple validation errors // returned by ConfigDump.ValidateAll() if the designated constraints aren't met. type ConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ConfigDumpMultiError) AllErrors() []error { return m } // ConfigDumpValidationError is the validation error returned by // ConfigDump.Validate if the designated constraints aren't met. type ConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ConfigDumpValidationError) ErrorName() string { return "ConfigDumpValidationError" } // Error satisfies the builtin error interface func (e ConfigDumpValidationError) 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 %sConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ConfigDumpValidationError{} // Validate checks the field values on UpdateFailureState with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *UpdateFailureState) Validate() error { return m.validate(false) } // ValidateAll checks the field values on UpdateFailureState with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // UpdateFailureStateMultiError, or nil if none found. func (m *UpdateFailureState) ValidateAll() error { return m.validate(true) } func (m *UpdateFailureState) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetFailedConfiguration()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, UpdateFailureStateValidationError{ field: "FailedConfiguration", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, UpdateFailureStateValidationError{ field: "FailedConfiguration", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateFailureStateValidationError{ field: "FailedConfiguration", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdateAttempt()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, UpdateFailureStateValidationError{ field: "LastUpdateAttempt", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, UpdateFailureStateValidationError{ field: "LastUpdateAttempt", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateFailureStateValidationError{ field: "LastUpdateAttempt", reason: "embedded message failed validation", cause: err, } } } // no validation rules for Details if len(errors) > 0 { return UpdateFailureStateMultiError(errors) } return nil } // UpdateFailureStateMultiError is an error wrapping multiple validation errors // returned by UpdateFailureState.ValidateAll() if the designated constraints // aren't met. type UpdateFailureStateMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m UpdateFailureStateMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m UpdateFailureStateMultiError) AllErrors() []error { return m } // UpdateFailureStateValidationError is the validation error returned by // UpdateFailureState.Validate if the designated constraints aren't met. type UpdateFailureStateValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e UpdateFailureStateValidationError) Field() string { return e.field } // Reason function returns reason value. func (e UpdateFailureStateValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e UpdateFailureStateValidationError) Cause() error { return e.cause } // Key function returns key value. func (e UpdateFailureStateValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e UpdateFailureStateValidationError) ErrorName() string { return "UpdateFailureStateValidationError" } // Error satisfies the builtin error interface func (e UpdateFailureStateValidationError) 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 %sUpdateFailureState.%s: %s%s", key, e.field, e.reason, cause) } var _ error = UpdateFailureStateValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = UpdateFailureStateValidationError{} // Validate checks the field values on BootstrapConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *BootstrapConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on BootstrapConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // BootstrapConfigDumpMultiError, or nil if none found. func (m *BootstrapConfigDump) ValidateAll() error { return m.validate(true) } func (m *BootstrapConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetBootstrap()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, BootstrapConfigDumpValidationError{ field: "Bootstrap", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, BootstrapConfigDumpValidationError{ field: "Bootstrap", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapConfigDumpValidationError{ field: "Bootstrap", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, BootstrapConfigDumpValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, BootstrapConfigDumpValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapConfigDumpValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return BootstrapConfigDumpMultiError(errors) } return nil } // BootstrapConfigDumpMultiError is an error wrapping multiple validation // errors returned by BootstrapConfigDump.ValidateAll() if the designated // constraints aren't met. type BootstrapConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m BootstrapConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m BootstrapConfigDumpMultiError) AllErrors() []error { return m } // BootstrapConfigDumpValidationError is the validation error returned by // BootstrapConfigDump.Validate if the designated constraints aren't met. type BootstrapConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e BootstrapConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e BootstrapConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e BootstrapConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e BootstrapConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e BootstrapConfigDumpValidationError) ErrorName() string { return "BootstrapConfigDumpValidationError" } // Error satisfies the builtin error interface func (e BootstrapConfigDumpValidationError) 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 %sBootstrapConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = BootstrapConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = BootstrapConfigDumpValidationError{} // Validate checks the field values on ListenersConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ListenersConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ListenersConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ListenersConfigDumpMultiError, or nil if none found. func (m *ListenersConfigDump) ValidateAll() error { return m.validate(true) } func (m *ListenersConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for VersionInfo for idx, item := range m.GetStaticListeners() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDumpValidationError{ field: fmt.Sprintf("StaticListeners[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDumpValidationError{ field: fmt.Sprintf("StaticListeners[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDumpValidationError{ field: fmt.Sprintf("StaticListeners[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicListeners() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDumpValidationError{ field: fmt.Sprintf("DynamicListeners[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDumpValidationError{ field: fmt.Sprintf("DynamicListeners[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDumpValidationError{ field: fmt.Sprintf("DynamicListeners[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ListenersConfigDumpMultiError(errors) } return nil } // ListenersConfigDumpMultiError is an error wrapping multiple validation // errors returned by ListenersConfigDump.ValidateAll() if the designated // constraints aren't met. type ListenersConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ListenersConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ListenersConfigDumpMultiError) AllErrors() []error { return m } // ListenersConfigDumpValidationError is the validation error returned by // ListenersConfigDump.Validate if the designated constraints aren't met. type ListenersConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ListenersConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ListenersConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ListenersConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ListenersConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ListenersConfigDumpValidationError) ErrorName() string { return "ListenersConfigDumpValidationError" } // Error satisfies the builtin error interface func (e ListenersConfigDumpValidationError) 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 %sListenersConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ListenersConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ListenersConfigDumpValidationError{} // Validate checks the field values on ClustersConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ClustersConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ClustersConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ClustersConfigDumpMultiError, or nil if none found. func (m *ClustersConfigDump) ValidateAll() error { return m.validate(true) } func (m *ClustersConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for VersionInfo for idx, item := range m.GetStaticClusters() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDumpValidationError{ field: fmt.Sprintf("StaticClusters[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDumpValidationError{ field: fmt.Sprintf("StaticClusters[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("StaticClusters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicActiveClusters() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicWarmingClusters() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ClustersConfigDumpMultiError(errors) } return nil } // ClustersConfigDumpMultiError is an error wrapping multiple validation errors // returned by ClustersConfigDump.ValidateAll() if the designated constraints // aren't met. type ClustersConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ClustersConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ClustersConfigDumpMultiError) AllErrors() []error { return m } // ClustersConfigDumpValidationError is the validation error returned by // ClustersConfigDump.Validate if the designated constraints aren't met. type ClustersConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ClustersConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ClustersConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ClustersConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ClustersConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ClustersConfigDumpValidationError) ErrorName() string { return "ClustersConfigDumpValidationError" } // Error satisfies the builtin error interface func (e ClustersConfigDumpValidationError) 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 %sClustersConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ClustersConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ClustersConfigDumpValidationError{} // Validate checks the field values on RoutesConfigDump with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *RoutesConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RoutesConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // RoutesConfigDumpMultiError, or nil if none found. func (m *RoutesConfigDump) ValidateAll() error { return m.validate(true) } func (m *RoutesConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetStaticRouteConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RoutesConfigDumpValidationError{ field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RoutesConfigDumpValidationError{ field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidationError{ field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicRouteConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return RoutesConfigDumpMultiError(errors) } return nil } // RoutesConfigDumpMultiError is an error wrapping multiple validation errors // returned by RoutesConfigDump.ValidateAll() if the designated constraints // aren't met. type RoutesConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RoutesConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RoutesConfigDumpMultiError) AllErrors() []error { return m } // RoutesConfigDumpValidationError is the validation error returned by // RoutesConfigDump.Validate if the designated constraints aren't met. type RoutesConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RoutesConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RoutesConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RoutesConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RoutesConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RoutesConfigDumpValidationError) ErrorName() string { return "RoutesConfigDumpValidationError" } // Error satisfies the builtin error interface func (e RoutesConfigDumpValidationError) 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 %sRoutesConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RoutesConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RoutesConfigDumpValidationError{} // Validate checks the field values on ScopedRoutesConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ScopedRoutesConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // ScopedRoutesConfigDumpMultiError, or nil if none found. func (m *ScopedRoutesConfigDump) ValidateAll() error { return m.validate(true) } func (m *ScopedRoutesConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetInlineScopedRouteConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicScopedRouteConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return ScopedRoutesConfigDumpMultiError(errors) } return nil } // ScopedRoutesConfigDumpMultiError is an error wrapping multiple validation // errors returned by ScopedRoutesConfigDump.ValidateAll() if the designated // constraints aren't met. type ScopedRoutesConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ScopedRoutesConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ScopedRoutesConfigDumpMultiError) AllErrors() []error { return m } // ScopedRoutesConfigDumpValidationError is the validation error returned by // ScopedRoutesConfigDump.Validate if the designated constraints aren't met. type ScopedRoutesConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ScopedRoutesConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ScopedRoutesConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ScopedRoutesConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ScopedRoutesConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ScopedRoutesConfigDumpValidationError) ErrorName() string { return "ScopedRoutesConfigDumpValidationError" } // Error satisfies the builtin error interface func (e ScopedRoutesConfigDumpValidationError) 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 %sScopedRoutesConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ScopedRoutesConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ScopedRoutesConfigDumpValidationError{} // Validate checks the field values on SecretsConfigDump with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SecretsConfigDump with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in // SecretsConfigDumpMultiError, or nil if none found. func (m *SecretsConfigDump) ValidateAll() error { return m.validate(true) } func (m *SecretsConfigDump) validate(all bool) error { if m == nil { return nil } var errors []error for idx, item := range m.GetStaticSecrets() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDumpValidationError{ field: fmt.Sprintf("StaticSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDumpValidationError{ field: fmt.Sprintf("StaticSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("StaticSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicActiveSecrets() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetDynamicWarmingSecrets() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if len(errors) > 0 { return SecretsConfigDumpMultiError(errors) } return nil } // SecretsConfigDumpMultiError is an error wrapping multiple validation errors // returned by SecretsConfigDump.ValidateAll() if the designated constraints // aren't met. type SecretsConfigDumpMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SecretsConfigDumpMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SecretsConfigDumpMultiError) AllErrors() []error { return m } // SecretsConfigDumpValidationError is the validation error returned by // SecretsConfigDump.Validate if the designated constraints aren't met. type SecretsConfigDumpValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SecretsConfigDumpValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SecretsConfigDumpValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SecretsConfigDumpValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SecretsConfigDumpValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SecretsConfigDumpValidationError) ErrorName() string { return "SecretsConfigDumpValidationError" } // Error satisfies the builtin error interface func (e SecretsConfigDumpValidationError) 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 %sSecretsConfigDump.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SecretsConfigDumpValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SecretsConfigDumpValidationError{} // Validate checks the field values on ListenersConfigDump_StaticListener with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *ListenersConfigDump_StaticListener) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ListenersConfigDump_StaticListener // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // ListenersConfigDump_StaticListenerMultiError, or nil if none found. func (m *ListenersConfigDump_StaticListener) ValidateAll() error { return m.validate(true) } func (m *ListenersConfigDump_StaticListener) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetListener()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ field: "Listener", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ field: "Listener", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "Listener", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ListenersConfigDump_StaticListenerMultiError(errors) } return nil } // ListenersConfigDump_StaticListenerMultiError is an error wrapping multiple // validation errors returned by // ListenersConfigDump_StaticListener.ValidateAll() if the designated // constraints aren't met. type ListenersConfigDump_StaticListenerMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ListenersConfigDump_StaticListenerMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ListenersConfigDump_StaticListenerMultiError) AllErrors() []error { return m } // ListenersConfigDump_StaticListenerValidationError is the validation error // returned by ListenersConfigDump_StaticListener.Validate if the designated // constraints aren't met. type ListenersConfigDump_StaticListenerValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ListenersConfigDump_StaticListenerValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ListenersConfigDump_StaticListenerValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ListenersConfigDump_StaticListenerValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ListenersConfigDump_StaticListenerValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ListenersConfigDump_StaticListenerValidationError) ErrorName() string { return "ListenersConfigDump_StaticListenerValidationError" } // Error satisfies the builtin error interface func (e ListenersConfigDump_StaticListenerValidationError) 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 %sListenersConfigDump_StaticListener.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ListenersConfigDump_StaticListenerValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ListenersConfigDump_StaticListenerValidationError{} // Validate checks the field values on ListenersConfigDump_DynamicListenerState // with the rules defined in the proto definition for this message. If any // rules are violated, the first error encountered is returned, or nil if // there are no violations. func (m *ListenersConfigDump_DynamicListenerState) Validate() error { return m.validate(false) } // ValidateAll checks the field values on // ListenersConfigDump_DynamicListenerState with the rules defined in the // proto definition for this message. If any rules are violated, the result is // a list of violation errors wrapped in // ListenersConfigDump_DynamicListenerStateMultiError, or nil if none found. func (m *ListenersConfigDump_DynamicListenerState) ValidateAll() error { return m.validate(true) } func (m *ListenersConfigDump_DynamicListenerState) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for VersionInfo if all { switch v := interface{}(m.GetListener()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ field: "Listener", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ field: "Listener", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerStateValidationError{ field: "Listener", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerStateValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ListenersConfigDump_DynamicListenerStateMultiError(errors) } return nil } // ListenersConfigDump_DynamicListenerStateMultiError is an error wrapping // multiple validation errors returned by // ListenersConfigDump_DynamicListenerState.ValidateAll() if the designated // constraints aren't met. type ListenersConfigDump_DynamicListenerStateMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ListenersConfigDump_DynamicListenerStateMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ListenersConfigDump_DynamicListenerStateMultiError) AllErrors() []error { return m } // ListenersConfigDump_DynamicListenerStateValidationError is the validation // error returned by ListenersConfigDump_DynamicListenerState.Validate if the // designated constraints aren't met. type ListenersConfigDump_DynamicListenerStateValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ListenersConfigDump_DynamicListenerStateValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ListenersConfigDump_DynamicListenerStateValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ListenersConfigDump_DynamicListenerStateValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ListenersConfigDump_DynamicListenerStateValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ListenersConfigDump_DynamicListenerStateValidationError) ErrorName() string { return "ListenersConfigDump_DynamicListenerStateValidationError" } // Error satisfies the builtin error interface func (e ListenersConfigDump_DynamicListenerStateValidationError) 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 %sListenersConfigDump_DynamicListenerState.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ListenersConfigDump_DynamicListenerStateValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ListenersConfigDump_DynamicListenerStateValidationError{} // Validate checks the field values on ListenersConfigDump_DynamicListener with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *ListenersConfigDump_DynamicListener) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ListenersConfigDump_DynamicListener // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // ListenersConfigDump_DynamicListenerMultiError, or nil if none found. func (m *ListenersConfigDump_DynamicListener) ValidateAll() error { return m.validate(true) } func (m *ListenersConfigDump_DynamicListener) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name if all { switch v := interface{}(m.GetActiveState()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "ActiveState", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "ActiveState", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "ActiveState", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetWarmingState()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "WarmingState", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "WarmingState", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "WarmingState", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetDrainingState()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "DrainingState", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "DrainingState", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "DrainingState", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetErrorState()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "ErrorState", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ field: "ErrorState", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "ErrorState", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ListenersConfigDump_DynamicListenerMultiError(errors) } return nil } // ListenersConfigDump_DynamicListenerMultiError is an error wrapping multiple // validation errors returned by // ListenersConfigDump_DynamicListener.ValidateAll() if the designated // constraints aren't met. type ListenersConfigDump_DynamicListenerMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ListenersConfigDump_DynamicListenerMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ListenersConfigDump_DynamicListenerMultiError) AllErrors() []error { return m } // ListenersConfigDump_DynamicListenerValidationError is the validation error // returned by ListenersConfigDump_DynamicListener.Validate if the designated // constraints aren't met. type ListenersConfigDump_DynamicListenerValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ListenersConfigDump_DynamicListenerValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ListenersConfigDump_DynamicListenerValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ListenersConfigDump_DynamicListenerValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ListenersConfigDump_DynamicListenerValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ListenersConfigDump_DynamicListenerValidationError) ErrorName() string { return "ListenersConfigDump_DynamicListenerValidationError" } // Error satisfies the builtin error interface func (e ListenersConfigDump_DynamicListenerValidationError) 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 %sListenersConfigDump_DynamicListener.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ListenersConfigDump_DynamicListenerValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ListenersConfigDump_DynamicListenerValidationError{} // Validate checks the field values on ClustersConfigDump_StaticCluster with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *ClustersConfigDump_StaticCluster) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ClustersConfigDump_StaticCluster with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // ClustersConfigDump_StaticClusterMultiError, or nil if none found. func (m *ClustersConfigDump_StaticCluster) ValidateAll() error { return m.validate(true) } func (m *ClustersConfigDump_StaticCluster) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetCluster()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ClustersConfigDump_StaticClusterMultiError(errors) } return nil } // ClustersConfigDump_StaticClusterMultiError is an error wrapping multiple // validation errors returned by // ClustersConfigDump_StaticCluster.ValidateAll() if the designated // constraints aren't met. type ClustersConfigDump_StaticClusterMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ClustersConfigDump_StaticClusterMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ClustersConfigDump_StaticClusterMultiError) AllErrors() []error { return m } // ClustersConfigDump_StaticClusterValidationError is the validation error // returned by ClustersConfigDump_StaticCluster.Validate if the designated // constraints aren't met. type ClustersConfigDump_StaticClusterValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ClustersConfigDump_StaticClusterValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ClustersConfigDump_StaticClusterValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ClustersConfigDump_StaticClusterValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ClustersConfigDump_StaticClusterValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ClustersConfigDump_StaticClusterValidationError) ErrorName() string { return "ClustersConfigDump_StaticClusterValidationError" } // Error satisfies the builtin error interface func (e ClustersConfigDump_StaticClusterValidationError) 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 %sClustersConfigDump_StaticCluster.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ClustersConfigDump_StaticClusterValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ClustersConfigDump_StaticClusterValidationError{} // Validate checks the field values on ClustersConfigDump_DynamicCluster with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *ClustersConfigDump_DynamicCluster) Validate() error { return m.validate(false) } // ValidateAll checks the field values on ClustersConfigDump_DynamicCluster // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // ClustersConfigDump_DynamicClusterMultiError, or nil if none found. func (m *ClustersConfigDump_DynamicCluster) ValidateAll() error { return m.validate(true) } func (m *ClustersConfigDump_DynamicCluster) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for VersionInfo if all { switch v := interface{}(m.GetCluster()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ field: "Cluster", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ field: "Cluster", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterValidationError{ field: "Cluster", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ClustersConfigDump_DynamicClusterMultiError(errors) } return nil } // ClustersConfigDump_DynamicClusterMultiError is an error wrapping multiple // validation errors returned by // ClustersConfigDump_DynamicCluster.ValidateAll() if the designated // constraints aren't met. type ClustersConfigDump_DynamicClusterMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ClustersConfigDump_DynamicClusterMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ClustersConfigDump_DynamicClusterMultiError) AllErrors() []error { return m } // ClustersConfigDump_DynamicClusterValidationError is the validation error // returned by ClustersConfigDump_DynamicCluster.Validate if the designated // constraints aren't met. type ClustersConfigDump_DynamicClusterValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ClustersConfigDump_DynamicClusterValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ClustersConfigDump_DynamicClusterValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ClustersConfigDump_DynamicClusterValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ClustersConfigDump_DynamicClusterValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ClustersConfigDump_DynamicClusterValidationError) ErrorName() string { return "ClustersConfigDump_DynamicClusterValidationError" } // Error satisfies the builtin error interface func (e ClustersConfigDump_DynamicClusterValidationError) 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 %sClustersConfigDump_DynamicCluster.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ClustersConfigDump_DynamicClusterValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ClustersConfigDump_DynamicClusterValidationError{} // Validate checks the field values on RoutesConfigDump_StaticRouteConfig with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RoutesConfigDump_StaticRouteConfig // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // RoutesConfigDump_StaticRouteConfigMultiError, or nil if none found. func (m *RoutesConfigDump_StaticRouteConfig) ValidateAll() error { return m.validate(true) } func (m *RoutesConfigDump_StaticRouteConfig) validate(all bool) error { if m == nil { return nil } var errors []error if all { switch v := interface{}(m.GetRouteConfig()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteConfig", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteConfig", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteConfig", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return RoutesConfigDump_StaticRouteConfigMultiError(errors) } return nil } // RoutesConfigDump_StaticRouteConfigMultiError is an error wrapping multiple // validation errors returned by // RoutesConfigDump_StaticRouteConfig.ValidateAll() if the designated // constraints aren't met. type RoutesConfigDump_StaticRouteConfigMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RoutesConfigDump_StaticRouteConfigMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RoutesConfigDump_StaticRouteConfigMultiError) AllErrors() []error { return m } // RoutesConfigDump_StaticRouteConfigValidationError is the validation error // returned by RoutesConfigDump_StaticRouteConfig.Validate if the designated // constraints aren't met. type RoutesConfigDump_StaticRouteConfigValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RoutesConfigDump_StaticRouteConfigValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RoutesConfigDump_StaticRouteConfigValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RoutesConfigDump_StaticRouteConfigValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RoutesConfigDump_StaticRouteConfigValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RoutesConfigDump_StaticRouteConfigValidationError) ErrorName() string { return "RoutesConfigDump_StaticRouteConfigValidationError" } // Error satisfies the builtin error interface func (e RoutesConfigDump_StaticRouteConfigValidationError) 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 %sRoutesConfigDump_StaticRouteConfig.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RoutesConfigDump_StaticRouteConfigValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RoutesConfigDump_StaticRouteConfigValidationError{} // Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are // no violations. func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { return m.validate(false) } // ValidateAll checks the field values on RoutesConfigDump_DynamicRouteConfig // with the rules defined in the proto definition for this message. If any // rules are violated, the result is a list of violation errors wrapped in // RoutesConfigDump_DynamicRouteConfigMultiError, or nil if none found. func (m *RoutesConfigDump_DynamicRouteConfig) ValidateAll() error { return m.validate(true) } func (m *RoutesConfigDump_DynamicRouteConfig) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for VersionInfo if all { switch v := interface{}(m.GetRouteConfig()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ field: "RouteConfig", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ field: "RouteConfig", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRouteConfigValidationError{ field: "RouteConfig", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRouteConfigValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return RoutesConfigDump_DynamicRouteConfigMultiError(errors) } return nil } // RoutesConfigDump_DynamicRouteConfigMultiError is an error wrapping multiple // validation errors returned by // RoutesConfigDump_DynamicRouteConfig.ValidateAll() if the designated // constraints aren't met. type RoutesConfigDump_DynamicRouteConfigMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m RoutesConfigDump_DynamicRouteConfigMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m RoutesConfigDump_DynamicRouteConfigMultiError) AllErrors() []error { return m } // RoutesConfigDump_DynamicRouteConfigValidationError is the validation error // returned by RoutesConfigDump_DynamicRouteConfig.Validate if the designated // constraints aren't met. type RoutesConfigDump_DynamicRouteConfigValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e RoutesConfigDump_DynamicRouteConfigValidationError) Field() string { return e.field } // Reason function returns reason value. func (e RoutesConfigDump_DynamicRouteConfigValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e RoutesConfigDump_DynamicRouteConfigValidationError) Cause() error { return e.cause } // Key function returns key value. func (e RoutesConfigDump_DynamicRouteConfigValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e RoutesConfigDump_DynamicRouteConfigValidationError) ErrorName() string { return "RoutesConfigDump_DynamicRouteConfigValidationError" } // Error satisfies the builtin error interface func (e RoutesConfigDump_DynamicRouteConfigValidationError) 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 %sRoutesConfigDump_DynamicRouteConfig.%s: %s%s", key, e.field, e.reason, cause) } var _ error = RoutesConfigDump_DynamicRouteConfigValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = RoutesConfigDump_DynamicRouteConfigValidationError{} // Validate checks the field values on // ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { return m.validate(false) } // ValidateAll checks the field values on // ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in // the proto definition for this message. If any rules are violated, the // result is a list of violation errors wrapped in // ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError, or nil if none found. func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ValidateAll() error { return m.validate(true) } func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name for idx, item := range m.GetScopedRouteConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError(errors) } return nil } // ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError is an error // wrapping multiple validation errors returned by // ScopedRoutesConfigDump_InlineScopedRouteConfigs.ValidateAll() if the // designated constraints aren't met. type ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) AllErrors() []error { return m } // ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError is the // validation error returned by // ScopedRoutesConfigDump_InlineScopedRouteConfigs.Validate if the designated // constraints aren't met. type ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) ErrorName() string { return "ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError" } // Error satisfies the builtin error interface func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) 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 %sScopedRoutesConfigDump_InlineScopedRouteConfigs.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{} // Validate checks the field values on // ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { return m.validate(false) } // ValidateAll checks the field values on // ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in // the proto definition for this message. If any rules are violated, the // result is a list of violation errors wrapped in // ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError, or nil if none found. func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ValidateAll() error { return m.validate(true) } func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for VersionInfo for idx, item := range m.GetScopedRouteConfigs() { _, _ = idx, item if all { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError(errors) } return nil } // ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError is an error // wrapping multiple validation errors returned by // ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ValidateAll() if the // designated constraints aren't met. type ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) AllErrors() []error { return m } // ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError is the // validation error returned by // ScopedRoutesConfigDump_DynamicScopedRouteConfigs.Validate if the designated // constraints aren't met. type ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Field() string { return e.field } // Reason function returns reason value. func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Cause() error { return e.cause } // Key function returns key value. func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) ErrorName() string { return "ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError" } // Error satisfies the builtin error interface func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) 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 %sScopedRoutesConfigDump_DynamicScopedRouteConfigs.%s: %s%s", key, e.field, e.reason, cause) } var _ error = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{} // Validate checks the field values on SecretsConfigDump_DynamicSecret with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump_DynamicSecret) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SecretsConfigDump_DynamicSecret with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // SecretsConfigDump_DynamicSecretMultiError, or nil if none found. func (m *SecretsConfigDump_DynamicSecret) ValidateAll() error { return m.validate(true) } func (m *SecretsConfigDump_DynamicSecret) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name // no validation rules for VersionInfo if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_DynamicSecretValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetSecret()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ field: "Secret", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ field: "Secret", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_DynamicSecretValidationError{ field: "Secret", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return SecretsConfigDump_DynamicSecretMultiError(errors) } return nil } // SecretsConfigDump_DynamicSecretMultiError is an error wrapping multiple // validation errors returned by SecretsConfigDump_DynamicSecret.ValidateAll() // if the designated constraints aren't met. type SecretsConfigDump_DynamicSecretMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SecretsConfigDump_DynamicSecretMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SecretsConfigDump_DynamicSecretMultiError) AllErrors() []error { return m } // SecretsConfigDump_DynamicSecretValidationError is the validation error // returned by SecretsConfigDump_DynamicSecret.Validate if the designated // constraints aren't met. type SecretsConfigDump_DynamicSecretValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SecretsConfigDump_DynamicSecretValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SecretsConfigDump_DynamicSecretValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SecretsConfigDump_DynamicSecretValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SecretsConfigDump_DynamicSecretValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SecretsConfigDump_DynamicSecretValidationError) ErrorName() string { return "SecretsConfigDump_DynamicSecretValidationError" } // Error satisfies the builtin error interface func (e SecretsConfigDump_DynamicSecretValidationError) 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 %sSecretsConfigDump_DynamicSecret.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SecretsConfigDump_DynamicSecretValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SecretsConfigDump_DynamicSecretValidationError{} // Validate checks the field values on SecretsConfigDump_StaticSecret with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump_StaticSecret) Validate() error { return m.validate(false) } // ValidateAll checks the field values on SecretsConfigDump_StaticSecret with // the rules defined in the proto definition for this message. If any rules // are violated, the result is a list of violation errors wrapped in // SecretsConfigDump_StaticSecretMultiError, or nil if none found. func (m *SecretsConfigDump_StaticSecret) ValidateAll() error { return m.validate(true) } func (m *SecretsConfigDump_StaticSecret) validate(all bool) error { if m == nil { return nil } var errors []error // no validation rules for Name if all { switch v := interface{}(m.GetLastUpdated()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_StaticSecretValidationError{ field: "LastUpdated", reason: "embedded message failed validation", cause: err, } } } if all { switch v := interface{}(m.GetSecret()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ field: "Secret", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ field: "Secret", reason: "embedded message failed validation", cause: err, }) } } } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_StaticSecretValidationError{ field: "Secret", reason: "embedded message failed validation", cause: err, } } } if len(errors) > 0 { return SecretsConfigDump_StaticSecretMultiError(errors) } return nil } // SecretsConfigDump_StaticSecretMultiError is an error wrapping multiple // validation errors returned by SecretsConfigDump_StaticSecret.ValidateAll() // if the designated constraints aren't met. type SecretsConfigDump_StaticSecretMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SecretsConfigDump_StaticSecretMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) } return strings.Join(msgs, "; ") } // AllErrors returns a list of validation violation errors. func (m SecretsConfigDump_StaticSecretMultiError) AllErrors() []error { return m } // SecretsConfigDump_StaticSecretValidationError is the validation error // returned by SecretsConfigDump_StaticSecret.Validate if the designated // constraints aren't met. type SecretsConfigDump_StaticSecretValidationError struct { field string reason string cause error key bool } // Field function returns field value. func (e SecretsConfigDump_StaticSecretValidationError) Field() string { return e.field } // Reason function returns reason value. func (e SecretsConfigDump_StaticSecretValidationError) Reason() string { return e.reason } // Cause function returns cause value. func (e SecretsConfigDump_StaticSecretValidationError) Cause() error { return e.cause } // Key function returns key value. func (e SecretsConfigDump_StaticSecretValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e SecretsConfigDump_StaticSecretValidationError) ErrorName() string { return "SecretsConfigDump_StaticSecretValidationError" } // Error satisfies the builtin error interface func (e SecretsConfigDump_StaticSecretValidationError) 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 %sSecretsConfigDump_StaticSecret.%s: %s%s", key, e.field, e.reason, cause) } var _ error = SecretsConfigDump_StaticSecretValidationError{} var _ interface { Field() string Reason() string Key() bool Cause() error ErrorName() string } = SecretsConfigDump_StaticSecretValidationError{}