You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by lu...@apache.org on 2022/07/05 09:32:59 UTC
[skywalking-banyandb] branch main updated: api: add validation for proto message (#134)
This is an automated email from the ASF dual-hosted git repository.
lujiajing pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 5886070 api: add validation for proto message (#134)
5886070 is described below
commit 5886070c8406d1fe0df82b7579933f4d9b1435db
Author: e11jah <30...@users.noreply.github.com>
AuthorDate: Tue Jul 5 17:32:54 2022 +0800
api: add validation for proto message (#134)
* add validation for proto message
* add PGV proto dependency
* add validation for measure query, property request & stream query
* add generation config
* add the license header for validation flie
* add validate interceptor
* skip license check for validate go file
* skip lint check for validate go file
* remove enum validation
* tidy go mod
* fix license header issue
* add todo for enum validation
Signed-off-by: elijah <f1...@gmail.com>
Co-authored-by: Gao Hongtao <ha...@gmail.com>
---
.golangci.yml | 1 +
.licenserc.yaml | 1 +
api/Makefile | 2 +
api/buf.gen.yaml | 6 +
api/proto/banyandb/common/v1/common.pb.go | 91 +-
api/proto/banyandb/common/v1/common.pb.validate.go | 446 ++
api/proto/banyandb/common/v1/common.proto | 3 +-
.../banyandb/database/v1/database.pb.validate.go | 416 ++
.../banyandb/database/v1/event.pb.validate.go | 494 ++
api/proto/banyandb/database/v1/rpc.pb.validate.go | 7408 ++++++++++++++++++++
.../banyandb/database/v1/schema.pb.validate.go | 1688 +++++
api/proto/banyandb/measure/v1/query.pb.go | 195 +-
api/proto/banyandb/measure/v1/query.pb.validate.go | 1347 ++++
api/proto/banyandb/measure/v1/query.proto | 7 +-
api/proto/banyandb/measure/v1/rpc.pb.validate.go | 36 +
api/proto/banyandb/measure/v1/topn.pb.go | 98 +-
api/proto/banyandb/measure/v1/topn.pb.validate.go | 690 ++
api/proto/banyandb/measure/v1/topn.proto | 8 +-
api/proto/banyandb/measure/v1/write.pb.go | 83 +-
api/proto/banyandb/measure/v1/write.pb.validate.go | 640 ++
api/proto/banyandb/measure/v1/write.proto | 9 +-
api/proto/banyandb/model/v1/common.pb.validate.go | 1109 +++
api/proto/banyandb/model/v1/query.pb.go | 147 +-
api/proto/banyandb/model/v1/query.pb.validate.go | 1076 +++
api/proto/banyandb/model/v1/query.proto | 3 +-
.../banyandb/property/v1/property.pb.validate.go | 357 +
api/proto/banyandb/property/v1/rpc.pb.go | 199 +-
api/proto/banyandb/property/v1/rpc.pb.validate.go | 1297 ++++
api/proto/banyandb/property/v1/rpc.proto | 11 +-
api/proto/banyandb/stream/v1/query.pb.go | 96 +-
api/proto/banyandb/stream/v1/query.pb.validate.go | 608 ++
api/proto/banyandb/stream/v1/query.proto | 5 +-
api/proto/banyandb/stream/v1/rpc.pb.validate.go | 36 +
api/proto/banyandb/stream/v1/write.pb.go | 80 +-
api/proto/banyandb/stream/v1/write.pb.validate.go | 614 ++
api/proto/banyandb/stream/v1/write.proto | 5 +-
api/proto/buf.lock | 4 +
api/proto/buf.yaml | 9 +-
banyand/liaison/grpc/server.go | 6 +-
deprecated-golangci.yml | 2 +
dist/LICENSE | 1 +
...-github.com-envoyproxy-protoc-gen-validate.txt} | 212 +-
docs/api-reference.md | 2 +-
go.mod | 3 +-
go.sum | 3 +
45 files changed, 18863 insertions(+), 691 deletions(-)
diff --git a/.golangci.yml b/.golangci.yml
index 6727826..1bc0bed 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -99,6 +99,7 @@ run:
deadline: 20m
skip-files:
- ".*\\.pb\\.go"
+ - ".*\\.pb\\.validate\\.go"
- ".*\\.gen\\.go"
issues:
exclude-rules:
diff --git a/.licenserc.yaml b/.licenserc.yaml
index cc057c9..72376e7 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -75,6 +75,7 @@ header: # `header` section is configurations for source codes license header.
- '**/*_mock.go'
- '**/*_mock_test.go'
- '**/*.pb.go'
+ - '**/*.pb.validate.go'
- '**/*.pb.gw.go'
- '**/*.textproto'
- '**/*.pem'
diff --git a/api/Makefile b/api/Makefile
index 2116256..8afd3e1 100644
--- a/api/Makefile
+++ b/api/Makefile
@@ -33,6 +33,7 @@ $(BUF):
@rm -f $(tool_bin)/protoc-gen-doc
@rm -f $(tool_bin)/protoc-gen-grpc-gateway
@rm -f $(tool_bin)/protoc-gen-openapiv2
+ @rm -f $(tool_bin)/protoc-gen-validate
@rm -f $(tool_bin)/buf
@rm -f $(tool_bin)/protoc-gen-buf-breaking
@rm -f $(tool_bin)/protoc-gen-buf-lint
@@ -44,6 +45,7 @@ $(BUF):
@GOBIN=$(tool_bin) go install github.com/bufbuild/buf/cmd/buf@$(buf_version)
@GOBIN=$(tool_bin) go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@$(buf_version)
@GOBIN=$(tool_bin) go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@$(buf_version)
+ @GOBIN=$(tool_bin) go install github.com/envoyproxy/protoc-gen-validate@v0.6.7
generate: $(BUF)
@PATH=$(tool_bin):$(proto_dir) $(BUF) generate
diff --git a/api/buf.gen.yaml b/api/buf.gen.yaml
index b55d18b..54d6ae1 100644
--- a/api/buf.gen.yaml
+++ b/api/buf.gen.yaml
@@ -29,6 +29,12 @@ plugins:
out: proto
opt: markdown,api-reference.md
strategy: all
+ - name: validate
+ out: proto
+ opt:
+ - lang=go
+ - paths=source_relative
+ - validate_out="lang=go:./proto"
- name: grpc-gateway
out: proto
opt: paths=source_relative
diff --git a/api/proto/banyandb/common/v1/common.pb.go b/api/proto/banyandb/common/v1/common.pb.go
index c82fb76..c2b6f11 100644
--- a/api/proto/banyandb/common/v1/common.pb.go
+++ b/api/proto/banyandb/common/v1/common.pb.go
@@ -24,6 +24,7 @@
package v1
import (
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
@@ -321,50 +322,52 @@ var file_banyandb_common_v1_common_proto_rawDesc = []byte{
0x6f, 0x12, 0x12, 0x62, 0x61, 0x6e, 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a,
- 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a,
- 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
- 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x5f, 0x72, 0x65,
- 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x6f,
- 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x0c, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x61,
- 0x72, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x68,
- 0x61, 0x72, 0x64, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
- 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
- 0x4e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0xfa, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12,
- 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,
- 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x61, 0x74,
- 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e,
- 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
- 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,
- 0x12, 0x45, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74,
- 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x79, 0x61, 0x6e,
- 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
- 0x41, 0x74, 0x2a, 0x4b, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x17, 0x0a,
- 0x13, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f,
- 0x47, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41,
- 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x4d, 0x45, 0x41, 0x53, 0x55, 0x52, 0x45, 0x10, 0x02, 0x42,
- 0x6e, 0x0a, 0x28, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x73, 0x6b,
- 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x61, 0x6e, 0x79, 0x61, 0x6e, 0x64,
- 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x42, 0x67, 0x69, 0x74,
- 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x73,
- 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x61, 0x6e, 0x79, 0x61, 0x6e,
- 0x64, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x61, 0x6e,
- 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x99, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69,
+ 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x5f,
+ 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
+ 0x6d, 0x6f, 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x0c, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73,
+ 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
+ 0x73, 0x68, 0x61, 0x72, 0x64, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0xfa, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x07, 0x63,
+ 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62,
+ 0x61, 0x6e, 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
+ 0x31, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c,
+ 0x6f, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f,
+ 0x70, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x79,
+ 0x61, 0x6e, 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x64, 0x41, 0x74, 0x2a, 0x4b, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12,
+ 0x17, 0x0a, 0x13, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x54, 0x41,
+ 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f,
+ 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x4d, 0x45, 0x41, 0x53, 0x55, 0x52, 0x45, 0x10,
+ 0x02, 0x42, 0x6e, 0x0a, 0x28, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e,
+ 0x73, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x61, 0x6e, 0x79, 0x61,
+ 0x6e, 0x64, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x42, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65,
+ 0x2f, 0x73, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x62, 0x61, 0x6e, 0x79,
+ 0x61, 0x6e, 0x64, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62,
+ 0x61, 0x6e, 0x79, 0x61, 0x6e, 0x64, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/api/proto/banyandb/common/v1/common.pb.validate.go b/api/proto/banyandb/common/v1/common.pb.validate.go
new file mode 100644
index 0000000..e436e66
--- /dev/null
+++ b/api/proto/banyandb/common/v1/common.pb.validate.go
@@ -0,0 +1,446 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: banyandb/common/v1/common.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Metadata 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 *Metadata) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Metadata 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 MetadataMultiError, or nil
+// if none found.
+func (m *Metadata) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Metadata) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := MetadataValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for Id
+
+ // no validation rules for CreateRevision
+
+ // no validation rules for ModRevision
+
+ if len(errors) > 0 {
+ return MetadataMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataMultiError is an error wrapping multiple validation errors returned
+// by Metadata.ValidateAll() if the designated constraints aren't met.
+type MetadataMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataMultiError) 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 MetadataMultiError) AllErrors() []error { return m }
+
+// MetadataValidationError is the validation error returned by
+// Metadata.Validate if the designated constraints aren't met.
+type MetadataValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" }
+
+// Error satisfies the builtin error interface
+func (e MetadataValidationError) 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 %sMetadata.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataValidationError{}
+
+// Validate checks the field values on ResourceOpts 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 *ResourceOpts) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResourceOpts 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 ResourceOptsMultiError, or
+// nil if none found.
+func (m *ResourceOpts) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResourceOpts) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ShardNum
+
+ // no validation rules for BlockNum
+
+ // no validation rules for Ttl
+
+ if len(errors) > 0 {
+ return ResourceOptsMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceOptsMultiError is an error wrapping multiple validation errors
+// returned by ResourceOpts.ValidateAll() if the designated constraints aren't met.
+type ResourceOptsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceOptsMultiError) 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 ResourceOptsMultiError) AllErrors() []error { return m }
+
+// ResourceOptsValidationError is the validation error returned by
+// ResourceOpts.Validate if the designated constraints aren't met.
+type ResourceOptsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceOptsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceOptsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceOptsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceOptsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceOptsValidationError) ErrorName() string { return "ResourceOptsValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceOptsValidationError) 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 %sResourceOpts.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceOptsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceOptsValidationError{}
+
+// Validate checks the field values on Group 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 *Group) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Group 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 GroupMultiError, or nil if none found.
+func (m *Group) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Group) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GroupValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Catalog
+
+ if all {
+ switch v := interface{}(m.GetResourceOpts()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupValidationError{
+ field: "ResourceOpts",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupValidationError{
+ field: "ResourceOpts",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResourceOpts()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GroupValidationError{
+ field: "ResourceOpts",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetUpdatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GroupValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GroupMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupMultiError is an error wrapping multiple validation errors returned by
+// Group.ValidateAll() if the designated constraints aren't met.
+type GroupMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupMultiError) 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 GroupMultiError) AllErrors() []error { return m }
+
+// GroupValidationError is the validation error returned by Group.Validate if
+// the designated constraints aren't met.
+type GroupValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupValidationError) ErrorName() string { return "GroupValidationError" }
+
+// Error satisfies the builtin error interface
+func (e GroupValidationError) 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 %sGroup.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupValidationError{}
diff --git a/api/proto/banyandb/common/v1/common.proto b/api/proto/banyandb/common/v1/common.proto
index f9df37e..b00d04c 100644
--- a/api/proto/banyandb/common/v1/common.proto
+++ b/api/proto/banyandb/common/v1/common.proto
@@ -23,6 +23,7 @@ option go_package = "github.com/apache/skywalking-banyandb/api/proto/banyandb/co
package banyandb.common.v1;
import "google/protobuf/timestamp.proto";
+import "validate/validate.proto";
enum Catalog {
CATALOG_UNSPECIFIED = 0;
@@ -35,7 +36,7 @@ message Metadata {
// group contains a set of options, like retention policy, max
string group = 1;
// name of the entity
- string name = 2;
+ string name = 2 [(validate.rules).string.min_len = 1];
uint32 id = 3;
// readonly. create_revision is the revision of last creation on this key.
int64 create_revision = 4;
diff --git a/api/proto/banyandb/database/v1/database.pb.validate.go b/api/proto/banyandb/database/v1/database.pb.validate.go
new file mode 100644
index 0000000..b58713f
--- /dev/null
+++ b/api/proto/banyandb/database/v1/database.pb.validate.go
@@ -0,0 +1,416 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: banyandb/database/v1/database.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Node 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 *Node) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Node 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 NodeMultiError, or nil if none found.
+func (m *Node) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Node) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Id
+
+ // no validation rules for Addr
+
+ if all {
+ switch v := interface{}(m.GetUpdatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, NodeValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, NodeValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return NodeValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCreatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, NodeValidationError{
+ field: "CreatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, NodeValidationError{
+ field: "CreatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return NodeValidationError{
+ field: "CreatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return NodeMultiError(errors)
+ }
+
+ return nil
+}
+
+// NodeMultiError is an error wrapping multiple validation errors returned by
+// Node.ValidateAll() if the designated constraints aren't met.
+type NodeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m NodeMultiError) 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 NodeMultiError) AllErrors() []error { return m }
+
+// NodeValidationError is the validation error returned by Node.Validate if the
+// designated constraints aren't met.
+type NodeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e NodeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e NodeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e NodeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e NodeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e NodeValidationError) ErrorName() string { return "NodeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e NodeValidationError) 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 %sNode.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = NodeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = NodeValidationError{}
+
+// Validate checks the field values on Shard 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 *Shard) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Shard 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 ShardMultiError, or nil if none found.
+func (m *Shard) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Shard) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Id
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ShardValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Catalog
+
+ if all {
+ switch v := interface{}(m.GetNode()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ShardValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Total
+
+ if all {
+ switch v := interface{}(m.GetUpdatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ShardValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCreatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "CreatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ShardValidationError{
+ field: "CreatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ShardValidationError{
+ field: "CreatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ShardMultiError(errors)
+ }
+
+ return nil
+}
+
+// ShardMultiError is an error wrapping multiple validation errors returned by
+// Shard.ValidateAll() if the designated constraints aren't met.
+type ShardMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ShardMultiError) 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 ShardMultiError) AllErrors() []error { return m }
+
+// ShardValidationError is the validation error returned by Shard.Validate if
+// the designated constraints aren't met.
+type ShardValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ShardValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ShardValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ShardValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ShardValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ShardValidationError) ErrorName() string { return "ShardValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ShardValidationError) 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 %sShard.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ShardValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ShardValidationError{}
diff --git a/api/proto/banyandb/database/v1/event.pb.validate.go b/api/proto/banyandb/database/v1/event.pb.validate.go
new file mode 100644
index 0000000..5e0ab42
--- /dev/null
+++ b/api/proto/banyandb/database/v1/event.pb.validate.go
@@ -0,0 +1,494 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: banyandb/database/v1/event.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ShardEvent 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 *ShardEvent) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ShardEvent 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 ShardEventMultiError, or
+// nil if none found.
+func (m *ShardEvent) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ShardEvent) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetShard()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ShardEventValidationError{
+ field: "Shard",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ShardEventValidationError{
+ field: "Shard",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetShard()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ShardEventValidationError{
+ field: "Shard",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Action
+
+ if all {
+ switch v := interface{}(m.GetTime()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ShardEventValidationError{
+ field: "Time",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ShardEventValidationError{
+ field: "Time",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ShardEventValidationError{
+ field: "Time",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ShardEventMultiError(errors)
+ }
+
+ return nil
+}
+
+// ShardEventMultiError is an error wrapping multiple validation errors
+// returned by ShardEvent.ValidateAll() if the designated constraints aren't met.
+type ShardEventMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ShardEventMultiError) 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 ShardEventMultiError) AllErrors() []error { return m }
+
+// ShardEventValidationError is the validation error returned by
+// ShardEvent.Validate if the designated constraints aren't met.
+type ShardEventValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ShardEventValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ShardEventValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ShardEventValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ShardEventValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ShardEventValidationError) ErrorName() string { return "ShardEventValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ShardEventValidationError) 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 %sShardEvent.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ShardEventValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ShardEventValidationError{}
+
+// Validate checks the field values on EntityEvent 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 *EntityEvent) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on EntityEvent 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 EntityEventMultiError, or
+// nil if none found.
+func (m *EntityEvent) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *EntityEvent) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, EntityEventValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, EntityEventValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return EntityEventValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetEntityLocator() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, EntityEventValidationError{
+ field: fmt.Sprintf("EntityLocator[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, EntityEventValidationError{
+ field: fmt.Sprintf("EntityLocator[%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 EntityEventValidationError{
+ field: fmt.Sprintf("EntityLocator[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for Action
+
+ if all {
+ switch v := interface{}(m.GetTime()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, EntityEventValidationError{
+ field: "Time",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, EntityEventValidationError{
+ field: "Time",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return EntityEventValidationError{
+ field: "Time",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return EntityEventMultiError(errors)
+ }
+
+ return nil
+}
+
+// EntityEventMultiError is an error wrapping multiple validation errors
+// returned by EntityEvent.ValidateAll() if the designated constraints aren't met.
+type EntityEventMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m EntityEventMultiError) 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 EntityEventMultiError) AllErrors() []error { return m }
+
+// EntityEventValidationError is the validation error returned by
+// EntityEvent.Validate if the designated constraints aren't met.
+type EntityEventValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e EntityEventValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e EntityEventValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e EntityEventValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e EntityEventValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e EntityEventValidationError) ErrorName() string { return "EntityEventValidationError" }
+
+// Error satisfies the builtin error interface
+func (e EntityEventValidationError) 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 %sEntityEvent.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = EntityEventValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = EntityEventValidationError{}
+
+// Validate checks the field values on EntityEvent_TagLocator 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 *EntityEvent_TagLocator) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on EntityEvent_TagLocator 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
+// EntityEvent_TagLocatorMultiError, or nil if none found.
+func (m *EntityEvent_TagLocator) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *EntityEvent_TagLocator) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for FamilyOffset
+
+ // no validation rules for TagOffset
+
+ if len(errors) > 0 {
+ return EntityEvent_TagLocatorMultiError(errors)
+ }
+
+ return nil
+}
+
+// EntityEvent_TagLocatorMultiError is an error wrapping multiple validation
+// errors returned by EntityEvent_TagLocator.ValidateAll() if the designated
+// constraints aren't met.
+type EntityEvent_TagLocatorMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m EntityEvent_TagLocatorMultiError) 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 EntityEvent_TagLocatorMultiError) AllErrors() []error { return m }
+
+// EntityEvent_TagLocatorValidationError is the validation error returned by
+// EntityEvent_TagLocator.Validate if the designated constraints aren't met.
+type EntityEvent_TagLocatorValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e EntityEvent_TagLocatorValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e EntityEvent_TagLocatorValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e EntityEvent_TagLocatorValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e EntityEvent_TagLocatorValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e EntityEvent_TagLocatorValidationError) ErrorName() string {
+ return "EntityEvent_TagLocatorValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e EntityEvent_TagLocatorValidationError) 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 %sEntityEvent_TagLocator.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = EntityEvent_TagLocatorValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = EntityEvent_TagLocatorValidationError{}
diff --git a/api/proto/banyandb/database/v1/rpc.pb.validate.go b/api/proto/banyandb/database/v1/rpc.pb.validate.go
new file mode 100644
index 0000000..cdb88ec
--- /dev/null
+++ b/api/proto/banyandb/database/v1/rpc.pb.validate.go
@@ -0,0 +1,7408 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: banyandb/database/v1/rpc.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on StreamRegistryServiceCreateRequest 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 *StreamRegistryServiceCreateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceCreateRequest
+// 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
+// StreamRegistryServiceCreateRequestMultiError, or nil if none found.
+func (m *StreamRegistryServiceCreateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceCreateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetStream()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamRegistryServiceCreateRequestValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamRegistryServiceCreateRequestValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStream()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamRegistryServiceCreateRequestValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceCreateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceCreateRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceCreateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceCreateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceCreateRequestMultiError) 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 StreamRegistryServiceCreateRequestMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceCreateRequestValidationError is the validation error
+// returned by StreamRegistryServiceCreateRequest.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceCreateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceCreateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceCreateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceCreateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceCreateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceCreateRequestValidationError) ErrorName() string {
+ return "StreamRegistryServiceCreateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceCreateRequestValidationError) 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 %sStreamRegistryServiceCreateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceCreateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceCreateRequestValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceCreateResponse 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 *StreamRegistryServiceCreateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceCreateResponse
+// 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
+// StreamRegistryServiceCreateResponseMultiError, or nil if none found.
+func (m *StreamRegistryServiceCreateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceCreateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceCreateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceCreateResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceCreateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceCreateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceCreateResponseMultiError) 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 StreamRegistryServiceCreateResponseMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceCreateResponseValidationError is the validation error
+// returned by StreamRegistryServiceCreateResponse.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceCreateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceCreateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceCreateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceCreateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceCreateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceCreateResponseValidationError) ErrorName() string {
+ return "StreamRegistryServiceCreateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceCreateResponseValidationError) 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 %sStreamRegistryServiceCreateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceCreateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceCreateResponseValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceUpdateRequest 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 *StreamRegistryServiceUpdateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceUpdateRequest
+// 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
+// StreamRegistryServiceUpdateRequestMultiError, or nil if none found.
+func (m *StreamRegistryServiceUpdateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceUpdateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetStream()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamRegistryServiceUpdateRequestValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamRegistryServiceUpdateRequestValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStream()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamRegistryServiceUpdateRequestValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceUpdateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceUpdateRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceUpdateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceUpdateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceUpdateRequestMultiError) 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 StreamRegistryServiceUpdateRequestMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceUpdateRequestValidationError is the validation error
+// returned by StreamRegistryServiceUpdateRequest.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceUpdateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceUpdateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceUpdateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceUpdateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceUpdateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceUpdateRequestValidationError) ErrorName() string {
+ return "StreamRegistryServiceUpdateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceUpdateRequestValidationError) 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 %sStreamRegistryServiceUpdateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceUpdateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceUpdateRequestValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceUpdateResponse 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 *StreamRegistryServiceUpdateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceUpdateResponse
+// 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
+// StreamRegistryServiceUpdateResponseMultiError, or nil if none found.
+func (m *StreamRegistryServiceUpdateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceUpdateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceUpdateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceUpdateResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceUpdateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceUpdateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceUpdateResponseMultiError) 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 StreamRegistryServiceUpdateResponseMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceUpdateResponseValidationError is the validation error
+// returned by StreamRegistryServiceUpdateResponse.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceUpdateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceUpdateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceUpdateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceUpdateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceUpdateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceUpdateResponseValidationError) ErrorName() string {
+ return "StreamRegistryServiceUpdateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceUpdateResponseValidationError) 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 %sStreamRegistryServiceUpdateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceUpdateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceUpdateResponseValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceDeleteRequest 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 *StreamRegistryServiceDeleteRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceDeleteRequest
+// 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
+// StreamRegistryServiceDeleteRequestMultiError, or nil if none found.
+func (m *StreamRegistryServiceDeleteRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceDeleteRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceDeleteRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceDeleteRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceDeleteRequest.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceDeleteRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceDeleteRequestMultiError) 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 StreamRegistryServiceDeleteRequestMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceDeleteRequestValidationError is the validation error
+// returned by StreamRegistryServiceDeleteRequest.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceDeleteRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceDeleteRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceDeleteRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceDeleteRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceDeleteRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceDeleteRequestValidationError) ErrorName() string {
+ return "StreamRegistryServiceDeleteRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceDeleteRequestValidationError) 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 %sStreamRegistryServiceDeleteRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceDeleteRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceDeleteRequestValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceDeleteResponse 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 *StreamRegistryServiceDeleteResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceDeleteResponse
+// 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
+// StreamRegistryServiceDeleteResponseMultiError, or nil if none found.
+func (m *StreamRegistryServiceDeleteResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceDeleteResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Deleted
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceDeleteResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceDeleteResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceDeleteResponse.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceDeleteResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceDeleteResponseMultiError) 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 StreamRegistryServiceDeleteResponseMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceDeleteResponseValidationError is the validation error
+// returned by StreamRegistryServiceDeleteResponse.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceDeleteResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceDeleteResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceDeleteResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceDeleteResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceDeleteResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceDeleteResponseValidationError) ErrorName() string {
+ return "StreamRegistryServiceDeleteResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceDeleteResponseValidationError) 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 %sStreamRegistryServiceDeleteResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceDeleteResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceDeleteResponseValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceGetRequest 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 *StreamRegistryServiceGetRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceGetRequest 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
+// StreamRegistryServiceGetRequestMultiError, or nil if none found.
+func (m *StreamRegistryServiceGetRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceGetRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceGetRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceGetRequestMultiError is an error wrapping multiple
+// validation errors returned by StreamRegistryServiceGetRequest.ValidateAll()
+// if the designated constraints aren't met.
+type StreamRegistryServiceGetRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceGetRequestMultiError) 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 StreamRegistryServiceGetRequestMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceGetRequestValidationError is the validation error
+// returned by StreamRegistryServiceGetRequest.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceGetRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceGetRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceGetRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceGetRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceGetRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceGetRequestValidationError) ErrorName() string {
+ return "StreamRegistryServiceGetRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceGetRequestValidationError) 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 %sStreamRegistryServiceGetRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceGetRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceGetRequestValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceGetResponse 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 *StreamRegistryServiceGetResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceGetResponse 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
+// StreamRegistryServiceGetResponseMultiError, or nil if none found.
+func (m *StreamRegistryServiceGetResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceGetResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetStream()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamRegistryServiceGetResponseValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamRegistryServiceGetResponseValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStream()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamRegistryServiceGetResponseValidationError{
+ field: "Stream",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceGetResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceGetResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceGetResponse.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceGetResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceGetResponseMultiError) 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 StreamRegistryServiceGetResponseMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceGetResponseValidationError is the validation error
+// returned by StreamRegistryServiceGetResponse.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceGetResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceGetResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceGetResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceGetResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceGetResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceGetResponseValidationError) ErrorName() string {
+ return "StreamRegistryServiceGetResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceGetResponseValidationError) 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 %sStreamRegistryServiceGetResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceGetResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceGetResponseValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceListRequest 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 *StreamRegistryServiceListRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceListRequest 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
+// StreamRegistryServiceListRequestMultiError, or nil if none found.
+func (m *StreamRegistryServiceListRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceListRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceListRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceListRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceListRequest.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceListRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceListRequestMultiError) 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 StreamRegistryServiceListRequestMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceListRequestValidationError is the validation error
+// returned by StreamRegistryServiceListRequest.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceListRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceListRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceListRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceListRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceListRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceListRequestValidationError) ErrorName() string {
+ return "StreamRegistryServiceListRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceListRequestValidationError) 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 %sStreamRegistryServiceListRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceListRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceListRequestValidationError{}
+
+// Validate checks the field values on StreamRegistryServiceListResponse 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 *StreamRegistryServiceListResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StreamRegistryServiceListResponse
+// 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
+// StreamRegistryServiceListResponseMultiError, or nil if none found.
+func (m *StreamRegistryServiceListResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StreamRegistryServiceListResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetStream() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Stream[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Stream[%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 StreamRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Stream[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return StreamRegistryServiceListResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamRegistryServiceListResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// StreamRegistryServiceListResponse.ValidateAll() if the designated
+// constraints aren't met.
+type StreamRegistryServiceListResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamRegistryServiceListResponseMultiError) 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 StreamRegistryServiceListResponseMultiError) AllErrors() []error { return m }
+
+// StreamRegistryServiceListResponseValidationError is the validation error
+// returned by StreamRegistryServiceListResponse.Validate if the designated
+// constraints aren't met.
+type StreamRegistryServiceListResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamRegistryServiceListResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamRegistryServiceListResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamRegistryServiceListResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamRegistryServiceListResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamRegistryServiceListResponseValidationError) ErrorName() string {
+ return "StreamRegistryServiceListResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StreamRegistryServiceListResponseValidationError) 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 %sStreamRegistryServiceListResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamRegistryServiceListResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamRegistryServiceListResponseValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceCreateRequest 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 *IndexRuleBindingRegistryServiceCreateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceCreateRequest 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
+// IndexRuleBindingRegistryServiceCreateRequestMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceCreateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceCreateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetIndexRuleBinding()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceCreateRequestValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceCreateRequestValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIndexRuleBinding()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleBindingRegistryServiceCreateRequestValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceCreateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceCreateRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceCreateRequest.ValidateAll() if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceCreateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceCreateRequestMultiError) 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 IndexRuleBindingRegistryServiceCreateRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceCreateRequestValidationError is the
+// validation error returned by
+// IndexRuleBindingRegistryServiceCreateRequest.Validate if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceCreateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceCreateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceCreateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceCreateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceCreateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceCreateRequestValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceCreateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceCreateRequestValidationError) 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 %sIndexRuleBindingRegistryServiceCreateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceCreateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceCreateRequestValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceCreateResponse 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 *IndexRuleBindingRegistryServiceCreateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceCreateResponse 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
+// IndexRuleBindingRegistryServiceCreateResponseMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceCreateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceCreateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceCreateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceCreateResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceCreateResponse.ValidateAll() if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceCreateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceCreateResponseMultiError) 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 IndexRuleBindingRegistryServiceCreateResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceCreateResponseValidationError is the
+// validation error returned by
+// IndexRuleBindingRegistryServiceCreateResponse.Validate if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceCreateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceCreateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceCreateResponseValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceCreateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceCreateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceCreateResponseValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceCreateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceCreateResponseValidationError) 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 %sIndexRuleBindingRegistryServiceCreateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceCreateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceCreateResponseValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceUpdateRequest 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 *IndexRuleBindingRegistryServiceUpdateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceUpdateRequest 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
+// IndexRuleBindingRegistryServiceUpdateRequestMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceUpdateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceUpdateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetIndexRuleBinding()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceUpdateRequestValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceUpdateRequestValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIndexRuleBinding()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleBindingRegistryServiceUpdateRequestValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceUpdateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceUpdateRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceUpdateRequest.ValidateAll() if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceUpdateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceUpdateRequestMultiError) 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 IndexRuleBindingRegistryServiceUpdateRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceUpdateRequestValidationError is the
+// validation error returned by
+// IndexRuleBindingRegistryServiceUpdateRequest.Validate if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceUpdateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceUpdateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceUpdateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceUpdateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceUpdateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceUpdateRequestValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceUpdateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceUpdateRequestValidationError) 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 %sIndexRuleBindingRegistryServiceUpdateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceUpdateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceUpdateRequestValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceUpdateResponse 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 *IndexRuleBindingRegistryServiceUpdateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceUpdateResponse 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
+// IndexRuleBindingRegistryServiceUpdateResponseMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceUpdateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceUpdateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceUpdateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceUpdateResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceUpdateResponse.ValidateAll() if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceUpdateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceUpdateResponseMultiError) 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 IndexRuleBindingRegistryServiceUpdateResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceUpdateResponseValidationError is the
+// validation error returned by
+// IndexRuleBindingRegistryServiceUpdateResponse.Validate if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceUpdateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceUpdateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceUpdateResponseValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceUpdateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceUpdateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceUpdateResponseValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceUpdateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceUpdateResponseValidationError) 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 %sIndexRuleBindingRegistryServiceUpdateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceUpdateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceUpdateResponseValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceDeleteRequest 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 *IndexRuleBindingRegistryServiceDeleteRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceDeleteRequest 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
+// IndexRuleBindingRegistryServiceDeleteRequestMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceDeleteRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceDeleteRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleBindingRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceDeleteRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceDeleteRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceDeleteRequest.ValidateAll() if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceDeleteRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceDeleteRequestMultiError) 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 IndexRuleBindingRegistryServiceDeleteRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceDeleteRequestValidationError is the
+// validation error returned by
+// IndexRuleBindingRegistryServiceDeleteRequest.Validate if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceDeleteRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceDeleteRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceDeleteRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceDeleteRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceDeleteRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceDeleteRequestValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceDeleteRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceDeleteRequestValidationError) 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 %sIndexRuleBindingRegistryServiceDeleteRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceDeleteRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceDeleteRequestValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceDeleteResponse 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 *IndexRuleBindingRegistryServiceDeleteResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceDeleteResponse 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
+// IndexRuleBindingRegistryServiceDeleteResponseMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceDeleteResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceDeleteResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Deleted
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceDeleteResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceDeleteResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceDeleteResponse.ValidateAll() if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceDeleteResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceDeleteResponseMultiError) 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 IndexRuleBindingRegistryServiceDeleteResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceDeleteResponseValidationError is the
+// validation error returned by
+// IndexRuleBindingRegistryServiceDeleteResponse.Validate if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceDeleteResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceDeleteResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceDeleteResponseValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceDeleteResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceDeleteResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceDeleteResponseValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceDeleteResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceDeleteResponseValidationError) 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 %sIndexRuleBindingRegistryServiceDeleteResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceDeleteResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceDeleteResponseValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceGetRequest 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 *IndexRuleBindingRegistryServiceGetRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceGetRequest 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
+// IndexRuleBindingRegistryServiceGetRequestMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceGetRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceGetRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleBindingRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceGetRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceGetRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceGetRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceGetRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceGetRequestMultiError) 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 IndexRuleBindingRegistryServiceGetRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceGetRequestValidationError is the validation
+// error returned by IndexRuleBindingRegistryServiceGetRequest.Validate if the
+// designated constraints aren't met.
+type IndexRuleBindingRegistryServiceGetRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceGetRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceGetRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceGetRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceGetRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceGetRequestValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceGetRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceGetRequestValidationError) 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 %sIndexRuleBindingRegistryServiceGetRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceGetRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceGetRequestValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceGetResponse 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 *IndexRuleBindingRegistryServiceGetResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceGetResponse 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
+// IndexRuleBindingRegistryServiceGetResponseMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceGetResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceGetResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetIndexRuleBinding()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceGetResponseValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceGetResponseValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIndexRuleBinding()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleBindingRegistryServiceGetResponseValidationError{
+ field: "IndexRuleBinding",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceGetResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceGetResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceGetResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceGetResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceGetResponseMultiError) 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 IndexRuleBindingRegistryServiceGetResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceGetResponseValidationError is the validation
+// error returned by IndexRuleBindingRegistryServiceGetResponse.Validate if
+// the designated constraints aren't met.
+type IndexRuleBindingRegistryServiceGetResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceGetResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceGetResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceGetResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceGetResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceGetResponseValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceGetResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceGetResponseValidationError) 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 %sIndexRuleBindingRegistryServiceGetResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceGetResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceGetResponseValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceListRequest 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 *IndexRuleBindingRegistryServiceListRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceListRequest 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
+// IndexRuleBindingRegistryServiceListRequestMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceListRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceListRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceListRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceListRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceListRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceListRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceListRequestMultiError) 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 IndexRuleBindingRegistryServiceListRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceListRequestValidationError is the validation
+// error returned by IndexRuleBindingRegistryServiceListRequest.Validate if
+// the designated constraints aren't met.
+type IndexRuleBindingRegistryServiceListRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceListRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceListRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceListRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceListRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceListRequestValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceListRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceListRequestValidationError) 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 %sIndexRuleBindingRegistryServiceListRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceListRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceListRequestValidationError{}
+
+// Validate checks the field values on
+// IndexRuleBindingRegistryServiceListResponse 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 *IndexRuleBindingRegistryServiceListResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleBindingRegistryServiceListResponse 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
+// IndexRuleBindingRegistryServiceListResponseMultiError, or nil if none found.
+func (m *IndexRuleBindingRegistryServiceListResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleBindingRegistryServiceListResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetIndexRuleBinding() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("IndexRuleBinding[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleBindingRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("IndexRuleBinding[%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 IndexRuleBindingRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("IndexRuleBinding[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleBindingRegistryServiceListResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleBindingRegistryServiceListResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleBindingRegistryServiceListResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleBindingRegistryServiceListResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleBindingRegistryServiceListResponseMultiError) 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 IndexRuleBindingRegistryServiceListResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleBindingRegistryServiceListResponseValidationError is the validation
+// error returned by IndexRuleBindingRegistryServiceListResponse.Validate if
+// the designated constraints aren't met.
+type IndexRuleBindingRegistryServiceListResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleBindingRegistryServiceListResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleBindingRegistryServiceListResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleBindingRegistryServiceListResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleBindingRegistryServiceListResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleBindingRegistryServiceListResponseValidationError) ErrorName() string {
+ return "IndexRuleBindingRegistryServiceListResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleBindingRegistryServiceListResponseValidationError) 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 %sIndexRuleBindingRegistryServiceListResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleBindingRegistryServiceListResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleBindingRegistryServiceListResponseValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceCreateRequest
+// 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 *IndexRuleRegistryServiceCreateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceCreateRequest
+// 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
+// IndexRuleRegistryServiceCreateRequestMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceCreateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceCreateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetIndexRule()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceCreateRequestValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceCreateRequestValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIndexRule()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleRegistryServiceCreateRequestValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceCreateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceCreateRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleRegistryServiceCreateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceCreateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceCreateRequestMultiError) 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 IndexRuleRegistryServiceCreateRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceCreateRequestValidationError is the validation error
+// returned by IndexRuleRegistryServiceCreateRequest.Validate if the
+// designated constraints aren't met.
+type IndexRuleRegistryServiceCreateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceCreateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceCreateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceCreateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceCreateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceCreateRequestValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceCreateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceCreateRequestValidationError) 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 %sIndexRuleRegistryServiceCreateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceCreateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceCreateRequestValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceCreateResponse
+// 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 *IndexRuleRegistryServiceCreateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleRegistryServiceCreateResponse 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
+// IndexRuleRegistryServiceCreateResponseMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceCreateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceCreateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceCreateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceCreateResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleRegistryServiceCreateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceCreateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceCreateResponseMultiError) 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 IndexRuleRegistryServiceCreateResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceCreateResponseValidationError is the validation
+// error returned by IndexRuleRegistryServiceCreateResponse.Validate if the
+// designated constraints aren't met.
+type IndexRuleRegistryServiceCreateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceCreateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceCreateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceCreateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceCreateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceCreateResponseValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceCreateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceCreateResponseValidationError) 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 %sIndexRuleRegistryServiceCreateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceCreateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceCreateResponseValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceUpdateRequest
+// 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 *IndexRuleRegistryServiceUpdateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceUpdateRequest
+// 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
+// IndexRuleRegistryServiceUpdateRequestMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceUpdateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceUpdateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetIndexRule()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceUpdateRequestValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceUpdateRequestValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIndexRule()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleRegistryServiceUpdateRequestValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceUpdateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceUpdateRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleRegistryServiceUpdateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceUpdateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceUpdateRequestMultiError) 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 IndexRuleRegistryServiceUpdateRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceUpdateRequestValidationError is the validation error
+// returned by IndexRuleRegistryServiceUpdateRequest.Validate if the
+// designated constraints aren't met.
+type IndexRuleRegistryServiceUpdateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceUpdateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceUpdateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceUpdateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceUpdateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceUpdateRequestValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceUpdateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceUpdateRequestValidationError) 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 %sIndexRuleRegistryServiceUpdateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceUpdateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceUpdateRequestValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceUpdateResponse
+// 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 *IndexRuleRegistryServiceUpdateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleRegistryServiceUpdateResponse 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
+// IndexRuleRegistryServiceUpdateResponseMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceUpdateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceUpdateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceUpdateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceUpdateResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleRegistryServiceUpdateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceUpdateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceUpdateResponseMultiError) 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 IndexRuleRegistryServiceUpdateResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceUpdateResponseValidationError is the validation
+// error returned by IndexRuleRegistryServiceUpdateResponse.Validate if the
+// designated constraints aren't met.
+type IndexRuleRegistryServiceUpdateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceUpdateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceUpdateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceUpdateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceUpdateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceUpdateResponseValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceUpdateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceUpdateResponseValidationError) 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 %sIndexRuleRegistryServiceUpdateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceUpdateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceUpdateResponseValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceDeleteRequest
+// 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 *IndexRuleRegistryServiceDeleteRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceDeleteRequest
+// 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
+// IndexRuleRegistryServiceDeleteRequestMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceDeleteRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceDeleteRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceDeleteRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceDeleteRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleRegistryServiceDeleteRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceDeleteRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceDeleteRequestMultiError) 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 IndexRuleRegistryServiceDeleteRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceDeleteRequestValidationError is the validation error
+// returned by IndexRuleRegistryServiceDeleteRequest.Validate if the
+// designated constraints aren't met.
+type IndexRuleRegistryServiceDeleteRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceDeleteRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceDeleteRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceDeleteRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceDeleteRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceDeleteRequestValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceDeleteRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceDeleteRequestValidationError) 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 %sIndexRuleRegistryServiceDeleteRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceDeleteRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceDeleteRequestValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceDeleteResponse
+// 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 *IndexRuleRegistryServiceDeleteResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// IndexRuleRegistryServiceDeleteResponse 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
+// IndexRuleRegistryServiceDeleteResponseMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceDeleteResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceDeleteResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Deleted
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceDeleteResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceDeleteResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// IndexRuleRegistryServiceDeleteResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceDeleteResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceDeleteResponseMultiError) 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 IndexRuleRegistryServiceDeleteResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceDeleteResponseValidationError is the validation
+// error returned by IndexRuleRegistryServiceDeleteResponse.Validate if the
+// designated constraints aren't met.
+type IndexRuleRegistryServiceDeleteResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceDeleteResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceDeleteResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceDeleteResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceDeleteResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceDeleteResponseValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceDeleteResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceDeleteResponseValidationError) 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 %sIndexRuleRegistryServiceDeleteResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceDeleteResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceDeleteResponseValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceGetRequest 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 *IndexRuleRegistryServiceGetRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceGetRequest
+// 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
+// IndexRuleRegistryServiceGetRequestMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceGetRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceGetRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceGetRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceGetRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// IndexRuleRegistryServiceGetRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceGetRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceGetRequestMultiError) 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 IndexRuleRegistryServiceGetRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceGetRequestValidationError is the validation error
+// returned by IndexRuleRegistryServiceGetRequest.Validate if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceGetRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceGetRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceGetRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceGetRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceGetRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceGetRequestValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceGetRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceGetRequestValidationError) 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 %sIndexRuleRegistryServiceGetRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceGetRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceGetRequestValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceGetResponse 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 *IndexRuleRegistryServiceGetResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceGetResponse
+// 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
+// IndexRuleRegistryServiceGetResponseMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceGetResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceGetResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetIndexRule()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceGetResponseValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceGetResponseValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIndexRule()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IndexRuleRegistryServiceGetResponseValidationError{
+ field: "IndexRule",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceGetResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceGetResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// IndexRuleRegistryServiceGetResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceGetResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceGetResponseMultiError) 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 IndexRuleRegistryServiceGetResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceGetResponseValidationError is the validation error
+// returned by IndexRuleRegistryServiceGetResponse.Validate if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceGetResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceGetResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceGetResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceGetResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceGetResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceGetResponseValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceGetResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceGetResponseValidationError) 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 %sIndexRuleRegistryServiceGetResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceGetResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceGetResponseValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceListRequest 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 *IndexRuleRegistryServiceListRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceListRequest
+// 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
+// IndexRuleRegistryServiceListRequestMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceListRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceListRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceListRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceListRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// IndexRuleRegistryServiceListRequest.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceListRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceListRequestMultiError) 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 IndexRuleRegistryServiceListRequestMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceListRequestValidationError is the validation error
+// returned by IndexRuleRegistryServiceListRequest.Validate if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceListRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceListRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceListRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceListRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceListRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceListRequestValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceListRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceListRequestValidationError) 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 %sIndexRuleRegistryServiceListRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceListRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceListRequestValidationError{}
+
+// Validate checks the field values on IndexRuleRegistryServiceListResponse
+// 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 *IndexRuleRegistryServiceListResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IndexRuleRegistryServiceListResponse
+// 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
+// IndexRuleRegistryServiceListResponseMultiError, or nil if none found.
+func (m *IndexRuleRegistryServiceListResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IndexRuleRegistryServiceListResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetIndexRule() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("IndexRule[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IndexRuleRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("IndexRule[%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 IndexRuleRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("IndexRule[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return IndexRuleRegistryServiceListResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// IndexRuleRegistryServiceListResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// IndexRuleRegistryServiceListResponse.ValidateAll() if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceListResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IndexRuleRegistryServiceListResponseMultiError) 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 IndexRuleRegistryServiceListResponseMultiError) AllErrors() []error { return m }
+
+// IndexRuleRegistryServiceListResponseValidationError is the validation error
+// returned by IndexRuleRegistryServiceListResponse.Validate if the designated
+// constraints aren't met.
+type IndexRuleRegistryServiceListResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IndexRuleRegistryServiceListResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IndexRuleRegistryServiceListResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IndexRuleRegistryServiceListResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IndexRuleRegistryServiceListResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IndexRuleRegistryServiceListResponseValidationError) ErrorName() string {
+ return "IndexRuleRegistryServiceListResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IndexRuleRegistryServiceListResponseValidationError) 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 %sIndexRuleRegistryServiceListResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IndexRuleRegistryServiceListResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IndexRuleRegistryServiceListResponseValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceCreateRequest 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 *MeasureRegistryServiceCreateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceCreateRequest
+// 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
+// MeasureRegistryServiceCreateRequestMultiError, or nil if none found.
+func (m *MeasureRegistryServiceCreateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceCreateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMeasure()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureRegistryServiceCreateRequestValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureRegistryServiceCreateRequestValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMeasure()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureRegistryServiceCreateRequestValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceCreateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceCreateRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceCreateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceCreateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceCreateRequestMultiError) 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 MeasureRegistryServiceCreateRequestMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceCreateRequestValidationError is the validation error
+// returned by MeasureRegistryServiceCreateRequest.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceCreateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceCreateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceCreateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceCreateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceCreateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceCreateRequestValidationError) ErrorName() string {
+ return "MeasureRegistryServiceCreateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceCreateRequestValidationError) 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 %sMeasureRegistryServiceCreateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceCreateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceCreateRequestValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceCreateResponse
+// 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 *MeasureRegistryServiceCreateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceCreateResponse
+// 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
+// MeasureRegistryServiceCreateResponseMultiError, or nil if none found.
+func (m *MeasureRegistryServiceCreateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceCreateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceCreateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceCreateResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceCreateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceCreateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceCreateResponseMultiError) 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 MeasureRegistryServiceCreateResponseMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceCreateResponseValidationError is the validation error
+// returned by MeasureRegistryServiceCreateResponse.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceCreateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceCreateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceCreateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceCreateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceCreateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceCreateResponseValidationError) ErrorName() string {
+ return "MeasureRegistryServiceCreateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceCreateResponseValidationError) 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 %sMeasureRegistryServiceCreateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceCreateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceCreateResponseValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceUpdateRequest 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 *MeasureRegistryServiceUpdateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceUpdateRequest
+// 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
+// MeasureRegistryServiceUpdateRequestMultiError, or nil if none found.
+func (m *MeasureRegistryServiceUpdateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceUpdateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMeasure()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureRegistryServiceUpdateRequestValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureRegistryServiceUpdateRequestValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMeasure()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureRegistryServiceUpdateRequestValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceUpdateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceUpdateRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceUpdateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceUpdateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceUpdateRequestMultiError) 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 MeasureRegistryServiceUpdateRequestMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceUpdateRequestValidationError is the validation error
+// returned by MeasureRegistryServiceUpdateRequest.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceUpdateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceUpdateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceUpdateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceUpdateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceUpdateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceUpdateRequestValidationError) ErrorName() string {
+ return "MeasureRegistryServiceUpdateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceUpdateRequestValidationError) 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 %sMeasureRegistryServiceUpdateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceUpdateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceUpdateRequestValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceUpdateResponse
+// 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 *MeasureRegistryServiceUpdateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceUpdateResponse
+// 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
+// MeasureRegistryServiceUpdateResponseMultiError, or nil if none found.
+func (m *MeasureRegistryServiceUpdateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceUpdateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceUpdateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceUpdateResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceUpdateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceUpdateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceUpdateResponseMultiError) 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 MeasureRegistryServiceUpdateResponseMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceUpdateResponseValidationError is the validation error
+// returned by MeasureRegistryServiceUpdateResponse.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceUpdateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceUpdateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceUpdateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceUpdateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceUpdateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceUpdateResponseValidationError) ErrorName() string {
+ return "MeasureRegistryServiceUpdateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceUpdateResponseValidationError) 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 %sMeasureRegistryServiceUpdateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceUpdateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceUpdateResponseValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceDeleteRequest 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 *MeasureRegistryServiceDeleteRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceDeleteRequest
+// 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
+// MeasureRegistryServiceDeleteRequestMultiError, or nil if none found.
+func (m *MeasureRegistryServiceDeleteRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceDeleteRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceDeleteRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceDeleteRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceDeleteRequest.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceDeleteRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceDeleteRequestMultiError) 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 MeasureRegistryServiceDeleteRequestMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceDeleteRequestValidationError is the validation error
+// returned by MeasureRegistryServiceDeleteRequest.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceDeleteRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceDeleteRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceDeleteRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceDeleteRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceDeleteRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceDeleteRequestValidationError) ErrorName() string {
+ return "MeasureRegistryServiceDeleteRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceDeleteRequestValidationError) 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 %sMeasureRegistryServiceDeleteRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceDeleteRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceDeleteRequestValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceDeleteResponse
+// 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 *MeasureRegistryServiceDeleteResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceDeleteResponse
+// 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
+// MeasureRegistryServiceDeleteResponseMultiError, or nil if none found.
+func (m *MeasureRegistryServiceDeleteResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceDeleteResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Deleted
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceDeleteResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceDeleteResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceDeleteResponse.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceDeleteResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceDeleteResponseMultiError) 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 MeasureRegistryServiceDeleteResponseMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceDeleteResponseValidationError is the validation error
+// returned by MeasureRegistryServiceDeleteResponse.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceDeleteResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceDeleteResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceDeleteResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceDeleteResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceDeleteResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceDeleteResponseValidationError) ErrorName() string {
+ return "MeasureRegistryServiceDeleteResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceDeleteResponseValidationError) 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 %sMeasureRegistryServiceDeleteResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceDeleteResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceDeleteResponseValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceGetRequest 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 *MeasureRegistryServiceGetRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceGetRequest 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
+// MeasureRegistryServiceGetRequestMultiError, or nil if none found.
+func (m *MeasureRegistryServiceGetRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceGetRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceGetRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceGetRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceGetRequest.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceGetRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceGetRequestMultiError) 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 MeasureRegistryServiceGetRequestMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceGetRequestValidationError is the validation error
+// returned by MeasureRegistryServiceGetRequest.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceGetRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceGetRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceGetRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceGetRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceGetRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceGetRequestValidationError) ErrorName() string {
+ return "MeasureRegistryServiceGetRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceGetRequestValidationError) 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 %sMeasureRegistryServiceGetRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceGetRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceGetRequestValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceGetResponse 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 *MeasureRegistryServiceGetResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceGetResponse
+// 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
+// MeasureRegistryServiceGetResponseMultiError, or nil if none found.
+func (m *MeasureRegistryServiceGetResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceGetResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMeasure()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureRegistryServiceGetResponseValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureRegistryServiceGetResponseValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMeasure()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureRegistryServiceGetResponseValidationError{
+ field: "Measure",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceGetResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceGetResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceGetResponse.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceGetResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceGetResponseMultiError) 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 MeasureRegistryServiceGetResponseMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceGetResponseValidationError is the validation error
+// returned by MeasureRegistryServiceGetResponse.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceGetResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceGetResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceGetResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceGetResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceGetResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceGetResponseValidationError) ErrorName() string {
+ return "MeasureRegistryServiceGetResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceGetResponseValidationError) 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 %sMeasureRegistryServiceGetResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceGetResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceGetResponseValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceListRequest 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 *MeasureRegistryServiceListRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceListRequest
+// 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
+// MeasureRegistryServiceListRequestMultiError, or nil if none found.
+func (m *MeasureRegistryServiceListRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceListRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceListRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceListRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceListRequest.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceListRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceListRequestMultiError) 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 MeasureRegistryServiceListRequestMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceListRequestValidationError is the validation error
+// returned by MeasureRegistryServiceListRequest.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceListRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceListRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceListRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceListRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceListRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceListRequestValidationError) ErrorName() string {
+ return "MeasureRegistryServiceListRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceListRequestValidationError) 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 %sMeasureRegistryServiceListRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceListRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceListRequestValidationError{}
+
+// Validate checks the field values on MeasureRegistryServiceListResponse 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 *MeasureRegistryServiceListResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MeasureRegistryServiceListResponse
+// 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
+// MeasureRegistryServiceListResponseMultiError, or nil if none found.
+func (m *MeasureRegistryServiceListResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MeasureRegistryServiceListResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetMeasure() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Measure[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Measure[%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 MeasureRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Measure[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return MeasureRegistryServiceListResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureRegistryServiceListResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// MeasureRegistryServiceListResponse.ValidateAll() if the designated
+// constraints aren't met.
+type MeasureRegistryServiceListResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureRegistryServiceListResponseMultiError) 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 MeasureRegistryServiceListResponseMultiError) AllErrors() []error { return m }
+
+// MeasureRegistryServiceListResponseValidationError is the validation error
+// returned by MeasureRegistryServiceListResponse.Validate if the designated
+// constraints aren't met.
+type MeasureRegistryServiceListResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureRegistryServiceListResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureRegistryServiceListResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureRegistryServiceListResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureRegistryServiceListResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureRegistryServiceListResponseValidationError) ErrorName() string {
+ return "MeasureRegistryServiceListResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MeasureRegistryServiceListResponseValidationError) 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 %sMeasureRegistryServiceListResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MeasureRegistryServiceListResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MeasureRegistryServiceListResponseValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceCreateRequest 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 *GroupRegistryServiceCreateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceCreateRequest
+// 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
+// GroupRegistryServiceCreateRequestMultiError, or nil if none found.
+func (m *GroupRegistryServiceCreateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceCreateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetGroup()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupRegistryServiceCreateRequestValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupRegistryServiceCreateRequestValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GroupRegistryServiceCreateRequestValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceCreateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceCreateRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceCreateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceCreateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceCreateRequestMultiError) 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 GroupRegistryServiceCreateRequestMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceCreateRequestValidationError is the validation error
+// returned by GroupRegistryServiceCreateRequest.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceCreateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceCreateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceCreateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceCreateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceCreateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceCreateRequestValidationError) ErrorName() string {
+ return "GroupRegistryServiceCreateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceCreateRequestValidationError) 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 %sGroupRegistryServiceCreateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceCreateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceCreateRequestValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceCreateResponse 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 *GroupRegistryServiceCreateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceCreateResponse
+// 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
+// GroupRegistryServiceCreateResponseMultiError, or nil if none found.
+func (m *GroupRegistryServiceCreateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceCreateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceCreateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceCreateResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceCreateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceCreateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceCreateResponseMultiError) 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 GroupRegistryServiceCreateResponseMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceCreateResponseValidationError is the validation error
+// returned by GroupRegistryServiceCreateResponse.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceCreateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceCreateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceCreateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceCreateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceCreateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceCreateResponseValidationError) ErrorName() string {
+ return "GroupRegistryServiceCreateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceCreateResponseValidationError) 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 %sGroupRegistryServiceCreateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceCreateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceCreateResponseValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceUpdateRequest 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 *GroupRegistryServiceUpdateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceUpdateRequest
+// 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
+// GroupRegistryServiceUpdateRequestMultiError, or nil if none found.
+func (m *GroupRegistryServiceUpdateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceUpdateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetGroup()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupRegistryServiceUpdateRequestValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupRegistryServiceUpdateRequestValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GroupRegistryServiceUpdateRequestValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceUpdateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceUpdateRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceUpdateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceUpdateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceUpdateRequestMultiError) 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 GroupRegistryServiceUpdateRequestMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceUpdateRequestValidationError is the validation error
+// returned by GroupRegistryServiceUpdateRequest.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceUpdateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceUpdateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceUpdateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceUpdateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceUpdateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceUpdateRequestValidationError) ErrorName() string {
+ return "GroupRegistryServiceUpdateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceUpdateRequestValidationError) 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 %sGroupRegistryServiceUpdateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceUpdateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceUpdateRequestValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceUpdateResponse 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 *GroupRegistryServiceUpdateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceUpdateResponse
+// 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
+// GroupRegistryServiceUpdateResponseMultiError, or nil if none found.
+func (m *GroupRegistryServiceUpdateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceUpdateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceUpdateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceUpdateResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceUpdateResponse.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceUpdateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceUpdateResponseMultiError) 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 GroupRegistryServiceUpdateResponseMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceUpdateResponseValidationError is the validation error
+// returned by GroupRegistryServiceUpdateResponse.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceUpdateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceUpdateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceUpdateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceUpdateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceUpdateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceUpdateResponseValidationError) ErrorName() string {
+ return "GroupRegistryServiceUpdateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceUpdateResponseValidationError) 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 %sGroupRegistryServiceUpdateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceUpdateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceUpdateResponseValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceDeleteRequest 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 *GroupRegistryServiceDeleteRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceDeleteRequest
+// 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
+// GroupRegistryServiceDeleteRequestMultiError, or nil if none found.
+func (m *GroupRegistryServiceDeleteRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceDeleteRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceDeleteRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceDeleteRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceDeleteRequest.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceDeleteRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceDeleteRequestMultiError) 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 GroupRegistryServiceDeleteRequestMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceDeleteRequestValidationError is the validation error
+// returned by GroupRegistryServiceDeleteRequest.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceDeleteRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceDeleteRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceDeleteRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceDeleteRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceDeleteRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceDeleteRequestValidationError) ErrorName() string {
+ return "GroupRegistryServiceDeleteRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceDeleteRequestValidationError) 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 %sGroupRegistryServiceDeleteRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceDeleteRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceDeleteRequestValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceDeleteResponse 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 *GroupRegistryServiceDeleteResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceDeleteResponse
+// 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
+// GroupRegistryServiceDeleteResponseMultiError, or nil if none found.
+func (m *GroupRegistryServiceDeleteResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceDeleteResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Deleted
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceDeleteResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceDeleteResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceDeleteResponse.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceDeleteResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceDeleteResponseMultiError) 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 GroupRegistryServiceDeleteResponseMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceDeleteResponseValidationError is the validation error
+// returned by GroupRegistryServiceDeleteResponse.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceDeleteResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceDeleteResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceDeleteResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceDeleteResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceDeleteResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceDeleteResponseValidationError) ErrorName() string {
+ return "GroupRegistryServiceDeleteResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceDeleteResponseValidationError) 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 %sGroupRegistryServiceDeleteResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceDeleteResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceDeleteResponseValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceGetRequest 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 *GroupRegistryServiceGetRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceGetRequest 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
+// GroupRegistryServiceGetRequestMultiError, or nil if none found.
+func (m *GroupRegistryServiceGetRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceGetRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceGetRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceGetRequestMultiError is an error wrapping multiple
+// validation errors returned by GroupRegistryServiceGetRequest.ValidateAll()
+// if the designated constraints aren't met.
+type GroupRegistryServiceGetRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceGetRequestMultiError) 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 GroupRegistryServiceGetRequestMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceGetRequestValidationError is the validation error
+// returned by GroupRegistryServiceGetRequest.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceGetRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceGetRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceGetRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceGetRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceGetRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceGetRequestValidationError) ErrorName() string {
+ return "GroupRegistryServiceGetRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceGetRequestValidationError) 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 %sGroupRegistryServiceGetRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceGetRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceGetRequestValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceGetResponse 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 *GroupRegistryServiceGetResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceGetResponse 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
+// GroupRegistryServiceGetResponseMultiError, or nil if none found.
+func (m *GroupRegistryServiceGetResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceGetResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetGroup()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupRegistryServiceGetResponseValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupRegistryServiceGetResponseValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GroupRegistryServiceGetResponseValidationError{
+ field: "Group",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceGetResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceGetResponseMultiError is an error wrapping multiple
+// validation errors returned by GroupRegistryServiceGetResponse.ValidateAll()
+// if the designated constraints aren't met.
+type GroupRegistryServiceGetResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceGetResponseMultiError) 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 GroupRegistryServiceGetResponseMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceGetResponseValidationError is the validation error
+// returned by GroupRegistryServiceGetResponse.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceGetResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceGetResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceGetResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceGetResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceGetResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceGetResponseValidationError) ErrorName() string {
+ return "GroupRegistryServiceGetResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceGetResponseValidationError) 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 %sGroupRegistryServiceGetResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceGetResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceGetResponseValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceListRequest 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 *GroupRegistryServiceListRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceListRequest 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
+// GroupRegistryServiceListRequestMultiError, or nil if none found.
+func (m *GroupRegistryServiceListRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceListRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceListRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceListRequestMultiError is an error wrapping multiple
+// validation errors returned by GroupRegistryServiceListRequest.ValidateAll()
+// if the designated constraints aren't met.
+type GroupRegistryServiceListRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceListRequestMultiError) 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 GroupRegistryServiceListRequestMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceListRequestValidationError is the validation error
+// returned by GroupRegistryServiceListRequest.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceListRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceListRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceListRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceListRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceListRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceListRequestValidationError) ErrorName() string {
+ return "GroupRegistryServiceListRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceListRequestValidationError) 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 %sGroupRegistryServiceListRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceListRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceListRequestValidationError{}
+
+// Validate checks the field values on GroupRegistryServiceListResponse 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 *GroupRegistryServiceListResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GroupRegistryServiceListResponse 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
+// GroupRegistryServiceListResponseMultiError, or nil if none found.
+func (m *GroupRegistryServiceListResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GroupRegistryServiceListResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetGroup() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GroupRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Group[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GroupRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Group[%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 GroupRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("Group[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return GroupRegistryServiceListResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GroupRegistryServiceListResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// GroupRegistryServiceListResponse.ValidateAll() if the designated
+// constraints aren't met.
+type GroupRegistryServiceListResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GroupRegistryServiceListResponseMultiError) 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 GroupRegistryServiceListResponseMultiError) AllErrors() []error { return m }
+
+// GroupRegistryServiceListResponseValidationError is the validation error
+// returned by GroupRegistryServiceListResponse.Validate if the designated
+// constraints aren't met.
+type GroupRegistryServiceListResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GroupRegistryServiceListResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GroupRegistryServiceListResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GroupRegistryServiceListResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GroupRegistryServiceListResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GroupRegistryServiceListResponseValidationError) ErrorName() string {
+ return "GroupRegistryServiceListResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GroupRegistryServiceListResponseValidationError) 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 %sGroupRegistryServiceListResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GroupRegistryServiceListResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GroupRegistryServiceListResponseValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceCreateRequest 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 *TopNAggregationRegistryServiceCreateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceCreateRequest 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
+// TopNAggregationRegistryServiceCreateRequestMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceCreateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceCreateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetTopNAggregation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceCreateRequestValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceCreateRequestValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTopNAggregation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TopNAggregationRegistryServiceCreateRequestValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceCreateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceCreateRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceCreateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceCreateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceCreateRequestMultiError) 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 TopNAggregationRegistryServiceCreateRequestMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceCreateRequestValidationError is the validation
+// error returned by TopNAggregationRegistryServiceCreateRequest.Validate if
+// the designated constraints aren't met.
+type TopNAggregationRegistryServiceCreateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceCreateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceCreateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceCreateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceCreateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceCreateRequestValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceCreateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceCreateRequestValidationError) 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 %sTopNAggregationRegistryServiceCreateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceCreateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceCreateRequestValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceCreateResponse 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 *TopNAggregationRegistryServiceCreateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceCreateResponse 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
+// TopNAggregationRegistryServiceCreateResponseMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceCreateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceCreateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceCreateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceCreateResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceCreateResponse.ValidateAll() if the
+// designated constraints aren't met.
+type TopNAggregationRegistryServiceCreateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceCreateResponseMultiError) 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 TopNAggregationRegistryServiceCreateResponseMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceCreateResponseValidationError is the
+// validation error returned by
+// TopNAggregationRegistryServiceCreateResponse.Validate if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceCreateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceCreateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceCreateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceCreateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceCreateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceCreateResponseValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceCreateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceCreateResponseValidationError) 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 %sTopNAggregationRegistryServiceCreateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceCreateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceCreateResponseValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceUpdateRequest 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 *TopNAggregationRegistryServiceUpdateRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceUpdateRequest 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
+// TopNAggregationRegistryServiceUpdateRequestMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceUpdateRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceUpdateRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetTopNAggregation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceUpdateRequestValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceUpdateRequestValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTopNAggregation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TopNAggregationRegistryServiceUpdateRequestValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceUpdateRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceUpdateRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceUpdateRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceUpdateRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceUpdateRequestMultiError) 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 TopNAggregationRegistryServiceUpdateRequestMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceUpdateRequestValidationError is the validation
+// error returned by TopNAggregationRegistryServiceUpdateRequest.Validate if
+// the designated constraints aren't met.
+type TopNAggregationRegistryServiceUpdateRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceUpdateRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceUpdateRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceUpdateRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceUpdateRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceUpdateRequestValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceUpdateRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceUpdateRequestValidationError) 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 %sTopNAggregationRegistryServiceUpdateRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceUpdateRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceUpdateRequestValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceUpdateResponse 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 *TopNAggregationRegistryServiceUpdateResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceUpdateResponse 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
+// TopNAggregationRegistryServiceUpdateResponseMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceUpdateResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceUpdateResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceUpdateResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceUpdateResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceUpdateResponse.ValidateAll() if the
+// designated constraints aren't met.
+type TopNAggregationRegistryServiceUpdateResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceUpdateResponseMultiError) 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 TopNAggregationRegistryServiceUpdateResponseMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceUpdateResponseValidationError is the
+// validation error returned by
+// TopNAggregationRegistryServiceUpdateResponse.Validate if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceUpdateResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceUpdateResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceUpdateResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceUpdateResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceUpdateResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceUpdateResponseValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceUpdateResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceUpdateResponseValidationError) 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 %sTopNAggregationRegistryServiceUpdateResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceUpdateResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceUpdateResponseValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceDeleteRequest 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 *TopNAggregationRegistryServiceDeleteRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceDeleteRequest 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
+// TopNAggregationRegistryServiceDeleteRequestMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceDeleteRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceDeleteRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TopNAggregationRegistryServiceDeleteRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceDeleteRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceDeleteRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceDeleteRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceDeleteRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceDeleteRequestMultiError) 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 TopNAggregationRegistryServiceDeleteRequestMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceDeleteRequestValidationError is the validation
+// error returned by TopNAggregationRegistryServiceDeleteRequest.Validate if
+// the designated constraints aren't met.
+type TopNAggregationRegistryServiceDeleteRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceDeleteRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceDeleteRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceDeleteRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceDeleteRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceDeleteRequestValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceDeleteRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceDeleteRequestValidationError) 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 %sTopNAggregationRegistryServiceDeleteRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceDeleteRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceDeleteRequestValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceDeleteResponse 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 *TopNAggregationRegistryServiceDeleteResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceDeleteResponse 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
+// TopNAggregationRegistryServiceDeleteResponseMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceDeleteResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceDeleteResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Deleted
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceDeleteResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceDeleteResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceDeleteResponse.ValidateAll() if the
+// designated constraints aren't met.
+type TopNAggregationRegistryServiceDeleteResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceDeleteResponseMultiError) 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 TopNAggregationRegistryServiceDeleteResponseMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceDeleteResponseValidationError is the
+// validation error returned by
+// TopNAggregationRegistryServiceDeleteResponse.Validate if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceDeleteResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceDeleteResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceDeleteResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceDeleteResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceDeleteResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceDeleteResponseValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceDeleteResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceDeleteResponseValidationError) 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 %sTopNAggregationRegistryServiceDeleteResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceDeleteResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceDeleteResponseValidationError{}
+
+// Validate checks the field values on TopNAggregationRegistryServiceGetRequest
+// 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 *TopNAggregationRegistryServiceGetRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceGetRequest 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
+// TopNAggregationRegistryServiceGetRequestMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceGetRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceGetRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TopNAggregationRegistryServiceGetRequestValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceGetRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceGetRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceGetRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceGetRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceGetRequestMultiError) 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 TopNAggregationRegistryServiceGetRequestMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceGetRequestValidationError is the validation
+// error returned by TopNAggregationRegistryServiceGetRequest.Validate if the
+// designated constraints aren't met.
+type TopNAggregationRegistryServiceGetRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceGetRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceGetRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceGetRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceGetRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceGetRequestValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceGetRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceGetRequestValidationError) 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 %sTopNAggregationRegistryServiceGetRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceGetRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceGetRequestValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceGetResponse 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 *TopNAggregationRegistryServiceGetResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceGetResponse 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
+// TopNAggregationRegistryServiceGetResponseMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceGetResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceGetResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetTopNAggregation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceGetResponseValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceGetResponseValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTopNAggregation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TopNAggregationRegistryServiceGetResponseValidationError{
+ field: "TopNAggregation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceGetResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceGetResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceGetResponse.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceGetResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceGetResponseMultiError) 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 TopNAggregationRegistryServiceGetResponseMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceGetResponseValidationError is the validation
+// error returned by TopNAggregationRegistryServiceGetResponse.Validate if the
+// designated constraints aren't met.
+type TopNAggregationRegistryServiceGetResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceGetResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceGetResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceGetResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceGetResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceGetResponseValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceGetResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceGetResponseValidationError) 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 %sTopNAggregationRegistryServiceGetResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceGetResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceGetResponseValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceListRequest 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 *TopNAggregationRegistryServiceListRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceListRequest 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
+// TopNAggregationRegistryServiceListRequestMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceListRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceListRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Group
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceListRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceListRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceListRequest.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceListRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceListRequestMultiError) 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 TopNAggregationRegistryServiceListRequestMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceListRequestValidationError is the validation
+// error returned by TopNAggregationRegistryServiceListRequest.Validate if the
+// designated constraints aren't met.
+type TopNAggregationRegistryServiceListRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceListRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceListRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceListRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceListRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceListRequestValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceListRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceListRequestValidationError) 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 %sTopNAggregationRegistryServiceListRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceListRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceListRequestValidationError{}
+
+// Validate checks the field values on
+// TopNAggregationRegistryServiceListResponse 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 *TopNAggregationRegistryServiceListResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// TopNAggregationRegistryServiceListResponse 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
+// TopNAggregationRegistryServiceListResponseMultiError, or nil if none found.
+func (m *TopNAggregationRegistryServiceListResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TopNAggregationRegistryServiceListResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTopNAggregation() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("TopNAggregation[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TopNAggregationRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("TopNAggregation[%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 TopNAggregationRegistryServiceListResponseValidationError{
+ field: fmt.Sprintf("TopNAggregation[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TopNAggregationRegistryServiceListResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// TopNAggregationRegistryServiceListResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// TopNAggregationRegistryServiceListResponse.ValidateAll() if the designated
+// constraints aren't met.
+type TopNAggregationRegistryServiceListResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TopNAggregationRegistryServiceListResponseMultiError) 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 TopNAggregationRegistryServiceListResponseMultiError) AllErrors() []error { return m }
+
+// TopNAggregationRegistryServiceListResponseValidationError is the validation
+// error returned by TopNAggregationRegistryServiceListResponse.Validate if
+// the designated constraints aren't met.
+type TopNAggregationRegistryServiceListResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TopNAggregationRegistryServiceListResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TopNAggregationRegistryServiceListResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TopNAggregationRegistryServiceListResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TopNAggregationRegistryServiceListResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TopNAggregationRegistryServiceListResponseValidationError) ErrorName() string {
+ return "TopNAggregationRegistryServiceListResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TopNAggregationRegistryServiceListResponseValidationError) 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 %sTopNAggregationRegistryServiceListResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TopNAggregationRegistryServiceListResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TopNAggregationRegistryServiceListResponseValidationError{}
diff --git a/api/proto/banyandb/database/v1/schema.pb.validate.go b/api/proto/banyandb/database/v1/schema.pb.validate.go
new file mode 100644
index 0000000..fc76c03
--- /dev/null
+++ b/api/proto/banyandb/database/v1/schema.pb.validate.go
@@ -0,0 +1,1688 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: banyandb/database/v1/schema.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on TagFamilySpec 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 *TagFamilySpec) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TagFamilySpec 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 TagFamilySpecMultiError, or
+// nil if none found.
+func (m *TagFamilySpec) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TagFamilySpec) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ for idx, item := range m.GetTags() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TagFamilySpecValidationError{
+ field: fmt.Sprintf("Tags[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TagFamilySpecValidationError{
+ field: fmt.Sprintf("Tags[%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 TagFamilySpecValidationError{
+ field: fmt.Sprintf("Tags[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TagFamilySpecMultiError(errors)
+ }
+
+ return nil
+}
+
+// TagFamilySpecMultiError is an error wrapping multiple validation errors
+// returned by TagFamilySpec.ValidateAll() if the designated constraints
+// aren't met.
+type TagFamilySpecMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TagFamilySpecMultiError) 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 TagFamilySpecMultiError) AllErrors() []error { return m }
+
+// TagFamilySpecValidationError is the validation error returned by
+// TagFamilySpec.Validate if the designated constraints aren't met.
+type TagFamilySpecValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TagFamilySpecValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TagFamilySpecValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TagFamilySpecValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TagFamilySpecValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TagFamilySpecValidationError) ErrorName() string { return "TagFamilySpecValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TagFamilySpecValidationError) 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 %sTagFamilySpec.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TagFamilySpecValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TagFamilySpecValidationError{}
+
+// Validate checks the field values on TagSpec 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 *TagSpec) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TagSpec 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 TagSpecMultiError, or nil if none found.
+func (m *TagSpec) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TagSpec) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Type
+
+ if len(errors) > 0 {
+ return TagSpecMultiError(errors)
+ }
+
+ return nil
+}
+
+// TagSpecMultiError is an error wrapping multiple validation errors returned
+// by TagSpec.ValidateAll() if the designated constraints aren't met.
+type TagSpecMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TagSpecMultiError) 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 TagSpecMultiError) AllErrors() []error { return m }
+
+// TagSpecValidationError is the validation error returned by TagSpec.Validate
+// if the designated constraints aren't met.
+type TagSpecValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TagSpecValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TagSpecValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TagSpecValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TagSpecValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TagSpecValidationError) ErrorName() string { return "TagSpecValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TagSpecValidationError) 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 %sTagSpec.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TagSpecValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TagSpecValidationError{}
+
+// Validate checks the field values on Stream 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 *Stream) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Stream 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 StreamMultiError, or nil if none found.
+func (m *Stream) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Stream) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetTagFamilies() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: fmt.Sprintf("TagFamilies[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: fmt.Sprintf("TagFamilies[%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 StreamValidationError{
+ field: fmt.Sprintf("TagFamilies[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetEntity()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: "Entity",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: "Entity",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamValidationError{
+ field: "Entity",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetUpdatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StreamValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StreamValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StreamMultiError(errors)
+ }
+
+ return nil
+}
+
+// StreamMultiError is an error wrapping multiple validation errors returned by
+// Stream.ValidateAll() if the designated constraints aren't met.
+type StreamMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StreamMultiError) 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 StreamMultiError) AllErrors() []error { return m }
+
+// StreamValidationError is the validation error returned by Stream.Validate if
+// the designated constraints aren't met.
+type StreamValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StreamValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StreamValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StreamValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StreamValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StreamValidationError) ErrorName() string { return "StreamValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StreamValidationError) 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 %sStream.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StreamValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StreamValidationError{}
+
+// Validate checks the field values on Entity 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 *Entity) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Entity 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 EntityMultiError, or nil if none found.
+func (m *Entity) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Entity) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return EntityMultiError(errors)
+ }
+
+ return nil
+}
+
+// EntityMultiError is an error wrapping multiple validation errors returned by
+// Entity.ValidateAll() if the designated constraints aren't met.
+type EntityMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m EntityMultiError) 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 EntityMultiError) AllErrors() []error { return m }
+
+// EntityValidationError is the validation error returned by Entity.Validate if
+// the designated constraints aren't met.
+type EntityValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e EntityValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e EntityValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e EntityValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e EntityValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e EntityValidationError) ErrorName() string { return "EntityValidationError" }
+
+// Error satisfies the builtin error interface
+func (e EntityValidationError) 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 %sEntity.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = EntityValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = EntityValidationError{}
+
+// Validate checks the field values on FieldSpec 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 *FieldSpec) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FieldSpec 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 FieldSpecMultiError, or nil
+// if none found.
+func (m *FieldSpec) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FieldSpec) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for FieldType
+
+ // no validation rules for EncodingMethod
+
+ // no validation rules for CompressionMethod
+
+ if len(errors) > 0 {
+ return FieldSpecMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldSpecMultiError is an error wrapping multiple validation errors returned
+// by FieldSpec.ValidateAll() if the designated constraints aren't met.
+type FieldSpecMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldSpecMultiError) 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 FieldSpecMultiError) AllErrors() []error { return m }
+
+// FieldSpecValidationError is the validation error returned by
+// FieldSpec.Validate if the designated constraints aren't met.
+type FieldSpecValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldSpecValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldSpecValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldSpecValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldSpecValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldSpecValidationError) ErrorName() string { return "FieldSpecValidationError" }
+
+// Error satisfies the builtin error interface
+func (e FieldSpecValidationError) 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 %sFieldSpec.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldSpecValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldSpecValidationError{}
+
+// Validate checks the field values on Measure 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 *Measure) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Measure 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 MeasureMultiError, or nil if none found.
+func (m *Measure) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Measure) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetTagFamilies() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: fmt.Sprintf("TagFamilies[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: fmt.Sprintf("TagFamilies[%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 MeasureValidationError{
+ field: fmt.Sprintf("TagFamilies[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetFields() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: fmt.Sprintf("Fields[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: fmt.Sprintf("Fields[%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 MeasureValidationError{
+ field: fmt.Sprintf("Fields[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetEntity()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: "Entity",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: "Entity",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureValidationError{
+ field: "Entity",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Interval
+
+ if all {
+ switch v := interface{}(m.GetUpdatedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MeasureValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MeasureValidationError{
+ field: "UpdatedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return MeasureMultiError(errors)
+ }
+
+ return nil
+}
+
+// MeasureMultiError is an error wrapping multiple validation errors returned
+// by Measure.ValidateAll() if the designated constraints aren't met.
+type MeasureMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MeasureMultiError) 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 MeasureMultiError) AllErrors() []error { return m }
+
+// MeasureValidationError is the validation error returned by Measure.Validate
+// if the designated constraints aren't met.
+type MeasureValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MeasureValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MeasureValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MeasureValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MeasureValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MeasureValidationError) ErrorName() string { return "MeasureValidationError" }
+
+// Error satisfies the builtin error interface
+func (e MeasureValidationError) 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 %sMeasure.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
... 10256 lines suppressed ...