diff --git a/Makefile b/Makefile index 8d1238b6f..94a8a14c3 100755 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ GO_VERSION ?= 1.22 LINT_VERSION ?= 1.60.1 TRUECLOUDLAB_LINT_VERSION ?= 0.0.6 PROTOC_VERSION ?= 25.0 -PROTOC_GEN_GO_VERSION ?= $(shell go list -f '{{.Version}}' -m google.golang.org/protobuf) PROTOGEN_FROSTFS_VERSION ?= $(shell go list -f '{{.Version}}' -m git.frostfs.info/TrueCloudLab/frostfs-api-go/v2) PROTOC_OS_VERSION=osx-x86_64 ifeq ($(shell uname), Linux) @@ -39,7 +38,6 @@ LINT_DIR = $(OUTPUT_LINT_DIR)/golangci-lint-$(LINT_VERSION)-v$(TRUECLOUDLAB_LINT TMP_DIR := .cache PROTOBUF_DIR ?= $(abspath $(BIN))/protobuf PROTOC_DIR ?= $(PROTOBUF_DIR)/protoc-v$(PROTOC_VERSION) -PROTOC_GEN_GO_DIR ?= $(PROTOBUF_DIR)/protoc-gen-go-$(PROTOC_GEN_GO_VERSION) PROTOGEN_FROSTFS_DIR ?= $(PROTOBUF_DIR)/protogen-$(PROTOGEN_FROSTFS_VERSION) STATICCHECK_DIR ?= $(abspath $(BIN))/staticcheck STATICCHECK_VERSION_DIR ?= $(STATICCHECK_DIR)/$(STATICCHECK_VERSION) @@ -107,17 +105,15 @@ export-metrics: dep # Regenerate proto files: protoc: - @if [ ! -d "$(PROTOC_DIR)" ] || [ ! -d "$(PROTOC_GEN_GO_DIR)" ] || [ ! -d "$(PROTOGEN_FROSTFS_DIR)" ]; then \ + @if [ ! -d "$(PROTOC_DIR)" ] || [ ! -d "$(PROTOGEN_FROSTFS_DIR)" ]; then \ make protoc-install; \ fi @for f in `find . -type f -name '*.proto' -not -path './bin/*'`; do \ echo "⇒ Processing $$f "; \ $(PROTOC_DIR)/bin/protoc \ --proto_path=.:$(PROTOC_DIR)/include:/usr/local/include \ - --plugin=protoc-gen-go=$(PROTOC_GEN_GO_DIR)/protoc-gen-go \ --plugin=protoc-gen-go-frostfs=$(PROTOGEN_FROSTFS_DIR)/protogen \ --go-frostfs_out=. --go-frostfs_opt=paths=source_relative \ - --go_out=. --go_opt=paths=source_relative \ --go-grpc_opt=require_unimplemented_servers=false \ --go-grpc_out=. --go-grpc_opt=paths=source_relative $$f; \ done @@ -130,8 +126,6 @@ protoc-install: @wget -q -O $(PROTOBUF_DIR)/protoc-$(PROTOC_VERSION).zip 'https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-$(PROTOC_OS_VERSION).zip' @unzip -q -o $(PROTOBUF_DIR)/protoc-$(PROTOC_VERSION).zip -d $(PROTOC_DIR) @rm $(PROTOBUF_DIR)/protoc-$(PROTOC_VERSION).zip - @echo "⇒ Installing protoc-gen-go..." - @GOBIN=$(PROTOC_GEN_GO_DIR) go install -v google.golang.org/protobuf/...@$(PROTOC_GEN_GO_VERSION) @echo "⇒ Instaling protogen FrostFS plugin..." @GOBIN=$(PROTOGEN_FROSTFS_DIR) go install -mod=mod -v git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/protogen@$(PROTOGEN_FROSTFS_VERSION) diff --git a/cmd/frostfs-cli/modules/control/set_netmap_status.go b/cmd/frostfs-cli/modules/control/set_netmap_status.go index 31ade1eb9..a107b2b53 100644 --- a/cmd/frostfs-cli/modules/control/set_netmap_status.go +++ b/cmd/frostfs-cli/modules/control/set_netmap_status.go @@ -84,7 +84,7 @@ func setNetmapStatus(cmd *cobra.Command, _ []string) { body.SetStatus(control.NetmapStatus_MAINTENANCE) if force { - body.SetForceMaintenance() + body.SetForceMaintenance(true) common.PrintVerbose(cmd, "Local maintenance will be forced.") } targetStatus = control.NetmapStatus_MAINTENANCE diff --git a/cmd/frostfs-cli/modules/control/shards_set_mode.go b/cmd/frostfs-cli/modules/control/shards_set_mode.go index e73f15178..dd0d77748 100644 --- a/cmd/frostfs-cli/modules/control/shards_set_mode.go +++ b/cmd/frostfs-cli/modules/control/shards_set_mode.go @@ -117,10 +117,10 @@ func setShardMode(cmd *cobra.Command, _ []string) { req.SetBody(body) body.SetMode(mode) - body.SetShardIDList(getShardIDList(cmd)) + body.SetShard_ID(getShardIDList(cmd)) reset, _ := cmd.Flags().GetBool(shardClearErrorsFlag) - body.ClearErrorCounter(reset) + body.SetResetErrorCounter(reset) signRequest(cmd, pk, req) diff --git a/cmd/frostfs-cli/modules/control/util.go b/cmd/frostfs-cli/modules/control/util.go index c0577ac0c..ef547681f 100644 --- a/cmd/frostfs-cli/modules/control/util.go +++ b/cmd/frostfs-cli/modules/control/util.go @@ -44,7 +44,7 @@ func verifyResponse(cmd *cobra.Command, GetSign() []byte }, body interface { - StableMarshal([]byte) []byte + MarshalProtobuf([]byte) []byte }, ) { if sigControl == nil { @@ -60,7 +60,7 @@ func verifyResponse(cmd *cobra.Command, var sig frostfscrypto.Signature commonCmd.ExitOnErr(cmd, "can't read signature: %w", sig.ReadFromV2(sigV2)) - if !sig.Verify(body.StableMarshal(nil)) { + if !sig.Verify(body.MarshalProtobuf(nil)) { commonCmd.ExitOnErr(cmd, "", errors.New("invalid response signature")) } } diff --git a/cmd/frostfs-node/netmap.go b/cmd/frostfs-node/netmap.go index 128cc3005..8104b1dc1 100644 --- a/cmd/frostfs-node/netmap.go +++ b/cmd/frostfs-node/netmap.go @@ -84,7 +84,7 @@ func (s *networkState) setNodeInfo(ni *netmapSDK.NodeInfo) { } } - s.setControlNetmapStatus(ctrlNetSt) + s.setControlNetmapStatus(control.NetmapStatus(ctrlNetSt)) } // sets the current node state to the given value. Subsequent cfg.bootstrap diff --git a/go.mod b/go.mod index 79dcc9553..b665709cc 100644 --- a/go.mod +++ b/go.mod @@ -4,16 +4,17 @@ go 1.22 require ( code.gitea.io/sdk/gitea v0.17.1 - git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240813155151-d112a28d382f + git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240819074700-a43110e36326 git.frostfs.info/TrueCloudLab/frostfs-contract v0.19.3-0.20240621131249-49e5270f673e git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 git.frostfs.info/TrueCloudLab/frostfs-locode-db v0.4.1-0.20240710074952-65761deb5c0d git.frostfs.info/TrueCloudLab/frostfs-observability v0.0.0-20231101111734-b3ad3335ff65 - git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240813155821-98aabc45a720 + git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240820072028-6dd7be11d13b git.frostfs.info/TrueCloudLab/hrw v1.2.1 git.frostfs.info/TrueCloudLab/policy-engine v0.0.0-20240814080254-96225afacb88 git.frostfs.info/TrueCloudLab/tzhash v1.8.0 git.frostfs.info/TrueCloudLab/zapjournald v0.0.0-20240124114243-cb2e66427d02 + github.com/VictoriaMetrics/easyproto v0.1.4 github.com/cheggaaa/pb v1.0.29 github.com/chzyer/readline v1.5.1 github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 @@ -21,6 +22,7 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/klauspost/compress v1.17.4 + github.com/mailru/easyjson v0.7.7 github.com/mitchellh/go-homedir v1.1.0 github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multiaddr v0.12.1 @@ -84,7 +86,6 @@ require ( github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/klauspost/reedsolomon v1.12.1 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect diff --git a/go.sum b/go.sum index 803a065c3..54e0d0301 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8= code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM= -git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240813155151-d112a28d382f h1:xrJqsXOZeSkBFMSyN+PQ9DiCGxVULU3VIN/tuH/vtb8= -git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240813155151-d112a28d382f/go.mod h1:mc7j6Cc1GU1tJZNmDwEYiJJ339biNnU1Bz3wZGogMe0= +git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240819074700-a43110e36326 h1:TkH+NSsY4C/Z8MocIJyMcqLm5vEhZcSowOldJyilKKA= +git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240819074700-a43110e36326/go.mod h1:zZnHiRv9m5+ESYLhBXY9Jds9A/YIDEUGiuyPUS09HwM= git.frostfs.info/TrueCloudLab/frostfs-contract v0.19.3-0.20240621131249-49e5270f673e h1:kcBqZBiFIUBATUqEuvVigtkJJWQ2Gug/eYXn967o3M4= git.frostfs.info/TrueCloudLab/frostfs-contract v0.19.3-0.20240621131249-49e5270f673e/go.mod h1:F/fe1OoIDKr5Bz99q4sriuHDuf3aZefZy9ZsCqEtgxc= git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 h1:FxqFDhQYYgpe41qsIHVOcdzSVCB8JNSfPG7Uk4r2oSk= @@ -10,8 +10,8 @@ git.frostfs.info/TrueCloudLab/frostfs-locode-db v0.4.1-0.20240710074952-65761deb git.frostfs.info/TrueCloudLab/frostfs-locode-db v0.4.1-0.20240710074952-65761deb5c0d/go.mod h1:7ZZq8iguY7qFsXajdHGmZd2AW4QbucyrJwhbsRfOfek= git.frostfs.info/TrueCloudLab/frostfs-observability v0.0.0-20231101111734-b3ad3335ff65 h1:PaZ8GpnUoXxUoNsc1qp36bT2u7FU+neU4Jn9cl8AWqI= git.frostfs.info/TrueCloudLab/frostfs-observability v0.0.0-20231101111734-b3ad3335ff65/go.mod h1:6aAX80dvJ3r5fjN9CzzPglRptoiPgIC9KFGGsUA+1Hw= -git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240813155821-98aabc45a720 h1:15UXpW42bfshIv/X5kww92jG2o0drHgsdFd+UJ6zD7g= -git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240813155821-98aabc45a720/go.mod h1:XRX/bBQsDJKr040N/a0YnDhxJqaUv1XyMVj3qxnb5K0= +git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240820072028-6dd7be11d13b h1:ZCJBVmQDcdv0twpX9xJU/AQwX+dXyvVfqr0Pq3x+3yk= +git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240820072028-6dd7be11d13b/go.mod h1:aaC2OR34tVrBwd0Z2gqoN5WLtV/idKqpqPDhb4XqmCo= git.frostfs.info/TrueCloudLab/hrw v1.2.1 h1:ccBRK21rFvY5R1WotI6LNoPlizk7qSvdfD8lNIRudVc= git.frostfs.info/TrueCloudLab/hrw v1.2.1/go.mod h1:C1Ygde2n843yTZEQ0FP69jYiuaYV0kriLvP4zm8JuvM= git.frostfs.info/TrueCloudLab/neoneo-go v0.106.1-0.20240726093631-5481339d6928 h1:LK3mCkNZkY48eBA9jnk1N0eQZLsZhOG+XYw4EBoKUjM= @@ -25,6 +25,8 @@ git.frostfs.info/TrueCloudLab/tzhash v1.8.0/go.mod h1:dhY+oy274hV8wGvGL4MwwMpdL3 git.frostfs.info/TrueCloudLab/zapjournald v0.0.0-20240124114243-cb2e66427d02 h1:HeY8n27VyPRQe49l/fzyVMkWEB2fsLJYKp64pwA7tz4= git.frostfs.info/TrueCloudLab/zapjournald v0.0.0-20240124114243-cb2e66427d02/go.mod h1:rQFJJdEOV7KbbMtQYR2lNfiZk+ONRDJSbMCTWxKt8Fw= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/VictoriaMetrics/easyproto v0.1.4 h1:r8cNvo8o6sR4QShBXQd1bKw/VVLSQma/V2KhTBPf+Sc= +github.com/VictoriaMetrics/easyproto v0.1.4/go.mod h1:QlGlzaJnDfFd8Lk6Ci/fuLxfTo3/GThPs2KH23mv710= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/pkg/local_object_storage/metabase/get.go b/pkg/local_object_storage/metabase/get.go index b79f6cb14..d979b4f0f 100644 --- a/pkg/local_object_storage/metabase/get.go +++ b/pkg/local_object_storage/metabase/get.go @@ -1,6 +1,7 @@ package meta import ( + "bytes" "context" "fmt" "time" @@ -107,7 +108,7 @@ func (db *DB) get(tx *bbolt.Tx, addr oid.Address, key []byte, checkStatus, raw b // check in primary index data := getFromBucket(tx, primaryBucketName(cnr, bucketName), key) if len(data) != 0 { - return obj, obj.Unmarshal(data) + return obj, obj.Unmarshal(bytes.Clone(data)) } data = getFromBucket(tx, ecInfoBucketName(cnr, bucketName), key) @@ -118,13 +119,13 @@ func (db *DB) get(tx *bbolt.Tx, addr oid.Address, key []byte, checkStatus, raw b // if not found then check in tombstone index data = getFromBucket(tx, tombstoneBucketName(cnr, bucketName), key) if len(data) != 0 { - return obj, obj.Unmarshal(data) + return obj, obj.Unmarshal(bytes.Clone(data)) } // if not found then check in locker index data = getFromBucket(tx, bucketNameLockers(cnr, bucketName), key) if len(data) != 0 { - return obj, obj.Unmarshal(data) + return obj, obj.Unmarshal(bytes.Clone(data)) } // if not found then check if object is a virtual diff --git a/pkg/services/control/common_test.go b/pkg/services/control/common_test.go deleted file mode 100644 index bc512b4be..000000000 --- a/pkg/services/control/common_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package control_test - -import ( - "crypto/rand" - "testing" - - "github.com/mr-tron/base58" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" -) - -type protoMessage interface { - StableMarshal([]byte) []byte - proto.Message -} - -func testStableMarshal(t *testing.T, m1, m2 protoMessage, cmp func(m1, m2 protoMessage) bool) { - require.NoError(t, proto.Unmarshal(m1.StableMarshal(nil), m2)) - - require.True(t, cmp(m1, m2)) -} - -func testData(sz int) []byte { - d := make([]byte, sz) - - _, _ = rand.Read(d) - - return d -} - -func testString() string { - return base58.Encode(testData(10)) -} diff --git a/pkg/services/control/ir/service.go b/pkg/services/control/ir/service.go deleted file mode 100644 index b2db2b43a..000000000 --- a/pkg/services/control/ir/service.go +++ /dev/null @@ -1,46 +0,0 @@ -package control - -// SetBody sets health check request body. -func (x *HealthCheckRequest) SetBody(v *HealthCheckRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetHealthStatus sets health status of the IR application. -func (x *HealthCheckResponse_Body) SetHealthStatus(v HealthStatus) { - if x != nil { - x.HealthStatus = v - } -} - -// SetBody sets health check response body. -func (x *HealthCheckResponse) SetBody(v *HealthCheckResponse_Body) { - if x != nil { - x.Body = v - } -} - -func (x *TickEpochRequest) SetBody(v *TickEpochRequest_Body) { - if x != nil { - x.Body = v - } -} - -func (x *TickEpochResponse) SetBody(v *TickEpochResponse_Body) { - if x != nil { - x.Body = v - } -} - -func (x *RemoveNodeRequest) SetBody(v *RemoveNodeRequest_Body) { - if x != nil { - x.Body = v - } -} - -func (x *RemoveNodeResponse) SetBody(v *RemoveNodeResponse_Body) { - if x != nil { - x.Body = v - } -} diff --git a/pkg/services/control/ir/service.pb.go b/pkg/services/control/ir/service.pb.go deleted file mode 100644 index d1e253bf5..000000000 --- a/pkg/services/control/ir/service.pb.go +++ /dev/null @@ -1,1277 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.0 -// source: pkg/services/control/ir/service.proto - -package control - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Health check request. -type HealthCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of health check request message. - Body *HealthCheckRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - // Should be signed by node key or one of - // the keys configured by the node. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *HealthCheckRequest) Reset() { - *x = HealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequest) ProtoMessage() {} - -func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead. -func (*HealthCheckRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{0} -} - -func (x *HealthCheckRequest) GetBody() *HealthCheckRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *HealthCheckRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Health check response. -type HealthCheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of health check response message. - Body *HealthCheckResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *HealthCheckResponse) Reset() { - *x = HealthCheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckResponse) ProtoMessage() {} - -func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead. -func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{1} -} - -func (x *HealthCheckResponse) GetBody() *HealthCheckResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *HealthCheckResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type TickEpochRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *TickEpochRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *TickEpochRequest) Reset() { - *x = TickEpochRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TickEpochRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TickEpochRequest) ProtoMessage() {} - -func (x *TickEpochRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TickEpochRequest.ProtoReflect.Descriptor instead. -func (*TickEpochRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{2} -} - -func (x *TickEpochRequest) GetBody() *TickEpochRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *TickEpochRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type TickEpochResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *TickEpochResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *TickEpochResponse) Reset() { - *x = TickEpochResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TickEpochResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TickEpochResponse) ProtoMessage() {} - -func (x *TickEpochResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TickEpochResponse.ProtoReflect.Descriptor instead. -func (*TickEpochResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{3} -} - -func (x *TickEpochResponse) GetBody() *TickEpochResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *TickEpochResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveNodeRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveNodeRequest) Reset() { - *x = RemoveNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveNodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveNodeRequest) ProtoMessage() {} - -func (x *RemoveNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveNodeRequest.ProtoReflect.Descriptor instead. -func (*RemoveNodeRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{4} -} - -func (x *RemoveNodeRequest) GetBody() *RemoveNodeRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveNodeRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveNodeResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveNodeResponse) Reset() { - *x = RemoveNodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveNodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveNodeResponse) ProtoMessage() {} - -func (x *RemoveNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveNodeResponse.ProtoReflect.Descriptor instead. -func (*RemoveNodeResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{5} -} - -func (x *RemoveNodeResponse) GetBody() *RemoveNodeResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveNodeResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveContainerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveContainerRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveContainerRequest) Reset() { - *x = RemoveContainerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveContainerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveContainerRequest) ProtoMessage() {} - -func (x *RemoveContainerRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveContainerRequest.ProtoReflect.Descriptor instead. -func (*RemoveContainerRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{6} -} - -func (x *RemoveContainerRequest) GetBody() *RemoveContainerRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveContainerRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveContainerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveContainerResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveContainerResponse) Reset() { - *x = RemoveContainerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveContainerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveContainerResponse) ProtoMessage() {} - -func (x *RemoveContainerResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveContainerResponse.ProtoReflect.Descriptor instead. -func (*RemoveContainerResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{7} -} - -func (x *RemoveContainerResponse) GetBody() *RemoveContainerResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveContainerResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Health check request body. -type HealthCheckRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HealthCheckRequest_Body) Reset() { - *x = HealthCheckRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequest_Body) ProtoMessage() {} - -func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequest_Body.ProtoReflect.Descriptor instead. -func (*HealthCheckRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{0, 0} -} - -// Health check response body -type HealthCheckResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Health status of IR node application. - HealthStatus HealthStatus `protobuf:"varint,1,opt,name=health_status,json=healthStatus,proto3,enum=ircontrol.HealthStatus" json:"health_status,omitempty"` -} - -func (x *HealthCheckResponse_Body) Reset() { - *x = HealthCheckResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckResponse_Body) ProtoMessage() {} - -func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckResponse_Body.ProtoReflect.Descriptor instead. -func (*HealthCheckResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *HealthCheckResponse_Body) GetHealthStatus() HealthStatus { - if x != nil { - return x.HealthStatus - } - return HealthStatus_HEALTH_STATUS_UNDEFINED -} - -type TickEpochRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Valid until block value override. - Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"` -} - -func (x *TickEpochRequest_Body) Reset() { - *x = TickEpochRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TickEpochRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TickEpochRequest_Body) ProtoMessage() {} - -func (x *TickEpochRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TickEpochRequest_Body.ProtoReflect.Descriptor instead. -func (*TickEpochRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *TickEpochRequest_Body) GetVub() uint32 { - if x != nil { - return x.Vub - } - return 0 -} - -type TickEpochResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Valid until block value for transaction. - Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"` -} - -func (x *TickEpochResponse_Body) Reset() { - *x = TickEpochResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TickEpochResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TickEpochResponse_Body) ProtoMessage() {} - -func (x *TickEpochResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TickEpochResponse_Body.ProtoReflect.Descriptor instead. -func (*TickEpochResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *TickEpochResponse_Body) GetVub() uint32 { - if x != nil { - return x.Vub - } - return 0 -} - -type RemoveNodeRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Valid until block value override. - Vub uint32 `protobuf:"varint,2,opt,name=vub,proto3" json:"vub,omitempty"` -} - -func (x *RemoveNodeRequest_Body) Reset() { - *x = RemoveNodeRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveNodeRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveNodeRequest_Body) ProtoMessage() {} - -func (x *RemoveNodeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveNodeRequest_Body.ProtoReflect.Descriptor instead. -func (*RemoveNodeRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *RemoveNodeRequest_Body) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *RemoveNodeRequest_Body) GetVub() uint32 { - if x != nil { - return x.Vub - } - return 0 -} - -type RemoveNodeResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Valid until block value for transaction. - Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"` -} - -func (x *RemoveNodeResponse_Body) Reset() { - *x = RemoveNodeResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveNodeResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveNodeResponse_Body) ProtoMessage() {} - -func (x *RemoveNodeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveNodeResponse_Body.ProtoReflect.Descriptor instead. -func (*RemoveNodeResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *RemoveNodeResponse_Body) GetVub() uint32 { - if x != nil { - return x.Vub - } - return 0 -} - -type RemoveContainerRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - // Valid until block value override. - Vub uint32 `protobuf:"varint,3,opt,name=vub,proto3" json:"vub,omitempty"` -} - -func (x *RemoveContainerRequest_Body) Reset() { - *x = RemoveContainerRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveContainerRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveContainerRequest_Body) ProtoMessage() {} - -func (x *RemoveContainerRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveContainerRequest_Body.ProtoReflect.Descriptor instead. -func (*RemoveContainerRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *RemoveContainerRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *RemoveContainerRequest_Body) GetOwner() []byte { - if x != nil { - return x.Owner - } - return nil -} - -func (x *RemoveContainerRequest_Body) GetVub() uint32 { - if x != nil { - return x.Vub - } - return 0 -} - -type RemoveContainerResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Valid until block value for transaction. - Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"` -} - -func (x *RemoveContainerResponse_Body) Reset() { - *x = RemoveContainerResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveContainerResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveContainerResponse_Body) ProtoMessage() {} - -func (x *RemoveContainerResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveContainerResponse_Body.ProtoReflect.Descriptor instead. -func (*RemoveContainerResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *RemoveContainerResponse_Body) GetVub() uint32 { - if x != nil { - return x.Vub - } - return 0 -} - -var File_pkg_services_control_ir_service_proto protoreflect.FileDescriptor - -var file_pkg_services_control_ir_service_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x69, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x1a, 0x23, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x69, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, - 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, - 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, - 0x64, 0x79, 0x22, 0xc8, 0x01, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x44, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x3c, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x96, 0x01, - 0x0a, 0x10, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, - 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, - 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18, 0x0a, 0x04, - 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0x98, 0x01, 0x0a, 0x11, 0x54, 0x69, 0x63, 0x6b, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x72, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, - 0x62, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x1a, 0x2a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x76, 0x75, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0x9a, - 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0xdb, 0x01, 0x0a, 0x16, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x51, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, - 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0xa4, 0x01, 0x0a, 0x17, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, - 0x32, 0xcb, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x0a, 0x09, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1b, - 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x69, 0x72, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x72, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, - 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, - 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, - 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pkg_services_control_ir_service_proto_rawDescOnce sync.Once - file_pkg_services_control_ir_service_proto_rawDescData = file_pkg_services_control_ir_service_proto_rawDesc -) - -func file_pkg_services_control_ir_service_proto_rawDescGZIP() []byte { - file_pkg_services_control_ir_service_proto_rawDescOnce.Do(func() { - file_pkg_services_control_ir_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_services_control_ir_service_proto_rawDescData) - }) - return file_pkg_services_control_ir_service_proto_rawDescData -} - -var file_pkg_services_control_ir_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_pkg_services_control_ir_service_proto_goTypes = []interface{}{ - (*HealthCheckRequest)(nil), // 0: ircontrol.HealthCheckRequest - (*HealthCheckResponse)(nil), // 1: ircontrol.HealthCheckResponse - (*TickEpochRequest)(nil), // 2: ircontrol.TickEpochRequest - (*TickEpochResponse)(nil), // 3: ircontrol.TickEpochResponse - (*RemoveNodeRequest)(nil), // 4: ircontrol.RemoveNodeRequest - (*RemoveNodeResponse)(nil), // 5: ircontrol.RemoveNodeResponse - (*RemoveContainerRequest)(nil), // 6: ircontrol.RemoveContainerRequest - (*RemoveContainerResponse)(nil), // 7: ircontrol.RemoveContainerResponse - (*HealthCheckRequest_Body)(nil), // 8: ircontrol.HealthCheckRequest.Body - (*HealthCheckResponse_Body)(nil), // 9: ircontrol.HealthCheckResponse.Body - (*TickEpochRequest_Body)(nil), // 10: ircontrol.TickEpochRequest.Body - (*TickEpochResponse_Body)(nil), // 11: ircontrol.TickEpochResponse.Body - (*RemoveNodeRequest_Body)(nil), // 12: ircontrol.RemoveNodeRequest.Body - (*RemoveNodeResponse_Body)(nil), // 13: ircontrol.RemoveNodeResponse.Body - (*RemoveContainerRequest_Body)(nil), // 14: ircontrol.RemoveContainerRequest.Body - (*RemoveContainerResponse_Body)(nil), // 15: ircontrol.RemoveContainerResponse.Body - (*Signature)(nil), // 16: ircontrol.Signature - (HealthStatus)(0), // 17: ircontrol.HealthStatus -} -var file_pkg_services_control_ir_service_proto_depIdxs = []int32{ - 8, // 0: ircontrol.HealthCheckRequest.body:type_name -> ircontrol.HealthCheckRequest.Body - 16, // 1: ircontrol.HealthCheckRequest.signature:type_name -> ircontrol.Signature - 9, // 2: ircontrol.HealthCheckResponse.body:type_name -> ircontrol.HealthCheckResponse.Body - 16, // 3: ircontrol.HealthCheckResponse.signature:type_name -> ircontrol.Signature - 10, // 4: ircontrol.TickEpochRequest.body:type_name -> ircontrol.TickEpochRequest.Body - 16, // 5: ircontrol.TickEpochRequest.signature:type_name -> ircontrol.Signature - 11, // 6: ircontrol.TickEpochResponse.body:type_name -> ircontrol.TickEpochResponse.Body - 16, // 7: ircontrol.TickEpochResponse.signature:type_name -> ircontrol.Signature - 12, // 8: ircontrol.RemoveNodeRequest.body:type_name -> ircontrol.RemoveNodeRequest.Body - 16, // 9: ircontrol.RemoveNodeRequest.signature:type_name -> ircontrol.Signature - 13, // 10: ircontrol.RemoveNodeResponse.body:type_name -> ircontrol.RemoveNodeResponse.Body - 16, // 11: ircontrol.RemoveNodeResponse.signature:type_name -> ircontrol.Signature - 14, // 12: ircontrol.RemoveContainerRequest.body:type_name -> ircontrol.RemoveContainerRequest.Body - 16, // 13: ircontrol.RemoveContainerRequest.signature:type_name -> ircontrol.Signature - 15, // 14: ircontrol.RemoveContainerResponse.body:type_name -> ircontrol.RemoveContainerResponse.Body - 16, // 15: ircontrol.RemoveContainerResponse.signature:type_name -> ircontrol.Signature - 17, // 16: ircontrol.HealthCheckResponse.Body.health_status:type_name -> ircontrol.HealthStatus - 0, // 17: ircontrol.ControlService.HealthCheck:input_type -> ircontrol.HealthCheckRequest - 2, // 18: ircontrol.ControlService.TickEpoch:input_type -> ircontrol.TickEpochRequest - 4, // 19: ircontrol.ControlService.RemoveNode:input_type -> ircontrol.RemoveNodeRequest - 6, // 20: ircontrol.ControlService.RemoveContainer:input_type -> ircontrol.RemoveContainerRequest - 1, // 21: ircontrol.ControlService.HealthCheck:output_type -> ircontrol.HealthCheckResponse - 3, // 22: ircontrol.ControlService.TickEpoch:output_type -> ircontrol.TickEpochResponse - 5, // 23: ircontrol.ControlService.RemoveNode:output_type -> ircontrol.RemoveNodeResponse - 7, // 24: ircontrol.ControlService.RemoveContainer:output_type -> ircontrol.RemoveContainerResponse - 21, // [21:25] is the sub-list for method output_type - 17, // [17:21] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_pkg_services_control_ir_service_proto_init() } -func file_pkg_services_control_ir_service_proto_init() { - if File_pkg_services_control_ir_service_proto != nil { - return - } - file_pkg_services_control_ir_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_pkg_services_control_ir_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TickEpochRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TickEpochResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveNodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveContainerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveContainerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TickEpochRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TickEpochResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveNodeRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveNodeResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveContainerRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_ir_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveContainerResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_services_control_ir_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_pkg_services_control_ir_service_proto_goTypes, - DependencyIndexes: file_pkg_services_control_ir_service_proto_depIdxs, - MessageInfos: file_pkg_services_control_ir_service_proto_msgTypes, - }.Build() - File_pkg_services_control_ir_service_proto = out.File - file_pkg_services_control_ir_service_proto_rawDesc = nil - file_pkg_services_control_ir_service_proto_goTypes = nil - file_pkg_services_control_ir_service_proto_depIdxs = nil -} diff --git a/pkg/services/control/ir/service_frostfs.pb.go b/pkg/services/control/ir/service_frostfs.pb.go index e22d0013f..786095802 100644 --- a/pkg/services/control/ir/service_frostfs.pb.go +++ b/pkg/services/control/ir/service_frostfs.pb.go @@ -2,7 +2,27 @@ package control -import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" +import ( + json "encoding/json" + fmt "fmt" + pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" + proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" + encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" + easyproto "github.com/VictoriaMetrics/easyproto" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" + strconv "strconv" +) + +type HealthCheckRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckRequest_Body)(nil) + _ json.Marshaler = (*HealthCheckRequest_Body)(nil) + _ json.Unmarshaler = (*HealthCheckRequest_Body)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -14,18 +34,93 @@ func (x *HealthCheckRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthCheckRequest struct { + Body *HealthCheckRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckRequest)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckRequest)(nil) + _ json.Marshaler = (*HealthCheckRequest)(nil) + _ json.Unmarshaler = (*HealthCheckRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -38,27 +133,6 @@ func (x *HealthCheckRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -74,13 +148,164 @@ func (x *HealthCheckRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *HealthCheckRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *HealthCheckRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(HealthCheckRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *HealthCheckRequest) GetBody() *HealthCheckRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *HealthCheckRequest) SetBody(v *HealthCheckRequest_Body) { + x.Body = v +} +func (x *HealthCheckRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *HealthCheckRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *HealthCheckRequest_Body + f = new(HealthCheckRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthCheckResponse_Body struct { + HealthStatus HealthStatus `json:"healthStatus"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckResponse_Body)(nil) + _ json.Marshaler = (*HealthCheckResponse_Body)(nil) + _ json.Unmarshaler = (*HealthCheckResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -92,26 +317,141 @@ func (x *HealthCheckResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.EnumMarshal(1, buf[offset:], int32(x.HealthStatus)) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if int32(x.HealthStatus) != 0 { + mm.AppendInt32(1, int32(x.HealthStatus)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckResponse_Body") + } + switch fc.FieldNum { + case 1: // HealthStatus + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "HealthStatus") + } + x.HealthStatus = HealthStatus(data) + } + } + return nil +} +func (x *HealthCheckResponse_Body) GetHealthStatus() HealthStatus { + if x != nil { + return x.HealthStatus + } + return 0 +} +func (x *HealthCheckResponse_Body) SetHealthStatus(v HealthStatus) { + x.HealthStatus = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"healthStatus\":" + out.RawString(prefix[1:]) + out.Int32(int32(x.HealthStatus)) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "healthStatus": + { + var f HealthStatus + var parsedValue HealthStatus + switch v := in.Interface().(type) { + case string: + if vv, ok := HealthStatus_value[v]; ok { + parsedValue = HealthStatus(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = HealthStatus(vv) + case float64: + parsedValue = HealthStatus(v) + } + f = parsedValue + x.HealthStatus = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthCheckResponse struct { + Body *HealthCheckResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckResponse)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckResponse)(nil) + _ json.Marshaler = (*HealthCheckResponse)(nil) + _ json.Unmarshaler = (*HealthCheckResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -124,27 +464,6 @@ func (x *HealthCheckResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -160,13 +479,164 @@ func (x *HealthCheckResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *HealthCheckResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *HealthCheckResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(HealthCheckResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *HealthCheckResponse) GetBody() *HealthCheckResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *HealthCheckResponse) SetBody(v *HealthCheckResponse_Body) { + x.Body = v +} +func (x *HealthCheckResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *HealthCheckResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *HealthCheckResponse_Body + f = new(HealthCheckResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TickEpochRequest_Body struct { + Vub uint32 `json:"vub"` +} + +var ( + _ encoding.ProtoMarshaler = (*TickEpochRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*TickEpochRequest_Body)(nil) + _ json.Marshaler = (*TickEpochRequest_Body)(nil) + _ json.Unmarshaler = (*TickEpochRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -178,26 +648,125 @@ func (x *TickEpochRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TickEpochRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt32Marshal(1, buf[offset:], x.Vub) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TickEpochRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TickEpochRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Vub != 0 { + mm.AppendUint32(1, x.Vub) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TickEpochRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TickEpochRequest_Body") + } + switch fc.FieldNum { + case 1: // Vub + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Vub") + } + x.Vub = data + } + } + return nil +} +func (x *TickEpochRequest_Body) GetVub() uint32 { + if x != nil { + return x.Vub + } + return 0 +} +func (x *TickEpochRequest_Body) SetVub(v uint32) { + x.Vub = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TickEpochRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TickEpochRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"vub\":" + out.RawString(prefix[1:]) + out.Uint32(x.Vub) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TickEpochRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TickEpochRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "vub": + { + var f uint32 + f = in.Uint32() + x.Vub = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TickEpochRequest struct { + Body *TickEpochRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*TickEpochRequest)(nil) + _ encoding.ProtoUnmarshaler = (*TickEpochRequest)(nil) + _ json.Marshaler = (*TickEpochRequest)(nil) + _ json.Unmarshaler = (*TickEpochRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -210,27 +779,6 @@ func (x *TickEpochRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TickEpochRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -246,13 +794,164 @@ func (x *TickEpochRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *TickEpochRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *TickEpochRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TickEpochRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TickEpochRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TickEpochRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TickEpochRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(TickEpochRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *TickEpochRequest) GetBody() *TickEpochRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *TickEpochRequest) SetBody(v *TickEpochRequest_Body) { + x.Body = v +} +func (x *TickEpochRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *TickEpochRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TickEpochRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TickEpochRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TickEpochRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TickEpochRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *TickEpochRequest_Body + f = new(TickEpochRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TickEpochResponse_Body struct { + Vub uint32 `json:"vub"` +} + +var ( + _ encoding.ProtoMarshaler = (*TickEpochResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*TickEpochResponse_Body)(nil) + _ json.Marshaler = (*TickEpochResponse_Body)(nil) + _ json.Unmarshaler = (*TickEpochResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -264,26 +963,125 @@ func (x *TickEpochResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TickEpochResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt32Marshal(1, buf[offset:], x.Vub) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TickEpochResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TickEpochResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Vub != 0 { + mm.AppendUint32(1, x.Vub) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TickEpochResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TickEpochResponse_Body") + } + switch fc.FieldNum { + case 1: // Vub + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Vub") + } + x.Vub = data + } + } + return nil +} +func (x *TickEpochResponse_Body) GetVub() uint32 { + if x != nil { + return x.Vub + } + return 0 +} +func (x *TickEpochResponse_Body) SetVub(v uint32) { + x.Vub = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TickEpochResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TickEpochResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"vub\":" + out.RawString(prefix[1:]) + out.Uint32(x.Vub) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TickEpochResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TickEpochResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "vub": + { + var f uint32 + f = in.Uint32() + x.Vub = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TickEpochResponse struct { + Body *TickEpochResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*TickEpochResponse)(nil) + _ encoding.ProtoUnmarshaler = (*TickEpochResponse)(nil) + _ json.Marshaler = (*TickEpochResponse)(nil) + _ json.Unmarshaler = (*TickEpochResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -296,27 +1094,6 @@ func (x *TickEpochResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TickEpochResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -332,13 +1109,165 @@ func (x *TickEpochResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *TickEpochResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *TickEpochResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TickEpochResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TickEpochResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TickEpochResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TickEpochResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(TickEpochResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *TickEpochResponse) GetBody() *TickEpochResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *TickEpochResponse) SetBody(v *TickEpochResponse_Body) { + x.Body = v +} +func (x *TickEpochResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *TickEpochResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TickEpochResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TickEpochResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TickEpochResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TickEpochResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *TickEpochResponse_Body + f = new(TickEpochResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveNodeRequest_Body struct { + Key []byte `json:"key"` + Vub uint32 `json:"vub"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveNodeRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveNodeRequest_Body)(nil) + _ json.Marshaler = (*RemoveNodeRequest_Body)(nil) + _ json.Unmarshaler = (*RemoveNodeRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -351,27 +1280,154 @@ func (x *RemoveNodeRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveNodeRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Key) - offset += proto.UInt32Marshal(2, buf[offset:], x.Vub) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveNodeRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveNodeRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Key) != 0 { + mm.AppendBytes(1, x.Key) + } + if x.Vub != 0 { + mm.AppendUint32(2, x.Vub) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveNodeRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveNodeRequest_Body") + } + switch fc.FieldNum { + case 1: // Key + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Key") + } + x.Key = data + case 2: // Vub + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Vub") + } + x.Vub = data + } + } + return nil +} +func (x *RemoveNodeRequest_Body) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} +func (x *RemoveNodeRequest_Body) SetKey(v []byte) { + x.Key = v +} +func (x *RemoveNodeRequest_Body) GetVub() uint32 { + if x != nil { + return x.Vub + } + return 0 +} +func (x *RemoveNodeRequest_Body) SetVub(v uint32) { + x.Vub = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveNodeRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveNodeRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Key) + } + { + const prefix string = ",\"vub\":" + out.RawString(prefix) + out.Uint32(x.Vub) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveNodeRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveNodeRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "key": + { + var f []byte + f = in.Bytes() + x.Key = f + } + case "vub": + { + var f uint32 + f = in.Uint32() + x.Vub = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveNodeRequest struct { + Body *RemoveNodeRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveNodeRequest)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveNodeRequest)(nil) + _ json.Marshaler = (*RemoveNodeRequest)(nil) + _ json.Unmarshaler = (*RemoveNodeRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -384,27 +1440,6 @@ func (x *RemoveNodeRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveNodeRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -420,13 +1455,164 @@ func (x *RemoveNodeRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveNodeRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveNodeRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveNodeRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveNodeRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveNodeRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveNodeRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveNodeRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveNodeRequest) GetBody() *RemoveNodeRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveNodeRequest) SetBody(v *RemoveNodeRequest_Body) { + x.Body = v +} +func (x *RemoveNodeRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveNodeRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveNodeRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveNodeRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveNodeRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveNodeRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveNodeRequest_Body + f = new(RemoveNodeRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveNodeResponse_Body struct { + Vub uint32 `json:"vub"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveNodeResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveNodeResponse_Body)(nil) + _ json.Marshaler = (*RemoveNodeResponse_Body)(nil) + _ json.Unmarshaler = (*RemoveNodeResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -438,26 +1624,125 @@ func (x *RemoveNodeResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveNodeResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt32Marshal(1, buf[offset:], x.Vub) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveNodeResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveNodeResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Vub != 0 { + mm.AppendUint32(1, x.Vub) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveNodeResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveNodeResponse_Body") + } + switch fc.FieldNum { + case 1: // Vub + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Vub") + } + x.Vub = data + } + } + return nil +} +func (x *RemoveNodeResponse_Body) GetVub() uint32 { + if x != nil { + return x.Vub + } + return 0 +} +func (x *RemoveNodeResponse_Body) SetVub(v uint32) { + x.Vub = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveNodeResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveNodeResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"vub\":" + out.RawString(prefix[1:]) + out.Uint32(x.Vub) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveNodeResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveNodeResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "vub": + { + var f uint32 + f = in.Uint32() + x.Vub = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveNodeResponse struct { + Body *RemoveNodeResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveNodeResponse)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveNodeResponse)(nil) + _ json.Marshaler = (*RemoveNodeResponse)(nil) + _ json.Unmarshaler = (*RemoveNodeResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -470,27 +1755,6 @@ func (x *RemoveNodeResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveNodeResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -506,13 +1770,166 @@ func (x *RemoveNodeResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveNodeResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveNodeResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveNodeResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveNodeResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveNodeResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveNodeResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveNodeResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveNodeResponse) GetBody() *RemoveNodeResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveNodeResponse) SetBody(v *RemoveNodeResponse_Body) { + x.Body = v +} +func (x *RemoveNodeResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveNodeResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveNodeResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveNodeResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveNodeResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveNodeResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveNodeResponse_Body + f = new(RemoveNodeResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveContainerRequest_Body struct { + ContainerId []byte `json:"containerId"` + Owner []byte `json:"owner"` + Vub uint32 `json:"vub"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveContainerRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveContainerRequest_Body)(nil) + _ json.Marshaler = (*RemoveContainerRequest_Body)(nil) + _ json.Unmarshaler = (*RemoveContainerRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -526,28 +1943,183 @@ func (x *RemoveContainerRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveContainerRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.BytesMarshal(2, buf[offset:], x.Owner) - offset += proto.UInt32Marshal(3, buf[offset:], x.Vub) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveContainerRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveContainerRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.Owner) != 0 { + mm.AppendBytes(2, x.Owner) + } + if x.Vub != 0 { + mm.AppendUint32(3, x.Vub) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveContainerRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveContainerRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // Owner + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Owner") + } + x.Owner = data + case 3: // Vub + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Vub") + } + x.Vub = data + } + } + return nil +} +func (x *RemoveContainerRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *RemoveContainerRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *RemoveContainerRequest_Body) GetOwner() []byte { + if x != nil { + return x.Owner + } + return nil +} +func (x *RemoveContainerRequest_Body) SetOwner(v []byte) { + x.Owner = v +} +func (x *RemoveContainerRequest_Body) GetVub() uint32 { + if x != nil { + return x.Vub + } + return 0 +} +func (x *RemoveContainerRequest_Body) SetVub(v uint32) { + x.Vub = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveContainerRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveContainerRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"owner\":" + out.RawString(prefix) + out.Base64Bytes(x.Owner) + } + { + const prefix string = ",\"vub\":" + out.RawString(prefix) + out.Uint32(x.Vub) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveContainerRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveContainerRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "owner": + { + var f []byte + f = in.Bytes() + x.Owner = f + } + case "vub": + { + var f uint32 + f = in.Uint32() + x.Vub = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveContainerRequest struct { + Body *RemoveContainerRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveContainerRequest)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveContainerRequest)(nil) + _ json.Marshaler = (*RemoveContainerRequest)(nil) + _ json.Unmarshaler = (*RemoveContainerRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -560,27 +2132,6 @@ func (x *RemoveContainerRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveContainerRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -596,13 +2147,164 @@ func (x *RemoveContainerRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveContainerRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveContainerRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveContainerRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveContainerRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveContainerRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveContainerRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveContainerRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveContainerRequest) GetBody() *RemoveContainerRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveContainerRequest) SetBody(v *RemoveContainerRequest_Body) { + x.Body = v +} +func (x *RemoveContainerRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveContainerRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveContainerRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveContainerRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveContainerRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveContainerRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveContainerRequest_Body + f = new(RemoveContainerRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveContainerResponse_Body struct { + Vub uint32 `json:"vub"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveContainerResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveContainerResponse_Body)(nil) + _ json.Marshaler = (*RemoveContainerResponse_Body)(nil) + _ json.Unmarshaler = (*RemoveContainerResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -614,26 +2316,125 @@ func (x *RemoveContainerResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveContainerResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt32Marshal(1, buf[offset:], x.Vub) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveContainerResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveContainerResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Vub != 0 { + mm.AppendUint32(1, x.Vub) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveContainerResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveContainerResponse_Body") + } + switch fc.FieldNum { + case 1: // Vub + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Vub") + } + x.Vub = data + } + } + return nil +} +func (x *RemoveContainerResponse_Body) GetVub() uint32 { + if x != nil { + return x.Vub + } + return 0 +} +func (x *RemoveContainerResponse_Body) SetVub(v uint32) { + x.Vub = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveContainerResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveContainerResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"vub\":" + out.RawString(prefix[1:]) + out.Uint32(x.Vub) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveContainerResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveContainerResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "vub": + { + var f uint32 + f = in.Uint32() + x.Vub = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveContainerResponse struct { + Body *RemoveContainerResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveContainerResponse)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveContainerResponse)(nil) + _ json.Marshaler = (*RemoveContainerResponse)(nil) + _ json.Unmarshaler = (*RemoveContainerResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -646,27 +2447,6 @@ func (x *RemoveContainerResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveContainerResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -682,9 +2462,149 @@ func (x *RemoveContainerResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveContainerResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveContainerResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveContainerResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *RemoveContainerResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveContainerResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveContainerResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveContainerResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveContainerResponse) GetBody() *RemoveContainerResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveContainerResponse) SetBody(v *RemoveContainerResponse_Body) { + x.Body = v +} +func (x *RemoveContainerResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveContainerResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveContainerResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveContainerResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveContainerResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveContainerResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveContainerResponse_Body + f = new(RemoveContainerResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } } diff --git a/pkg/services/control/ir/service_test.go b/pkg/services/control/ir/service_test.go deleted file mode 100644 index 54eef5148..000000000 --- a/pkg/services/control/ir/service_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package control_test - -import ( - "testing" - - control "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control/ir" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" -) - -type protoMessage interface { - StableMarshal([]byte) []byte - proto.Message -} - -func testStableMarshal(t *testing.T, m1, m2 protoMessage, cmp func(m1, m2 protoMessage) bool) { - require.NoError(t, proto.Unmarshal(m1.StableMarshal(nil), m2)) - - require.True(t, cmp(m1, m2)) -} - -func TestHealthCheckResponse_Body_StableMarshal(t *testing.T) { - testStableMarshal(t, - generateHealthCheckResponseBody(), - new(control.HealthCheckResponse_Body), - func(m1, m2 protoMessage) bool { - return equalHealthCheckResponseBodies( - m1.(*control.HealthCheckResponse_Body), - m2.(*control.HealthCheckResponse_Body), - ) - }, - ) -} - -func generateHealthCheckResponseBody() *control.HealthCheckResponse_Body { - body := new(control.HealthCheckResponse_Body) - body.SetHealthStatus(control.HealthStatus_SHUTTING_DOWN) - - return body -} - -func equalHealthCheckResponseBodies(b1, b2 *control.HealthCheckResponse_Body) bool { - return b1.GetHealthStatus() == b2.GetHealthStatus() -} diff --git a/pkg/services/control/ir/types.go b/pkg/services/control/ir/types.go deleted file mode 100644 index 97ffd3ce3..000000000 --- a/pkg/services/control/ir/types.go +++ /dev/null @@ -1,15 +0,0 @@ -package control - -// SetKey sets public key used for signing. -func (x *Signature) SetKey(v []byte) { - if x != nil { - x.Key = v - } -} - -// SetSign sets binary signature. -func (x *Signature) SetSign(v []byte) { - if x != nil { - x.Sign = v - } -} diff --git a/pkg/services/control/ir/types.pb.go b/pkg/services/control/ir/types.pb.go deleted file mode 100644 index 840e0be67..000000000 --- a/pkg/services/control/ir/types.pb.go +++ /dev/null @@ -1,230 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.0 -// source: pkg/services/control/ir/types.proto - -package control - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Health status of the IR application. -type HealthStatus int32 - -const ( - // Undefined status, default value. - HealthStatus_HEALTH_STATUS_UNDEFINED HealthStatus = 0 - // IR application is starting. - HealthStatus_STARTING HealthStatus = 1 - // IR application is started and serves all services. - HealthStatus_READY HealthStatus = 2 - // IR application is shutting down. - HealthStatus_SHUTTING_DOWN HealthStatus = 3 - // IR application is reconfiguring. - HealthStatus_RECONFIGURING HealthStatus = 4 -) - -// Enum value maps for HealthStatus. -var ( - HealthStatus_name = map[int32]string{ - 0: "HEALTH_STATUS_UNDEFINED", - 1: "STARTING", - 2: "READY", - 3: "SHUTTING_DOWN", - 4: "RECONFIGURING", - } - HealthStatus_value = map[string]int32{ - "HEALTH_STATUS_UNDEFINED": 0, - "STARTING": 1, - "READY": 2, - "SHUTTING_DOWN": 3, - "RECONFIGURING": 4, - } -) - -func (x HealthStatus) Enum() *HealthStatus { - p := new(HealthStatus) - *p = x - return p -} - -func (x HealthStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_ir_types_proto_enumTypes[0].Descriptor() -} - -func (HealthStatus) Type() protoreflect.EnumType { - return &file_pkg_services_control_ir_types_proto_enumTypes[0] -} - -func (x HealthStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HealthStatus.Descriptor instead. -func (HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_ir_types_proto_rawDescGZIP(), []int{0} -} - -// Signature of some message. -type Signature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Public key used for signing. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Binary signature. - Sign []byte `protobuf:"bytes,2,opt,name=sign,json=signature,proto3" json:"sign,omitempty"` -} - -func (x *Signature) Reset() { - *x = Signature{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_ir_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Signature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Signature) ProtoMessage() {} - -func (x *Signature) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_ir_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Signature.ProtoReflect.Descriptor instead. -func (*Signature) Descriptor() ([]byte, []int) { - return file_pkg_services_control_ir_types_proto_rawDescGZIP(), []int{0} -} - -func (x *Signature) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *Signature) GetSign() []byte { - if x != nil { - return x.Sign - } - return nil -} - -var File_pkg_services_control_ir_types_proto protoreflect.FileDescriptor - -var file_pkg_services_control_ir_types_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x69, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x22, 0x36, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2a, 0x6a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x45, 0x41, 0x4c, - 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, - 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x11, - 0x0a, 0x0d, 0x53, 0x48, 0x55, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, - 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x04, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, - 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, - 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_pkg_services_control_ir_types_proto_rawDescOnce sync.Once - file_pkg_services_control_ir_types_proto_rawDescData = file_pkg_services_control_ir_types_proto_rawDesc -) - -func file_pkg_services_control_ir_types_proto_rawDescGZIP() []byte { - file_pkg_services_control_ir_types_proto_rawDescOnce.Do(func() { - file_pkg_services_control_ir_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_services_control_ir_types_proto_rawDescData) - }) - return file_pkg_services_control_ir_types_proto_rawDescData -} - -var file_pkg_services_control_ir_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pkg_services_control_ir_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_pkg_services_control_ir_types_proto_goTypes = []interface{}{ - (HealthStatus)(0), // 0: ircontrol.HealthStatus - (*Signature)(nil), // 1: ircontrol.Signature -} -var file_pkg_services_control_ir_types_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pkg_services_control_ir_types_proto_init() } -func file_pkg_services_control_ir_types_proto_init() { - if File_pkg_services_control_ir_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pkg_services_control_ir_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Signature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_services_control_ir_types_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pkg_services_control_ir_types_proto_goTypes, - DependencyIndexes: file_pkg_services_control_ir_types_proto_depIdxs, - EnumInfos: file_pkg_services_control_ir_types_proto_enumTypes, - MessageInfos: file_pkg_services_control_ir_types_proto_msgTypes, - }.Build() - File_pkg_services_control_ir_types_proto = out.File - file_pkg_services_control_ir_types_proto_rawDesc = nil - file_pkg_services_control_ir_types_proto_goTypes = nil - file_pkg_services_control_ir_types_proto_depIdxs = nil -} diff --git a/pkg/services/control/ir/types_frostfs.pb.go b/pkg/services/control/ir/types_frostfs.pb.go index ef2fc458e..b230726a9 100644 --- a/pkg/services/control/ir/types_frostfs.pb.go +++ b/pkg/services/control/ir/types_frostfs.pb.go @@ -2,7 +2,70 @@ package control -import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" +import ( + json "encoding/json" + fmt "fmt" + pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" + proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" + encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" + easyproto "github.com/VictoriaMetrics/easyproto" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" + strconv "strconv" +) + +type HealthStatus int32 + +const ( + HealthStatus_HEALTH_STATUS_UNDEFINED HealthStatus = 0 + HealthStatus_STARTING HealthStatus = 1 + HealthStatus_READY HealthStatus = 2 + HealthStatus_SHUTTING_DOWN HealthStatus = 3 + HealthStatus_RECONFIGURING HealthStatus = 4 +) + +var ( + HealthStatus_name = map[int32]string{ + 0: "HEALTH_STATUS_UNDEFINED", + 1: "STARTING", + 2: "READY", + 3: "SHUTTING_DOWN", + 4: "RECONFIGURING", + } + HealthStatus_value = map[string]int32{ + "HEALTH_STATUS_UNDEFINED": 0, + "STARTING": 1, + "READY": 2, + "SHUTTING_DOWN": 3, + "RECONFIGURING": 4, + } +) + +func (x HealthStatus) String() string { + if v, ok := HealthStatus_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *HealthStatus) FromString(s string) bool { + if v, ok := HealthStatus_value[s]; ok { + *x = HealthStatus(v) + return true + } + return false +} + +type Signature struct { + Key []byte `json:"key"` + Sign []byte `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*Signature)(nil) + _ encoding.ProtoUnmarshaler = (*Signature)(nil) + _ json.Marshaler = (*Signature)(nil) + _ json.Unmarshaler = (*Signature)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -16,23 +79,138 @@ func (x *Signature) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *Signature) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Key) - offset += proto.BytesMarshal(2, buf[offset:], x.Sign) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *Signature) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *Signature) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Key) != 0 { + mm.AppendBytes(1, x.Key) + } + if len(x.Sign) != 0 { + mm.AppendBytes(2, x.Sign) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *Signature) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "Signature") + } + switch fc.FieldNum { + case 1: // Key + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Key") + } + x.Key = data + case 2: // Sign + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Sign") + } + x.Sign = data + } + } + return nil +} +func (x *Signature) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} +func (x *Signature) SetKey(v []byte) { + x.Key = v +} +func (x *Signature) GetSign() []byte { + if x != nil { + return x.Sign + } + return nil +} +func (x *Signature) SetSign(v []byte) { + x.Sign = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *Signature) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *Signature) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Key) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + out.Base64Bytes(x.Sign) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *Signature) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *Signature) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "key": + { + var f []byte + f = in.Bytes() + x.Key = f + } + case "signature": + { + var f []byte + f = in.Bytes() + x.Sign = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } } diff --git a/pkg/services/control/server/list_shards.go b/pkg/services/control/server/list_shards.go index d6531b947..b639245c1 100644 --- a/pkg/services/control/server/list_shards.go +++ b/pkg/services/control/server/list_shards.go @@ -30,10 +30,10 @@ func (s *Server) ListShards(_ context.Context, req *control.ListShardsRequest) ( for _, sh := range info.Shards { si := new(control.ShardInfo) - si.SetID(*sh.ID) + si.SetShard_ID(*sh.ID) si.SetMetabasePath(sh.MetaBaseInfo.Path) si.Blobstor = blobstorInfoToProto(sh.BlobStorInfo) - si.SetWriteCachePath(sh.WriteCacheInfo.Path) + si.SetWritecachePath(sh.WriteCacheInfo.Path) si.SetPiloramaPath(sh.PiloramaInfo.Path) var m control.ShardMode diff --git a/pkg/services/control/service.go b/pkg/services/control/service.go deleted file mode 100644 index ef0c0a8d2..000000000 --- a/pkg/services/control/service.go +++ /dev/null @@ -1,142 +0,0 @@ -package control - -// SetBody sets health check request body. -func (x *HealthCheckRequest) SetBody(v *HealthCheckRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetNetmapStatus sets status of the storage node in FrostFS network map. -func (x *HealthCheckResponse_Body) SetNetmapStatus(v NetmapStatus) { - if x != nil { - x.NetmapStatus = v - } -} - -// SetHealthStatus sets health status of the storage node application. -func (x *HealthCheckResponse_Body) SetHealthStatus(v HealthStatus) { - if x != nil { - x.HealthStatus = v - } -} - -// SetBody sets health check response body. -func (x *HealthCheckResponse) SetBody(v *HealthCheckResponse_Body) { - if x != nil { - x.Body = v - } -} - -// SetStatus sets new storage node status in FrostFS network map. -func (x *SetNetmapStatusRequest_Body) SetStatus(v NetmapStatus) { - if x != nil { - x.Status = v - } -} - -// SetForceMaintenance sets force_maintenance flag in the message. -func (x *SetNetmapStatusRequest_Body) SetForceMaintenance() { - x.ForceMaintenance = true -} - -// SetBody sets body of the set netmap status request . -func (x *SetNetmapStatusRequest) SetBody(v *SetNetmapStatusRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetBody sets set body of the netmap status response. -func (x *SetNetmapStatusResponse) SetBody(v *SetNetmapStatusResponse_Body) { - if x != nil { - x.Body = v - } -} - -// SetAddressList sets list of objects to be removed in FrostFS API binary format. -func (x *DropObjectsRequest_Body) SetAddressList(v [][]byte) { - if x != nil { - x.AddressList = v - } -} - -// SetBody sets body of the set "Drop objects" request. -func (x *DropObjectsRequest) SetBody(v *DropObjectsRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetBody sets set body of the "Drop objects" response. -func (x *DropObjectsResponse) SetBody(v *DropObjectsResponse_Body) { - if x != nil { - x.Body = v - } -} - -// SetBody sets list shards request body. -func (x *ListShardsRequest) SetBody(v *ListShardsRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetShards sets shards of the storage node. -func (x *ListShardsResponse_Body) SetShards(v []*ShardInfo) { - if x != nil { - x.Shards = v - } -} - -// SetBody sets list shards response body. -func (x *ListShardsResponse) SetBody(v *ListShardsResponse_Body) { - if x != nil { - x.Body = v - } -} - -// SetShardIDList sets shard ID whose mode is requested to be set. -func (x *SetShardModeRequest_Body) SetShardIDList(v [][]byte) { - if v != nil { - x.Shard_ID = v - } -} - -// SetMode sets mode of the shard. -func (x *SetShardModeRequest_Body) SetMode(v ShardMode) { - x.Mode = v -} - -// ClearErrorCounter sets flag signifying whether error counter for shard should be cleared. -func (x *SetShardModeRequest_Body) ClearErrorCounter(reset bool) { - x.ResetErrorCounter = reset -} - -// SetBody sets request body. -func (x *SetShardModeRequest) SetBody(v *SetShardModeRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetBody sets body of the set shard mode response. -func (x *SetShardModeResponse) SetBody(v *SetShardModeResponse_Body) { - if x != nil { - x.Body = v - } -} - -// SetBody sets list shards request body. -func (x *SynchronizeTreeRequest) SetBody(v *SynchronizeTreeRequest_Body) { - if x != nil { - x.Body = v - } -} - -// SetBody sets list shards response body. -func (x *SynchronizeTreeResponse) SetBody(v *SynchronizeTreeResponse_Body) { - if x != nil { - x.Body = v - } -} diff --git a/pkg/services/control/service.pb.go b/pkg/services/control/service.pb.go deleted file mode 100644 index e5a5ce24c..000000000 --- a/pkg/services/control/service.pb.go +++ /dev/null @@ -1,7094 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.0 -// source: pkg/services/control/service.proto - -package control - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type StartShardEvacuationRequest_Body_Scope int32 - -const ( - StartShardEvacuationRequest_Body_NONE StartShardEvacuationRequest_Body_Scope = 0 - StartShardEvacuationRequest_Body_OBJECTS StartShardEvacuationRequest_Body_Scope = 1 - StartShardEvacuationRequest_Body_TREES StartShardEvacuationRequest_Body_Scope = 2 -) - -// Enum value maps for StartShardEvacuationRequest_Body_Scope. -var ( - StartShardEvacuationRequest_Body_Scope_name = map[int32]string{ - 0: "NONE", - 1: "OBJECTS", - 2: "TREES", - } - StartShardEvacuationRequest_Body_Scope_value = map[string]int32{ - "NONE": 0, - "OBJECTS": 1, - "TREES": 2, - } -) - -func (x StartShardEvacuationRequest_Body_Scope) Enum() *StartShardEvacuationRequest_Body_Scope { - p := new(StartShardEvacuationRequest_Body_Scope) - *p = x - return p -} - -func (x StartShardEvacuationRequest_Body_Scope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StartShardEvacuationRequest_Body_Scope) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_service_proto_enumTypes[0].Descriptor() -} - -func (StartShardEvacuationRequest_Body_Scope) Type() protoreflect.EnumType { - return &file_pkg_services_control_service_proto_enumTypes[0] -} - -func (x StartShardEvacuationRequest_Body_Scope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StartShardEvacuationRequest_Body_Scope.Descriptor instead. -func (StartShardEvacuationRequest_Body_Scope) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{20, 0, 0} -} - -// Evacuate status enum. -type GetShardEvacuationStatusResponse_Body_Status int32 - -const ( - GetShardEvacuationStatusResponse_Body_EVACUATE_SHARD_STATUS_UNDEFINED GetShardEvacuationStatusResponse_Body_Status = 0 - GetShardEvacuationStatusResponse_Body_RUNNING GetShardEvacuationStatusResponse_Body_Status = 1 - GetShardEvacuationStatusResponse_Body_COMPLETED GetShardEvacuationStatusResponse_Body_Status = 2 -) - -// Enum value maps for GetShardEvacuationStatusResponse_Body_Status. -var ( - GetShardEvacuationStatusResponse_Body_Status_name = map[int32]string{ - 0: "EVACUATE_SHARD_STATUS_UNDEFINED", - 1: "RUNNING", - 2: "COMPLETED", - } - GetShardEvacuationStatusResponse_Body_Status_value = map[string]int32{ - "EVACUATE_SHARD_STATUS_UNDEFINED": 0, - "RUNNING": 1, - "COMPLETED": 2, - } -) - -func (x GetShardEvacuationStatusResponse_Body_Status) Enum() *GetShardEvacuationStatusResponse_Body_Status { - p := new(GetShardEvacuationStatusResponse_Body_Status) - *p = x - return p -} - -func (x GetShardEvacuationStatusResponse_Body_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetShardEvacuationStatusResponse_Body_Status) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_service_proto_enumTypes[1].Descriptor() -} - -func (GetShardEvacuationStatusResponse_Body_Status) Type() protoreflect.EnumType { - return &file_pkg_services_control_service_proto_enumTypes[1] -} - -func (x GetShardEvacuationStatusResponse_Body_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetShardEvacuationStatusResponse_Body_Status.Descriptor instead. -func (GetShardEvacuationStatusResponse_Body_Status) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{23, 0, 0} -} - -// Health check request. -type HealthCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of health check request message. - Body *HealthCheckRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *HealthCheckRequest) Reset() { - *x = HealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequest) ProtoMessage() {} - -func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead. -func (*HealthCheckRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{0} -} - -func (x *HealthCheckRequest) GetBody() *HealthCheckRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *HealthCheckRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Health check request. -type HealthCheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of health check response message. - Body *HealthCheckResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *HealthCheckResponse) Reset() { - *x = HealthCheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckResponse) ProtoMessage() {} - -func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead. -func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{1} -} - -func (x *HealthCheckResponse) GetBody() *HealthCheckResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *HealthCheckResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Set netmap status request. -type SetNetmapStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of set netmap status request message. - Body *SetNetmapStatusRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SetNetmapStatusRequest) Reset() { - *x = SetNetmapStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetNetmapStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNetmapStatusRequest) ProtoMessage() {} - -func (x *SetNetmapStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNetmapStatusRequest.ProtoReflect.Descriptor instead. -func (*SetNetmapStatusRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{2} -} - -func (x *SetNetmapStatusRequest) GetBody() *SetNetmapStatusRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SetNetmapStatusRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Set netmap status response. -type SetNetmapStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of set netmap status response message. - Body *SetNetmapStatusResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SetNetmapStatusResponse) Reset() { - *x = SetNetmapStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetNetmapStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNetmapStatusResponse) ProtoMessage() {} - -func (x *SetNetmapStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNetmapStatusResponse.ProtoReflect.Descriptor instead. -func (*SetNetmapStatusResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{3} -} - -func (x *SetNetmapStatusResponse) GetBody() *SetNetmapStatusResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SetNetmapStatusResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Get netmap status request. -type GetNetmapStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of set netmap status request message. - Body *GetNetmapStatusRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetNetmapStatusRequest) Reset() { - *x = GetNetmapStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNetmapStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNetmapStatusRequest) ProtoMessage() {} - -func (x *GetNetmapStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNetmapStatusRequest.ProtoReflect.Descriptor instead. -func (*GetNetmapStatusRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{4} -} - -func (x *GetNetmapStatusRequest) GetBody() *GetNetmapStatusRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetNetmapStatusRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Get netmap status response. -type GetNetmapStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of get netmap status response message. - Body *GetNetmapStatusResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetNetmapStatusResponse) Reset() { - *x = GetNetmapStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNetmapStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNetmapStatusResponse) ProtoMessage() {} - -func (x *GetNetmapStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNetmapStatusResponse.ProtoReflect.Descriptor instead. -func (*GetNetmapStatusResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{5} -} - -func (x *GetNetmapStatusResponse) GetBody() *GetNetmapStatusResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetNetmapStatusResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Request to drop the objects. -type DropObjectsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of the request message. - Body *DropObjectsRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *DropObjectsRequest) Reset() { - *x = DropObjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DropObjectsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DropObjectsRequest) ProtoMessage() {} - -func (x *DropObjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DropObjectsRequest.ProtoReflect.Descriptor instead. -func (*DropObjectsRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{6} -} - -func (x *DropObjectsRequest) GetBody() *DropObjectsRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *DropObjectsRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Response to request to drop the objects. -type DropObjectsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of the response message. - Body *DropObjectsResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *DropObjectsResponse) Reset() { - *x = DropObjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DropObjectsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DropObjectsResponse) ProtoMessage() {} - -func (x *DropObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DropObjectsResponse.ProtoReflect.Descriptor instead. -func (*DropObjectsResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{7} -} - -func (x *DropObjectsResponse) GetBody() *DropObjectsResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *DropObjectsResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Request to list all shards of the node. -type ListShardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of the request message. - Body *ListShardsRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ListShardsRequest) Reset() { - *x = ListShardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListShardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListShardsRequest) ProtoMessage() {} - -func (x *ListShardsRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListShardsRequest.ProtoReflect.Descriptor instead. -func (*ListShardsRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{8} -} - -func (x *ListShardsRequest) GetBody() *ListShardsRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ListShardsRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ListShards response. -type ListShardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of the response message. - Body *ListShardsResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ListShardsResponse) Reset() { - *x = ListShardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListShardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListShardsResponse) ProtoMessage() {} - -func (x *ListShardsResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListShardsResponse.ProtoReflect.Descriptor instead. -func (*ListShardsResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{9} -} - -func (x *ListShardsResponse) GetBody() *ListShardsResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ListShardsResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Request to set mode of the shard. -type SetShardModeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of set shard mode request message. - Body *SetShardModeRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SetShardModeRequest) Reset() { - *x = SetShardModeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetShardModeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetShardModeRequest) ProtoMessage() {} - -func (x *SetShardModeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetShardModeRequest.ProtoReflect.Descriptor instead. -func (*SetShardModeRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{10} -} - -func (x *SetShardModeRequest) GetBody() *SetShardModeRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SetShardModeRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// SetShardMode response. -type SetShardModeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of set shard mode response message. - Body *SetShardModeResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SetShardModeResponse) Reset() { - *x = SetShardModeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetShardModeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetShardModeResponse) ProtoMessage() {} - -func (x *SetShardModeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetShardModeResponse.ProtoReflect.Descriptor instead. -func (*SetShardModeResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{11} -} - -func (x *SetShardModeResponse) GetBody() *SetShardModeResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SetShardModeResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// SynchronizeTree request. -type SynchronizeTreeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of restore shard request message. - Body *SynchronizeTreeRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SynchronizeTreeRequest) Reset() { - *x = SynchronizeTreeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SynchronizeTreeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SynchronizeTreeRequest) ProtoMessage() {} - -func (x *SynchronizeTreeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SynchronizeTreeRequest.ProtoReflect.Descriptor instead. -func (*SynchronizeTreeRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{12} -} - -func (x *SynchronizeTreeRequest) GetBody() *SynchronizeTreeRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SynchronizeTreeRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// SynchronizeTree response. -type SynchronizeTreeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Body of restore shard response message. - Body *SynchronizeTreeResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Body signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SynchronizeTreeResponse) Reset() { - *x = SynchronizeTreeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SynchronizeTreeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SynchronizeTreeResponse) ProtoMessage() {} - -func (x *SynchronizeTreeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SynchronizeTreeResponse.ProtoReflect.Descriptor instead. -func (*SynchronizeTreeResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{13} -} - -func (x *SynchronizeTreeResponse) GetBody() *SynchronizeTreeResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SynchronizeTreeResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// EvacuateShard request. -type EvacuateShardRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *EvacuateShardRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *EvacuateShardRequest) Reset() { - *x = EvacuateShardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvacuateShardRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvacuateShardRequest) ProtoMessage() {} - -func (x *EvacuateShardRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvacuateShardRequest.ProtoReflect.Descriptor instead. -func (*EvacuateShardRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{14} -} - -func (x *EvacuateShardRequest) GetBody() *EvacuateShardRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *EvacuateShardRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// EvacuateShard response. -type EvacuateShardResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *EvacuateShardResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *EvacuateShardResponse) Reset() { - *x = EvacuateShardResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvacuateShardResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvacuateShardResponse) ProtoMessage() {} - -func (x *EvacuateShardResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvacuateShardResponse.ProtoReflect.Descriptor instead. -func (*EvacuateShardResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{15} -} - -func (x *EvacuateShardResponse) GetBody() *EvacuateShardResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *EvacuateShardResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// FlushCache request. -type FlushCacheRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *FlushCacheRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *FlushCacheRequest) Reset() { - *x = FlushCacheRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlushCacheRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlushCacheRequest) ProtoMessage() {} - -func (x *FlushCacheRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlushCacheRequest.ProtoReflect.Descriptor instead. -func (*FlushCacheRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{16} -} - -func (x *FlushCacheRequest) GetBody() *FlushCacheRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *FlushCacheRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// FlushCache response. -type FlushCacheResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *FlushCacheResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *FlushCacheResponse) Reset() { - *x = FlushCacheResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlushCacheResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlushCacheResponse) ProtoMessage() {} - -func (x *FlushCacheResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlushCacheResponse.ProtoReflect.Descriptor instead. -func (*FlushCacheResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{17} -} - -func (x *FlushCacheResponse) GetBody() *FlushCacheResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *FlushCacheResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Doctor request. -type DoctorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *DoctorRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *DoctorRequest) Reset() { - *x = DoctorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoctorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoctorRequest) ProtoMessage() {} - -func (x *DoctorRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoctorRequest.ProtoReflect.Descriptor instead. -func (*DoctorRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{18} -} - -func (x *DoctorRequest) GetBody() *DoctorRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *DoctorRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Doctor response. -type DoctorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *DoctorResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *DoctorResponse) Reset() { - *x = DoctorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoctorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoctorResponse) ProtoMessage() {} - -func (x *DoctorResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoctorResponse.ProtoReflect.Descriptor instead. -func (*DoctorResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{19} -} - -func (x *DoctorResponse) GetBody() *DoctorResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *DoctorResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// StartShardEvacuation request. -type StartShardEvacuationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *StartShardEvacuationRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *StartShardEvacuationRequest) Reset() { - *x = StartShardEvacuationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartShardEvacuationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartShardEvacuationRequest) ProtoMessage() {} - -func (x *StartShardEvacuationRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartShardEvacuationRequest.ProtoReflect.Descriptor instead. -func (*StartShardEvacuationRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{20} -} - -func (x *StartShardEvacuationRequest) GetBody() *StartShardEvacuationRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *StartShardEvacuationRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// StartShardEvacuation response. -type StartShardEvacuationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *StartShardEvacuationResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *StartShardEvacuationResponse) Reset() { - *x = StartShardEvacuationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartShardEvacuationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartShardEvacuationResponse) ProtoMessage() {} - -func (x *StartShardEvacuationResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartShardEvacuationResponse.ProtoReflect.Descriptor instead. -func (*StartShardEvacuationResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{21} -} - -func (x *StartShardEvacuationResponse) GetBody() *StartShardEvacuationResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *StartShardEvacuationResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// GetShardEvacuationStatus request. -type GetShardEvacuationStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *GetShardEvacuationStatusRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetShardEvacuationStatusRequest) Reset() { - *x = GetShardEvacuationStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetShardEvacuationStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetShardEvacuationStatusRequest) ProtoMessage() {} - -func (x *GetShardEvacuationStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetShardEvacuationStatusRequest.ProtoReflect.Descriptor instead. -func (*GetShardEvacuationStatusRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{22} -} - -func (x *GetShardEvacuationStatusRequest) GetBody() *GetShardEvacuationStatusRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetShardEvacuationStatusRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// GetShardEvacuationStatus response. -type GetShardEvacuationStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *GetShardEvacuationStatusResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetShardEvacuationStatusResponse) Reset() { - *x = GetShardEvacuationStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetShardEvacuationStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetShardEvacuationStatusResponse) ProtoMessage() {} - -func (x *GetShardEvacuationStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetShardEvacuationStatusResponse.ProtoReflect.Descriptor instead. -func (*GetShardEvacuationStatusResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{23} -} - -func (x *GetShardEvacuationStatusResponse) GetBody() *GetShardEvacuationStatusResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetShardEvacuationStatusResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ResetShardEvacuationStatus request. -type ResetShardEvacuationStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *ResetShardEvacuationStatusRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ResetShardEvacuationStatusRequest) Reset() { - *x = ResetShardEvacuationStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResetShardEvacuationStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResetShardEvacuationStatusRequest) ProtoMessage() {} - -func (x *ResetShardEvacuationStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResetShardEvacuationStatusRequest.ProtoReflect.Descriptor instead. -func (*ResetShardEvacuationStatusRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{24} -} - -func (x *ResetShardEvacuationStatusRequest) GetBody() *ResetShardEvacuationStatusRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ResetShardEvacuationStatusRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ResetShardEvacuationStatus response. -type ResetShardEvacuationStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *ResetShardEvacuationStatusResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ResetShardEvacuationStatusResponse) Reset() { - *x = ResetShardEvacuationStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResetShardEvacuationStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResetShardEvacuationStatusResponse) ProtoMessage() {} - -func (x *ResetShardEvacuationStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResetShardEvacuationStatusResponse.ProtoReflect.Descriptor instead. -func (*ResetShardEvacuationStatusResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{25} -} - -func (x *ResetShardEvacuationStatusResponse) GetBody() *ResetShardEvacuationStatusResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ResetShardEvacuationStatusResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// StopShardEvacuation request. -type StopShardEvacuationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *StopShardEvacuationRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *StopShardEvacuationRequest) Reset() { - *x = StopShardEvacuationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StopShardEvacuationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StopShardEvacuationRequest) ProtoMessage() {} - -func (x *StopShardEvacuationRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StopShardEvacuationRequest.ProtoReflect.Descriptor instead. -func (*StopShardEvacuationRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{26} -} - -func (x *StopShardEvacuationRequest) GetBody() *StopShardEvacuationRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *StopShardEvacuationRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// StopShardEvacuation response. -type StopShardEvacuationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *StopShardEvacuationResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *StopShardEvacuationResponse) Reset() { - *x = StopShardEvacuationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StopShardEvacuationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StopShardEvacuationResponse) ProtoMessage() {} - -func (x *StopShardEvacuationResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StopShardEvacuationResponse.ProtoReflect.Descriptor instead. -func (*StopShardEvacuationResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{27} -} - -func (x *StopShardEvacuationResponse) GetBody() *StopShardEvacuationResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *StopShardEvacuationResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// AddChainLocalOverride request. -type AddChainLocalOverrideRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *AddChainLocalOverrideRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *AddChainLocalOverrideRequest) Reset() { - *x = AddChainLocalOverrideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddChainLocalOverrideRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddChainLocalOverrideRequest) ProtoMessage() {} - -func (x *AddChainLocalOverrideRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddChainLocalOverrideRequest.ProtoReflect.Descriptor instead. -func (*AddChainLocalOverrideRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{28} -} - -func (x *AddChainLocalOverrideRequest) GetBody() *AddChainLocalOverrideRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *AddChainLocalOverrideRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// AddChainLocalOverride response. -type AddChainLocalOverrideResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *AddChainLocalOverrideResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *AddChainLocalOverrideResponse) Reset() { - *x = AddChainLocalOverrideResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddChainLocalOverrideResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddChainLocalOverrideResponse) ProtoMessage() {} - -func (x *AddChainLocalOverrideResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddChainLocalOverrideResponse.ProtoReflect.Descriptor instead. -func (*AddChainLocalOverrideResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{29} -} - -func (x *AddChainLocalOverrideResponse) GetBody() *AddChainLocalOverrideResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *AddChainLocalOverrideResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// GetChainLocalOverride request. -type GetChainLocalOverrideRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *GetChainLocalOverrideRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetChainLocalOverrideRequest) Reset() { - *x = GetChainLocalOverrideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChainLocalOverrideRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChainLocalOverrideRequest) ProtoMessage() {} - -func (x *GetChainLocalOverrideRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChainLocalOverrideRequest.ProtoReflect.Descriptor instead. -func (*GetChainLocalOverrideRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{30} -} - -func (x *GetChainLocalOverrideRequest) GetBody() *GetChainLocalOverrideRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetChainLocalOverrideRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// GetChainLocalOverride response. -type GetChainLocalOverrideResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *GetChainLocalOverrideResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetChainLocalOverrideResponse) Reset() { - *x = GetChainLocalOverrideResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChainLocalOverrideResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChainLocalOverrideResponse) ProtoMessage() {} - -func (x *GetChainLocalOverrideResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChainLocalOverrideResponse.ProtoReflect.Descriptor instead. -func (*GetChainLocalOverrideResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{31} -} - -func (x *GetChainLocalOverrideResponse) GetBody() *GetChainLocalOverrideResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetChainLocalOverrideResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ListChainLocalOverrides request. -type ListChainLocalOverridesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *ListChainLocalOverridesRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ListChainLocalOverridesRequest) Reset() { - *x = ListChainLocalOverridesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListChainLocalOverridesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListChainLocalOverridesRequest) ProtoMessage() {} - -func (x *ListChainLocalOverridesRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListChainLocalOverridesRequest.ProtoReflect.Descriptor instead. -func (*ListChainLocalOverridesRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{32} -} - -func (x *ListChainLocalOverridesRequest) GetBody() *ListChainLocalOverridesRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ListChainLocalOverridesRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ListChainLocalOverrides response. -type ListChainLocalOverridesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *ListChainLocalOverridesResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ListChainLocalOverridesResponse) Reset() { - *x = ListChainLocalOverridesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListChainLocalOverridesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListChainLocalOverridesResponse) ProtoMessage() {} - -func (x *ListChainLocalOverridesResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListChainLocalOverridesResponse.ProtoReflect.Descriptor instead. -func (*ListChainLocalOverridesResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{33} -} - -func (x *ListChainLocalOverridesResponse) GetBody() *ListChainLocalOverridesResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ListChainLocalOverridesResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ListTargetsLocalOverrides request. -type ListTargetsLocalOverridesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *ListTargetsLocalOverridesRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ListTargetsLocalOverridesRequest) Reset() { - *x = ListTargetsLocalOverridesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListTargetsLocalOverridesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTargetsLocalOverridesRequest) ProtoMessage() {} - -func (x *ListTargetsLocalOverridesRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTargetsLocalOverridesRequest.ProtoReflect.Descriptor instead. -func (*ListTargetsLocalOverridesRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{34} -} - -func (x *ListTargetsLocalOverridesRequest) GetBody() *ListTargetsLocalOverridesRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ListTargetsLocalOverridesRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// ListTargetsLocalOverrides response. -type ListTargetsLocalOverridesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *ListTargetsLocalOverridesResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ListTargetsLocalOverridesResponse) Reset() { - *x = ListTargetsLocalOverridesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListTargetsLocalOverridesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTargetsLocalOverridesResponse) ProtoMessage() {} - -func (x *ListTargetsLocalOverridesResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTargetsLocalOverridesResponse.ProtoReflect.Descriptor instead. -func (*ListTargetsLocalOverridesResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{35} -} - -func (x *ListTargetsLocalOverridesResponse) GetBody() *ListTargetsLocalOverridesResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ListTargetsLocalOverridesResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveChainLocalOverrideRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveChainLocalOverrideRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveChainLocalOverrideRequest) Reset() { - *x = RemoveChainLocalOverrideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverrideRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverrideRequest) ProtoMessage() {} - -func (x *RemoveChainLocalOverrideRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverrideRequest.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverrideRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{36} -} - -func (x *RemoveChainLocalOverrideRequest) GetBody() *RemoveChainLocalOverrideRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveChainLocalOverrideRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveChainLocalOverrideResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveChainLocalOverrideResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveChainLocalOverrideResponse) Reset() { - *x = RemoveChainLocalOverrideResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverrideResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverrideResponse) ProtoMessage() {} - -func (x *RemoveChainLocalOverrideResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverrideResponse.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverrideResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{37} -} - -func (x *RemoveChainLocalOverrideResponse) GetBody() *RemoveChainLocalOverrideResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveChainLocalOverrideResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveChainLocalOverridesByTargetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveChainLocalOverridesByTargetRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveChainLocalOverridesByTargetRequest) Reset() { - *x = RemoveChainLocalOverridesByTargetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverridesByTargetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverridesByTargetRequest) ProtoMessage() {} - -func (x *RemoveChainLocalOverridesByTargetRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverridesByTargetRequest.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverridesByTargetRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{38} -} - -func (x *RemoveChainLocalOverridesByTargetRequest) GetBody() *RemoveChainLocalOverridesByTargetRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveChainLocalOverridesByTargetRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveChainLocalOverridesByTargetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *RemoveChainLocalOverridesByTargetResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveChainLocalOverridesByTargetResponse) Reset() { - *x = RemoveChainLocalOverridesByTargetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverridesByTargetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverridesByTargetResponse) ProtoMessage() {} - -func (x *RemoveChainLocalOverridesByTargetResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverridesByTargetResponse.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverridesByTargetResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{39} -} - -func (x *RemoveChainLocalOverridesByTargetResponse) GetBody() *RemoveChainLocalOverridesByTargetResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveChainLocalOverridesByTargetResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type SealWriteCacheRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *SealWriteCacheRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SealWriteCacheRequest) Reset() { - *x = SealWriteCacheRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SealWriteCacheRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SealWriteCacheRequest) ProtoMessage() {} - -func (x *SealWriteCacheRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SealWriteCacheRequest.ProtoReflect.Descriptor instead. -func (*SealWriteCacheRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{40} -} - -func (x *SealWriteCacheRequest) GetBody() *SealWriteCacheRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SealWriteCacheRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type SealWriteCacheResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *SealWriteCacheResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SealWriteCacheResponse) Reset() { - *x = SealWriteCacheResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SealWriteCacheResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SealWriteCacheResponse) ProtoMessage() {} - -func (x *SealWriteCacheResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SealWriteCacheResponse.ProtoReflect.Descriptor instead. -func (*SealWriteCacheResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{41} -} - -func (x *SealWriteCacheResponse) GetBody() *SealWriteCacheResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *SealWriteCacheResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type DetachShardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *DetachShardsRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *DetachShardsRequest) Reset() { - *x = DetachShardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DetachShardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DetachShardsRequest) ProtoMessage() {} - -func (x *DetachShardsRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DetachShardsRequest.ProtoReflect.Descriptor instead. -func (*DetachShardsRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{42} -} - -func (x *DetachShardsRequest) GetBody() *DetachShardsRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *DetachShardsRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type DetachShardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *DetachShardsResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *DetachShardsResponse) Reset() { - *x = DetachShardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DetachShardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DetachShardsResponse) ProtoMessage() {} - -func (x *DetachShardsResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DetachShardsResponse.ProtoReflect.Descriptor instead. -func (*DetachShardsResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{43} -} - -func (x *DetachShardsResponse) GetBody() *DetachShardsResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *DetachShardsResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -// Health check request body. -type HealthCheckRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HealthCheckRequest_Body) Reset() { - *x = HealthCheckRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequest_Body) ProtoMessage() {} - -func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequest_Body.ProtoReflect.Descriptor instead. -func (*HealthCheckRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{0, 0} -} - -// Health check response body -type HealthCheckResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status of the storage node in FrostFS network map. - NetmapStatus NetmapStatus `protobuf:"varint,1,opt,name=netmap_status,json=netmapStatus,proto3,enum=control.NetmapStatus" json:"netmap_status,omitempty"` - // Health status of storage node application. - HealthStatus HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=control.HealthStatus" json:"health_status,omitempty"` -} - -func (x *HealthCheckResponse_Body) Reset() { - *x = HealthCheckResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckResponse_Body) ProtoMessage() {} - -func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckResponse_Body.ProtoReflect.Descriptor instead. -func (*HealthCheckResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *HealthCheckResponse_Body) GetNetmapStatus() NetmapStatus { - if x != nil { - return x.NetmapStatus - } - return NetmapStatus_STATUS_UNDEFINED -} - -func (x *HealthCheckResponse_Body) GetHealthStatus() HealthStatus { - if x != nil { - return x.HealthStatus - } - return HealthStatus_HEALTH_STATUS_UNDEFINED -} - -// Set netmap status request body. -type SetNetmapStatusRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // New storage node status in FrostFS network map. - // If status is MAINTENANCE, the node checks whether maintenance is - // allowed in the network settings. In case of prohibition, the request - // is denied. Otherwise, node switches to local maintenance state. To - // force local maintenance, use `force_maintenance` flag. - Status NetmapStatus `protobuf:"varint,1,opt,name=status,proto3,enum=control.NetmapStatus" json:"status,omitempty"` - // MAINTENANCE status validation skip flag. If set, node starts local - // maintenance regardless of network settings. The flag MUST NOT be - // set for any other status. - ForceMaintenance bool `protobuf:"varint,2,opt,name=force_maintenance,json=forceMaintenance,proto3" json:"force_maintenance,omitempty"` -} - -func (x *SetNetmapStatusRequest_Body) Reset() { - *x = SetNetmapStatusRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetNetmapStatusRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNetmapStatusRequest_Body) ProtoMessage() {} - -func (x *SetNetmapStatusRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNetmapStatusRequest_Body.ProtoReflect.Descriptor instead. -func (*SetNetmapStatusRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *SetNetmapStatusRequest_Body) GetStatus() NetmapStatus { - if x != nil { - return x.Status - } - return NetmapStatus_STATUS_UNDEFINED -} - -func (x *SetNetmapStatusRequest_Body) GetForceMaintenance() bool { - if x != nil { - return x.ForceMaintenance - } - return false -} - -// Set netmap status response body -type SetNetmapStatusResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetNetmapStatusResponse_Body) Reset() { - *x = SetNetmapStatusResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetNetmapStatusResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetNetmapStatusResponse_Body) ProtoMessage() {} - -func (x *SetNetmapStatusResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetNetmapStatusResponse_Body.ProtoReflect.Descriptor instead. -func (*SetNetmapStatusResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{3, 0} -} - -type GetNetmapStatusRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetNetmapStatusRequest_Body) Reset() { - *x = GetNetmapStatusRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNetmapStatusRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNetmapStatusRequest_Body) ProtoMessage() {} - -func (x *GetNetmapStatusRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNetmapStatusRequest_Body.ProtoReflect.Descriptor instead. -func (*GetNetmapStatusRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{4, 0} -} - -type GetNetmapStatusResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Storage node status in FrostFS network map. - Status NetmapStatus `protobuf:"varint,1,opt,name=status,proto3,enum=control.NetmapStatus" json:"status,omitempty"` - // Network map epoch. - Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` -} - -func (x *GetNetmapStatusResponse_Body) Reset() { - *x = GetNetmapStatusResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNetmapStatusResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNetmapStatusResponse_Body) ProtoMessage() {} - -func (x *GetNetmapStatusResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNetmapStatusResponse_Body.ProtoReflect.Descriptor instead. -func (*GetNetmapStatusResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *GetNetmapStatusResponse_Body) GetStatus() NetmapStatus { - if x != nil { - return x.Status - } - return NetmapStatus_STATUS_UNDEFINED -} - -func (x *GetNetmapStatusResponse_Body) GetEpoch() uint64 { - if x != nil { - return x.Epoch - } - return 0 -} - -// Request body structure. -type DropObjectsRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of object addresses to be removed. - // in FrostFS API binary format. - AddressList [][]byte `protobuf:"bytes,1,rep,name=address_list,json=addressList,proto3" json:"address_list,omitempty"` -} - -func (x *DropObjectsRequest_Body) Reset() { - *x = DropObjectsRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DropObjectsRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DropObjectsRequest_Body) ProtoMessage() {} - -func (x *DropObjectsRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DropObjectsRequest_Body.ProtoReflect.Descriptor instead. -func (*DropObjectsRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *DropObjectsRequest_Body) GetAddressList() [][]byte { - if x != nil { - return x.AddressList - } - return nil -} - -// Response body structure. -type DropObjectsResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DropObjectsResponse_Body) Reset() { - *x = DropObjectsResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DropObjectsResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DropObjectsResponse_Body) ProtoMessage() {} - -func (x *DropObjectsResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DropObjectsResponse_Body.ProtoReflect.Descriptor instead. -func (*DropObjectsResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{7, 0} -} - -// Request body structure. -type ListShardsRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListShardsRequest_Body) Reset() { - *x = ListShardsRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListShardsRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListShardsRequest_Body) ProtoMessage() {} - -func (x *ListShardsRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListShardsRequest_Body.ProtoReflect.Descriptor instead. -func (*ListShardsRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{8, 0} -} - -// Response body structure. -type ListShardsResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of the node's shards. - Shards []*ShardInfo `protobuf:"bytes,1,rep,name=shards,proto3" json:"shards,omitempty"` -} - -func (x *ListShardsResponse_Body) Reset() { - *x = ListShardsResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListShardsResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListShardsResponse_Body) ProtoMessage() {} - -func (x *ListShardsResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListShardsResponse_Body.ProtoReflect.Descriptor instead. -func (*ListShardsResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{9, 0} -} - -func (x *ListShardsResponse_Body) GetShards() []*ShardInfo { - if x != nil { - return x.Shards - } - return nil -} - -// Request body structure. -type SetShardModeRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the shard. - Shard_ID [][]byte `protobuf:"bytes,1,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // Mode that requested to be set. - Mode ShardMode `protobuf:"varint,2,opt,name=mode,proto3,enum=control.ShardMode" json:"mode,omitempty"` - // Flag signifying whether error counter should be set to 0. - ResetErrorCounter bool `protobuf:"varint,3,opt,name=resetErrorCounter,proto3" json:"resetErrorCounter,omitempty"` -} - -func (x *SetShardModeRequest_Body) Reset() { - *x = SetShardModeRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetShardModeRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetShardModeRequest_Body) ProtoMessage() {} - -func (x *SetShardModeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetShardModeRequest_Body.ProtoReflect.Descriptor instead. -func (*SetShardModeRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{10, 0} -} - -func (x *SetShardModeRequest_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *SetShardModeRequest_Body) GetMode() ShardMode { - if x != nil { - return x.Mode - } - return ShardMode_SHARD_MODE_UNDEFINED -} - -func (x *SetShardModeRequest_Body) GetResetErrorCounter() bool { - if x != nil { - return x.ResetErrorCounter - } - return false -} - -// Response body structure. -type SetShardModeResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetShardModeResponse_Body) Reset() { - *x = SetShardModeResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetShardModeResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetShardModeResponse_Body) ProtoMessage() {} - -func (x *SetShardModeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetShardModeResponse_Body.ProtoReflect.Descriptor instead. -func (*SetShardModeResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{11, 0} -} - -// Request body structure. -type SynchronizeTreeRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // Starting height for the synchronization. Can be omitted. - Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *SynchronizeTreeRequest_Body) Reset() { - *x = SynchronizeTreeRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SynchronizeTreeRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SynchronizeTreeRequest_Body) ProtoMessage() {} - -func (x *SynchronizeTreeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SynchronizeTreeRequest_Body.ProtoReflect.Descriptor instead. -func (*SynchronizeTreeRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{12, 0} -} - -func (x *SynchronizeTreeRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *SynchronizeTreeRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *SynchronizeTreeRequest_Body) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -// Response body structure. -type SynchronizeTreeResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SynchronizeTreeResponse_Body) Reset() { - *x = SynchronizeTreeResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SynchronizeTreeResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SynchronizeTreeResponse_Body) ProtoMessage() {} - -func (x *SynchronizeTreeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SynchronizeTreeResponse_Body.ProtoReflect.Descriptor instead. -func (*SynchronizeTreeResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{13, 0} -} - -// Request body structure. -type EvacuateShardRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the shard. - Shard_ID [][]byte `protobuf:"bytes,1,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // Flag indicating whether object read errors should be ignored. - IgnoreErrors bool `protobuf:"varint,2,opt,name=ignore_errors,json=ignoreErrors,proto3" json:"ignore_errors,omitempty"` -} - -func (x *EvacuateShardRequest_Body) Reset() { - *x = EvacuateShardRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvacuateShardRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvacuateShardRequest_Body) ProtoMessage() {} - -func (x *EvacuateShardRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvacuateShardRequest_Body.ProtoReflect.Descriptor instead. -func (*EvacuateShardRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{14, 0} -} - -func (x *EvacuateShardRequest_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *EvacuateShardRequest_Body) GetIgnoreErrors() bool { - if x != nil { - return x.IgnoreErrors - } - return false -} - -// Response body structure. -type EvacuateShardResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` -} - -func (x *EvacuateShardResponse_Body) Reset() { - *x = EvacuateShardResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvacuateShardResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvacuateShardResponse_Body) ProtoMessage() {} - -func (x *EvacuateShardResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvacuateShardResponse_Body.ProtoReflect.Descriptor instead. -func (*EvacuateShardResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{15, 0} -} - -func (x *EvacuateShardResponse_Body) GetCount() uint32 { - if x != nil { - return x.Count - } - return 0 -} - -// Request body structure. -type FlushCacheRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the shard. - Shard_ID [][]byte `protobuf:"bytes,1,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // If true, then writecache will be left in read-only mode after flush - // completed. - Seal bool `protobuf:"varint,2,opt,name=seal,proto3" json:"seal,omitempty"` -} - -func (x *FlushCacheRequest_Body) Reset() { - *x = FlushCacheRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlushCacheRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlushCacheRequest_Body) ProtoMessage() {} - -func (x *FlushCacheRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlushCacheRequest_Body.ProtoReflect.Descriptor instead. -func (*FlushCacheRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{16, 0} -} - -func (x *FlushCacheRequest_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *FlushCacheRequest_Body) GetSeal() bool { - if x != nil { - return x.Seal - } - return false -} - -// Response body structure. -type FlushCacheResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *FlushCacheResponse_Body) Reset() { - *x = FlushCacheResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlushCacheResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlushCacheResponse_Body) ProtoMessage() {} - -func (x *FlushCacheResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlushCacheResponse_Body.ProtoReflect.Descriptor instead. -func (*FlushCacheResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{17, 0} -} - -// Request body structure. -type DoctorRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Number of threads to use for the operation. - Concurrency uint32 `protobuf:"varint,1,opt,name=concurrency,proto3" json:"concurrency,omitempty"` - // Flag to search engine for duplicate objects and leave only one copy. - RemoveDuplicates bool `protobuf:"varint,2,opt,name=remove_duplicates,json=removeDuplicates,proto3" json:"remove_duplicates,omitempty"` -} - -func (x *DoctorRequest_Body) Reset() { - *x = DoctorRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoctorRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoctorRequest_Body) ProtoMessage() {} - -func (x *DoctorRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoctorRequest_Body.ProtoReflect.Descriptor instead. -func (*DoctorRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{18, 0} -} - -func (x *DoctorRequest_Body) GetConcurrency() uint32 { - if x != nil { - return x.Concurrency - } - return 0 -} - -func (x *DoctorRequest_Body) GetRemoveDuplicates() bool { - if x != nil { - return x.RemoveDuplicates - } - return false -} - -// Response body structure. -type DoctorResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DoctorResponse_Body) Reset() { - *x = DoctorResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoctorResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoctorResponse_Body) ProtoMessage() {} - -func (x *DoctorResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoctorResponse_Body.ProtoReflect.Descriptor instead. -func (*DoctorResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{19, 0} -} - -// Request body structure. -type StartShardEvacuationRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // IDs of the shards. - Shard_ID [][]byte `protobuf:"bytes,1,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // Flag indicating whether object read errors should be ignored. - IgnoreErrors bool `protobuf:"varint,2,opt,name=ignore_errors,json=ignoreErrors,proto3" json:"ignore_errors,omitempty"` - // Evacuation scope. - Scope uint32 `protobuf:"varint,3,opt,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *StartShardEvacuationRequest_Body) Reset() { - *x = StartShardEvacuationRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartShardEvacuationRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartShardEvacuationRequest_Body) ProtoMessage() {} - -func (x *StartShardEvacuationRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartShardEvacuationRequest_Body.ProtoReflect.Descriptor instead. -func (*StartShardEvacuationRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{20, 0} -} - -func (x *StartShardEvacuationRequest_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *StartShardEvacuationRequest_Body) GetIgnoreErrors() bool { - if x != nil { - return x.IgnoreErrors - } - return false -} - -func (x *StartShardEvacuationRequest_Body) GetScope() uint32 { - if x != nil { - return x.Scope - } - return 0 -} - -// Response body structure. -type StartShardEvacuationResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StartShardEvacuationResponse_Body) Reset() { - *x = StartShardEvacuationResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartShardEvacuationResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartShardEvacuationResponse_Body) ProtoMessage() {} - -func (x *StartShardEvacuationResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartShardEvacuationResponse_Body.ProtoReflect.Descriptor instead. -func (*StartShardEvacuationResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{21, 0} -} - -// Request body structure. -type GetShardEvacuationStatusRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetShardEvacuationStatusRequest_Body) Reset() { - *x = GetShardEvacuationStatusRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetShardEvacuationStatusRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetShardEvacuationStatusRequest_Body) ProtoMessage() {} - -func (x *GetShardEvacuationStatusRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetShardEvacuationStatusRequest_Body.ProtoReflect.Descriptor instead. -func (*GetShardEvacuationStatusRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{22, 0} -} - -// Response body structure. -type GetShardEvacuationStatusResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Total objects to evacuate count. The value is approximate, so evacuated + - // failed + skipped == total is not guaranteed after completion. - TotalObjects uint64 `protobuf:"varint,1,opt,name=total_objects,json=totalObjects,proto3" json:"total_objects,omitempty"` - // Evacuated objects count. - EvacuatedObjects uint64 `protobuf:"varint,2,opt,name=evacuated_objects,json=evacuatedObjects,proto3" json:"evacuated_objects,omitempty"` - // Failed objects count. - FailedObjects uint64 `protobuf:"varint,3,opt,name=failed_objects,json=failedObjects,proto3" json:"failed_objects,omitempty"` - // Shard IDs. - Shard_ID [][]byte `protobuf:"bytes,4,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // Evacuation process status. - Status GetShardEvacuationStatusResponse_Body_Status `protobuf:"varint,5,opt,name=status,proto3,enum=control.GetShardEvacuationStatusResponse_Body_Status" json:"status,omitempty"` - // Evacuation process duration. - Duration *GetShardEvacuationStatusResponse_Body_Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` - // Evacuation process started at timestamp. - StartedAt *GetShardEvacuationStatusResponse_Body_UnixTimestamp `protobuf:"bytes,7,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - // Error message if evacuation failed. - ErrorMessage string `protobuf:"bytes,8,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` - // Skipped objects count. - SkippedObjects uint64 `protobuf:"varint,9,opt,name=skipped_objects,json=skippedObjects,proto3" json:"skipped_objects,omitempty"` - // Total trees to evacuate count. - TotalTrees uint64 `protobuf:"varint,10,opt,name=total_trees,json=totalTrees,proto3" json:"total_trees,omitempty"` - // Evacuated trees count. - EvacuatedTrees uint64 `protobuf:"varint,11,opt,name=evacuated_trees,json=evacuatedTrees,proto3" json:"evacuated_trees,omitempty"` - // Failed trees count. - FailedTrees uint64 `protobuf:"varint,12,opt,name=failed_trees,json=failedTrees,proto3" json:"failed_trees,omitempty"` -} - -func (x *GetShardEvacuationStatusResponse_Body) Reset() { - *x = GetShardEvacuationStatusResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetShardEvacuationStatusResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetShardEvacuationStatusResponse_Body) ProtoMessage() {} - -func (x *GetShardEvacuationStatusResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetShardEvacuationStatusResponse_Body.ProtoReflect.Descriptor instead. -func (*GetShardEvacuationStatusResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{23, 0} -} - -func (x *GetShardEvacuationStatusResponse_Body) GetTotalObjects() uint64 { - if x != nil { - return x.TotalObjects - } - return 0 -} - -func (x *GetShardEvacuationStatusResponse_Body) GetEvacuatedObjects() uint64 { - if x != nil { - return x.EvacuatedObjects - } - return 0 -} - -func (x *GetShardEvacuationStatusResponse_Body) GetFailedObjects() uint64 { - if x != nil { - return x.FailedObjects - } - return 0 -} - -func (x *GetShardEvacuationStatusResponse_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *GetShardEvacuationStatusResponse_Body) GetStatus() GetShardEvacuationStatusResponse_Body_Status { - if x != nil { - return x.Status - } - return GetShardEvacuationStatusResponse_Body_EVACUATE_SHARD_STATUS_UNDEFINED -} - -func (x *GetShardEvacuationStatusResponse_Body) GetDuration() *GetShardEvacuationStatusResponse_Body_Duration { - if x != nil { - return x.Duration - } - return nil -} - -func (x *GetShardEvacuationStatusResponse_Body) GetStartedAt() *GetShardEvacuationStatusResponse_Body_UnixTimestamp { - if x != nil { - return x.StartedAt - } - return nil -} - -func (x *GetShardEvacuationStatusResponse_Body) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -func (x *GetShardEvacuationStatusResponse_Body) GetSkippedObjects() uint64 { - if x != nil { - return x.SkippedObjects - } - return 0 -} - -func (x *GetShardEvacuationStatusResponse_Body) GetTotalTrees() uint64 { - if x != nil { - return x.TotalTrees - } - return 0 -} - -func (x *GetShardEvacuationStatusResponse_Body) GetEvacuatedTrees() uint64 { - if x != nil { - return x.EvacuatedTrees - } - return 0 -} - -func (x *GetShardEvacuationStatusResponse_Body) GetFailedTrees() uint64 { - if x != nil { - return x.FailedTrees - } - return 0 -} - -// Unix timestamp value. -type GetShardEvacuationStatusResponse_Body_UnixTimestamp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) Reset() { - *x = GetShardEvacuationStatusResponse_Body_UnixTimestamp{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetShardEvacuationStatusResponse_Body_UnixTimestamp) ProtoMessage() {} - -func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetShardEvacuationStatusResponse_Body_UnixTimestamp.ProtoReflect.Descriptor instead. -func (*GetShardEvacuationStatusResponse_Body_UnixTimestamp) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{23, 0, 0} -} - -func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) GetValue() int64 { - if x != nil { - return x.Value - } - return 0 -} - -// Duration in seconds. -type GetShardEvacuationStatusResponse_Body_Duration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` -} - -func (x *GetShardEvacuationStatusResponse_Body_Duration) Reset() { - *x = GetShardEvacuationStatusResponse_Body_Duration{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetShardEvacuationStatusResponse_Body_Duration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetShardEvacuationStatusResponse_Body_Duration) ProtoMessage() {} - -func (x *GetShardEvacuationStatusResponse_Body_Duration) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetShardEvacuationStatusResponse_Body_Duration.ProtoReflect.Descriptor instead. -func (*GetShardEvacuationStatusResponse_Body_Duration) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{23, 0, 1} -} - -func (x *GetShardEvacuationStatusResponse_Body_Duration) GetSeconds() int64 { - if x != nil { - return x.Seconds - } - return 0 -} - -type ResetShardEvacuationStatusRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ResetShardEvacuationStatusRequest_Body) Reset() { - *x = ResetShardEvacuationStatusRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResetShardEvacuationStatusRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResetShardEvacuationStatusRequest_Body) ProtoMessage() {} - -func (x *ResetShardEvacuationStatusRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResetShardEvacuationStatusRequest_Body.ProtoReflect.Descriptor instead. -func (*ResetShardEvacuationStatusRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{24, 0} -} - -type ResetShardEvacuationStatusResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ResetShardEvacuationStatusResponse_Body) Reset() { - *x = ResetShardEvacuationStatusResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResetShardEvacuationStatusResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResetShardEvacuationStatusResponse_Body) ProtoMessage() {} - -func (x *ResetShardEvacuationStatusResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResetShardEvacuationStatusResponse_Body.ProtoReflect.Descriptor instead. -func (*ResetShardEvacuationStatusResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{25, 0} -} - -// Request body structure. -type StopShardEvacuationRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StopShardEvacuationRequest_Body) Reset() { - *x = StopShardEvacuationRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StopShardEvacuationRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StopShardEvacuationRequest_Body) ProtoMessage() {} - -func (x *StopShardEvacuationRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StopShardEvacuationRequest_Body.ProtoReflect.Descriptor instead. -func (*StopShardEvacuationRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{26, 0} -} - -// Response body structure. -type StopShardEvacuationResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StopShardEvacuationResponse_Body) Reset() { - *x = StopShardEvacuationResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StopShardEvacuationResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StopShardEvacuationResponse_Body) ProtoMessage() {} - -func (x *StopShardEvacuationResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StopShardEvacuationResponse_Body.ProtoReflect.Descriptor instead. -func (*StopShardEvacuationResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{27, 0} -} - -type AddChainLocalOverrideRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target for which the overrides are applied. - Target *ChainTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - // Serialized rule chain. If chain ID is left empty - // in the chain, then it will be generated and returned - // in the response. - Chain []byte `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"` -} - -func (x *AddChainLocalOverrideRequest_Body) Reset() { - *x = AddChainLocalOverrideRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddChainLocalOverrideRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddChainLocalOverrideRequest_Body) ProtoMessage() {} - -func (x *AddChainLocalOverrideRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddChainLocalOverrideRequest_Body.ProtoReflect.Descriptor instead. -func (*AddChainLocalOverrideRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{28, 0} -} - -func (x *AddChainLocalOverrideRequest_Body) GetTarget() *ChainTarget { - if x != nil { - return x.Target - } - return nil -} - -func (x *AddChainLocalOverrideRequest_Body) GetChain() []byte { - if x != nil { - return x.Chain - } - return nil -} - -type AddChainLocalOverrideResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Chain ID assigned for the added rule chain. - // If chain ID is left empty in the request, then - // it will be generated. - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (x *AddChainLocalOverrideResponse_Body) Reset() { - *x = AddChainLocalOverrideResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddChainLocalOverrideResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddChainLocalOverrideResponse_Body) ProtoMessage() {} - -func (x *AddChainLocalOverrideResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddChainLocalOverrideResponse_Body.ProtoReflect.Descriptor instead. -func (*AddChainLocalOverrideResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{29, 0} -} - -func (x *AddChainLocalOverrideResponse_Body) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -type GetChainLocalOverrideRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target for which the overrides are applied. - Target *ChainTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - // Chain ID assigned for the added rule chain. - ChainId []byte `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (x *GetChainLocalOverrideRequest_Body) Reset() { - *x = GetChainLocalOverrideRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChainLocalOverrideRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChainLocalOverrideRequest_Body) ProtoMessage() {} - -func (x *GetChainLocalOverrideRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChainLocalOverrideRequest_Body.ProtoReflect.Descriptor instead. -func (*GetChainLocalOverrideRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{30, 0} -} - -func (x *GetChainLocalOverrideRequest_Body) GetTarget() *ChainTarget { - if x != nil { - return x.Target - } - return nil -} - -func (x *GetChainLocalOverrideRequest_Body) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -type GetChainLocalOverrideResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Serialized rule chain. - Chain []byte `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` -} - -func (x *GetChainLocalOverrideResponse_Body) Reset() { - *x = GetChainLocalOverrideResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChainLocalOverrideResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChainLocalOverrideResponse_Body) ProtoMessage() {} - -func (x *GetChainLocalOverrideResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChainLocalOverrideResponse_Body.ProtoReflect.Descriptor instead. -func (*GetChainLocalOverrideResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{31, 0} -} - -func (x *GetChainLocalOverrideResponse_Body) GetChain() []byte { - if x != nil { - return x.Chain - } - return nil -} - -type ListChainLocalOverridesRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target for which the overrides are applied. - Target *ChainTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` -} - -func (x *ListChainLocalOverridesRequest_Body) Reset() { - *x = ListChainLocalOverridesRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListChainLocalOverridesRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListChainLocalOverridesRequest_Body) ProtoMessage() {} - -func (x *ListChainLocalOverridesRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListChainLocalOverridesRequest_Body.ProtoReflect.Descriptor instead. -func (*ListChainLocalOverridesRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{32, 0} -} - -func (x *ListChainLocalOverridesRequest_Body) GetTarget() *ChainTarget { - if x != nil { - return x.Target - } - return nil -} - -type ListChainLocalOverridesResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of serialized rule chain. - Chains [][]byte `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` -} - -func (x *ListChainLocalOverridesResponse_Body) Reset() { - *x = ListChainLocalOverridesResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListChainLocalOverridesResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListChainLocalOverridesResponse_Body) ProtoMessage() {} - -func (x *ListChainLocalOverridesResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListChainLocalOverridesResponse_Body.ProtoReflect.Descriptor instead. -func (*ListChainLocalOverridesResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{33, 0} -} - -func (x *ListChainLocalOverridesResponse_Body) GetChains() [][]byte { - if x != nil { - return x.Chains - } - return nil -} - -type ListTargetsLocalOverridesRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target for which the overrides are applied. - ChainName string `protobuf:"bytes,1,opt,name=chainName,proto3" json:"chainName,omitempty"` -} - -func (x *ListTargetsLocalOverridesRequest_Body) Reset() { - *x = ListTargetsLocalOverridesRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListTargetsLocalOverridesRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTargetsLocalOverridesRequest_Body) ProtoMessage() {} - -func (x *ListTargetsLocalOverridesRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTargetsLocalOverridesRequest_Body.ProtoReflect.Descriptor instead. -func (*ListTargetsLocalOverridesRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{34, 0} -} - -func (x *ListTargetsLocalOverridesRequest_Body) GetChainName() string { - if x != nil { - return x.ChainName - } - return "" -} - -type ListTargetsLocalOverridesResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of chain targets. - Targets []*ChainTarget `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty"` -} - -func (x *ListTargetsLocalOverridesResponse_Body) Reset() { - *x = ListTargetsLocalOverridesResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListTargetsLocalOverridesResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTargetsLocalOverridesResponse_Body) ProtoMessage() {} - -func (x *ListTargetsLocalOverridesResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTargetsLocalOverridesResponse_Body.ProtoReflect.Descriptor instead. -func (*ListTargetsLocalOverridesResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{35, 0} -} - -func (x *ListTargetsLocalOverridesResponse_Body) GetTargets() []*ChainTarget { - if x != nil { - return x.Targets - } - return nil -} - -type RemoveChainLocalOverrideRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target for which the overrides are applied. - Target *ChainTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - // Chain ID assigned for the added rule chain. - ChainId []byte `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (x *RemoveChainLocalOverrideRequest_Body) Reset() { - *x = RemoveChainLocalOverrideRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverrideRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverrideRequest_Body) ProtoMessage() {} - -func (x *RemoveChainLocalOverrideRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverrideRequest_Body.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverrideRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{36, 0} -} - -func (x *RemoveChainLocalOverrideRequest_Body) GetTarget() *ChainTarget { - if x != nil { - return x.Target - } - return nil -} - -func (x *RemoveChainLocalOverrideRequest_Body) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -type RemoveChainLocalOverrideResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveChainLocalOverrideResponse_Body) Reset() { - *x = RemoveChainLocalOverrideResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverrideResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverrideResponse_Body) ProtoMessage() {} - -func (x *RemoveChainLocalOverrideResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverrideResponse_Body.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverrideResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{37, 0} -} - -type RemoveChainLocalOverridesByTargetRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target for which the overrides are applied. - Target *ChainTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` -} - -func (x *RemoveChainLocalOverridesByTargetRequest_Body) Reset() { - *x = RemoveChainLocalOverridesByTargetRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverridesByTargetRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverridesByTargetRequest_Body) ProtoMessage() {} - -func (x *RemoveChainLocalOverridesByTargetRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverridesByTargetRequest_Body.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverridesByTargetRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{38, 0} -} - -func (x *RemoveChainLocalOverridesByTargetRequest_Body) GetTarget() *ChainTarget { - if x != nil { - return x.Target - } - return nil -} - -type RemoveChainLocalOverridesByTargetResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveChainLocalOverridesByTargetResponse_Body) Reset() { - *x = RemoveChainLocalOverridesByTargetResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveChainLocalOverridesByTargetResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveChainLocalOverridesByTargetResponse_Body) ProtoMessage() {} - -func (x *RemoveChainLocalOverridesByTargetResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveChainLocalOverridesByTargetResponse_Body.ProtoReflect.Descriptor instead. -func (*RemoveChainLocalOverridesByTargetResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{39, 0} -} - -// Request body structure. -type SealWriteCacheRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the shard. - Shard_ID [][]byte `protobuf:"bytes,1,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // Flag indicating whether object read errors should be ignored. - IgnoreErrors bool `protobuf:"varint,2,opt,name=ignore_errors,json=ignoreErrors,proto3" json:"ignore_errors,omitempty"` - // Flag indicating whether writecache will be sealed async. - Async bool `protobuf:"varint,3,opt,name=async,proto3" json:"async,omitempty"` - // If true, then writecache will be sealed, but mode will be restored to the current one. - RestoreMode bool `protobuf:"varint,4,opt,name=restore_mode,json=restoreMode,proto3" json:"restore_mode,omitempty"` - // If true, then writecache will shrink internal storage. - Shrink bool `protobuf:"varint,5,opt,name=shrink,proto3" json:"shrink,omitempty"` -} - -func (x *SealWriteCacheRequest_Body) Reset() { - *x = SealWriteCacheRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SealWriteCacheRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SealWriteCacheRequest_Body) ProtoMessage() {} - -func (x *SealWriteCacheRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SealWriteCacheRequest_Body.ProtoReflect.Descriptor instead. -func (*SealWriteCacheRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{40, 0} -} - -func (x *SealWriteCacheRequest_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *SealWriteCacheRequest_Body) GetIgnoreErrors() bool { - if x != nil { - return x.IgnoreErrors - } - return false -} - -func (x *SealWriteCacheRequest_Body) GetAsync() bool { - if x != nil { - return x.Async - } - return false -} - -func (x *SealWriteCacheRequest_Body) GetRestoreMode() bool { - if x != nil { - return x.RestoreMode - } - return false -} - -func (x *SealWriteCacheRequest_Body) GetShrink() bool { - if x != nil { - return x.Shrink - } - return false -} - -type SealWriteCacheResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Results []*SealWriteCacheResponse_Body_Status `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` -} - -func (x *SealWriteCacheResponse_Body) Reset() { - *x = SealWriteCacheResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SealWriteCacheResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SealWriteCacheResponse_Body) ProtoMessage() {} - -func (x *SealWriteCacheResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SealWriteCacheResponse_Body.ProtoReflect.Descriptor instead. -func (*SealWriteCacheResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{41, 0} -} - -func (x *SealWriteCacheResponse_Body) GetResults() []*SealWriteCacheResponse_Body_Status { - if x != nil { - return x.Results - } - return nil -} - -type SealWriteCacheResponse_Body_Status struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Shard_ID []byte `protobuf:"bytes,1,opt,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *SealWriteCacheResponse_Body_Status) Reset() { - *x = SealWriteCacheResponse_Body_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SealWriteCacheResponse_Body_Status) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SealWriteCacheResponse_Body_Status) ProtoMessage() {} - -func (x *SealWriteCacheResponse_Body_Status) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SealWriteCacheResponse_Body_Status.ProtoReflect.Descriptor instead. -func (*SealWriteCacheResponse_Body_Status) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{41, 0, 0} -} - -func (x *SealWriteCacheResponse_Body_Status) GetShard_ID() []byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *SealWriteCacheResponse_Body_Status) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *SealWriteCacheResponse_Body_Status) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type DetachShardsRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Shard_ID [][]byte `protobuf:"bytes,1,rep,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` -} - -func (x *DetachShardsRequest_Body) Reset() { - *x = DetachShardsRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DetachShardsRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DetachShardsRequest_Body) ProtoMessage() {} - -func (x *DetachShardsRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DetachShardsRequest_Body.ProtoReflect.Descriptor instead. -func (*DetachShardsRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{42, 0} -} - -func (x *DetachShardsRequest_Body) GetShard_ID() [][]byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -type DetachShardsResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DetachShardsResponse_Body) Reset() { - *x = DetachShardsResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_service_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DetachShardsResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DetachShardsResponse_Body) ProtoMessage() {} - -func (x *DetachShardsResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_service_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DetachShardsResponse_Body.ProtoReflect.Descriptor instead. -func (*DetachShardsResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_control_service_proto_rawDescGZIP(), []int{43, 0} -} - -var File_pkg_services_control_service_proto protoreflect.FileDescriptor - -var file_pkg_services_control_service_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x1a, 0x20, 0x70, - 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x84, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, - 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xfe, 0x01, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x7e, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x3a, 0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x6e, - 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, - 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x62, - 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x6d, - 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x10, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, - 0x6f, 0x64, 0x79, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, - 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, - 0x64, 0x79, 0x22, 0xd3, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x4b, 0x0a, 0x04, 0x42, - 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, - 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xa7, 0x01, 0x0a, 0x12, 0x44, 0x72, 0x6f, - 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x29, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x21, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x13, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x82, 0x01, 0x0a, 0x11, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, - 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, - 0x22, 0xb0, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, - 0x32, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x1a, 0x77, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19, 0x0a, 0x08, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, - 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, - 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x72, 0x65, 0x73, 0x65, - 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x88, 0x01, - 0x0a, 0x14, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, - 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xe0, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x6e, - 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, - 0x5a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, - 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, - 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x17, - 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xc8, 0x01, 0x0a, - 0x14, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, - 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, - 0x46, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, - 0x49, 0x44, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x45, 0x76, 0x61, 0x63, - 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x37, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, - 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x1c, 0x0a, 0x04, - 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x46, - 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x35, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x65, 0x61, 0x6c, 0x22, 0x84, - 0x01, 0x0a, 0x12, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, - 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xc9, 0x01, 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x44, 0x6f, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, - 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x55, 0x0a, 0x04, 0x42, 0x6f, - 0x64, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, - 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x73, 0x22, 0x7c, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x6f, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, - 0x98, 0x02, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, - 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3d, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x87, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, - 0x29, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, - 0x09, 0x0a, 0x05, 0x54, 0x52, 0x45, 0x45, 0x53, 0x10, 0x02, 0x22, 0x98, 0x01, 0x0a, 0x1c, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, - 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x9e, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, - 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x89, 0x07, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, - 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, - 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0xee, 0x05, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, - 0x2b, 0x0a, 0x11, 0x65, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x76, 0x61, 0x63, - 0x75, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x4d, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x53, 0x0a, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x55, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, - 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x73, 0x12, 0x27, - 0x0a, 0x0f, 0x65, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x65, 0x65, - 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, - 0x65, 0x64, 0x54, 0x72, 0x65, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x72, 0x65, 0x65, 0x73, 0x1a, 0x25, 0x0a, 0x0d, 0x55, 0x6e, - 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x1a, 0x24, 0x0a, 0x08, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x49, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x41, 0x43, 0x55, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x48, - 0x41, 0x52, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, - 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, - 0x10, 0x02, 0x22, 0xa2, 0x01, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, - 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xa4, 0x01, 0x0a, 0x22, 0x52, 0x65, 0x73, 0x65, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, - 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x94, - 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, - 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, - 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x96, 0x01, 0x0a, 0x1b, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, - 0x6f, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xdc, - 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, - 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x4a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, - 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xb5, 0x01, - 0x0a, 0x1d, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x1a, 0x21, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, - 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x4f, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, - 0x12, 0x2c, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x1d, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x1c, - 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xca, 0x01, 0x0a, - 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x40, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x1a, 0x34, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x1f, 0x4c, 0x69, - 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x1a, 0x1e, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x24, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x36, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, - 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, - 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x4f, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, - 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x22, 0xa0, 0x01, 0x0a, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xde, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x73, 0x42, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x73, 0x42, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x34, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xb2, 0x01, 0x0a, 0x29, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x73, 0x42, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x9c, 0x02, 0x0a, 0x15, - 0x53, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, - 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x97, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x79, - 0x6e, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x72, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x73, 0x68, 0x72, 0x69, 0x6e, 0x6b, 0x22, 0xa9, 0x02, 0x0a, 0x16, 0x53, - 0x65, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, - 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, - 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0xa2, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, - 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x1a, 0x53, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x74, 0x61, 0x63, - 0x68, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x21, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x22, 0x88, 0x01, 0x0a, 0x14, 0x44, - 0x65, 0x74, 0x61, 0x63, 0x68, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x74, 0x61, - 0x63, 0x68, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x32, 0x8b, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, - 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4b, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, - 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, - 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, - 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, - 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, - 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, - 0x61, 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x45, 0x76, 0x61, - 0x63, 0x75, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, - 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x68, - 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, - 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x73, - 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x60, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, - 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x76, 0x61, 0x63, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, - 0x76, 0x61, 0x63, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, - 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x6f, 0x63, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x6f, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x25, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x64, - 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x27, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6f, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x28, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x21, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x42, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, 0x79, 0x54, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, - 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x72, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x53, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, - 0x65, 0x74, 0x61, 0x63, 0x68, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, - 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, - 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pkg_services_control_service_proto_rawDescOnce sync.Once - file_pkg_services_control_service_proto_rawDescData = file_pkg_services_control_service_proto_rawDesc -) - -func file_pkg_services_control_service_proto_rawDescGZIP() []byte { - file_pkg_services_control_service_proto_rawDescOnce.Do(func() { - file_pkg_services_control_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_services_control_service_proto_rawDescData) - }) - return file_pkg_services_control_service_proto_rawDescData -} - -var file_pkg_services_control_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_pkg_services_control_service_proto_msgTypes = make([]protoimpl.MessageInfo, 91) -var file_pkg_services_control_service_proto_goTypes = []interface{}{ - (StartShardEvacuationRequest_Body_Scope)(0), // 0: control.StartShardEvacuationRequest.Body.Scope - (GetShardEvacuationStatusResponse_Body_Status)(0), // 1: control.GetShardEvacuationStatusResponse.Body.Status - (*HealthCheckRequest)(nil), // 2: control.HealthCheckRequest - (*HealthCheckResponse)(nil), // 3: control.HealthCheckResponse - (*SetNetmapStatusRequest)(nil), // 4: control.SetNetmapStatusRequest - (*SetNetmapStatusResponse)(nil), // 5: control.SetNetmapStatusResponse - (*GetNetmapStatusRequest)(nil), // 6: control.GetNetmapStatusRequest - (*GetNetmapStatusResponse)(nil), // 7: control.GetNetmapStatusResponse - (*DropObjectsRequest)(nil), // 8: control.DropObjectsRequest - (*DropObjectsResponse)(nil), // 9: control.DropObjectsResponse - (*ListShardsRequest)(nil), // 10: control.ListShardsRequest - (*ListShardsResponse)(nil), // 11: control.ListShardsResponse - (*SetShardModeRequest)(nil), // 12: control.SetShardModeRequest - (*SetShardModeResponse)(nil), // 13: control.SetShardModeResponse - (*SynchronizeTreeRequest)(nil), // 14: control.SynchronizeTreeRequest - (*SynchronizeTreeResponse)(nil), // 15: control.SynchronizeTreeResponse - (*EvacuateShardRequest)(nil), // 16: control.EvacuateShardRequest - (*EvacuateShardResponse)(nil), // 17: control.EvacuateShardResponse - (*FlushCacheRequest)(nil), // 18: control.FlushCacheRequest - (*FlushCacheResponse)(nil), // 19: control.FlushCacheResponse - (*DoctorRequest)(nil), // 20: control.DoctorRequest - (*DoctorResponse)(nil), // 21: control.DoctorResponse - (*StartShardEvacuationRequest)(nil), // 22: control.StartShardEvacuationRequest - (*StartShardEvacuationResponse)(nil), // 23: control.StartShardEvacuationResponse - (*GetShardEvacuationStatusRequest)(nil), // 24: control.GetShardEvacuationStatusRequest - (*GetShardEvacuationStatusResponse)(nil), // 25: control.GetShardEvacuationStatusResponse - (*ResetShardEvacuationStatusRequest)(nil), // 26: control.ResetShardEvacuationStatusRequest - (*ResetShardEvacuationStatusResponse)(nil), // 27: control.ResetShardEvacuationStatusResponse - (*StopShardEvacuationRequest)(nil), // 28: control.StopShardEvacuationRequest - (*StopShardEvacuationResponse)(nil), // 29: control.StopShardEvacuationResponse - (*AddChainLocalOverrideRequest)(nil), // 30: control.AddChainLocalOverrideRequest - (*AddChainLocalOverrideResponse)(nil), // 31: control.AddChainLocalOverrideResponse - (*GetChainLocalOverrideRequest)(nil), // 32: control.GetChainLocalOverrideRequest - (*GetChainLocalOverrideResponse)(nil), // 33: control.GetChainLocalOverrideResponse - (*ListChainLocalOverridesRequest)(nil), // 34: control.ListChainLocalOverridesRequest - (*ListChainLocalOverridesResponse)(nil), // 35: control.ListChainLocalOverridesResponse - (*ListTargetsLocalOverridesRequest)(nil), // 36: control.ListTargetsLocalOverridesRequest - (*ListTargetsLocalOverridesResponse)(nil), // 37: control.ListTargetsLocalOverridesResponse - (*RemoveChainLocalOverrideRequest)(nil), // 38: control.RemoveChainLocalOverrideRequest - (*RemoveChainLocalOverrideResponse)(nil), // 39: control.RemoveChainLocalOverrideResponse - (*RemoveChainLocalOverridesByTargetRequest)(nil), // 40: control.RemoveChainLocalOverridesByTargetRequest - (*RemoveChainLocalOverridesByTargetResponse)(nil), // 41: control.RemoveChainLocalOverridesByTargetResponse - (*SealWriteCacheRequest)(nil), // 42: control.SealWriteCacheRequest - (*SealWriteCacheResponse)(nil), // 43: control.SealWriteCacheResponse - (*DetachShardsRequest)(nil), // 44: control.DetachShardsRequest - (*DetachShardsResponse)(nil), // 45: control.DetachShardsResponse - (*HealthCheckRequest_Body)(nil), // 46: control.HealthCheckRequest.Body - (*HealthCheckResponse_Body)(nil), // 47: control.HealthCheckResponse.Body - (*SetNetmapStatusRequest_Body)(nil), // 48: control.SetNetmapStatusRequest.Body - (*SetNetmapStatusResponse_Body)(nil), // 49: control.SetNetmapStatusResponse.Body - (*GetNetmapStatusRequest_Body)(nil), // 50: control.GetNetmapStatusRequest.Body - (*GetNetmapStatusResponse_Body)(nil), // 51: control.GetNetmapStatusResponse.Body - (*DropObjectsRequest_Body)(nil), // 52: control.DropObjectsRequest.Body - (*DropObjectsResponse_Body)(nil), // 53: control.DropObjectsResponse.Body - (*ListShardsRequest_Body)(nil), // 54: control.ListShardsRequest.Body - (*ListShardsResponse_Body)(nil), // 55: control.ListShardsResponse.Body - (*SetShardModeRequest_Body)(nil), // 56: control.SetShardModeRequest.Body - (*SetShardModeResponse_Body)(nil), // 57: control.SetShardModeResponse.Body - (*SynchronizeTreeRequest_Body)(nil), // 58: control.SynchronizeTreeRequest.Body - (*SynchronizeTreeResponse_Body)(nil), // 59: control.SynchronizeTreeResponse.Body - (*EvacuateShardRequest_Body)(nil), // 60: control.EvacuateShardRequest.Body - (*EvacuateShardResponse_Body)(nil), // 61: control.EvacuateShardResponse.Body - (*FlushCacheRequest_Body)(nil), // 62: control.FlushCacheRequest.Body - (*FlushCacheResponse_Body)(nil), // 63: control.FlushCacheResponse.Body - (*DoctorRequest_Body)(nil), // 64: control.DoctorRequest.Body - (*DoctorResponse_Body)(nil), // 65: control.DoctorResponse.Body - (*StartShardEvacuationRequest_Body)(nil), // 66: control.StartShardEvacuationRequest.Body - (*StartShardEvacuationResponse_Body)(nil), // 67: control.StartShardEvacuationResponse.Body - (*GetShardEvacuationStatusRequest_Body)(nil), // 68: control.GetShardEvacuationStatusRequest.Body - (*GetShardEvacuationStatusResponse_Body)(nil), // 69: control.GetShardEvacuationStatusResponse.Body - (*GetShardEvacuationStatusResponse_Body_UnixTimestamp)(nil), // 70: control.GetShardEvacuationStatusResponse.Body.UnixTimestamp - (*GetShardEvacuationStatusResponse_Body_Duration)(nil), // 71: control.GetShardEvacuationStatusResponse.Body.Duration - (*ResetShardEvacuationStatusRequest_Body)(nil), // 72: control.ResetShardEvacuationStatusRequest.Body - (*ResetShardEvacuationStatusResponse_Body)(nil), // 73: control.ResetShardEvacuationStatusResponse.Body - (*StopShardEvacuationRequest_Body)(nil), // 74: control.StopShardEvacuationRequest.Body - (*StopShardEvacuationResponse_Body)(nil), // 75: control.StopShardEvacuationResponse.Body - (*AddChainLocalOverrideRequest_Body)(nil), // 76: control.AddChainLocalOverrideRequest.Body - (*AddChainLocalOverrideResponse_Body)(nil), // 77: control.AddChainLocalOverrideResponse.Body - (*GetChainLocalOverrideRequest_Body)(nil), // 78: control.GetChainLocalOverrideRequest.Body - (*GetChainLocalOverrideResponse_Body)(nil), // 79: control.GetChainLocalOverrideResponse.Body - (*ListChainLocalOverridesRequest_Body)(nil), // 80: control.ListChainLocalOverridesRequest.Body - (*ListChainLocalOverridesResponse_Body)(nil), // 81: control.ListChainLocalOverridesResponse.Body - (*ListTargetsLocalOverridesRequest_Body)(nil), // 82: control.ListTargetsLocalOverridesRequest.Body - (*ListTargetsLocalOverridesResponse_Body)(nil), // 83: control.ListTargetsLocalOverridesResponse.Body - (*RemoveChainLocalOverrideRequest_Body)(nil), // 84: control.RemoveChainLocalOverrideRequest.Body - (*RemoveChainLocalOverrideResponse_Body)(nil), // 85: control.RemoveChainLocalOverrideResponse.Body - (*RemoveChainLocalOverridesByTargetRequest_Body)(nil), // 86: control.RemoveChainLocalOverridesByTargetRequest.Body - (*RemoveChainLocalOverridesByTargetResponse_Body)(nil), // 87: control.RemoveChainLocalOverridesByTargetResponse.Body - (*SealWriteCacheRequest_Body)(nil), // 88: control.SealWriteCacheRequest.Body - (*SealWriteCacheResponse_Body)(nil), // 89: control.SealWriteCacheResponse.Body - (*SealWriteCacheResponse_Body_Status)(nil), // 90: control.SealWriteCacheResponse.Body.Status - (*DetachShardsRequest_Body)(nil), // 91: control.DetachShardsRequest.Body - (*DetachShardsResponse_Body)(nil), // 92: control.DetachShardsResponse.Body - (*Signature)(nil), // 93: control.Signature - (NetmapStatus)(0), // 94: control.NetmapStatus - (HealthStatus)(0), // 95: control.HealthStatus - (*ShardInfo)(nil), // 96: control.ShardInfo - (ShardMode)(0), // 97: control.ShardMode - (*ChainTarget)(nil), // 98: control.ChainTarget -} -var file_pkg_services_control_service_proto_depIdxs = []int32{ - 46, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body - 93, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature - 47, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body - 93, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature - 48, // 4: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body - 93, // 5: control.SetNetmapStatusRequest.signature:type_name -> control.Signature - 49, // 6: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body - 93, // 7: control.SetNetmapStatusResponse.signature:type_name -> control.Signature - 50, // 8: control.GetNetmapStatusRequest.body:type_name -> control.GetNetmapStatusRequest.Body - 93, // 9: control.GetNetmapStatusRequest.signature:type_name -> control.Signature - 51, // 10: control.GetNetmapStatusResponse.body:type_name -> control.GetNetmapStatusResponse.Body - 93, // 11: control.GetNetmapStatusResponse.signature:type_name -> control.Signature - 52, // 12: control.DropObjectsRequest.body:type_name -> control.DropObjectsRequest.Body - 93, // 13: control.DropObjectsRequest.signature:type_name -> control.Signature - 53, // 14: control.DropObjectsResponse.body:type_name -> control.DropObjectsResponse.Body - 93, // 15: control.DropObjectsResponse.signature:type_name -> control.Signature - 54, // 16: control.ListShardsRequest.body:type_name -> control.ListShardsRequest.Body - 93, // 17: control.ListShardsRequest.signature:type_name -> control.Signature - 55, // 18: control.ListShardsResponse.body:type_name -> control.ListShardsResponse.Body - 93, // 19: control.ListShardsResponse.signature:type_name -> control.Signature - 56, // 20: control.SetShardModeRequest.body:type_name -> control.SetShardModeRequest.Body - 93, // 21: control.SetShardModeRequest.signature:type_name -> control.Signature - 57, // 22: control.SetShardModeResponse.body:type_name -> control.SetShardModeResponse.Body - 93, // 23: control.SetShardModeResponse.signature:type_name -> control.Signature - 58, // 24: control.SynchronizeTreeRequest.body:type_name -> control.SynchronizeTreeRequest.Body - 93, // 25: control.SynchronizeTreeRequest.signature:type_name -> control.Signature - 59, // 26: control.SynchronizeTreeResponse.body:type_name -> control.SynchronizeTreeResponse.Body - 93, // 27: control.SynchronizeTreeResponse.signature:type_name -> control.Signature - 60, // 28: control.EvacuateShardRequest.body:type_name -> control.EvacuateShardRequest.Body - 93, // 29: control.EvacuateShardRequest.signature:type_name -> control.Signature - 61, // 30: control.EvacuateShardResponse.body:type_name -> control.EvacuateShardResponse.Body - 93, // 31: control.EvacuateShardResponse.signature:type_name -> control.Signature - 62, // 32: control.FlushCacheRequest.body:type_name -> control.FlushCacheRequest.Body - 93, // 33: control.FlushCacheRequest.signature:type_name -> control.Signature - 63, // 34: control.FlushCacheResponse.body:type_name -> control.FlushCacheResponse.Body - 93, // 35: control.FlushCacheResponse.signature:type_name -> control.Signature - 64, // 36: control.DoctorRequest.body:type_name -> control.DoctorRequest.Body - 93, // 37: control.DoctorRequest.signature:type_name -> control.Signature - 65, // 38: control.DoctorResponse.body:type_name -> control.DoctorResponse.Body - 93, // 39: control.DoctorResponse.signature:type_name -> control.Signature - 66, // 40: control.StartShardEvacuationRequest.body:type_name -> control.StartShardEvacuationRequest.Body - 93, // 41: control.StartShardEvacuationRequest.signature:type_name -> control.Signature - 67, // 42: control.StartShardEvacuationResponse.body:type_name -> control.StartShardEvacuationResponse.Body - 93, // 43: control.StartShardEvacuationResponse.signature:type_name -> control.Signature - 68, // 44: control.GetShardEvacuationStatusRequest.body:type_name -> control.GetShardEvacuationStatusRequest.Body - 93, // 45: control.GetShardEvacuationStatusRequest.signature:type_name -> control.Signature - 69, // 46: control.GetShardEvacuationStatusResponse.body:type_name -> control.GetShardEvacuationStatusResponse.Body - 93, // 47: control.GetShardEvacuationStatusResponse.signature:type_name -> control.Signature - 72, // 48: control.ResetShardEvacuationStatusRequest.body:type_name -> control.ResetShardEvacuationStatusRequest.Body - 93, // 49: control.ResetShardEvacuationStatusRequest.signature:type_name -> control.Signature - 73, // 50: control.ResetShardEvacuationStatusResponse.body:type_name -> control.ResetShardEvacuationStatusResponse.Body - 93, // 51: control.ResetShardEvacuationStatusResponse.signature:type_name -> control.Signature - 74, // 52: control.StopShardEvacuationRequest.body:type_name -> control.StopShardEvacuationRequest.Body - 93, // 53: control.StopShardEvacuationRequest.signature:type_name -> control.Signature - 75, // 54: control.StopShardEvacuationResponse.body:type_name -> control.StopShardEvacuationResponse.Body - 93, // 55: control.StopShardEvacuationResponse.signature:type_name -> control.Signature - 76, // 56: control.AddChainLocalOverrideRequest.body:type_name -> control.AddChainLocalOverrideRequest.Body - 93, // 57: control.AddChainLocalOverrideRequest.signature:type_name -> control.Signature - 77, // 58: control.AddChainLocalOverrideResponse.body:type_name -> control.AddChainLocalOverrideResponse.Body - 93, // 59: control.AddChainLocalOverrideResponse.signature:type_name -> control.Signature - 78, // 60: control.GetChainLocalOverrideRequest.body:type_name -> control.GetChainLocalOverrideRequest.Body - 93, // 61: control.GetChainLocalOverrideRequest.signature:type_name -> control.Signature - 79, // 62: control.GetChainLocalOverrideResponse.body:type_name -> control.GetChainLocalOverrideResponse.Body - 93, // 63: control.GetChainLocalOverrideResponse.signature:type_name -> control.Signature - 80, // 64: control.ListChainLocalOverridesRequest.body:type_name -> control.ListChainLocalOverridesRequest.Body - 93, // 65: control.ListChainLocalOverridesRequest.signature:type_name -> control.Signature - 81, // 66: control.ListChainLocalOverridesResponse.body:type_name -> control.ListChainLocalOverridesResponse.Body - 93, // 67: control.ListChainLocalOverridesResponse.signature:type_name -> control.Signature - 82, // 68: control.ListTargetsLocalOverridesRequest.body:type_name -> control.ListTargetsLocalOverridesRequest.Body - 93, // 69: control.ListTargetsLocalOverridesRequest.signature:type_name -> control.Signature - 83, // 70: control.ListTargetsLocalOverridesResponse.body:type_name -> control.ListTargetsLocalOverridesResponse.Body - 93, // 71: control.ListTargetsLocalOverridesResponse.signature:type_name -> control.Signature - 84, // 72: control.RemoveChainLocalOverrideRequest.body:type_name -> control.RemoveChainLocalOverrideRequest.Body - 93, // 73: control.RemoveChainLocalOverrideRequest.signature:type_name -> control.Signature - 85, // 74: control.RemoveChainLocalOverrideResponse.body:type_name -> control.RemoveChainLocalOverrideResponse.Body - 93, // 75: control.RemoveChainLocalOverrideResponse.signature:type_name -> control.Signature - 86, // 76: control.RemoveChainLocalOverridesByTargetRequest.body:type_name -> control.RemoveChainLocalOverridesByTargetRequest.Body - 93, // 77: control.RemoveChainLocalOverridesByTargetRequest.signature:type_name -> control.Signature - 87, // 78: control.RemoveChainLocalOverridesByTargetResponse.body:type_name -> control.RemoveChainLocalOverridesByTargetResponse.Body - 93, // 79: control.RemoveChainLocalOverridesByTargetResponse.signature:type_name -> control.Signature - 88, // 80: control.SealWriteCacheRequest.body:type_name -> control.SealWriteCacheRequest.Body - 93, // 81: control.SealWriteCacheRequest.signature:type_name -> control.Signature - 89, // 82: control.SealWriteCacheResponse.body:type_name -> control.SealWriteCacheResponse.Body - 93, // 83: control.SealWriteCacheResponse.signature:type_name -> control.Signature - 91, // 84: control.DetachShardsRequest.body:type_name -> control.DetachShardsRequest.Body - 93, // 85: control.DetachShardsRequest.signature:type_name -> control.Signature - 92, // 86: control.DetachShardsResponse.body:type_name -> control.DetachShardsResponse.Body - 93, // 87: control.DetachShardsResponse.signature:type_name -> control.Signature - 94, // 88: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus - 95, // 89: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus - 94, // 90: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus - 94, // 91: control.GetNetmapStatusResponse.Body.status:type_name -> control.NetmapStatus - 96, // 92: control.ListShardsResponse.Body.shards:type_name -> control.ShardInfo - 97, // 93: control.SetShardModeRequest.Body.mode:type_name -> control.ShardMode - 1, // 94: control.GetShardEvacuationStatusResponse.Body.status:type_name -> control.GetShardEvacuationStatusResponse.Body.Status - 71, // 95: control.GetShardEvacuationStatusResponse.Body.duration:type_name -> control.GetShardEvacuationStatusResponse.Body.Duration - 70, // 96: control.GetShardEvacuationStatusResponse.Body.started_at:type_name -> control.GetShardEvacuationStatusResponse.Body.UnixTimestamp - 98, // 97: control.AddChainLocalOverrideRequest.Body.target:type_name -> control.ChainTarget - 98, // 98: control.GetChainLocalOverrideRequest.Body.target:type_name -> control.ChainTarget - 98, // 99: control.ListChainLocalOverridesRequest.Body.target:type_name -> control.ChainTarget - 98, // 100: control.ListTargetsLocalOverridesResponse.Body.targets:type_name -> control.ChainTarget - 98, // 101: control.RemoveChainLocalOverrideRequest.Body.target:type_name -> control.ChainTarget - 98, // 102: control.RemoveChainLocalOverridesByTargetRequest.Body.target:type_name -> control.ChainTarget - 90, // 103: control.SealWriteCacheResponse.Body.results:type_name -> control.SealWriteCacheResponse.Body.Status - 2, // 104: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest - 4, // 105: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest - 6, // 106: control.ControlService.GetNetmapStatus:input_type -> control.GetNetmapStatusRequest - 8, // 107: control.ControlService.DropObjects:input_type -> control.DropObjectsRequest - 10, // 108: control.ControlService.ListShards:input_type -> control.ListShardsRequest - 12, // 109: control.ControlService.SetShardMode:input_type -> control.SetShardModeRequest - 14, // 110: control.ControlService.SynchronizeTree:input_type -> control.SynchronizeTreeRequest - 16, // 111: control.ControlService.EvacuateShard:input_type -> control.EvacuateShardRequest - 22, // 112: control.ControlService.StartShardEvacuation:input_type -> control.StartShardEvacuationRequest - 24, // 113: control.ControlService.GetShardEvacuationStatus:input_type -> control.GetShardEvacuationStatusRequest - 26, // 114: control.ControlService.ResetShardEvacuationStatus:input_type -> control.ResetShardEvacuationStatusRequest - 28, // 115: control.ControlService.StopShardEvacuation:input_type -> control.StopShardEvacuationRequest - 18, // 116: control.ControlService.FlushCache:input_type -> control.FlushCacheRequest - 20, // 117: control.ControlService.Doctor:input_type -> control.DoctorRequest - 30, // 118: control.ControlService.AddChainLocalOverride:input_type -> control.AddChainLocalOverrideRequest - 32, // 119: control.ControlService.GetChainLocalOverride:input_type -> control.GetChainLocalOverrideRequest - 34, // 120: control.ControlService.ListChainLocalOverrides:input_type -> control.ListChainLocalOverridesRequest - 38, // 121: control.ControlService.RemoveChainLocalOverride:input_type -> control.RemoveChainLocalOverrideRequest - 40, // 122: control.ControlService.RemoveChainLocalOverridesByTarget:input_type -> control.RemoveChainLocalOverridesByTargetRequest - 36, // 123: control.ControlService.ListTargetsLocalOverrides:input_type -> control.ListTargetsLocalOverridesRequest - 42, // 124: control.ControlService.SealWriteCache:input_type -> control.SealWriteCacheRequest - 44, // 125: control.ControlService.DetachShards:input_type -> control.DetachShardsRequest - 3, // 126: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse - 5, // 127: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse - 7, // 128: control.ControlService.GetNetmapStatus:output_type -> control.GetNetmapStatusResponse - 9, // 129: control.ControlService.DropObjects:output_type -> control.DropObjectsResponse - 11, // 130: control.ControlService.ListShards:output_type -> control.ListShardsResponse - 13, // 131: control.ControlService.SetShardMode:output_type -> control.SetShardModeResponse - 15, // 132: control.ControlService.SynchronizeTree:output_type -> control.SynchronizeTreeResponse - 17, // 133: control.ControlService.EvacuateShard:output_type -> control.EvacuateShardResponse - 23, // 134: control.ControlService.StartShardEvacuation:output_type -> control.StartShardEvacuationResponse - 25, // 135: control.ControlService.GetShardEvacuationStatus:output_type -> control.GetShardEvacuationStatusResponse - 27, // 136: control.ControlService.ResetShardEvacuationStatus:output_type -> control.ResetShardEvacuationStatusResponse - 29, // 137: control.ControlService.StopShardEvacuation:output_type -> control.StopShardEvacuationResponse - 19, // 138: control.ControlService.FlushCache:output_type -> control.FlushCacheResponse - 21, // 139: control.ControlService.Doctor:output_type -> control.DoctorResponse - 31, // 140: control.ControlService.AddChainLocalOverride:output_type -> control.AddChainLocalOverrideResponse - 33, // 141: control.ControlService.GetChainLocalOverride:output_type -> control.GetChainLocalOverrideResponse - 35, // 142: control.ControlService.ListChainLocalOverrides:output_type -> control.ListChainLocalOverridesResponse - 39, // 143: control.ControlService.RemoveChainLocalOverride:output_type -> control.RemoveChainLocalOverrideResponse - 41, // 144: control.ControlService.RemoveChainLocalOverridesByTarget:output_type -> control.RemoveChainLocalOverridesByTargetResponse - 37, // 145: control.ControlService.ListTargetsLocalOverrides:output_type -> control.ListTargetsLocalOverridesResponse - 43, // 146: control.ControlService.SealWriteCache:output_type -> control.SealWriteCacheResponse - 45, // 147: control.ControlService.DetachShards:output_type -> control.DetachShardsResponse - 126, // [126:148] is the sub-list for method output_type - 104, // [104:126] is the sub-list for method input_type - 104, // [104:104] is the sub-list for extension type_name - 104, // [104:104] is the sub-list for extension extendee - 0, // [0:104] is the sub-list for field type_name -} - -func init() { file_pkg_services_control_service_proto_init() } -func file_pkg_services_control_service_proto_init() { - if File_pkg_services_control_service_proto != nil { - return - } - file_pkg_services_control_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_pkg_services_control_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetNetmapStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetNetmapStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetmapStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetmapStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropObjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropObjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListShardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListShardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetShardModeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetShardModeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynchronizeTreeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynchronizeTreeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvacuateShardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvacuateShardResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushCacheRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushCacheResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoctorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoctorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartShardEvacuationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartShardEvacuationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardEvacuationStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardEvacuationStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetShardEvacuationStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetShardEvacuationStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopShardEvacuationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopShardEvacuationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddChainLocalOverrideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddChainLocalOverrideResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChainLocalOverrideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChainLocalOverrideResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListChainLocalOverridesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListChainLocalOverridesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTargetsLocalOverridesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTargetsLocalOverridesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverrideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverrideResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverridesByTargetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverridesByTargetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SealWriteCacheRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SealWriteCacheResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DetachShardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DetachShardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetNetmapStatusRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetNetmapStatusResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetmapStatusRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetmapStatusResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropObjectsRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropObjectsResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListShardsRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListShardsResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetShardModeRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetShardModeResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynchronizeTreeRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynchronizeTreeResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvacuateShardRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvacuateShardResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushCacheRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlushCacheResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoctorRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoctorResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartShardEvacuationRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartShardEvacuationResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardEvacuationStatusRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardEvacuationStatusResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardEvacuationStatusResponse_Body_UnixTimestamp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetShardEvacuationStatusResponse_Body_Duration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetShardEvacuationStatusRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetShardEvacuationStatusResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopShardEvacuationRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopShardEvacuationResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddChainLocalOverrideRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddChainLocalOverrideResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChainLocalOverrideRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChainLocalOverrideResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListChainLocalOverridesRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListChainLocalOverridesResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTargetsLocalOverridesRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTargetsLocalOverridesResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverrideRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverrideResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverridesByTargetRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveChainLocalOverridesByTargetResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SealWriteCacheRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SealWriteCacheResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SealWriteCacheResponse_Body_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DetachShardsRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_service_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DetachShardsResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_services_control_service_proto_rawDesc, - NumEnums: 2, - NumMessages: 91, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_pkg_services_control_service_proto_goTypes, - DependencyIndexes: file_pkg_services_control_service_proto_depIdxs, - EnumInfos: file_pkg_services_control_service_proto_enumTypes, - MessageInfos: file_pkg_services_control_service_proto_msgTypes, - }.Build() - File_pkg_services_control_service_proto = out.File - file_pkg_services_control_service_proto_rawDesc = nil - file_pkg_services_control_service_proto_goTypes = nil - file_pkg_services_control_service_proto_depIdxs = nil -} diff --git a/pkg/services/control/service_frostfs.pb.go b/pkg/services/control/service_frostfs.pb.go index 822244e77..afd1c3c41 100644 --- a/pkg/services/control/service_frostfs.pb.go +++ b/pkg/services/control/service_frostfs.pb.go @@ -2,7 +2,27 @@ package control -import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" +import ( + json "encoding/json" + fmt "fmt" + pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" + proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" + encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" + easyproto "github.com/VictoriaMetrics/easyproto" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" + strconv "strconv" +) + +type HealthCheckRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckRequest_Body)(nil) + _ json.Marshaler = (*HealthCheckRequest_Body)(nil) + _ json.Unmarshaler = (*HealthCheckRequest_Body)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -14,18 +34,93 @@ func (x *HealthCheckRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthCheckRequest struct { + Body *HealthCheckRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckRequest)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckRequest)(nil) + _ json.Marshaler = (*HealthCheckRequest)(nil) + _ json.Unmarshaler = (*HealthCheckRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -38,27 +133,6 @@ func (x *HealthCheckRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -74,13 +148,165 @@ func (x *HealthCheckRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *HealthCheckRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *HealthCheckRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(HealthCheckRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *HealthCheckRequest) GetBody() *HealthCheckRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *HealthCheckRequest) SetBody(v *HealthCheckRequest_Body) { + x.Body = v +} +func (x *HealthCheckRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *HealthCheckRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *HealthCheckRequest_Body + f = new(HealthCheckRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthCheckResponse_Body struct { + NetmapStatus NetmapStatus `json:"netmapStatus"` + HealthStatus HealthStatus `json:"healthStatus"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckResponse_Body)(nil) + _ json.Marshaler = (*HealthCheckResponse_Body)(nil) + _ json.Unmarshaler = (*HealthCheckResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -93,27 +319,186 @@ func (x *HealthCheckResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.EnumMarshal(1, buf[offset:], int32(x.NetmapStatus)) - offset += proto.EnumMarshal(2, buf[offset:], int32(x.HealthStatus)) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if int32(x.NetmapStatus) != 0 { + mm.AppendInt32(1, int32(x.NetmapStatus)) + } + if int32(x.HealthStatus) != 0 { + mm.AppendInt32(2, int32(x.HealthStatus)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckResponse_Body") + } + switch fc.FieldNum { + case 1: // NetmapStatus + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "NetmapStatus") + } + x.NetmapStatus = NetmapStatus(data) + case 2: // HealthStatus + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "HealthStatus") + } + x.HealthStatus = HealthStatus(data) + } + } + return nil +} +func (x *HealthCheckResponse_Body) GetNetmapStatus() NetmapStatus { + if x != nil { + return x.NetmapStatus + } + return 0 +} +func (x *HealthCheckResponse_Body) SetNetmapStatus(v NetmapStatus) { + x.NetmapStatus = v +} +func (x *HealthCheckResponse_Body) GetHealthStatus() HealthStatus { + if x != nil { + return x.HealthStatus + } + return 0 +} +func (x *HealthCheckResponse_Body) SetHealthStatus(v HealthStatus) { + x.HealthStatus = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"netmapStatus\":" + out.RawString(prefix[1:]) + out.Int32(int32(x.NetmapStatus)) + } + { + const prefix string = ",\"healthStatus\":" + out.RawString(prefix) + out.Int32(int32(x.HealthStatus)) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "netmapStatus": + { + var f NetmapStatus + var parsedValue NetmapStatus + switch v := in.Interface().(type) { + case string: + if vv, ok := NetmapStatus_value[v]; ok { + parsedValue = NetmapStatus(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = NetmapStatus(vv) + case float64: + parsedValue = NetmapStatus(v) + } + f = parsedValue + x.NetmapStatus = f + } + case "healthStatus": + { + var f HealthStatus + var parsedValue HealthStatus + switch v := in.Interface().(type) { + case string: + if vv, ok := HealthStatus_value[v]; ok { + parsedValue = HealthStatus(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = HealthStatus(vv) + case float64: + parsedValue = HealthStatus(v) + } + f = parsedValue + x.HealthStatus = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthCheckResponse struct { + Body *HealthCheckResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthCheckResponse)(nil) + _ encoding.ProtoUnmarshaler = (*HealthCheckResponse)(nil) + _ json.Marshaler = (*HealthCheckResponse)(nil) + _ json.Unmarshaler = (*HealthCheckResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -126,27 +511,6 @@ func (x *HealthCheckResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthCheckResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -162,13 +526,165 @@ func (x *HealthCheckResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *HealthCheckResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *HealthCheckResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthCheckResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthCheckResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthCheckResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthCheckResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(HealthCheckResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *HealthCheckResponse) GetBody() *HealthCheckResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *HealthCheckResponse) SetBody(v *HealthCheckResponse_Body) { + x.Body = v +} +func (x *HealthCheckResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *HealthCheckResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthCheckResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthCheckResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthCheckResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthCheckResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *HealthCheckResponse_Body + f = new(HealthCheckResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetNetmapStatusRequest_Body struct { + Status NetmapStatus `json:"status"` + ForceMaintenance bool `json:"forceMaintenance"` +} + +var ( + _ encoding.ProtoMarshaler = (*SetNetmapStatusRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SetNetmapStatusRequest_Body)(nil) + _ json.Marshaler = (*SetNetmapStatusRequest_Body)(nil) + _ json.Unmarshaler = (*SetNetmapStatusRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -181,27 +697,170 @@ func (x *SetNetmapStatusRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetNetmapStatusRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.EnumMarshal(1, buf[offset:], int32(x.Status)) - offset += proto.BoolMarshal(2, buf[offset:], x.ForceMaintenance) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetNetmapStatusRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetNetmapStatusRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if int32(x.Status) != 0 { + mm.AppendInt32(1, int32(x.Status)) + } + if x.ForceMaintenance { + mm.AppendBool(2, x.ForceMaintenance) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetNetmapStatusRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetNetmapStatusRequest_Body") + } + switch fc.FieldNum { + case 1: // Status + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Status") + } + x.Status = NetmapStatus(data) + case 2: // ForceMaintenance + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ForceMaintenance") + } + x.ForceMaintenance = data + } + } + return nil +} +func (x *SetNetmapStatusRequest_Body) GetStatus() NetmapStatus { + if x != nil { + return x.Status + } + return 0 +} +func (x *SetNetmapStatusRequest_Body) SetStatus(v NetmapStatus) { + x.Status = v +} +func (x *SetNetmapStatusRequest_Body) GetForceMaintenance() bool { + if x != nil { + return x.ForceMaintenance + } + return false +} +func (x *SetNetmapStatusRequest_Body) SetForceMaintenance(v bool) { + x.ForceMaintenance = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetNetmapStatusRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetNetmapStatusRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"status\":" + out.RawString(prefix[1:]) + out.Int32(int32(x.Status)) + } + { + const prefix string = ",\"forceMaintenance\":" + out.RawString(prefix) + out.Bool(x.ForceMaintenance) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetNetmapStatusRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetNetmapStatusRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "status": + { + var f NetmapStatus + var parsedValue NetmapStatus + switch v := in.Interface().(type) { + case string: + if vv, ok := NetmapStatus_value[v]; ok { + parsedValue = NetmapStatus(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = NetmapStatus(vv) + case float64: + parsedValue = NetmapStatus(v) + } + f = parsedValue + x.Status = f + } + case "forceMaintenance": + { + var f bool + f = in.Bool() + x.ForceMaintenance = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetNetmapStatusRequest struct { + Body *SetNetmapStatusRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SetNetmapStatusRequest)(nil) + _ encoding.ProtoUnmarshaler = (*SetNetmapStatusRequest)(nil) + _ json.Marshaler = (*SetNetmapStatusRequest)(nil) + _ json.Unmarshaler = (*SetNetmapStatusRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -214,27 +873,6 @@ func (x *SetNetmapStatusRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetNetmapStatusRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -250,13 +888,163 @@ func (x *SetNetmapStatusRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SetNetmapStatusRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SetNetmapStatusRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetNetmapStatusRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetNetmapStatusRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetNetmapStatusRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetNetmapStatusRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SetNetmapStatusRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SetNetmapStatusRequest) GetBody() *SetNetmapStatusRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SetNetmapStatusRequest) SetBody(v *SetNetmapStatusRequest_Body) { + x.Body = v +} +func (x *SetNetmapStatusRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SetNetmapStatusRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetNetmapStatusRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetNetmapStatusRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetNetmapStatusRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetNetmapStatusRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SetNetmapStatusRequest_Body + f = new(SetNetmapStatusRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetNetmapStatusResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*SetNetmapStatusResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SetNetmapStatusResponse_Body)(nil) + _ json.Marshaler = (*SetNetmapStatusResponse_Body)(nil) + _ json.Unmarshaler = (*SetNetmapStatusResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -267,18 +1055,93 @@ func (x *SetNetmapStatusResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetNetmapStatusResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetNetmapStatusResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetNetmapStatusResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetNetmapStatusResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetNetmapStatusResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetNetmapStatusResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetNetmapStatusResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetNetmapStatusResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetNetmapStatusResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetNetmapStatusResponse struct { + Body *SetNetmapStatusResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SetNetmapStatusResponse)(nil) + _ encoding.ProtoUnmarshaler = (*SetNetmapStatusResponse)(nil) + _ json.Marshaler = (*SetNetmapStatusResponse)(nil) + _ json.Unmarshaler = (*SetNetmapStatusResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -291,27 +1154,6 @@ func (x *SetNetmapStatusResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetNetmapStatusResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -327,13 +1169,163 @@ func (x *SetNetmapStatusResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SetNetmapStatusResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SetNetmapStatusResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetNetmapStatusResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetNetmapStatusResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetNetmapStatusResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetNetmapStatusResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SetNetmapStatusResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SetNetmapStatusResponse) GetBody() *SetNetmapStatusResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SetNetmapStatusResponse) SetBody(v *SetNetmapStatusResponse_Body) { + x.Body = v +} +func (x *SetNetmapStatusResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SetNetmapStatusResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetNetmapStatusResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetNetmapStatusResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetNetmapStatusResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetNetmapStatusResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SetNetmapStatusResponse_Body + f = new(SetNetmapStatusResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNetmapStatusRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*GetNetmapStatusRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetNetmapStatusRequest_Body)(nil) + _ json.Marshaler = (*GetNetmapStatusRequest_Body)(nil) + _ json.Unmarshaler = (*GetNetmapStatusRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -344,18 +1336,93 @@ func (x *GetNetmapStatusRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNetmapStatusRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNetmapStatusRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNetmapStatusRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNetmapStatusRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNetmapStatusRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNetmapStatusRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNetmapStatusRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNetmapStatusRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNetmapStatusRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNetmapStatusRequest struct { + Body *GetNetmapStatusRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNetmapStatusRequest)(nil) + _ encoding.ProtoUnmarshaler = (*GetNetmapStatusRequest)(nil) + _ json.Marshaler = (*GetNetmapStatusRequest)(nil) + _ json.Unmarshaler = (*GetNetmapStatusRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -368,27 +1435,6 @@ func (x *GetNetmapStatusRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNetmapStatusRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -404,13 +1450,165 @@ func (x *GetNetmapStatusRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetNetmapStatusRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetNetmapStatusRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNetmapStatusRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNetmapStatusRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNetmapStatusRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNetmapStatusRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetNetmapStatusRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetNetmapStatusRequest) GetBody() *GetNetmapStatusRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetNetmapStatusRequest) SetBody(v *GetNetmapStatusRequest_Body) { + x.Body = v +} +func (x *GetNetmapStatusRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetNetmapStatusRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNetmapStatusRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNetmapStatusRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNetmapStatusRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNetmapStatusRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetNetmapStatusRequest_Body + f = new(GetNetmapStatusRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNetmapStatusResponse_Body struct { + Status NetmapStatus `json:"status"` + Epoch uint64 `json:"epoch"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNetmapStatusResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetNetmapStatusResponse_Body)(nil) + _ json.Marshaler = (*GetNetmapStatusResponse_Body)(nil) + _ json.Unmarshaler = (*GetNetmapStatusResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -423,27 +1621,170 @@ func (x *GetNetmapStatusResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNetmapStatusResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.EnumMarshal(1, buf[offset:], int32(x.Status)) - offset += proto.UInt64Marshal(2, buf[offset:], x.Epoch) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNetmapStatusResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNetmapStatusResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if int32(x.Status) != 0 { + mm.AppendInt32(1, int32(x.Status)) + } + if x.Epoch != 0 { + mm.AppendUint64(2, x.Epoch) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNetmapStatusResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNetmapStatusResponse_Body") + } + switch fc.FieldNum { + case 1: // Status + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Status") + } + x.Status = NetmapStatus(data) + case 2: // Epoch + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Epoch") + } + x.Epoch = data + } + } + return nil +} +func (x *GetNetmapStatusResponse_Body) GetStatus() NetmapStatus { + if x != nil { + return x.Status + } + return 0 +} +func (x *GetNetmapStatusResponse_Body) SetStatus(v NetmapStatus) { + x.Status = v +} +func (x *GetNetmapStatusResponse_Body) GetEpoch() uint64 { + if x != nil { + return x.Epoch + } + return 0 +} +func (x *GetNetmapStatusResponse_Body) SetEpoch(v uint64) { + x.Epoch = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNetmapStatusResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNetmapStatusResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"status\":" + out.RawString(prefix[1:]) + out.Int32(int32(x.Status)) + } + { + const prefix string = ",\"epoch\":" + out.RawString(prefix) + out.Uint64(x.Epoch) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNetmapStatusResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNetmapStatusResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "status": + { + var f NetmapStatus + var parsedValue NetmapStatus + switch v := in.Interface().(type) { + case string: + if vv, ok := NetmapStatus_value[v]; ok { + parsedValue = NetmapStatus(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = NetmapStatus(vv) + case float64: + parsedValue = NetmapStatus(v) + } + f = parsedValue + x.Status = f + } + case "epoch": + { + var f uint64 + f = in.Uint64() + x.Epoch = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNetmapStatusResponse struct { + Body *GetNetmapStatusResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNetmapStatusResponse)(nil) + _ encoding.ProtoUnmarshaler = (*GetNetmapStatusResponse)(nil) + _ json.Marshaler = (*GetNetmapStatusResponse)(nil) + _ json.Unmarshaler = (*GetNetmapStatusResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -456,27 +1797,6 @@ func (x *GetNetmapStatusResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNetmapStatusResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -492,13 +1812,164 @@ func (x *GetNetmapStatusResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetNetmapStatusResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetNetmapStatusResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNetmapStatusResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNetmapStatusResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNetmapStatusResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNetmapStatusResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetNetmapStatusResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetNetmapStatusResponse) GetBody() *GetNetmapStatusResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetNetmapStatusResponse) SetBody(v *GetNetmapStatusResponse_Body) { + x.Body = v +} +func (x *GetNetmapStatusResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetNetmapStatusResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNetmapStatusResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNetmapStatusResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNetmapStatusResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNetmapStatusResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetNetmapStatusResponse_Body + f = new(GetNetmapStatusResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DropObjectsRequest_Body struct { + AddressList [][]byte `json:"addressList"` +} + +var ( + _ encoding.ProtoMarshaler = (*DropObjectsRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*DropObjectsRequest_Body)(nil) + _ json.Marshaler = (*DropObjectsRequest_Body)(nil) + _ json.Unmarshaler = (*DropObjectsRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -510,26 +1981,139 @@ func (x *DropObjectsRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DropObjectsRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.AddressList) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DropObjectsRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DropObjectsRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.AddressList { + mm.AppendBytes(1, x.AddressList[j]) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DropObjectsRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DropObjectsRequest_Body") + } + switch fc.FieldNum { + case 1: // AddressList + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "AddressList") + } + x.AddressList = append(x.AddressList, data) + } + } + return nil +} +func (x *DropObjectsRequest_Body) GetAddressList() [][]byte { + if x != nil { + return x.AddressList + } + return nil +} +func (x *DropObjectsRequest_Body) SetAddressList(v [][]byte) { + x.AddressList = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DropObjectsRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DropObjectsRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"addressList\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.AddressList { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.AddressList[i]) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DropObjectsRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DropObjectsRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "addressList": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.AddressList = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DropObjectsRequest struct { + Body *DropObjectsRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*DropObjectsRequest)(nil) + _ encoding.ProtoUnmarshaler = (*DropObjectsRequest)(nil) + _ json.Marshaler = (*DropObjectsRequest)(nil) + _ json.Unmarshaler = (*DropObjectsRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -542,27 +2126,6 @@ func (x *DropObjectsRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DropObjectsRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -578,13 +2141,163 @@ func (x *DropObjectsRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *DropObjectsRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *DropObjectsRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DropObjectsRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DropObjectsRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DropObjectsRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DropObjectsRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(DropObjectsRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *DropObjectsRequest) GetBody() *DropObjectsRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *DropObjectsRequest) SetBody(v *DropObjectsRequest_Body) { + x.Body = v +} +func (x *DropObjectsRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *DropObjectsRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DropObjectsRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DropObjectsRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DropObjectsRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DropObjectsRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *DropObjectsRequest_Body + f = new(DropObjectsRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DropObjectsResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*DropObjectsResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*DropObjectsResponse_Body)(nil) + _ json.Marshaler = (*DropObjectsResponse_Body)(nil) + _ json.Unmarshaler = (*DropObjectsResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -595,18 +2308,93 @@ func (x *DropObjectsResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DropObjectsResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DropObjectsResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DropObjectsResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DropObjectsResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DropObjectsResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DropObjectsResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DropObjectsResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DropObjectsResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DropObjectsResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DropObjectsResponse struct { + Body *DropObjectsResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*DropObjectsResponse)(nil) + _ encoding.ProtoUnmarshaler = (*DropObjectsResponse)(nil) + _ json.Marshaler = (*DropObjectsResponse)(nil) + _ json.Unmarshaler = (*DropObjectsResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -619,27 +2407,6 @@ func (x *DropObjectsResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DropObjectsResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -655,13 +2422,163 @@ func (x *DropObjectsResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *DropObjectsResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *DropObjectsResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DropObjectsResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DropObjectsResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DropObjectsResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DropObjectsResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(DropObjectsResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *DropObjectsResponse) GetBody() *DropObjectsResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *DropObjectsResponse) SetBody(v *DropObjectsResponse_Body) { + x.Body = v +} +func (x *DropObjectsResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *DropObjectsResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DropObjectsResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DropObjectsResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DropObjectsResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DropObjectsResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *DropObjectsResponse_Body + f = new(DropObjectsResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListShardsRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*ListShardsRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ListShardsRequest_Body)(nil) + _ json.Marshaler = (*ListShardsRequest_Body)(nil) + _ json.Unmarshaler = (*ListShardsRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -672,18 +2589,93 @@ func (x *ListShardsRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListShardsRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListShardsRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListShardsRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListShardsRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListShardsRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListShardsRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListShardsRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListShardsRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListShardsRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListShardsRequest struct { + Body *ListShardsRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListShardsRequest)(nil) + _ encoding.ProtoUnmarshaler = (*ListShardsRequest)(nil) + _ json.Marshaler = (*ListShardsRequest)(nil) + _ json.Unmarshaler = (*ListShardsRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -696,27 +2688,6 @@ func (x *ListShardsRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListShardsRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -732,13 +2703,164 @@ func (x *ListShardsRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ListShardsRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ListShardsRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListShardsRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListShardsRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListShardsRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListShardsRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ListShardsRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListShardsRequest) GetBody() *ListShardsRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ListShardsRequest) SetBody(v *ListShardsRequest_Body) { + x.Body = v +} +func (x *ListShardsRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ListShardsRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListShardsRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListShardsRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListShardsRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListShardsRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ListShardsRequest_Body + f = new(ListShardsRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListShardsResponse_Body struct { + Shards []*ShardInfo `json:"shards"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListShardsResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ListShardsResponse_Body)(nil) + _ json.Marshaler = (*ListShardsResponse_Body)(nil) + _ json.Unmarshaler = (*ListShardsResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -752,28 +2874,146 @@ func (x *ListShardsResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListShardsResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - for i := range x.Shards { - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Shards[i]) - } - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListShardsResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListShardsResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for i := range x.Shards { + if x.Shards[i] != nil && x.Shards[i].StableSize() != 0 { + x.Shards[i].EmitProtobuf(mm.AppendMessage(1)) + } + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListShardsResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListShardsResponse_Body") + } + switch fc.FieldNum { + case 1: // Shards + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shards") + } + x.Shards = append(x.Shards, new(ShardInfo)) + ff := x.Shards[len(x.Shards)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListShardsResponse_Body) GetShards() []*ShardInfo { + if x != nil { + return x.Shards + } + return nil +} +func (x *ListShardsResponse_Body) SetShards(v []*ShardInfo) { + x.Shards = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListShardsResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListShardsResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shards\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shards { + if i != 0 { + out.RawByte(',') + } + x.Shards[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListShardsResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListShardsResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shards": + { + var f *ShardInfo + var list []*ShardInfo + in.Delim('[') + for !in.IsDelim(']') { + f = new(ShardInfo) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Shards = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListShardsResponse struct { + Body *ListShardsResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListShardsResponse)(nil) + _ encoding.ProtoUnmarshaler = (*ListShardsResponse)(nil) + _ json.Marshaler = (*ListShardsResponse)(nil) + _ json.Unmarshaler = (*ListShardsResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -786,27 +3026,6 @@ func (x *ListShardsResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListShardsResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -822,13 +3041,166 @@ func (x *ListShardsResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ListShardsResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ListShardsResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListShardsResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListShardsResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListShardsResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListShardsResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ListShardsResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListShardsResponse) GetBody() *ListShardsResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ListShardsResponse) SetBody(v *ListShardsResponse_Body) { + x.Body = v +} +func (x *ListShardsResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ListShardsResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListShardsResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListShardsResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListShardsResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListShardsResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ListShardsResponse_Body + f = new(ListShardsResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetShardModeRequest_Body struct { + Shard_ID [][]byte `json:"shardID"` + Mode ShardMode `json:"mode"` + ResetErrorCounter bool `json:"resetErrorCounter"` +} + +var ( + _ encoding.ProtoMarshaler = (*SetShardModeRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SetShardModeRequest_Body)(nil) + _ json.Marshaler = (*SetShardModeRequest_Body)(nil) + _ json.Unmarshaler = (*SetShardModeRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -842,28 +3214,213 @@ func (x *SetShardModeRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetShardModeRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.EnumMarshal(2, buf[offset:], int32(x.Mode)) - offset += proto.BoolMarshal(3, buf[offset:], x.ResetErrorCounter) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetShardModeRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetShardModeRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Shard_ID { + mm.AppendBytes(1, x.Shard_ID[j]) + } + if int32(x.Mode) != 0 { + mm.AppendInt32(2, int32(x.Mode)) + } + if x.ResetErrorCounter { + mm.AppendBool(3, x.ResetErrorCounter) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetShardModeRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetShardModeRequest_Body") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + case 2: // Mode + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Mode") + } + x.Mode = ShardMode(data) + case 3: // ResetErrorCounter + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ResetErrorCounter") + } + x.ResetErrorCounter = data + } + } + return nil +} +func (x *SetShardModeRequest_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *SetShardModeRequest_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} +func (x *SetShardModeRequest_Body) GetMode() ShardMode { + if x != nil { + return x.Mode + } + return 0 +} +func (x *SetShardModeRequest_Body) SetMode(v ShardMode) { + x.Mode = v +} +func (x *SetShardModeRequest_Body) GetResetErrorCounter() bool { + if x != nil { + return x.ResetErrorCounter + } + return false +} +func (x *SetShardModeRequest_Body) SetResetErrorCounter(v bool) { + x.ResetErrorCounter = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetShardModeRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetShardModeRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"mode\":" + out.RawString(prefix) + out.Int32(int32(x.Mode)) + } + { + const prefix string = ",\"resetErrorCounter\":" + out.RawString(prefix) + out.Bool(x.ResetErrorCounter) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetShardModeRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetShardModeRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + case "mode": + { + var f ShardMode + var parsedValue ShardMode + switch v := in.Interface().(type) { + case string: + if vv, ok := ShardMode_value[v]; ok { + parsedValue = ShardMode(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = ShardMode(vv) + case float64: + parsedValue = ShardMode(v) + } + f = parsedValue + x.Mode = f + } + case "resetErrorCounter": + { + var f bool + f = in.Bool() + x.ResetErrorCounter = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetShardModeRequest struct { + Body *SetShardModeRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SetShardModeRequest)(nil) + _ encoding.ProtoUnmarshaler = (*SetShardModeRequest)(nil) + _ json.Marshaler = (*SetShardModeRequest)(nil) + _ json.Unmarshaler = (*SetShardModeRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -876,27 +3433,6 @@ func (x *SetShardModeRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetShardModeRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -912,13 +3448,163 @@ func (x *SetShardModeRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SetShardModeRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SetShardModeRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetShardModeRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetShardModeRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetShardModeRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetShardModeRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SetShardModeRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SetShardModeRequest) GetBody() *SetShardModeRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SetShardModeRequest) SetBody(v *SetShardModeRequest_Body) { + x.Body = v +} +func (x *SetShardModeRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SetShardModeRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetShardModeRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetShardModeRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetShardModeRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetShardModeRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SetShardModeRequest_Body + f = new(SetShardModeRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetShardModeResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*SetShardModeResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SetShardModeResponse_Body)(nil) + _ json.Marshaler = (*SetShardModeResponse_Body)(nil) + _ json.Unmarshaler = (*SetShardModeResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -929,18 +3615,93 @@ func (x *SetShardModeResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetShardModeResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetShardModeResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetShardModeResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetShardModeResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetShardModeResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetShardModeResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetShardModeResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetShardModeResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetShardModeResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SetShardModeResponse struct { + Body *SetShardModeResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SetShardModeResponse)(nil) + _ encoding.ProtoUnmarshaler = (*SetShardModeResponse)(nil) + _ json.Marshaler = (*SetShardModeResponse)(nil) + _ json.Unmarshaler = (*SetShardModeResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -953,27 +3714,6 @@ func (x *SetShardModeResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SetShardModeResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -989,13 +3729,166 @@ func (x *SetShardModeResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SetShardModeResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SetShardModeResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SetShardModeResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SetShardModeResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SetShardModeResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SetShardModeResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SetShardModeResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SetShardModeResponse) GetBody() *SetShardModeResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SetShardModeResponse) SetBody(v *SetShardModeResponse_Body) { + x.Body = v +} +func (x *SetShardModeResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SetShardModeResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SetShardModeResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SetShardModeResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SetShardModeResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SetShardModeResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SetShardModeResponse_Body + f = new(SetShardModeResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SynchronizeTreeRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + Height uint64 `json:"height"` +} + +var ( + _ encoding.ProtoMarshaler = (*SynchronizeTreeRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SynchronizeTreeRequest_Body)(nil) + _ json.Marshaler = (*SynchronizeTreeRequest_Body)(nil) + _ json.Unmarshaler = (*SynchronizeTreeRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1009,28 +3902,183 @@ func (x *SynchronizeTreeRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SynchronizeTreeRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.UInt64Marshal(3, buf[offset:], x.Height) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SynchronizeTreeRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SynchronizeTreeRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if x.Height != 0 { + mm.AppendUint64(3, x.Height) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SynchronizeTreeRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SynchronizeTreeRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // Height + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Height") + } + x.Height = data + } + } + return nil +} +func (x *SynchronizeTreeRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *SynchronizeTreeRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *SynchronizeTreeRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *SynchronizeTreeRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *SynchronizeTreeRequest_Body) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} +func (x *SynchronizeTreeRequest_Body) SetHeight(v uint64) { + x.Height = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SynchronizeTreeRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SynchronizeTreeRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"height\":" + out.RawString(prefix) + out.Uint64(x.Height) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SynchronizeTreeRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SynchronizeTreeRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "height": + { + var f uint64 + f = in.Uint64() + x.Height = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SynchronizeTreeRequest struct { + Body *SynchronizeTreeRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SynchronizeTreeRequest)(nil) + _ encoding.ProtoUnmarshaler = (*SynchronizeTreeRequest)(nil) + _ json.Marshaler = (*SynchronizeTreeRequest)(nil) + _ json.Unmarshaler = (*SynchronizeTreeRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1043,27 +4091,6 @@ func (x *SynchronizeTreeRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SynchronizeTreeRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1079,13 +4106,163 @@ func (x *SynchronizeTreeRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SynchronizeTreeRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SynchronizeTreeRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SynchronizeTreeRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SynchronizeTreeRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SynchronizeTreeRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SynchronizeTreeRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SynchronizeTreeRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SynchronizeTreeRequest) GetBody() *SynchronizeTreeRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SynchronizeTreeRequest) SetBody(v *SynchronizeTreeRequest_Body) { + x.Body = v +} +func (x *SynchronizeTreeRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SynchronizeTreeRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SynchronizeTreeRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SynchronizeTreeRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SynchronizeTreeRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SynchronizeTreeRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SynchronizeTreeRequest_Body + f = new(SynchronizeTreeRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SynchronizeTreeResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*SynchronizeTreeResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SynchronizeTreeResponse_Body)(nil) + _ json.Marshaler = (*SynchronizeTreeResponse_Body)(nil) + _ json.Unmarshaler = (*SynchronizeTreeResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1096,18 +4273,93 @@ func (x *SynchronizeTreeResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SynchronizeTreeResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SynchronizeTreeResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SynchronizeTreeResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SynchronizeTreeResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SynchronizeTreeResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SynchronizeTreeResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SynchronizeTreeResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SynchronizeTreeResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SynchronizeTreeResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SynchronizeTreeResponse struct { + Body *SynchronizeTreeResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SynchronizeTreeResponse)(nil) + _ encoding.ProtoUnmarshaler = (*SynchronizeTreeResponse)(nil) + _ json.Marshaler = (*SynchronizeTreeResponse)(nil) + _ json.Unmarshaler = (*SynchronizeTreeResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1120,27 +4372,6 @@ func (x *SynchronizeTreeResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SynchronizeTreeResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1156,13 +4387,165 @@ func (x *SynchronizeTreeResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SynchronizeTreeResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SynchronizeTreeResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SynchronizeTreeResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SynchronizeTreeResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SynchronizeTreeResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SynchronizeTreeResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SynchronizeTreeResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SynchronizeTreeResponse) GetBody() *SynchronizeTreeResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SynchronizeTreeResponse) SetBody(v *SynchronizeTreeResponse_Body) { + x.Body = v +} +func (x *SynchronizeTreeResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SynchronizeTreeResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SynchronizeTreeResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SynchronizeTreeResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SynchronizeTreeResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SynchronizeTreeResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SynchronizeTreeResponse_Body + f = new(SynchronizeTreeResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type EvacuateShardRequest_Body struct { + Shard_ID [][]byte `json:"shardID"` + IgnoreErrors bool `json:"ignoreErrors"` +} + +var ( + _ encoding.ProtoMarshaler = (*EvacuateShardRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*EvacuateShardRequest_Body)(nil) + _ json.Marshaler = (*EvacuateShardRequest_Body)(nil) + _ json.Unmarshaler = (*EvacuateShardRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1175,27 +4558,168 @@ func (x *EvacuateShardRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *EvacuateShardRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.BoolMarshal(2, buf[offset:], x.IgnoreErrors) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *EvacuateShardRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *EvacuateShardRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Shard_ID { + mm.AppendBytes(1, x.Shard_ID[j]) + } + if x.IgnoreErrors { + mm.AppendBool(2, x.IgnoreErrors) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *EvacuateShardRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "EvacuateShardRequest_Body") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + case 2: // IgnoreErrors + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "IgnoreErrors") + } + x.IgnoreErrors = data + } + } + return nil +} +func (x *EvacuateShardRequest_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *EvacuateShardRequest_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} +func (x *EvacuateShardRequest_Body) GetIgnoreErrors() bool { + if x != nil { + return x.IgnoreErrors + } + return false +} +func (x *EvacuateShardRequest_Body) SetIgnoreErrors(v bool) { + x.IgnoreErrors = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *EvacuateShardRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *EvacuateShardRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"ignoreErrors\":" + out.RawString(prefix) + out.Bool(x.IgnoreErrors) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *EvacuateShardRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *EvacuateShardRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + case "ignoreErrors": + { + var f bool + f = in.Bool() + x.IgnoreErrors = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type EvacuateShardRequest struct { + Body *EvacuateShardRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*EvacuateShardRequest)(nil) + _ encoding.ProtoUnmarshaler = (*EvacuateShardRequest)(nil) + _ json.Marshaler = (*EvacuateShardRequest)(nil) + _ json.Unmarshaler = (*EvacuateShardRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1208,27 +4732,6 @@ func (x *EvacuateShardRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *EvacuateShardRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1244,13 +4747,164 @@ func (x *EvacuateShardRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *EvacuateShardRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *EvacuateShardRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *EvacuateShardRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *EvacuateShardRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *EvacuateShardRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "EvacuateShardRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(EvacuateShardRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *EvacuateShardRequest) GetBody() *EvacuateShardRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *EvacuateShardRequest) SetBody(v *EvacuateShardRequest_Body) { + x.Body = v +} +func (x *EvacuateShardRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *EvacuateShardRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *EvacuateShardRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *EvacuateShardRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *EvacuateShardRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *EvacuateShardRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *EvacuateShardRequest_Body + f = new(EvacuateShardRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type EvacuateShardResponse_Body struct { + Count uint32 `json:"count"` +} + +var ( + _ encoding.ProtoMarshaler = (*EvacuateShardResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*EvacuateShardResponse_Body)(nil) + _ json.Marshaler = (*EvacuateShardResponse_Body)(nil) + _ json.Unmarshaler = (*EvacuateShardResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1262,26 +4916,125 @@ func (x *EvacuateShardResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *EvacuateShardResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt32Marshal(1, buf[offset:], x.Count) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *EvacuateShardResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *EvacuateShardResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Count != 0 { + mm.AppendUint32(1, x.Count) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *EvacuateShardResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "EvacuateShardResponse_Body") + } + switch fc.FieldNum { + case 1: // Count + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Count") + } + x.Count = data + } + } + return nil +} +func (x *EvacuateShardResponse_Body) GetCount() uint32 { + if x != nil { + return x.Count + } + return 0 +} +func (x *EvacuateShardResponse_Body) SetCount(v uint32) { + x.Count = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *EvacuateShardResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *EvacuateShardResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"count\":" + out.RawString(prefix[1:]) + out.Uint32(x.Count) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *EvacuateShardResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *EvacuateShardResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "count": + { + var f uint32 + f = in.Uint32() + x.Count = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type EvacuateShardResponse struct { + Body *EvacuateShardResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*EvacuateShardResponse)(nil) + _ encoding.ProtoUnmarshaler = (*EvacuateShardResponse)(nil) + _ json.Marshaler = (*EvacuateShardResponse)(nil) + _ json.Unmarshaler = (*EvacuateShardResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1294,27 +5047,6 @@ func (x *EvacuateShardResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *EvacuateShardResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1330,13 +5062,165 @@ func (x *EvacuateShardResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *EvacuateShardResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *EvacuateShardResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *EvacuateShardResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *EvacuateShardResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *EvacuateShardResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "EvacuateShardResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(EvacuateShardResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *EvacuateShardResponse) GetBody() *EvacuateShardResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *EvacuateShardResponse) SetBody(v *EvacuateShardResponse_Body) { + x.Body = v +} +func (x *EvacuateShardResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *EvacuateShardResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *EvacuateShardResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *EvacuateShardResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *EvacuateShardResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *EvacuateShardResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *EvacuateShardResponse_Body + f = new(EvacuateShardResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type FlushCacheRequest_Body struct { + Shard_ID [][]byte `json:"shardID"` + Seal bool `json:"seal"` +} + +var ( + _ encoding.ProtoMarshaler = (*FlushCacheRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*FlushCacheRequest_Body)(nil) + _ json.Marshaler = (*FlushCacheRequest_Body)(nil) + _ json.Unmarshaler = (*FlushCacheRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1349,27 +5233,168 @@ func (x *FlushCacheRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *FlushCacheRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.BoolMarshal(2, buf[offset:], x.Seal) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *FlushCacheRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *FlushCacheRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Shard_ID { + mm.AppendBytes(1, x.Shard_ID[j]) + } + if x.Seal { + mm.AppendBool(2, x.Seal) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *FlushCacheRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "FlushCacheRequest_Body") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + case 2: // Seal + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Seal") + } + x.Seal = data + } + } + return nil +} +func (x *FlushCacheRequest_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *FlushCacheRequest_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} +func (x *FlushCacheRequest_Body) GetSeal() bool { + if x != nil { + return x.Seal + } + return false +} +func (x *FlushCacheRequest_Body) SetSeal(v bool) { + x.Seal = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *FlushCacheRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *FlushCacheRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"seal\":" + out.RawString(prefix) + out.Bool(x.Seal) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *FlushCacheRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *FlushCacheRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + case "seal": + { + var f bool + f = in.Bool() + x.Seal = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type FlushCacheRequest struct { + Body *FlushCacheRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*FlushCacheRequest)(nil) + _ encoding.ProtoUnmarshaler = (*FlushCacheRequest)(nil) + _ json.Marshaler = (*FlushCacheRequest)(nil) + _ json.Unmarshaler = (*FlushCacheRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1382,27 +5407,6 @@ func (x *FlushCacheRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *FlushCacheRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1418,13 +5422,163 @@ func (x *FlushCacheRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *FlushCacheRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *FlushCacheRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *FlushCacheRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *FlushCacheRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *FlushCacheRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "FlushCacheRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(FlushCacheRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *FlushCacheRequest) GetBody() *FlushCacheRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *FlushCacheRequest) SetBody(v *FlushCacheRequest_Body) { + x.Body = v +} +func (x *FlushCacheRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *FlushCacheRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *FlushCacheRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *FlushCacheRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *FlushCacheRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *FlushCacheRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *FlushCacheRequest_Body + f = new(FlushCacheRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type FlushCacheResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*FlushCacheResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*FlushCacheResponse_Body)(nil) + _ json.Marshaler = (*FlushCacheResponse_Body)(nil) + _ json.Unmarshaler = (*FlushCacheResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1435,18 +5589,93 @@ func (x *FlushCacheResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *FlushCacheResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *FlushCacheResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *FlushCacheResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *FlushCacheResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "FlushCacheResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *FlushCacheResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *FlushCacheResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *FlushCacheResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *FlushCacheResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type FlushCacheResponse struct { + Body *FlushCacheResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*FlushCacheResponse)(nil) + _ encoding.ProtoUnmarshaler = (*FlushCacheResponse)(nil) + _ json.Marshaler = (*FlushCacheResponse)(nil) + _ json.Unmarshaler = (*FlushCacheResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1459,27 +5688,6 @@ func (x *FlushCacheResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *FlushCacheResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1495,13 +5703,165 @@ func (x *FlushCacheResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *FlushCacheResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *FlushCacheResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *FlushCacheResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *FlushCacheResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *FlushCacheResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "FlushCacheResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(FlushCacheResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *FlushCacheResponse) GetBody() *FlushCacheResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *FlushCacheResponse) SetBody(v *FlushCacheResponse_Body) { + x.Body = v +} +func (x *FlushCacheResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *FlushCacheResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *FlushCacheResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *FlushCacheResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *FlushCacheResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *FlushCacheResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *FlushCacheResponse_Body + f = new(FlushCacheResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DoctorRequest_Body struct { + Concurrency uint32 `json:"concurrency"` + RemoveDuplicates bool `json:"removeDuplicates"` +} + +var ( + _ encoding.ProtoMarshaler = (*DoctorRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*DoctorRequest_Body)(nil) + _ json.Marshaler = (*DoctorRequest_Body)(nil) + _ json.Unmarshaler = (*DoctorRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1514,27 +5874,154 @@ func (x *DoctorRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DoctorRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt32Marshal(1, buf[offset:], x.Concurrency) - offset += proto.BoolMarshal(2, buf[offset:], x.RemoveDuplicates) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DoctorRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DoctorRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Concurrency != 0 { + mm.AppendUint32(1, x.Concurrency) + } + if x.RemoveDuplicates { + mm.AppendBool(2, x.RemoveDuplicates) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DoctorRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DoctorRequest_Body") + } + switch fc.FieldNum { + case 1: // Concurrency + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Concurrency") + } + x.Concurrency = data + case 2: // RemoveDuplicates + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "RemoveDuplicates") + } + x.RemoveDuplicates = data + } + } + return nil +} +func (x *DoctorRequest_Body) GetConcurrency() uint32 { + if x != nil { + return x.Concurrency + } + return 0 +} +func (x *DoctorRequest_Body) SetConcurrency(v uint32) { + x.Concurrency = v +} +func (x *DoctorRequest_Body) GetRemoveDuplicates() bool { + if x != nil { + return x.RemoveDuplicates + } + return false +} +func (x *DoctorRequest_Body) SetRemoveDuplicates(v bool) { + x.RemoveDuplicates = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DoctorRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DoctorRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"concurrency\":" + out.RawString(prefix[1:]) + out.Uint32(x.Concurrency) + } + { + const prefix string = ",\"removeDuplicates\":" + out.RawString(prefix) + out.Bool(x.RemoveDuplicates) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DoctorRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DoctorRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "concurrency": + { + var f uint32 + f = in.Uint32() + x.Concurrency = f + } + case "removeDuplicates": + { + var f bool + f = in.Bool() + x.RemoveDuplicates = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DoctorRequest struct { + Body *DoctorRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*DoctorRequest)(nil) + _ encoding.ProtoUnmarshaler = (*DoctorRequest)(nil) + _ json.Marshaler = (*DoctorRequest)(nil) + _ json.Unmarshaler = (*DoctorRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1547,27 +6034,6 @@ func (x *DoctorRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DoctorRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1583,13 +6049,163 @@ func (x *DoctorRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *DoctorRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *DoctorRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DoctorRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DoctorRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DoctorRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DoctorRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(DoctorRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *DoctorRequest) GetBody() *DoctorRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *DoctorRequest) SetBody(v *DoctorRequest_Body) { + x.Body = v +} +func (x *DoctorRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *DoctorRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DoctorRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DoctorRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DoctorRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DoctorRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *DoctorRequest_Body + f = new(DoctorRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DoctorResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*DoctorResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*DoctorResponse_Body)(nil) + _ json.Marshaler = (*DoctorResponse_Body)(nil) + _ json.Unmarshaler = (*DoctorResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1600,18 +6216,93 @@ func (x *DoctorResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DoctorResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DoctorResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DoctorResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DoctorResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DoctorResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DoctorResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DoctorResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DoctorResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DoctorResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DoctorResponse struct { + Body *DoctorResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*DoctorResponse)(nil) + _ encoding.ProtoUnmarshaler = (*DoctorResponse)(nil) + _ json.Marshaler = (*DoctorResponse)(nil) + _ json.Unmarshaler = (*DoctorResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1624,27 +6315,6 @@ func (x *DoctorResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DoctorResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1660,13 +6330,201 @@ func (x *DoctorResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *DoctorResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *DoctorResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DoctorResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DoctorResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DoctorResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DoctorResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(DoctorResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *DoctorResponse) GetBody() *DoctorResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *DoctorResponse) SetBody(v *DoctorResponse_Body) { + x.Body = v +} +func (x *DoctorResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *DoctorResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DoctorResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DoctorResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DoctorResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DoctorResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *DoctorResponse_Body + f = new(DoctorResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StartShardEvacuationRequest_Body_Scope int32 + +const ( + StartShardEvacuationRequest_Body_NONE StartShardEvacuationRequest_Body_Scope = 0 + StartShardEvacuationRequest_Body_OBJECTS StartShardEvacuationRequest_Body_Scope = 1 + StartShardEvacuationRequest_Body_TREES StartShardEvacuationRequest_Body_Scope = 2 +) + +var ( + StartShardEvacuationRequest_Body_Scope_name = map[int32]string{ + 0: "NONE", + 1: "OBJECTS", + 2: "TREES", + } + StartShardEvacuationRequest_Body_Scope_value = map[string]int32{ + "NONE": 0, + "OBJECTS": 1, + "TREES": 2, + } +) + +func (x StartShardEvacuationRequest_Body_Scope) String() string { + if v, ok := StartShardEvacuationRequest_Body_Scope_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *StartShardEvacuationRequest_Body_Scope) FromString(s string) bool { + if v, ok := StartShardEvacuationRequest_Body_Scope_value[s]; ok { + *x = StartShardEvacuationRequest_Body_Scope(v) + return true + } + return false +} + +type StartShardEvacuationRequest_Body struct { + Shard_ID [][]byte `json:"shardID"` + IgnoreErrors bool `json:"ignoreErrors"` + Scope uint32 `json:"scope"` +} + +var ( + _ encoding.ProtoMarshaler = (*StartShardEvacuationRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*StartShardEvacuationRequest_Body)(nil) + _ json.Marshaler = (*StartShardEvacuationRequest_Body)(nil) + _ json.Unmarshaler = (*StartShardEvacuationRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1680,28 +6538,197 @@ func (x *StartShardEvacuationRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StartShardEvacuationRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.BoolMarshal(2, buf[offset:], x.IgnoreErrors) - offset += proto.UInt32Marshal(3, buf[offset:], x.Scope) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StartShardEvacuationRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StartShardEvacuationRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Shard_ID { + mm.AppendBytes(1, x.Shard_ID[j]) + } + if x.IgnoreErrors { + mm.AppendBool(2, x.IgnoreErrors) + } + if x.Scope != 0 { + mm.AppendUint32(3, x.Scope) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StartShardEvacuationRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StartShardEvacuationRequest_Body") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + case 2: // IgnoreErrors + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "IgnoreErrors") + } + x.IgnoreErrors = data + case 3: // Scope + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Scope") + } + x.Scope = data + } + } + return nil +} +func (x *StartShardEvacuationRequest_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *StartShardEvacuationRequest_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} +func (x *StartShardEvacuationRequest_Body) GetIgnoreErrors() bool { + if x != nil { + return x.IgnoreErrors + } + return false +} +func (x *StartShardEvacuationRequest_Body) SetIgnoreErrors(v bool) { + x.IgnoreErrors = v +} +func (x *StartShardEvacuationRequest_Body) GetScope() uint32 { + if x != nil { + return x.Scope + } + return 0 +} +func (x *StartShardEvacuationRequest_Body) SetScope(v uint32) { + x.Scope = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StartShardEvacuationRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StartShardEvacuationRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"ignoreErrors\":" + out.RawString(prefix) + out.Bool(x.IgnoreErrors) + } + { + const prefix string = ",\"scope\":" + out.RawString(prefix) + out.Uint32(x.Scope) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StartShardEvacuationRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StartShardEvacuationRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + case "ignoreErrors": + { + var f bool + f = in.Bool() + x.IgnoreErrors = f + } + case "scope": + { + var f uint32 + f = in.Uint32() + x.Scope = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StartShardEvacuationRequest struct { + Body *StartShardEvacuationRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*StartShardEvacuationRequest)(nil) + _ encoding.ProtoUnmarshaler = (*StartShardEvacuationRequest)(nil) + _ json.Marshaler = (*StartShardEvacuationRequest)(nil) + _ json.Unmarshaler = (*StartShardEvacuationRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1714,27 +6741,6 @@ func (x *StartShardEvacuationRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StartShardEvacuationRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1750,13 +6756,163 @@ func (x *StartShardEvacuationRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *StartShardEvacuationRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *StartShardEvacuationRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StartShardEvacuationRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StartShardEvacuationRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StartShardEvacuationRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StartShardEvacuationRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(StartShardEvacuationRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *StartShardEvacuationRequest) GetBody() *StartShardEvacuationRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *StartShardEvacuationRequest) SetBody(v *StartShardEvacuationRequest_Body) { + x.Body = v +} +func (x *StartShardEvacuationRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *StartShardEvacuationRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StartShardEvacuationRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StartShardEvacuationRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StartShardEvacuationRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StartShardEvacuationRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *StartShardEvacuationRequest_Body + f = new(StartShardEvacuationRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StartShardEvacuationResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*StartShardEvacuationResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*StartShardEvacuationResponse_Body)(nil) + _ json.Marshaler = (*StartShardEvacuationResponse_Body)(nil) + _ json.Unmarshaler = (*StartShardEvacuationResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1767,18 +6923,93 @@ func (x *StartShardEvacuationResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StartShardEvacuationResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StartShardEvacuationResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StartShardEvacuationResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StartShardEvacuationResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StartShardEvacuationResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StartShardEvacuationResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StartShardEvacuationResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StartShardEvacuationResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StartShardEvacuationResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StartShardEvacuationResponse struct { + Body *StartShardEvacuationResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*StartShardEvacuationResponse)(nil) + _ encoding.ProtoUnmarshaler = (*StartShardEvacuationResponse)(nil) + _ json.Marshaler = (*StartShardEvacuationResponse)(nil) + _ json.Unmarshaler = (*StartShardEvacuationResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1791,27 +7022,6 @@ func (x *StartShardEvacuationResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StartShardEvacuationResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1827,13 +7037,163 @@ func (x *StartShardEvacuationResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *StartShardEvacuationResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *StartShardEvacuationResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StartShardEvacuationResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StartShardEvacuationResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StartShardEvacuationResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StartShardEvacuationResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(StartShardEvacuationResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *StartShardEvacuationResponse) GetBody() *StartShardEvacuationResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *StartShardEvacuationResponse) SetBody(v *StartShardEvacuationResponse_Body) { + x.Body = v +} +func (x *StartShardEvacuationResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *StartShardEvacuationResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StartShardEvacuationResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StartShardEvacuationResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StartShardEvacuationResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StartShardEvacuationResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *StartShardEvacuationResponse_Body + f = new(StartShardEvacuationResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetShardEvacuationStatusRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*GetShardEvacuationStatusRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetShardEvacuationStatusRequest_Body)(nil) + _ json.Marshaler = (*GetShardEvacuationStatusRequest_Body)(nil) + _ json.Unmarshaler = (*GetShardEvacuationStatusRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1844,18 +7204,93 @@ func (x *GetShardEvacuationStatusRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetShardEvacuationStatusRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetShardEvacuationStatusRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetShardEvacuationStatusRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetShardEvacuationStatusRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetShardEvacuationStatusRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetShardEvacuationStatusRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetShardEvacuationStatusRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetShardEvacuationStatusRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetShardEvacuationStatusRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetShardEvacuationStatusRequest struct { + Body *GetShardEvacuationStatusRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetShardEvacuationStatusRequest)(nil) + _ encoding.ProtoUnmarshaler = (*GetShardEvacuationStatusRequest)(nil) + _ json.Marshaler = (*GetShardEvacuationStatusRequest)(nil) + _ json.Unmarshaler = (*GetShardEvacuationStatusRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1868,27 +7303,6 @@ func (x *GetShardEvacuationStatusRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetShardEvacuationStatusRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1904,13 +7318,199 @@ func (x *GetShardEvacuationStatusRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetShardEvacuationStatusRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetShardEvacuationStatusRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetShardEvacuationStatusRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetShardEvacuationStatusRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetShardEvacuationStatusRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetShardEvacuationStatusRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetShardEvacuationStatusRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetShardEvacuationStatusRequest) GetBody() *GetShardEvacuationStatusRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetShardEvacuationStatusRequest) SetBody(v *GetShardEvacuationStatusRequest_Body) { + x.Body = v +} +func (x *GetShardEvacuationStatusRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetShardEvacuationStatusRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetShardEvacuationStatusRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetShardEvacuationStatusRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetShardEvacuationStatusRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetShardEvacuationStatusRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetShardEvacuationStatusRequest_Body + f = new(GetShardEvacuationStatusRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetShardEvacuationStatusResponse_Body_Status int32 + +const ( + GetShardEvacuationStatusResponse_Body_EVACUATE_SHARD_STATUS_UNDEFINED GetShardEvacuationStatusResponse_Body_Status = 0 + GetShardEvacuationStatusResponse_Body_RUNNING GetShardEvacuationStatusResponse_Body_Status = 1 + GetShardEvacuationStatusResponse_Body_COMPLETED GetShardEvacuationStatusResponse_Body_Status = 2 +) + +var ( + GetShardEvacuationStatusResponse_Body_Status_name = map[int32]string{ + 0: "EVACUATE_SHARD_STATUS_UNDEFINED", + 1: "RUNNING", + 2: "COMPLETED", + } + GetShardEvacuationStatusResponse_Body_Status_value = map[string]int32{ + "EVACUATE_SHARD_STATUS_UNDEFINED": 0, + "RUNNING": 1, + "COMPLETED": 2, + } +) + +func (x GetShardEvacuationStatusResponse_Body_Status) String() string { + if v, ok := GetShardEvacuationStatusResponse_Body_Status_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *GetShardEvacuationStatusResponse_Body_Status) FromString(s string) bool { + if v, ok := GetShardEvacuationStatusResponse_Body_Status_value[s]; ok { + *x = GetShardEvacuationStatusResponse_Body_Status(v) + return true + } + return false +} + +type GetShardEvacuationStatusResponse_Body_UnixTimestamp struct { + Value int64 `json:"value"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetShardEvacuationStatusResponse_Body_UnixTimestamp)(nil) + _ encoding.ProtoUnmarshaler = (*GetShardEvacuationStatusResponse_Body_UnixTimestamp)(nil) + _ json.Marshaler = (*GetShardEvacuationStatusResponse_Body_UnixTimestamp)(nil) + _ json.Unmarshaler = (*GetShardEvacuationStatusResponse_Body_UnixTimestamp)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1922,26 +7522,124 @@ func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) StableSize() (size return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.Int64Marshal(1, buf[offset:], x.Value) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Value != 0 { + mm.AppendInt64(1, x.Value) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetShardEvacuationStatusResponse_Body_UnixTimestamp") + } + switch fc.FieldNum { + case 1: // Value + data, ok := fc.Int64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Value") + } + x.Value = data + } + } + return nil +} +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) SetValue(v int64) { + x.Value = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"value\":" + out.RawString(prefix[1:]) + out.Int64(x.Value) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "value": + { + var f int64 + f = in.Int64() + x.Value = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetShardEvacuationStatusResponse_Body_Duration struct { + Seconds int64 `json:"seconds"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetShardEvacuationStatusResponse_Body_Duration)(nil) + _ encoding.ProtoUnmarshaler = (*GetShardEvacuationStatusResponse_Body_Duration)(nil) + _ json.Marshaler = (*GetShardEvacuationStatusResponse_Body_Duration)(nil) + _ json.Unmarshaler = (*GetShardEvacuationStatusResponse_Body_Duration)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1953,26 +7651,135 @@ func (x *GetShardEvacuationStatusResponse_Body_Duration) StableSize() (size int) return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetShardEvacuationStatusResponse_Body_Duration) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.Int64Marshal(1, buf[offset:], x.Seconds) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_Duration) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetShardEvacuationStatusResponse_Body_Duration) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Seconds != 0 { + mm.AppendInt64(1, x.Seconds) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_Duration) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetShardEvacuationStatusResponse_Body_Duration") + } + switch fc.FieldNum { + case 1: // Seconds + data, ok := fc.Int64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Seconds") + } + x.Seconds = data + } + } + return nil +} +func (x *GetShardEvacuationStatusResponse_Body_Duration) GetSeconds() int64 { + if x != nil { + return x.Seconds + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body_Duration) SetSeconds(v int64) { + x.Seconds = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_Duration) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetShardEvacuationStatusResponse_Body_Duration) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"seconds\":" + out.RawString(prefix[1:]) + out.Int64(x.Seconds) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body_Duration) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetShardEvacuationStatusResponse_Body_Duration) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "seconds": + { + var f int64 + f = in.Int64() + x.Seconds = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetShardEvacuationStatusResponse_Body struct { + TotalObjects uint64 `json:"totalObjects"` + EvacuatedObjects uint64 `json:"evacuatedObjects"` + FailedObjects uint64 `json:"failedObjects"` + Shard_ID [][]byte `json:"shardID"` + Status GetShardEvacuationStatusResponse_Body_Status `json:"status"` + Duration *GetShardEvacuationStatusResponse_Body_Duration `json:"duration"` + StartedAt *GetShardEvacuationStatusResponse_Body_UnixTimestamp `json:"startedAt"` + ErrorMessage string `json:"errorMessage"` + SkippedObjects uint64 `json:"skippedObjects"` + TotalTrees uint64 `json:"totalTrees"` + EvacuatedTrees uint64 `json:"evacuatedTrees"` + FailedTrees uint64 `json:"failedTrees"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetShardEvacuationStatusResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetShardEvacuationStatusResponse_Body)(nil) + _ json.Marshaler = (*GetShardEvacuationStatusResponse_Body)(nil) + _ json.Unmarshaler = (*GetShardEvacuationStatusResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1995,37 +7802,482 @@ func (x *GetShardEvacuationStatusResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetShardEvacuationStatusResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt64Marshal(1, buf[offset:], x.TotalObjects) - offset += proto.UInt64Marshal(2, buf[offset:], x.EvacuatedObjects) - offset += proto.UInt64Marshal(3, buf[offset:], x.FailedObjects) - offset += proto.RepeatedBytesMarshal(4, buf[offset:], x.Shard_ID) - offset += proto.EnumMarshal(5, buf[offset:], int32(x.Status)) - offset += proto.NestedStructureMarshal(6, buf[offset:], x.Duration) - offset += proto.NestedStructureMarshal(7, buf[offset:], x.StartedAt) - offset += proto.StringMarshal(8, buf[offset:], x.ErrorMessage) - offset += proto.UInt64Marshal(9, buf[offset:], x.SkippedObjects) - offset += proto.UInt64Marshal(10, buf[offset:], x.TotalTrees) - offset += proto.UInt64Marshal(11, buf[offset:], x.EvacuatedTrees) - offset += proto.UInt64Marshal(12, buf[offset:], x.FailedTrees) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetShardEvacuationStatusResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.TotalObjects != 0 { + mm.AppendUint64(1, x.TotalObjects) + } + if x.EvacuatedObjects != 0 { + mm.AppendUint64(2, x.EvacuatedObjects) + } + if x.FailedObjects != 0 { + mm.AppendUint64(3, x.FailedObjects) + } + for j := range x.Shard_ID { + mm.AppendBytes(4, x.Shard_ID[j]) + } + if int32(x.Status) != 0 { + mm.AppendInt32(5, int32(x.Status)) + } + if x.Duration != nil && x.Duration.StableSize() != 0 { + x.Duration.EmitProtobuf(mm.AppendMessage(6)) + } + if x.StartedAt != nil && x.StartedAt.StableSize() != 0 { + x.StartedAt.EmitProtobuf(mm.AppendMessage(7)) + } + if len(x.ErrorMessage) != 0 { + mm.AppendString(8, x.ErrorMessage) + } + if x.SkippedObjects != 0 { + mm.AppendUint64(9, x.SkippedObjects) + } + if x.TotalTrees != 0 { + mm.AppendUint64(10, x.TotalTrees) + } + if x.EvacuatedTrees != 0 { + mm.AppendUint64(11, x.EvacuatedTrees) + } + if x.FailedTrees != 0 { + mm.AppendUint64(12, x.FailedTrees) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetShardEvacuationStatusResponse_Body") + } + switch fc.FieldNum { + case 1: // TotalObjects + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TotalObjects") + } + x.TotalObjects = data + case 2: // EvacuatedObjects + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "EvacuatedObjects") + } + x.EvacuatedObjects = data + case 3: // FailedObjects + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "FailedObjects") + } + x.FailedObjects = data + case 4: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + case 5: // Status + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Status") + } + x.Status = GetShardEvacuationStatusResponse_Body_Status(data) + case 6: // Duration + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Duration") + } + x.Duration = new(GetShardEvacuationStatusResponse_Body_Duration) + if err := x.Duration.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 7: // StartedAt + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "StartedAt") + } + x.StartedAt = new(GetShardEvacuationStatusResponse_Body_UnixTimestamp) + if err := x.StartedAt.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 8: // ErrorMessage + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ErrorMessage") + } + x.ErrorMessage = data + case 9: // SkippedObjects + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "SkippedObjects") + } + x.SkippedObjects = data + case 10: // TotalTrees + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TotalTrees") + } + x.TotalTrees = data + case 11: // EvacuatedTrees + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "EvacuatedTrees") + } + x.EvacuatedTrees = data + case 12: // FailedTrees + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "FailedTrees") + } + x.FailedTrees = data + } + } + return nil +} +func (x *GetShardEvacuationStatusResponse_Body) GetTotalObjects() uint64 { + if x != nil { + return x.TotalObjects + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetTotalObjects(v uint64) { + x.TotalObjects = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetEvacuatedObjects() uint64 { + if x != nil { + return x.EvacuatedObjects + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetEvacuatedObjects(v uint64) { + x.EvacuatedObjects = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetFailedObjects() uint64 { + if x != nil { + return x.FailedObjects + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetFailedObjects(v uint64) { + x.FailedObjects = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *GetShardEvacuationStatusResponse_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetStatus() GetShardEvacuationStatusResponse_Body_Status { + if x != nil { + return x.Status + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetStatus(v GetShardEvacuationStatusResponse_Body_Status) { + x.Status = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetDuration() *GetShardEvacuationStatusResponse_Body_Duration { + if x != nil { + return x.Duration + } + return nil +} +func (x *GetShardEvacuationStatusResponse_Body) SetDuration(v *GetShardEvacuationStatusResponse_Body_Duration) { + x.Duration = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetStartedAt() *GetShardEvacuationStatusResponse_Body_UnixTimestamp { + if x != nil { + return x.StartedAt + } + return nil +} +func (x *GetShardEvacuationStatusResponse_Body) SetStartedAt(v *GetShardEvacuationStatusResponse_Body_UnixTimestamp) { + x.StartedAt = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} +func (x *GetShardEvacuationStatusResponse_Body) SetErrorMessage(v string) { + x.ErrorMessage = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetSkippedObjects() uint64 { + if x != nil { + return x.SkippedObjects + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetSkippedObjects(v uint64) { + x.SkippedObjects = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetTotalTrees() uint64 { + if x != nil { + return x.TotalTrees + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetTotalTrees(v uint64) { + x.TotalTrees = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetEvacuatedTrees() uint64 { + if x != nil { + return x.EvacuatedTrees + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetEvacuatedTrees(v uint64) { + x.EvacuatedTrees = v +} +func (x *GetShardEvacuationStatusResponse_Body) GetFailedTrees() uint64 { + if x != nil { + return x.FailedTrees + } + return 0 +} +func (x *GetShardEvacuationStatusResponse_Body) SetFailedTrees(v uint64) { + x.FailedTrees = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetShardEvacuationStatusResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetShardEvacuationStatusResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"totalObjects\":" + out.RawString(prefix[1:]) + out.Uint64(x.TotalObjects) + } + { + const prefix string = ",\"evacuatedObjects\":" + out.RawString(prefix) + out.Uint64(x.EvacuatedObjects) + } + { + const prefix string = ",\"failedObjects\":" + out.RawString(prefix) + out.Uint64(x.FailedObjects) + } + { + const prefix string = ",\"shardID\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"status\":" + out.RawString(prefix) + out.Int32(int32(x.Status)) + } + { + const prefix string = ",\"duration\":" + out.RawString(prefix) + x.Duration.MarshalEasyJSON(out) + } + { + const prefix string = ",\"startedAt\":" + out.RawString(prefix) + x.StartedAt.MarshalEasyJSON(out) + } + { + const prefix string = ",\"errorMessage\":" + out.RawString(prefix) + out.String(x.ErrorMessage) + } + { + const prefix string = ",\"skippedObjects\":" + out.RawString(prefix) + out.Uint64(x.SkippedObjects) + } + { + const prefix string = ",\"totalTrees\":" + out.RawString(prefix) + out.Uint64(x.TotalTrees) + } + { + const prefix string = ",\"evacuatedTrees\":" + out.RawString(prefix) + out.Uint64(x.EvacuatedTrees) + } + { + const prefix string = ",\"failedTrees\":" + out.RawString(prefix) + out.Uint64(x.FailedTrees) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetShardEvacuationStatusResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetShardEvacuationStatusResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "totalObjects": + { + var f uint64 + f = in.Uint64() + x.TotalObjects = f + } + case "evacuatedObjects": + { + var f uint64 + f = in.Uint64() + x.EvacuatedObjects = f + } + case "failedObjects": + { + var f uint64 + f = in.Uint64() + x.FailedObjects = f + } + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + case "status": + { + var f GetShardEvacuationStatusResponse_Body_Status + var parsedValue GetShardEvacuationStatusResponse_Body_Status + switch v := in.Interface().(type) { + case string: + if vv, ok := GetShardEvacuationStatusResponse_Body_Status_value[v]; ok { + parsedValue = GetShardEvacuationStatusResponse_Body_Status(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = GetShardEvacuationStatusResponse_Body_Status(vv) + case float64: + parsedValue = GetShardEvacuationStatusResponse_Body_Status(v) + } + f = parsedValue + x.Status = f + } + case "duration": + { + var f *GetShardEvacuationStatusResponse_Body_Duration + f = new(GetShardEvacuationStatusResponse_Body_Duration) + f.UnmarshalEasyJSON(in) + x.Duration = f + } + case "startedAt": + { + var f *GetShardEvacuationStatusResponse_Body_UnixTimestamp + f = new(GetShardEvacuationStatusResponse_Body_UnixTimestamp) + f.UnmarshalEasyJSON(in) + x.StartedAt = f + } + case "errorMessage": + { + var f string + f = in.String() + x.ErrorMessage = f + } + case "skippedObjects": + { + var f uint64 + f = in.Uint64() + x.SkippedObjects = f + } + case "totalTrees": + { + var f uint64 + f = in.Uint64() + x.TotalTrees = f + } + case "evacuatedTrees": + { + var f uint64 + f = in.Uint64() + x.EvacuatedTrees = f + } + case "failedTrees": + { + var f uint64 + f = in.Uint64() + x.FailedTrees = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetShardEvacuationStatusResponse struct { + Body *GetShardEvacuationStatusResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetShardEvacuationStatusResponse)(nil) + _ encoding.ProtoUnmarshaler = (*GetShardEvacuationStatusResponse)(nil) + _ json.Marshaler = (*GetShardEvacuationStatusResponse)(nil) + _ json.Unmarshaler = (*GetShardEvacuationStatusResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2038,27 +8290,6 @@ func (x *GetShardEvacuationStatusResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetShardEvacuationStatusResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2074,13 +8305,163 @@ func (x *GetShardEvacuationStatusResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetShardEvacuationStatusResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetShardEvacuationStatusResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetShardEvacuationStatusResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetShardEvacuationStatusResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetShardEvacuationStatusResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetShardEvacuationStatusResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetShardEvacuationStatusResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetShardEvacuationStatusResponse) GetBody() *GetShardEvacuationStatusResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetShardEvacuationStatusResponse) SetBody(v *GetShardEvacuationStatusResponse_Body) { + x.Body = v +} +func (x *GetShardEvacuationStatusResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetShardEvacuationStatusResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetShardEvacuationStatusResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetShardEvacuationStatusResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetShardEvacuationStatusResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetShardEvacuationStatusResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetShardEvacuationStatusResponse_Body + f = new(GetShardEvacuationStatusResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ResetShardEvacuationStatusRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*ResetShardEvacuationStatusRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ResetShardEvacuationStatusRequest_Body)(nil) + _ json.Marshaler = (*ResetShardEvacuationStatusRequest_Body)(nil) + _ json.Unmarshaler = (*ResetShardEvacuationStatusRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2091,18 +8472,93 @@ func (x *ResetShardEvacuationStatusRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ResetShardEvacuationStatusRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ResetShardEvacuationStatusRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ResetShardEvacuationStatusRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ResetShardEvacuationStatusRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ResetShardEvacuationStatusRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ResetShardEvacuationStatusRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ResetShardEvacuationStatusRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ResetShardEvacuationStatusRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ResetShardEvacuationStatusRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ResetShardEvacuationStatusRequest struct { + Body *ResetShardEvacuationStatusRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ResetShardEvacuationStatusRequest)(nil) + _ encoding.ProtoUnmarshaler = (*ResetShardEvacuationStatusRequest)(nil) + _ json.Marshaler = (*ResetShardEvacuationStatusRequest)(nil) + _ json.Unmarshaler = (*ResetShardEvacuationStatusRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2115,27 +8571,6 @@ func (x *ResetShardEvacuationStatusRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ResetShardEvacuationStatusRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2151,13 +8586,163 @@ func (x *ResetShardEvacuationStatusRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ResetShardEvacuationStatusRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ResetShardEvacuationStatusRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ResetShardEvacuationStatusRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ResetShardEvacuationStatusRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ResetShardEvacuationStatusRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ResetShardEvacuationStatusRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ResetShardEvacuationStatusRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ResetShardEvacuationStatusRequest) GetBody() *ResetShardEvacuationStatusRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ResetShardEvacuationStatusRequest) SetBody(v *ResetShardEvacuationStatusRequest_Body) { + x.Body = v +} +func (x *ResetShardEvacuationStatusRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ResetShardEvacuationStatusRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ResetShardEvacuationStatusRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ResetShardEvacuationStatusRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ResetShardEvacuationStatusRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ResetShardEvacuationStatusRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ResetShardEvacuationStatusRequest_Body + f = new(ResetShardEvacuationStatusRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ResetShardEvacuationStatusResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*ResetShardEvacuationStatusResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ResetShardEvacuationStatusResponse_Body)(nil) + _ json.Marshaler = (*ResetShardEvacuationStatusResponse_Body)(nil) + _ json.Unmarshaler = (*ResetShardEvacuationStatusResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2168,18 +8753,93 @@ func (x *ResetShardEvacuationStatusResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ResetShardEvacuationStatusResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ResetShardEvacuationStatusResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ResetShardEvacuationStatusResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ResetShardEvacuationStatusResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ResetShardEvacuationStatusResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ResetShardEvacuationStatusResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ResetShardEvacuationStatusResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ResetShardEvacuationStatusResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ResetShardEvacuationStatusResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ResetShardEvacuationStatusResponse struct { + Body *ResetShardEvacuationStatusResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ResetShardEvacuationStatusResponse)(nil) + _ encoding.ProtoUnmarshaler = (*ResetShardEvacuationStatusResponse)(nil) + _ json.Marshaler = (*ResetShardEvacuationStatusResponse)(nil) + _ json.Unmarshaler = (*ResetShardEvacuationStatusResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2192,27 +8852,6 @@ func (x *ResetShardEvacuationStatusResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ResetShardEvacuationStatusResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2228,13 +8867,163 @@ func (x *ResetShardEvacuationStatusResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ResetShardEvacuationStatusResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ResetShardEvacuationStatusResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ResetShardEvacuationStatusResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ResetShardEvacuationStatusResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ResetShardEvacuationStatusResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ResetShardEvacuationStatusResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ResetShardEvacuationStatusResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ResetShardEvacuationStatusResponse) GetBody() *ResetShardEvacuationStatusResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ResetShardEvacuationStatusResponse) SetBody(v *ResetShardEvacuationStatusResponse_Body) { + x.Body = v +} +func (x *ResetShardEvacuationStatusResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ResetShardEvacuationStatusResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ResetShardEvacuationStatusResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ResetShardEvacuationStatusResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ResetShardEvacuationStatusResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ResetShardEvacuationStatusResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ResetShardEvacuationStatusResponse_Body + f = new(ResetShardEvacuationStatusResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StopShardEvacuationRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*StopShardEvacuationRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*StopShardEvacuationRequest_Body)(nil) + _ json.Marshaler = (*StopShardEvacuationRequest_Body)(nil) + _ json.Unmarshaler = (*StopShardEvacuationRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2245,18 +9034,93 @@ func (x *StopShardEvacuationRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StopShardEvacuationRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StopShardEvacuationRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StopShardEvacuationRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StopShardEvacuationRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StopShardEvacuationRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StopShardEvacuationRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StopShardEvacuationRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StopShardEvacuationRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StopShardEvacuationRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StopShardEvacuationRequest struct { + Body *StopShardEvacuationRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*StopShardEvacuationRequest)(nil) + _ encoding.ProtoUnmarshaler = (*StopShardEvacuationRequest)(nil) + _ json.Marshaler = (*StopShardEvacuationRequest)(nil) + _ json.Unmarshaler = (*StopShardEvacuationRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2269,27 +9133,6 @@ func (x *StopShardEvacuationRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StopShardEvacuationRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2305,13 +9148,163 @@ func (x *StopShardEvacuationRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *StopShardEvacuationRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *StopShardEvacuationRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StopShardEvacuationRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StopShardEvacuationRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StopShardEvacuationRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StopShardEvacuationRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(StopShardEvacuationRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *StopShardEvacuationRequest) GetBody() *StopShardEvacuationRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *StopShardEvacuationRequest) SetBody(v *StopShardEvacuationRequest_Body) { + x.Body = v +} +func (x *StopShardEvacuationRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *StopShardEvacuationRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StopShardEvacuationRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StopShardEvacuationRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StopShardEvacuationRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StopShardEvacuationRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *StopShardEvacuationRequest_Body + f = new(StopShardEvacuationRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StopShardEvacuationResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*StopShardEvacuationResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*StopShardEvacuationResponse_Body)(nil) + _ json.Marshaler = (*StopShardEvacuationResponse_Body)(nil) + _ json.Unmarshaler = (*StopShardEvacuationResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2322,18 +9315,93 @@ func (x *StopShardEvacuationResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StopShardEvacuationResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StopShardEvacuationResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StopShardEvacuationResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StopShardEvacuationResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StopShardEvacuationResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StopShardEvacuationResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StopShardEvacuationResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StopShardEvacuationResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StopShardEvacuationResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type StopShardEvacuationResponse struct { + Body *StopShardEvacuationResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*StopShardEvacuationResponse)(nil) + _ encoding.ProtoUnmarshaler = (*StopShardEvacuationResponse)(nil) + _ json.Marshaler = (*StopShardEvacuationResponse)(nil) + _ json.Unmarshaler = (*StopShardEvacuationResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2346,27 +9414,6 @@ func (x *StopShardEvacuationResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *StopShardEvacuationResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2382,13 +9429,165 @@ func (x *StopShardEvacuationResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *StopShardEvacuationResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *StopShardEvacuationResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *StopShardEvacuationResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *StopShardEvacuationResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *StopShardEvacuationResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "StopShardEvacuationResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(StopShardEvacuationResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *StopShardEvacuationResponse) GetBody() *StopShardEvacuationResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *StopShardEvacuationResponse) SetBody(v *StopShardEvacuationResponse_Body) { + x.Body = v +} +func (x *StopShardEvacuationResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *StopShardEvacuationResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *StopShardEvacuationResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *StopShardEvacuationResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *StopShardEvacuationResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *StopShardEvacuationResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *StopShardEvacuationResponse_Body + f = new(StopShardEvacuationResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddChainLocalOverrideRequest_Body struct { + Target *ChainTarget `json:"target"` + Chain []byte `json:"chain"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddChainLocalOverrideRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*AddChainLocalOverrideRequest_Body)(nil) + _ json.Marshaler = (*AddChainLocalOverrideRequest_Body)(nil) + _ json.Unmarshaler = (*AddChainLocalOverrideRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2401,27 +9600,158 @@ func (x *AddChainLocalOverrideRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddChainLocalOverrideRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Target) - offset += proto.BytesMarshal(2, buf[offset:], x.Chain) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddChainLocalOverrideRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddChainLocalOverrideRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Target != nil && x.Target.StableSize() != 0 { + x.Target.EmitProtobuf(mm.AppendMessage(1)) + } + if len(x.Chain) != 0 { + mm.AppendBytes(2, x.Chain) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddChainLocalOverrideRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddChainLocalOverrideRequest_Body") + } + switch fc.FieldNum { + case 1: // Target + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Target") + } + x.Target = new(ChainTarget) + if err := x.Target.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Chain + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Chain") + } + x.Chain = data + } + } + return nil +} +func (x *AddChainLocalOverrideRequest_Body) GetTarget() *ChainTarget { + if x != nil { + return x.Target + } + return nil +} +func (x *AddChainLocalOverrideRequest_Body) SetTarget(v *ChainTarget) { + x.Target = v +} +func (x *AddChainLocalOverrideRequest_Body) GetChain() []byte { + if x != nil { + return x.Chain + } + return nil +} +func (x *AddChainLocalOverrideRequest_Body) SetChain(v []byte) { + x.Chain = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddChainLocalOverrideRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddChainLocalOverrideRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"target\":" + out.RawString(prefix[1:]) + x.Target.MarshalEasyJSON(out) + } + { + const prefix string = ",\"chain\":" + out.RawString(prefix) + out.Base64Bytes(x.Chain) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddChainLocalOverrideRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddChainLocalOverrideRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "target": + { + var f *ChainTarget + f = new(ChainTarget) + f.UnmarshalEasyJSON(in) + x.Target = f + } + case "chain": + { + var f []byte + f = in.Bytes() + x.Chain = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddChainLocalOverrideRequest struct { + Body *AddChainLocalOverrideRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddChainLocalOverrideRequest)(nil) + _ encoding.ProtoUnmarshaler = (*AddChainLocalOverrideRequest)(nil) + _ json.Marshaler = (*AddChainLocalOverrideRequest)(nil) + _ json.Unmarshaler = (*AddChainLocalOverrideRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2434,27 +9764,6 @@ func (x *AddChainLocalOverrideRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddChainLocalOverrideRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2470,13 +9779,164 @@ func (x *AddChainLocalOverrideRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *AddChainLocalOverrideRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *AddChainLocalOverrideRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddChainLocalOverrideRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddChainLocalOverrideRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddChainLocalOverrideRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddChainLocalOverrideRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(AddChainLocalOverrideRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *AddChainLocalOverrideRequest) GetBody() *AddChainLocalOverrideRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *AddChainLocalOverrideRequest) SetBody(v *AddChainLocalOverrideRequest_Body) { + x.Body = v +} +func (x *AddChainLocalOverrideRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *AddChainLocalOverrideRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddChainLocalOverrideRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddChainLocalOverrideRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddChainLocalOverrideRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddChainLocalOverrideRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *AddChainLocalOverrideRequest_Body + f = new(AddChainLocalOverrideRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddChainLocalOverrideResponse_Body struct { + ChainId []byte `json:"chainId"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddChainLocalOverrideResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*AddChainLocalOverrideResponse_Body)(nil) + _ json.Marshaler = (*AddChainLocalOverrideResponse_Body)(nil) + _ json.Unmarshaler = (*AddChainLocalOverrideResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2488,26 +9948,125 @@ func (x *AddChainLocalOverrideResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddChainLocalOverrideResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ChainId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddChainLocalOverrideResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddChainLocalOverrideResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ChainId) != 0 { + mm.AppendBytes(1, x.ChainId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddChainLocalOverrideResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddChainLocalOverrideResponse_Body") + } + switch fc.FieldNum { + case 1: // ChainId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ChainId") + } + x.ChainId = data + } + } + return nil +} +func (x *AddChainLocalOverrideResponse_Body) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} +func (x *AddChainLocalOverrideResponse_Body) SetChainId(v []byte) { + x.ChainId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddChainLocalOverrideResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddChainLocalOverrideResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"chainId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ChainId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddChainLocalOverrideResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddChainLocalOverrideResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "chainId": + { + var f []byte + f = in.Bytes() + x.ChainId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddChainLocalOverrideResponse struct { + Body *AddChainLocalOverrideResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddChainLocalOverrideResponse)(nil) + _ encoding.ProtoUnmarshaler = (*AddChainLocalOverrideResponse)(nil) + _ json.Marshaler = (*AddChainLocalOverrideResponse)(nil) + _ json.Unmarshaler = (*AddChainLocalOverrideResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2520,27 +10079,6 @@ func (x *AddChainLocalOverrideResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddChainLocalOverrideResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2556,13 +10094,165 @@ func (x *AddChainLocalOverrideResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *AddChainLocalOverrideResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *AddChainLocalOverrideResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddChainLocalOverrideResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddChainLocalOverrideResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddChainLocalOverrideResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddChainLocalOverrideResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(AddChainLocalOverrideResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *AddChainLocalOverrideResponse) GetBody() *AddChainLocalOverrideResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *AddChainLocalOverrideResponse) SetBody(v *AddChainLocalOverrideResponse_Body) { + x.Body = v +} +func (x *AddChainLocalOverrideResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *AddChainLocalOverrideResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddChainLocalOverrideResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddChainLocalOverrideResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddChainLocalOverrideResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddChainLocalOverrideResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *AddChainLocalOverrideResponse_Body + f = new(AddChainLocalOverrideResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetChainLocalOverrideRequest_Body struct { + Target *ChainTarget `json:"target"` + ChainId []byte `json:"chainId"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetChainLocalOverrideRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetChainLocalOverrideRequest_Body)(nil) + _ json.Marshaler = (*GetChainLocalOverrideRequest_Body)(nil) + _ json.Unmarshaler = (*GetChainLocalOverrideRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2575,27 +10265,158 @@ func (x *GetChainLocalOverrideRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetChainLocalOverrideRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Target) - offset += proto.BytesMarshal(2, buf[offset:], x.ChainId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetChainLocalOverrideRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetChainLocalOverrideRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Target != nil && x.Target.StableSize() != 0 { + x.Target.EmitProtobuf(mm.AppendMessage(1)) + } + if len(x.ChainId) != 0 { + mm.AppendBytes(2, x.ChainId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetChainLocalOverrideRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetChainLocalOverrideRequest_Body") + } + switch fc.FieldNum { + case 1: // Target + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Target") + } + x.Target = new(ChainTarget) + if err := x.Target.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // ChainId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ChainId") + } + x.ChainId = data + } + } + return nil +} +func (x *GetChainLocalOverrideRequest_Body) GetTarget() *ChainTarget { + if x != nil { + return x.Target + } + return nil +} +func (x *GetChainLocalOverrideRequest_Body) SetTarget(v *ChainTarget) { + x.Target = v +} +func (x *GetChainLocalOverrideRequest_Body) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} +func (x *GetChainLocalOverrideRequest_Body) SetChainId(v []byte) { + x.ChainId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetChainLocalOverrideRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetChainLocalOverrideRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"target\":" + out.RawString(prefix[1:]) + x.Target.MarshalEasyJSON(out) + } + { + const prefix string = ",\"chainId\":" + out.RawString(prefix) + out.Base64Bytes(x.ChainId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetChainLocalOverrideRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetChainLocalOverrideRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "target": + { + var f *ChainTarget + f = new(ChainTarget) + f.UnmarshalEasyJSON(in) + x.Target = f + } + case "chainId": + { + var f []byte + f = in.Bytes() + x.ChainId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetChainLocalOverrideRequest struct { + Body *GetChainLocalOverrideRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetChainLocalOverrideRequest)(nil) + _ encoding.ProtoUnmarshaler = (*GetChainLocalOverrideRequest)(nil) + _ json.Marshaler = (*GetChainLocalOverrideRequest)(nil) + _ json.Unmarshaler = (*GetChainLocalOverrideRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2608,27 +10429,6 @@ func (x *GetChainLocalOverrideRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetChainLocalOverrideRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2644,13 +10444,164 @@ func (x *GetChainLocalOverrideRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetChainLocalOverrideRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetChainLocalOverrideRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetChainLocalOverrideRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetChainLocalOverrideRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetChainLocalOverrideRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetChainLocalOverrideRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetChainLocalOverrideRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetChainLocalOverrideRequest) GetBody() *GetChainLocalOverrideRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetChainLocalOverrideRequest) SetBody(v *GetChainLocalOverrideRequest_Body) { + x.Body = v +} +func (x *GetChainLocalOverrideRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetChainLocalOverrideRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetChainLocalOverrideRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetChainLocalOverrideRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetChainLocalOverrideRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetChainLocalOverrideRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetChainLocalOverrideRequest_Body + f = new(GetChainLocalOverrideRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetChainLocalOverrideResponse_Body struct { + Chain []byte `json:"chain"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetChainLocalOverrideResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetChainLocalOverrideResponse_Body)(nil) + _ json.Marshaler = (*GetChainLocalOverrideResponse_Body)(nil) + _ json.Unmarshaler = (*GetChainLocalOverrideResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2662,26 +10613,125 @@ func (x *GetChainLocalOverrideResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetChainLocalOverrideResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Chain) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetChainLocalOverrideResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetChainLocalOverrideResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Chain) != 0 { + mm.AppendBytes(1, x.Chain) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetChainLocalOverrideResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetChainLocalOverrideResponse_Body") + } + switch fc.FieldNum { + case 1: // Chain + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Chain") + } + x.Chain = data + } + } + return nil +} +func (x *GetChainLocalOverrideResponse_Body) GetChain() []byte { + if x != nil { + return x.Chain + } + return nil +} +func (x *GetChainLocalOverrideResponse_Body) SetChain(v []byte) { + x.Chain = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetChainLocalOverrideResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetChainLocalOverrideResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"chain\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Chain) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetChainLocalOverrideResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetChainLocalOverrideResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "chain": + { + var f []byte + f = in.Bytes() + x.Chain = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetChainLocalOverrideResponse struct { + Body *GetChainLocalOverrideResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetChainLocalOverrideResponse)(nil) + _ encoding.ProtoUnmarshaler = (*GetChainLocalOverrideResponse)(nil) + _ json.Marshaler = (*GetChainLocalOverrideResponse)(nil) + _ json.Unmarshaler = (*GetChainLocalOverrideResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2694,27 +10744,6 @@ func (x *GetChainLocalOverrideResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetChainLocalOverrideResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2730,13 +10759,164 @@ func (x *GetChainLocalOverrideResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetChainLocalOverrideResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetChainLocalOverrideResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetChainLocalOverrideResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetChainLocalOverrideResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetChainLocalOverrideResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetChainLocalOverrideResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetChainLocalOverrideResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetChainLocalOverrideResponse) GetBody() *GetChainLocalOverrideResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetChainLocalOverrideResponse) SetBody(v *GetChainLocalOverrideResponse_Body) { + x.Body = v +} +func (x *GetChainLocalOverrideResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetChainLocalOverrideResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetChainLocalOverrideResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetChainLocalOverrideResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetChainLocalOverrideResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetChainLocalOverrideResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetChainLocalOverrideResponse_Body + f = new(GetChainLocalOverrideResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListChainLocalOverridesRequest_Body struct { + Target *ChainTarget `json:"target"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListChainLocalOverridesRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ListChainLocalOverridesRequest_Body)(nil) + _ json.Marshaler = (*ListChainLocalOverridesRequest_Body)(nil) + _ json.Unmarshaler = (*ListChainLocalOverridesRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2748,26 +10928,129 @@ func (x *ListChainLocalOverridesRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListChainLocalOverridesRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Target) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListChainLocalOverridesRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListChainLocalOverridesRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Target != nil && x.Target.StableSize() != 0 { + x.Target.EmitProtobuf(mm.AppendMessage(1)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListChainLocalOverridesRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListChainLocalOverridesRequest_Body") + } + switch fc.FieldNum { + case 1: // Target + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Target") + } + x.Target = new(ChainTarget) + if err := x.Target.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListChainLocalOverridesRequest_Body) GetTarget() *ChainTarget { + if x != nil { + return x.Target + } + return nil +} +func (x *ListChainLocalOverridesRequest_Body) SetTarget(v *ChainTarget) { + x.Target = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListChainLocalOverridesRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListChainLocalOverridesRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"target\":" + out.RawString(prefix[1:]) + x.Target.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListChainLocalOverridesRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListChainLocalOverridesRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "target": + { + var f *ChainTarget + f = new(ChainTarget) + f.UnmarshalEasyJSON(in) + x.Target = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListChainLocalOverridesRequest struct { + Body *ListChainLocalOverridesRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListChainLocalOverridesRequest)(nil) + _ encoding.ProtoUnmarshaler = (*ListChainLocalOverridesRequest)(nil) + _ json.Marshaler = (*ListChainLocalOverridesRequest)(nil) + _ json.Unmarshaler = (*ListChainLocalOverridesRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2780,27 +11063,6 @@ func (x *ListChainLocalOverridesRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListChainLocalOverridesRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2816,13 +11078,164 @@ func (x *ListChainLocalOverridesRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ListChainLocalOverridesRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ListChainLocalOverridesRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListChainLocalOverridesRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListChainLocalOverridesRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListChainLocalOverridesRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListChainLocalOverridesRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ListChainLocalOverridesRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListChainLocalOverridesRequest) GetBody() *ListChainLocalOverridesRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ListChainLocalOverridesRequest) SetBody(v *ListChainLocalOverridesRequest_Body) { + x.Body = v +} +func (x *ListChainLocalOverridesRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ListChainLocalOverridesRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListChainLocalOverridesRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListChainLocalOverridesRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListChainLocalOverridesRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListChainLocalOverridesRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ListChainLocalOverridesRequest_Body + f = new(ListChainLocalOverridesRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListChainLocalOverridesResponse_Body struct { + Chains [][]byte `json:"chains"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListChainLocalOverridesResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ListChainLocalOverridesResponse_Body)(nil) + _ json.Marshaler = (*ListChainLocalOverridesResponse_Body)(nil) + _ json.Unmarshaler = (*ListChainLocalOverridesResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2834,26 +11247,139 @@ func (x *ListChainLocalOverridesResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListChainLocalOverridesResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Chains) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListChainLocalOverridesResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListChainLocalOverridesResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Chains { + mm.AppendBytes(1, x.Chains[j]) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListChainLocalOverridesResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListChainLocalOverridesResponse_Body") + } + switch fc.FieldNum { + case 1: // Chains + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Chains") + } + x.Chains = append(x.Chains, data) + } + } + return nil +} +func (x *ListChainLocalOverridesResponse_Body) GetChains() [][]byte { + if x != nil { + return x.Chains + } + return nil +} +func (x *ListChainLocalOverridesResponse_Body) SetChains(v [][]byte) { + x.Chains = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListChainLocalOverridesResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListChainLocalOverridesResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"chains\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Chains { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Chains[i]) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListChainLocalOverridesResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListChainLocalOverridesResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "chains": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Chains = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListChainLocalOverridesResponse struct { + Body *ListChainLocalOverridesResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListChainLocalOverridesResponse)(nil) + _ encoding.ProtoUnmarshaler = (*ListChainLocalOverridesResponse)(nil) + _ json.Marshaler = (*ListChainLocalOverridesResponse)(nil) + _ json.Unmarshaler = (*ListChainLocalOverridesResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2866,27 +11392,6 @@ func (x *ListChainLocalOverridesResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListChainLocalOverridesResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2902,13 +11407,164 @@ func (x *ListChainLocalOverridesResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ListChainLocalOverridesResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ListChainLocalOverridesResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListChainLocalOverridesResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListChainLocalOverridesResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListChainLocalOverridesResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListChainLocalOverridesResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ListChainLocalOverridesResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListChainLocalOverridesResponse) GetBody() *ListChainLocalOverridesResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ListChainLocalOverridesResponse) SetBody(v *ListChainLocalOverridesResponse_Body) { + x.Body = v +} +func (x *ListChainLocalOverridesResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ListChainLocalOverridesResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListChainLocalOverridesResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListChainLocalOverridesResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListChainLocalOverridesResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListChainLocalOverridesResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ListChainLocalOverridesResponse_Body + f = new(ListChainLocalOverridesResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListTargetsLocalOverridesRequest_Body struct { + ChainName string `json:"chainName"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListTargetsLocalOverridesRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ListTargetsLocalOverridesRequest_Body)(nil) + _ json.Marshaler = (*ListTargetsLocalOverridesRequest_Body)(nil) + _ json.Unmarshaler = (*ListTargetsLocalOverridesRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2920,26 +11576,125 @@ func (x *ListTargetsLocalOverridesRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListTargetsLocalOverridesRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.StringMarshal(1, buf[offset:], x.ChainName) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListTargetsLocalOverridesRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListTargetsLocalOverridesRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ChainName) != 0 { + mm.AppendString(1, x.ChainName) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListTargetsLocalOverridesRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListTargetsLocalOverridesRequest_Body") + } + switch fc.FieldNum { + case 1: // ChainName + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ChainName") + } + x.ChainName = data + } + } + return nil +} +func (x *ListTargetsLocalOverridesRequest_Body) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} +func (x *ListTargetsLocalOverridesRequest_Body) SetChainName(v string) { + x.ChainName = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListTargetsLocalOverridesRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListTargetsLocalOverridesRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"chainName\":" + out.RawString(prefix[1:]) + out.String(x.ChainName) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListTargetsLocalOverridesRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListTargetsLocalOverridesRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "chainName": + { + var f string + f = in.String() + x.ChainName = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListTargetsLocalOverridesRequest struct { + Body *ListTargetsLocalOverridesRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListTargetsLocalOverridesRequest)(nil) + _ encoding.ProtoUnmarshaler = (*ListTargetsLocalOverridesRequest)(nil) + _ json.Marshaler = (*ListTargetsLocalOverridesRequest)(nil) + _ json.Unmarshaler = (*ListTargetsLocalOverridesRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -2952,27 +11707,6 @@ func (x *ListTargetsLocalOverridesRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListTargetsLocalOverridesRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -2988,13 +11722,164 @@ func (x *ListTargetsLocalOverridesRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ListTargetsLocalOverridesRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ListTargetsLocalOverridesRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListTargetsLocalOverridesRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListTargetsLocalOverridesRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListTargetsLocalOverridesRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListTargetsLocalOverridesRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ListTargetsLocalOverridesRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListTargetsLocalOverridesRequest) GetBody() *ListTargetsLocalOverridesRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ListTargetsLocalOverridesRequest) SetBody(v *ListTargetsLocalOverridesRequest_Body) { + x.Body = v +} +func (x *ListTargetsLocalOverridesRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ListTargetsLocalOverridesRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListTargetsLocalOverridesRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListTargetsLocalOverridesRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListTargetsLocalOverridesRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListTargetsLocalOverridesRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ListTargetsLocalOverridesRequest_Body + f = new(ListTargetsLocalOverridesRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListTargetsLocalOverridesResponse_Body struct { + Targets []*ChainTarget `json:"targets"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListTargetsLocalOverridesResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ListTargetsLocalOverridesResponse_Body)(nil) + _ json.Marshaler = (*ListTargetsLocalOverridesResponse_Body)(nil) + _ json.Unmarshaler = (*ListTargetsLocalOverridesResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3008,28 +11893,146 @@ func (x *ListTargetsLocalOverridesResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListTargetsLocalOverridesResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - for i := range x.Targets { - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Targets[i]) - } - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListTargetsLocalOverridesResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListTargetsLocalOverridesResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for i := range x.Targets { + if x.Targets[i] != nil && x.Targets[i].StableSize() != 0 { + x.Targets[i].EmitProtobuf(mm.AppendMessage(1)) + } + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListTargetsLocalOverridesResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListTargetsLocalOverridesResponse_Body") + } + switch fc.FieldNum { + case 1: // Targets + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Targets") + } + x.Targets = append(x.Targets, new(ChainTarget)) + ff := x.Targets[len(x.Targets)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListTargetsLocalOverridesResponse_Body) GetTargets() []*ChainTarget { + if x != nil { + return x.Targets + } + return nil +} +func (x *ListTargetsLocalOverridesResponse_Body) SetTargets(v []*ChainTarget) { + x.Targets = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListTargetsLocalOverridesResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListTargetsLocalOverridesResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"targets\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Targets { + if i != 0 { + out.RawByte(',') + } + x.Targets[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListTargetsLocalOverridesResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListTargetsLocalOverridesResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "targets": + { + var f *ChainTarget + var list []*ChainTarget + in.Delim('[') + for !in.IsDelim(']') { + f = new(ChainTarget) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Targets = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ListTargetsLocalOverridesResponse struct { + Body *ListTargetsLocalOverridesResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ListTargetsLocalOverridesResponse)(nil) + _ encoding.ProtoUnmarshaler = (*ListTargetsLocalOverridesResponse)(nil) + _ json.Marshaler = (*ListTargetsLocalOverridesResponse)(nil) + _ json.Unmarshaler = (*ListTargetsLocalOverridesResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3042,27 +12045,6 @@ func (x *ListTargetsLocalOverridesResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ListTargetsLocalOverridesResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3078,13 +12060,165 @@ func (x *ListTargetsLocalOverridesResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ListTargetsLocalOverridesResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ListTargetsLocalOverridesResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ListTargetsLocalOverridesResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ListTargetsLocalOverridesResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ListTargetsLocalOverridesResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ListTargetsLocalOverridesResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ListTargetsLocalOverridesResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ListTargetsLocalOverridesResponse) GetBody() *ListTargetsLocalOverridesResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ListTargetsLocalOverridesResponse) SetBody(v *ListTargetsLocalOverridesResponse_Body) { + x.Body = v +} +func (x *ListTargetsLocalOverridesResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ListTargetsLocalOverridesResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ListTargetsLocalOverridesResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ListTargetsLocalOverridesResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ListTargetsLocalOverridesResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ListTargetsLocalOverridesResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ListTargetsLocalOverridesResponse_Body + f = new(ListTargetsLocalOverridesResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverrideRequest_Body struct { + Target *ChainTarget `json:"target"` + ChainId []byte `json:"chainId"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverrideRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverrideRequest_Body)(nil) + _ json.Marshaler = (*RemoveChainLocalOverrideRequest_Body)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverrideRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3097,27 +12231,158 @@ func (x *RemoveChainLocalOverrideRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverrideRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Target) - offset += proto.BytesMarshal(2, buf[offset:], x.ChainId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverrideRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverrideRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Target != nil && x.Target.StableSize() != 0 { + x.Target.EmitProtobuf(mm.AppendMessage(1)) + } + if len(x.ChainId) != 0 { + mm.AppendBytes(2, x.ChainId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverrideRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverrideRequest_Body") + } + switch fc.FieldNum { + case 1: // Target + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Target") + } + x.Target = new(ChainTarget) + if err := x.Target.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // ChainId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ChainId") + } + x.ChainId = data + } + } + return nil +} +func (x *RemoveChainLocalOverrideRequest_Body) GetTarget() *ChainTarget { + if x != nil { + return x.Target + } + return nil +} +func (x *RemoveChainLocalOverrideRequest_Body) SetTarget(v *ChainTarget) { + x.Target = v +} +func (x *RemoveChainLocalOverrideRequest_Body) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} +func (x *RemoveChainLocalOverrideRequest_Body) SetChainId(v []byte) { + x.ChainId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverrideRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverrideRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"target\":" + out.RawString(prefix[1:]) + x.Target.MarshalEasyJSON(out) + } + { + const prefix string = ",\"chainId\":" + out.RawString(prefix) + out.Base64Bytes(x.ChainId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverrideRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverrideRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "target": + { + var f *ChainTarget + f = new(ChainTarget) + f.UnmarshalEasyJSON(in) + x.Target = f + } + case "chainId": + { + var f []byte + f = in.Bytes() + x.ChainId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverrideRequest struct { + Body *RemoveChainLocalOverrideRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverrideRequest)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverrideRequest)(nil) + _ json.Marshaler = (*RemoveChainLocalOverrideRequest)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverrideRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3130,27 +12395,6 @@ func (x *RemoveChainLocalOverrideRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverrideRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3166,13 +12410,163 @@ func (x *RemoveChainLocalOverrideRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveChainLocalOverrideRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveChainLocalOverrideRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverrideRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverrideRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverrideRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverrideRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveChainLocalOverrideRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveChainLocalOverrideRequest) GetBody() *RemoveChainLocalOverrideRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveChainLocalOverrideRequest) SetBody(v *RemoveChainLocalOverrideRequest_Body) { + x.Body = v +} +func (x *RemoveChainLocalOverrideRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveChainLocalOverrideRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverrideRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverrideRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverrideRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverrideRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveChainLocalOverrideRequest_Body + f = new(RemoveChainLocalOverrideRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverrideResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverrideResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverrideResponse_Body)(nil) + _ json.Marshaler = (*RemoveChainLocalOverrideResponse_Body)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverrideResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3183,18 +12577,93 @@ func (x *RemoveChainLocalOverrideResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverrideResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverrideResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverrideResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverrideResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverrideResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverrideResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverrideResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverrideResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverrideResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverrideResponse struct { + Body *RemoveChainLocalOverrideResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverrideResponse)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverrideResponse)(nil) + _ json.Marshaler = (*RemoveChainLocalOverrideResponse)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverrideResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3207,27 +12676,6 @@ func (x *RemoveChainLocalOverrideResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverrideResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3243,13 +12691,164 @@ func (x *RemoveChainLocalOverrideResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveChainLocalOverrideResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveChainLocalOverrideResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverrideResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverrideResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverrideResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverrideResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveChainLocalOverrideResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveChainLocalOverrideResponse) GetBody() *RemoveChainLocalOverrideResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveChainLocalOverrideResponse) SetBody(v *RemoveChainLocalOverrideResponse_Body) { + x.Body = v +} +func (x *RemoveChainLocalOverrideResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveChainLocalOverrideResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverrideResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverrideResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverrideResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverrideResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveChainLocalOverrideResponse_Body + f = new(RemoveChainLocalOverrideResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverridesByTargetRequest_Body struct { + Target *ChainTarget `json:"target"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverridesByTargetRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverridesByTargetRequest_Body)(nil) + _ json.Marshaler = (*RemoveChainLocalOverridesByTargetRequest_Body)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverridesByTargetRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3261,26 +12860,129 @@ func (x *RemoveChainLocalOverridesByTargetRequest_Body) StableSize() (size int) return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverridesByTargetRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Target) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverridesByTargetRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Target != nil && x.Target.StableSize() != 0 { + x.Target.EmitProtobuf(mm.AppendMessage(1)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverridesByTargetRequest_Body") + } + switch fc.FieldNum { + case 1: // Target + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Target") + } + x.Target = new(ChainTarget) + if err := x.Target.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetRequest_Body) GetTarget() *ChainTarget { + if x != nil { + return x.Target + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetRequest_Body) SetTarget(v *ChainTarget) { + x.Target = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverridesByTargetRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"target\":" + out.RawString(prefix[1:]) + x.Target.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverridesByTargetRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "target": + { + var f *ChainTarget + f = new(ChainTarget) + f.UnmarshalEasyJSON(in) + x.Target = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverridesByTargetRequest struct { + Body *RemoveChainLocalOverridesByTargetRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverridesByTargetRequest)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverridesByTargetRequest)(nil) + _ json.Marshaler = (*RemoveChainLocalOverridesByTargetRequest)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverridesByTargetRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3293,27 +12995,6 @@ func (x *RemoveChainLocalOverridesByTargetRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverridesByTargetRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3329,13 +13010,163 @@ func (x *RemoveChainLocalOverridesByTargetRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveChainLocalOverridesByTargetRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveChainLocalOverridesByTargetRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverridesByTargetRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverridesByTargetRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveChainLocalOverridesByTargetRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetRequest) GetBody() *RemoveChainLocalOverridesByTargetRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetRequest) SetBody(v *RemoveChainLocalOverridesByTargetRequest_Body) { + x.Body = v +} +func (x *RemoveChainLocalOverridesByTargetRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverridesByTargetRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverridesByTargetRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveChainLocalOverridesByTargetRequest_Body + f = new(RemoveChainLocalOverridesByTargetRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverridesByTargetResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverridesByTargetResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverridesByTargetResponse_Body)(nil) + _ json.Marshaler = (*RemoveChainLocalOverridesByTargetResponse_Body)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverridesByTargetResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3346,18 +13177,93 @@ func (x *RemoveChainLocalOverridesByTargetResponse_Body) StableSize() (size int) return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverridesByTargetResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverridesByTargetResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverridesByTargetResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverridesByTargetResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverridesByTargetResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveChainLocalOverridesByTargetResponse struct { + Body *RemoveChainLocalOverridesByTargetResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveChainLocalOverridesByTargetResponse)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveChainLocalOverridesByTargetResponse)(nil) + _ json.Marshaler = (*RemoveChainLocalOverridesByTargetResponse)(nil) + _ json.Unmarshaler = (*RemoveChainLocalOverridesByTargetResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3370,27 +13276,6 @@ func (x *RemoveChainLocalOverridesByTargetResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveChainLocalOverridesByTargetResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3406,13 +13291,168 @@ func (x *RemoveChainLocalOverridesByTargetResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveChainLocalOverridesByTargetResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveChainLocalOverridesByTargetResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveChainLocalOverridesByTargetResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveChainLocalOverridesByTargetResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveChainLocalOverridesByTargetResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetResponse) GetBody() *RemoveChainLocalOverridesByTargetResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetResponse) SetBody(v *RemoveChainLocalOverridesByTargetResponse_Body) { + x.Body = v +} +func (x *RemoveChainLocalOverridesByTargetResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveChainLocalOverridesByTargetResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveChainLocalOverridesByTargetResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveChainLocalOverridesByTargetResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveChainLocalOverridesByTargetResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveChainLocalOverridesByTargetResponse_Body + f = new(RemoveChainLocalOverridesByTargetResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SealWriteCacheRequest_Body struct { + Shard_ID [][]byte `json:"shardID"` + IgnoreErrors bool `json:"ignoreErrors"` + Async bool `json:"async"` + RestoreMode bool `json:"restoreMode"` + Shrink bool `json:"shrink"` +} + +var ( + _ encoding.ProtoMarshaler = (*SealWriteCacheRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SealWriteCacheRequest_Body)(nil) + _ json.Marshaler = (*SealWriteCacheRequest_Body)(nil) + _ json.Unmarshaler = (*SealWriteCacheRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3428,30 +13468,255 @@ func (x *SealWriteCacheRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SealWriteCacheRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.BoolMarshal(2, buf[offset:], x.IgnoreErrors) - offset += proto.BoolMarshal(3, buf[offset:], x.Async) - offset += proto.BoolMarshal(4, buf[offset:], x.RestoreMode) - offset += proto.BoolMarshal(5, buf[offset:], x.Shrink) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SealWriteCacheRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SealWriteCacheRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Shard_ID { + mm.AppendBytes(1, x.Shard_ID[j]) + } + if x.IgnoreErrors { + mm.AppendBool(2, x.IgnoreErrors) + } + if x.Async { + mm.AppendBool(3, x.Async) + } + if x.RestoreMode { + mm.AppendBool(4, x.RestoreMode) + } + if x.Shrink { + mm.AppendBool(5, x.Shrink) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SealWriteCacheRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SealWriteCacheRequest_Body") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + case 2: // IgnoreErrors + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "IgnoreErrors") + } + x.IgnoreErrors = data + case 3: // Async + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Async") + } + x.Async = data + case 4: // RestoreMode + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "RestoreMode") + } + x.RestoreMode = data + case 5: // Shrink + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shrink") + } + x.Shrink = data + } + } + return nil +} +func (x *SealWriteCacheRequest_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *SealWriteCacheRequest_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} +func (x *SealWriteCacheRequest_Body) GetIgnoreErrors() bool { + if x != nil { + return x.IgnoreErrors + } + return false +} +func (x *SealWriteCacheRequest_Body) SetIgnoreErrors(v bool) { + x.IgnoreErrors = v +} +func (x *SealWriteCacheRequest_Body) GetAsync() bool { + if x != nil { + return x.Async + } + return false +} +func (x *SealWriteCacheRequest_Body) SetAsync(v bool) { + x.Async = v +} +func (x *SealWriteCacheRequest_Body) GetRestoreMode() bool { + if x != nil { + return x.RestoreMode + } + return false +} +func (x *SealWriteCacheRequest_Body) SetRestoreMode(v bool) { + x.RestoreMode = v +} +func (x *SealWriteCacheRequest_Body) GetShrink() bool { + if x != nil { + return x.Shrink + } + return false +} +func (x *SealWriteCacheRequest_Body) SetShrink(v bool) { + x.Shrink = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SealWriteCacheRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SealWriteCacheRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"ignoreErrors\":" + out.RawString(prefix) + out.Bool(x.IgnoreErrors) + } + { + const prefix string = ",\"async\":" + out.RawString(prefix) + out.Bool(x.Async) + } + { + const prefix string = ",\"restoreMode\":" + out.RawString(prefix) + out.Bool(x.RestoreMode) + } + { + const prefix string = ",\"shrink\":" + out.RawString(prefix) + out.Bool(x.Shrink) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SealWriteCacheRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SealWriteCacheRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + case "ignoreErrors": + { + var f bool + f = in.Bool() + x.IgnoreErrors = f + } + case "async": + { + var f bool + f = in.Bool() + x.Async = f + } + case "restoreMode": + { + var f bool + f = in.Bool() + x.RestoreMode = f + } + case "shrink": + { + var f bool + f = in.Bool() + x.Shrink = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SealWriteCacheRequest struct { + Body *SealWriteCacheRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SealWriteCacheRequest)(nil) + _ encoding.ProtoUnmarshaler = (*SealWriteCacheRequest)(nil) + _ json.Marshaler = (*SealWriteCacheRequest)(nil) + _ json.Unmarshaler = (*SealWriteCacheRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3464,27 +13729,6 @@ func (x *SealWriteCacheRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SealWriteCacheRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3500,13 +13744,166 @@ func (x *SealWriteCacheRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SealWriteCacheRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SealWriteCacheRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SealWriteCacheRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SealWriteCacheRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SealWriteCacheRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SealWriteCacheRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SealWriteCacheRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SealWriteCacheRequest) GetBody() *SealWriteCacheRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SealWriteCacheRequest) SetBody(v *SealWriteCacheRequest_Body) { + x.Body = v +} +func (x *SealWriteCacheRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SealWriteCacheRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SealWriteCacheRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SealWriteCacheRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SealWriteCacheRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SealWriteCacheRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SealWriteCacheRequest_Body + f = new(SealWriteCacheRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SealWriteCacheResponse_Body_Status struct { + Shard_ID []byte `json:"shardID"` + Success bool `json:"success"` + Error string `json:"error"` +} + +var ( + _ encoding.ProtoMarshaler = (*SealWriteCacheResponse_Body_Status)(nil) + _ encoding.ProtoUnmarshaler = (*SealWriteCacheResponse_Body_Status)(nil) + _ json.Marshaler = (*SealWriteCacheResponse_Body_Status)(nil) + _ json.Unmarshaler = (*SealWriteCacheResponse_Body_Status)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3520,28 +13917,182 @@ func (x *SealWriteCacheResponse_Body_Status) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SealWriteCacheResponse_Body_Status) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.BoolMarshal(2, buf[offset:], x.Success) - offset += proto.StringMarshal(3, buf[offset:], x.Error) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SealWriteCacheResponse_Body_Status) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SealWriteCacheResponse_Body_Status) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Shard_ID) != 0 { + mm.AppendBytes(1, x.Shard_ID) + } + if x.Success { + mm.AppendBool(2, x.Success) + } + if len(x.Error) != 0 { + mm.AppendString(3, x.Error) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SealWriteCacheResponse_Body_Status) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SealWriteCacheResponse_Body_Status") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = data + case 2: // Success + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Success") + } + x.Success = data + case 3: // Error + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Error") + } + x.Error = data + } + } + return nil +} +func (x *SealWriteCacheResponse_Body_Status) GetShard_ID() []byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *SealWriteCacheResponse_Body_Status) SetShard_ID(v []byte) { + x.Shard_ID = v +} +func (x *SealWriteCacheResponse_Body_Status) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} +func (x *SealWriteCacheResponse_Body_Status) SetSuccess(v bool) { + x.Success = v +} +func (x *SealWriteCacheResponse_Body_Status) GetError() string { + if x != nil { + return x.Error + } + return "" +} +func (x *SealWriteCacheResponse_Body_Status) SetError(v string) { + x.Error = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SealWriteCacheResponse_Body_Status) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SealWriteCacheResponse_Body_Status) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Shard_ID) + } + { + const prefix string = ",\"success\":" + out.RawString(prefix) + out.Bool(x.Success) + } + { + const prefix string = ",\"error\":" + out.RawString(prefix) + out.String(x.Error) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SealWriteCacheResponse_Body_Status) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SealWriteCacheResponse_Body_Status) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + f = in.Bytes() + x.Shard_ID = f + } + case "success": + { + var f bool + f = in.Bool() + x.Success = f + } + case "error": + { + var f string + f = in.String() + x.Error = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SealWriteCacheResponse_Body struct { + Results []*SealWriteCacheResponse_Body_Status `json:"results"` +} + +var ( + _ encoding.ProtoMarshaler = (*SealWriteCacheResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*SealWriteCacheResponse_Body)(nil) + _ json.Marshaler = (*SealWriteCacheResponse_Body)(nil) + _ json.Unmarshaler = (*SealWriteCacheResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3555,28 +14106,146 @@ func (x *SealWriteCacheResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SealWriteCacheResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - for i := range x.Results { - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Results[i]) - } - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SealWriteCacheResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SealWriteCacheResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for i := range x.Results { + if x.Results[i] != nil && x.Results[i].StableSize() != 0 { + x.Results[i].EmitProtobuf(mm.AppendMessage(1)) + } + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SealWriteCacheResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SealWriteCacheResponse_Body") + } + switch fc.FieldNum { + case 1: // Results + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Results") + } + x.Results = append(x.Results, new(SealWriteCacheResponse_Body_Status)) + ff := x.Results[len(x.Results)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SealWriteCacheResponse_Body) GetResults() []*SealWriteCacheResponse_Body_Status { + if x != nil { + return x.Results + } + return nil +} +func (x *SealWriteCacheResponse_Body) SetResults(v []*SealWriteCacheResponse_Body_Status) { + x.Results = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SealWriteCacheResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SealWriteCacheResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"results\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Results { + if i != 0 { + out.RawByte(',') + } + x.Results[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SealWriteCacheResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SealWriteCacheResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "results": + { + var f *SealWriteCacheResponse_Body_Status + var list []*SealWriteCacheResponse_Body_Status + in.Delim('[') + for !in.IsDelim(']') { + f = new(SealWriteCacheResponse_Body_Status) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Results = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type SealWriteCacheResponse struct { + Body *SealWriteCacheResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*SealWriteCacheResponse)(nil) + _ encoding.ProtoUnmarshaler = (*SealWriteCacheResponse)(nil) + _ json.Marshaler = (*SealWriteCacheResponse)(nil) + _ json.Unmarshaler = (*SealWriteCacheResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3589,27 +14258,6 @@ func (x *SealWriteCacheResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *SealWriteCacheResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3625,13 +14273,164 @@ func (x *SealWriteCacheResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *SealWriteCacheResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *SealWriteCacheResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *SealWriteCacheResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *SealWriteCacheResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *SealWriteCacheResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "SealWriteCacheResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(SealWriteCacheResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *SealWriteCacheResponse) GetBody() *SealWriteCacheResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *SealWriteCacheResponse) SetBody(v *SealWriteCacheResponse_Body) { + x.Body = v +} +func (x *SealWriteCacheResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *SealWriteCacheResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *SealWriteCacheResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *SealWriteCacheResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *SealWriteCacheResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *SealWriteCacheResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *SealWriteCacheResponse_Body + f = new(SealWriteCacheResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DetachShardsRequest_Body struct { + Shard_ID [][]byte `json:"shardID"` +} + +var ( + _ encoding.ProtoMarshaler = (*DetachShardsRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*DetachShardsRequest_Body)(nil) + _ json.Marshaler = (*DetachShardsRequest_Body)(nil) + _ json.Unmarshaler = (*DetachShardsRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3643,26 +14442,139 @@ func (x *DetachShardsRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DetachShardsRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedBytesMarshal(1, buf[offset:], x.Shard_ID) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DetachShardsRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DetachShardsRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Shard_ID { + mm.AppendBytes(1, x.Shard_ID[j]) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DetachShardsRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DetachShardsRequest_Body") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = append(x.Shard_ID, data) + } + } + return nil +} +func (x *DetachShardsRequest_Body) GetShard_ID() [][]byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *DetachShardsRequest_Body) SetShard_ID(v [][]byte) { + x.Shard_ID = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DetachShardsRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DetachShardsRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Shard_ID { + if i != 0 { + out.RawByte(',') + } + out.Base64Bytes(x.Shard_ID[i]) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DetachShardsRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DetachShardsRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + var list [][]byte + in.Delim('[') + for !in.IsDelim(']') { + f = in.Bytes() + list = append(list, f) + in.WantComma() + } + x.Shard_ID = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DetachShardsRequest struct { + Body *DetachShardsRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*DetachShardsRequest)(nil) + _ encoding.ProtoUnmarshaler = (*DetachShardsRequest)(nil) + _ json.Marshaler = (*DetachShardsRequest)(nil) + _ json.Unmarshaler = (*DetachShardsRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3675,27 +14587,6 @@ func (x *DetachShardsRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DetachShardsRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3711,13 +14602,163 @@ func (x *DetachShardsRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *DetachShardsRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *DetachShardsRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DetachShardsRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DetachShardsRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DetachShardsRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DetachShardsRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(DetachShardsRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *DetachShardsRequest) GetBody() *DetachShardsRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *DetachShardsRequest) SetBody(v *DetachShardsRequest_Body) { + x.Body = v +} +func (x *DetachShardsRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *DetachShardsRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DetachShardsRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DetachShardsRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DetachShardsRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DetachShardsRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *DetachShardsRequest_Body + f = new(DetachShardsRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DetachShardsResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*DetachShardsResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*DetachShardsResponse_Body)(nil) + _ json.Marshaler = (*DetachShardsResponse_Body)(nil) + _ json.Unmarshaler = (*DetachShardsResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3728,18 +14769,93 @@ func (x *DetachShardsResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DetachShardsResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DetachShardsResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *DetachShardsResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DetachShardsResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DetachShardsResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DetachShardsResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DetachShardsResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DetachShardsResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DetachShardsResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type DetachShardsResponse struct { + Body *DetachShardsResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*DetachShardsResponse)(nil) + _ encoding.ProtoUnmarshaler = (*DetachShardsResponse)(nil) + _ json.Marshaler = (*DetachShardsResponse)(nil) + _ json.Unmarshaler = (*DetachShardsResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -3752,27 +14868,6 @@ func (x *DetachShardsResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *DetachShardsResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -3788,9 +14883,149 @@ func (x *DetachShardsResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *DetachShardsResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *DetachShardsResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *DetachShardsResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *DetachShardsResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *DetachShardsResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "DetachShardsResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(DetachShardsResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *DetachShardsResponse) GetBody() *DetachShardsResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *DetachShardsResponse) SetBody(v *DetachShardsResponse_Body) { + x.Body = v +} +func (x *DetachShardsResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *DetachShardsResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *DetachShardsResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *DetachShardsResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *DetachShardsResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *DetachShardsResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *DetachShardsResponse_Body + f = new(DetachShardsResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } } diff --git a/pkg/services/control/service_test.go b/pkg/services/control/service_test.go deleted file mode 100644 index 1d98cc6f1..000000000 --- a/pkg/services/control/service_test.go +++ /dev/null @@ -1,181 +0,0 @@ -package control_test - -import ( - "bytes" - "testing" - - "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control" -) - -func TestHealthCheckResponse_Body_StableMarshal(t *testing.T) { - testStableMarshal(t, - generateHealthCheckResponseBody(), - new(control.HealthCheckResponse_Body), - func(m1, m2 protoMessage) bool { - return equalHealthCheckResponseBodies( - m1.(*control.HealthCheckResponse_Body), - m2.(*control.HealthCheckResponse_Body), - ) - }, - ) -} - -func generateHealthCheckResponseBody() *control.HealthCheckResponse_Body { - body := new(control.HealthCheckResponse_Body) - body.SetNetmapStatus(control.NetmapStatus_ONLINE) - body.SetHealthStatus(control.HealthStatus_SHUTTING_DOWN) - - return body -} - -func equalHealthCheckResponseBodies(b1, b2 *control.HealthCheckResponse_Body) bool { - return b1.GetNetmapStatus() == b2.GetNetmapStatus() && - b1.GetHealthStatus() == b2.GetHealthStatus() -} - -func TestSetNetmapStatusRequest_Body_StableMarshal(t *testing.T) { - testStableMarshal(t, - generateSetNetmapStatusRequestBody(), - new(control.SetNetmapStatusRequest_Body), - func(m1, m2 protoMessage) bool { - return equalSetnetmapStatusRequestBodies( - m1.(*control.SetNetmapStatusRequest_Body), - m2.(*control.SetNetmapStatusRequest_Body), - ) - }, - ) -} - -func generateSetNetmapStatusRequestBody() *control.SetNetmapStatusRequest_Body { - body := new(control.SetNetmapStatusRequest_Body) - body.SetStatus(control.NetmapStatus_ONLINE) - - return body -} - -func equalSetnetmapStatusRequestBodies(b1, b2 *control.SetNetmapStatusRequest_Body) bool { - return b1.GetStatus() == b2.GetStatus() -} - -func TestListShardsResponse_Body_StableMarshal(t *testing.T) { - testStableMarshal(t, - generateListShardsResponseBody(), - new(control.ListShardsResponse_Body), - func(m1, m2 protoMessage) bool { - return equalListShardResponseBodies( - m1.(*control.ListShardsResponse_Body), - m2.(*control.ListShardsResponse_Body), - ) - }, - ) -} - -func equalListShardResponseBodies(b1, b2 *control.ListShardsResponse_Body) bool { - if len(b1.Shards) != len(b2.Shards) { - return false - } - - for i := range b1.Shards { - if b1.Shards[i].GetMetabasePath() != b2.Shards[i].GetMetabasePath() || - b1.Shards[i].GetWritecachePath() != b2.Shards[i].GetWritecachePath() || - b1.Shards[i].GetPiloramaPath() != b2.Shards[i].GetPiloramaPath() || - !bytes.Equal(b1.Shards[i].GetShard_ID(), b2.Shards[i].GetShard_ID()) { - return false - } - - info1 := b1.Shards[i].GetBlobstor() - info2 := b2.Shards[i].GetBlobstor() - if !compareBlobstorInfo(info1, info2) { - return false - } - } - - for i := range b1.Shards { - for j := i + 1; j < len(b1.Shards); j++ { - if b1.Shards[i].GetMetabasePath() == b2.Shards[j].GetMetabasePath() || - !compareBlobstorInfo(b1.Shards[i].Blobstor, b2.Shards[i].Blobstor) || - b1.Shards[i].GetWritecachePath() == b2.Shards[j].GetWritecachePath() || - bytes.Equal(b1.Shards[i].GetShard_ID(), b2.Shards[j].GetShard_ID()) { - return false - } - } - } - - return true -} - -func compareBlobstorInfo(a, b []*control.BlobstorInfo) bool { - if len(a) != len(b) { - return false - } - for i := range a { - if a[i].Type != b[i].Type || - a[i].Path != b[i].Path { - return false - } - } - return true -} - -func generateListShardsResponseBody() *control.ListShardsResponse_Body { - body := new(control.ListShardsResponse_Body) - body.SetShards([]*control.ShardInfo{ - generateShardInfo(0), - generateShardInfo(1), - }) - - return body -} - -func TestSetShardModeRequest_Body_StableMarshal(t *testing.T) { - testStableMarshal(t, - generateSetShardModeRequestBody(), - new(control.SetShardModeRequest_Body), - func(m1, m2 protoMessage) bool { - return equalSetShardModeRequestBodies( - m1.(*control.SetShardModeRequest_Body), - m2.(*control.SetShardModeRequest_Body), - ) - }, - ) -} - -func generateSetShardModeRequestBody() *control.SetShardModeRequest_Body { - body := new(control.SetShardModeRequest_Body) - body.SetShardIDList([][]byte{{0, 1, 2, 3, 4}}) - body.SetMode(control.ShardMode_READ_WRITE) - - return body -} - -func equalSetShardModeRequestBodies(b1, b2 *control.SetShardModeRequest_Body) bool { - if b1.GetMode() != b2.GetMode() || len(b1.Shard_ID) != len(b2.Shard_ID) { - return false - } - - for i := range b1.Shard_ID { - if !bytes.Equal(b1.Shard_ID[i], b2.Shard_ID[i]) { - return false - } - } - - return true -} - -func TestSynchronizeTreeRequest_Body_StableMarshal(t *testing.T) { - testStableMarshal(t, - &control.SynchronizeTreeRequest_Body{ - ContainerId: []byte{1, 2, 3, 4, 5, 6, 7}, - TreeId: "someID", - Height: 42, - }, - new(control.SynchronizeTreeRequest_Body), - func(m1, m2 protoMessage) bool { - b1 := m1.(*control.SynchronizeTreeRequest_Body) - b2 := m2.(*control.SynchronizeTreeRequest_Body) - return bytes.Equal(b1.GetContainerId(), b2.GetContainerId()) && - b1.GetTreeId() == b2.GetTreeId() && - b1.GetHeight() == b2.GetHeight() - }, - ) -} diff --git a/pkg/services/control/types.go b/pkg/services/control/types.go deleted file mode 100644 index 94f681c55..000000000 --- a/pkg/services/control/types.go +++ /dev/null @@ -1,118 +0,0 @@ -package control - -import ( - "google.golang.org/protobuf/encoding/protojson" -) - -// SetKey sets public key used for signing. -func (x *Signature) SetKey(v []byte) { - if x != nil { - x.Key = v - } -} - -// SetSign sets binary signature. -func (x *Signature) SetSign(v []byte) { - if x != nil { - x.Sign = v - } -} - -// SetKey sets key of the node attribute. -func (x *NodeInfo_Attribute) SetKey(v string) { - if x != nil { - x.Key = v - } -} - -// SetValue sets value of the node attribute. -func (x *NodeInfo_Attribute) SetValue(v string) { - if x != nil { - x.Value = v - } -} - -// SetParents sets parent keys. -func (x *NodeInfo_Attribute) SetParents(v []string) { - if x != nil { - x.Parents = v - } -} - -// SetPublicKey sets public key of the FrostFS node in a binary format. -func (x *NodeInfo) SetPublicKey(v []byte) { - if x != nil { - x.PublicKey = v - } -} - -// SetAddresses sets ways to connect to a node. -func (x *NodeInfo) SetAddresses(v []string) { - if x != nil { - x.Addresses = v - } -} - -// SetAttributes sets attributes of the FrostFS Storage Node. -func (x *NodeInfo) SetAttributes(v []*NodeInfo_Attribute) { - if x != nil { - x.Attributes = v - } -} - -// SetState sets state of the FrostFS node. -func (x *NodeInfo) SetState(v NetmapStatus) { - if x != nil { - x.State = v - } -} - -// SetEpoch sets revision number of the network map. -func (x *Netmap) SetEpoch(v uint64) { - if x != nil { - x.Epoch = v - } -} - -// SetNodes sets nodes presented in network. -func (x *Netmap) SetNodes(v []*NodeInfo) { - if x != nil { - x.Nodes = v - } -} - -func (x *Netmap) MarshalJSON() ([]byte, error) { - return protojson.MarshalOptions{ - EmitUnpopulated: true, - }.Marshal(x) -} - -// SetID sets identificator of the shard. -func (x *ShardInfo) SetID(v []byte) { - x.Shard_ID = v -} - -// SetMetabasePath sets path to shard's metabase. -func (x *ShardInfo) SetMetabasePath(v string) { - x.MetabasePath = v -} - -// SetWriteCachePath sets path to shard's write-cache. -func (x *ShardInfo) SetWriteCachePath(v string) { - x.WritecachePath = v -} - -// SetPiloramaPath sets path to shard's pilorama. -func (x *ShardInfo) SetPiloramaPath(v string) { - x.PiloramaPath = v -} - -// SetMode sets path to shard's work mode. -func (x *ShardInfo) SetMode(v ShardMode) { - x.Mode = v -} - -// SetErrorCount sets shard's error counter. -func (x *ShardInfo) SetErrorCount(count uint32) { - x.ErrorCount = count -} diff --git a/pkg/services/control/types.pb.go b/pkg/services/control/types.pb.go deleted file mode 100644 index 858755694..000000000 --- a/pkg/services/control/types.pb.go +++ /dev/null @@ -1,1011 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.0 -// source: pkg/services/control/types.proto - -package control - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Status of the storage node in the FrostFS network map. -type NetmapStatus int32 - -const ( - // Undefined status, default value. - NetmapStatus_STATUS_UNDEFINED NetmapStatus = 0 - // Node is online. - NetmapStatus_ONLINE NetmapStatus = 1 - // Node is offline. - NetmapStatus_OFFLINE NetmapStatus = 2 - // Node is maintained by the owner. - NetmapStatus_MAINTENANCE NetmapStatus = 3 -) - -// Enum value maps for NetmapStatus. -var ( - NetmapStatus_name = map[int32]string{ - 0: "STATUS_UNDEFINED", - 1: "ONLINE", - 2: "OFFLINE", - 3: "MAINTENANCE", - } - NetmapStatus_value = map[string]int32{ - "STATUS_UNDEFINED": 0, - "ONLINE": 1, - "OFFLINE": 2, - "MAINTENANCE": 3, - } -) - -func (x NetmapStatus) Enum() *NetmapStatus { - p := new(NetmapStatus) - *p = x - return p -} - -func (x NetmapStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NetmapStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_types_proto_enumTypes[0].Descriptor() -} - -func (NetmapStatus) Type() protoreflect.EnumType { - return &file_pkg_services_control_types_proto_enumTypes[0] -} - -func (x NetmapStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NetmapStatus.Descriptor instead. -func (NetmapStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{0} -} - -// Health status of the storage node application. -type HealthStatus int32 - -const ( - // Undefined status, default value. - HealthStatus_HEALTH_STATUS_UNDEFINED HealthStatus = 0 - // Storage node application is starting. - HealthStatus_STARTING HealthStatus = 1 - // Storage node application is started and serves all services. - HealthStatus_READY HealthStatus = 2 - // Storage node application is shutting down. - HealthStatus_SHUTTING_DOWN HealthStatus = 3 - // Storage node application is reconfiguring. - HealthStatus_RECONFIGURING HealthStatus = 4 -) - -// Enum value maps for HealthStatus. -var ( - HealthStatus_name = map[int32]string{ - 0: "HEALTH_STATUS_UNDEFINED", - 1: "STARTING", - 2: "READY", - 3: "SHUTTING_DOWN", - 4: "RECONFIGURING", - } - HealthStatus_value = map[string]int32{ - "HEALTH_STATUS_UNDEFINED": 0, - "STARTING": 1, - "READY": 2, - "SHUTTING_DOWN": 3, - "RECONFIGURING": 4, - } -) - -func (x HealthStatus) Enum() *HealthStatus { - p := new(HealthStatus) - *p = x - return p -} - -func (x HealthStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_types_proto_enumTypes[1].Descriptor() -} - -func (HealthStatus) Type() protoreflect.EnumType { - return &file_pkg_services_control_types_proto_enumTypes[1] -} - -func (x HealthStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HealthStatus.Descriptor instead. -func (HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{1} -} - -// Work mode of the shard. -type ShardMode int32 - -const ( - // Undefined mode, default value. - ShardMode_SHARD_MODE_UNDEFINED ShardMode = 0 - // Read-write. - ShardMode_READ_WRITE ShardMode = 1 - // Read-only. - ShardMode_READ_ONLY ShardMode = 2 - // Degraded. - ShardMode_DEGRADED ShardMode = 3 - // DegradedReadOnly. - ShardMode_DEGRADED_READ_ONLY ShardMode = 4 -) - -// Enum value maps for ShardMode. -var ( - ShardMode_name = map[int32]string{ - 0: "SHARD_MODE_UNDEFINED", - 1: "READ_WRITE", - 2: "READ_ONLY", - 3: "DEGRADED", - 4: "DEGRADED_READ_ONLY", - } - ShardMode_value = map[string]int32{ - "SHARD_MODE_UNDEFINED": 0, - "READ_WRITE": 1, - "READ_ONLY": 2, - "DEGRADED": 3, - "DEGRADED_READ_ONLY": 4, - } -) - -func (x ShardMode) Enum() *ShardMode { - p := new(ShardMode) - *p = x - return p -} - -func (x ShardMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ShardMode) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_types_proto_enumTypes[2].Descriptor() -} - -func (ShardMode) Type() protoreflect.EnumType { - return &file_pkg_services_control_types_proto_enumTypes[2] -} - -func (x ShardMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ShardMode.Descriptor instead. -func (ShardMode) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{2} -} - -type ChainTarget_TargetType int32 - -const ( - ChainTarget_UNDEFINED ChainTarget_TargetType = 0 - ChainTarget_NAMESPACE ChainTarget_TargetType = 1 - ChainTarget_CONTAINER ChainTarget_TargetType = 2 - ChainTarget_USER ChainTarget_TargetType = 3 - ChainTarget_GROUP ChainTarget_TargetType = 4 -) - -// Enum value maps for ChainTarget_TargetType. -var ( - ChainTarget_TargetType_name = map[int32]string{ - 0: "UNDEFINED", - 1: "NAMESPACE", - 2: "CONTAINER", - 3: "USER", - 4: "GROUP", - } - ChainTarget_TargetType_value = map[string]int32{ - "UNDEFINED": 0, - "NAMESPACE": 1, - "CONTAINER": 2, - "USER": 3, - "GROUP": 4, - } -) - -func (x ChainTarget_TargetType) Enum() *ChainTarget_TargetType { - p := new(ChainTarget_TargetType) - *p = x - return p -} - -func (x ChainTarget_TargetType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChainTarget_TargetType) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_control_types_proto_enumTypes[3].Descriptor() -} - -func (ChainTarget_TargetType) Type() protoreflect.EnumType { - return &file_pkg_services_control_types_proto_enumTypes[3] -} - -func (x ChainTarget_TargetType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChainTarget_TargetType.Descriptor instead. -func (ChainTarget_TargetType) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{5, 0} -} - -// Signature of some message. -type Signature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Public key used for signing. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Binary signature. - Sign []byte `protobuf:"bytes,2,opt,name=sign,json=signature,proto3" json:"sign,omitempty"` -} - -func (x *Signature) Reset() { - *x = Signature{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Signature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Signature) ProtoMessage() {} - -func (x *Signature) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Signature.ProtoReflect.Descriptor instead. -func (*Signature) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{0} -} - -func (x *Signature) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *Signature) GetSign() []byte { - if x != nil { - return x.Sign - } - return nil -} - -// FrostFS node description. -type NodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Public key of the FrostFS node in a binary format. - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // Ways to connect to a node. - Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` - // Carries list of the FrostFS node attributes in a key-value form. Key name - // must be a node-unique valid UTF-8 string. Value can't be empty. NodeInfo - // structures with duplicated attribute names or attributes with empty values - // will be considered invalid. - Attributes []*NodeInfo_Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` - // Carries state of the FrostFS node. - State NetmapStatus `protobuf:"varint,4,opt,name=state,proto3,enum=control.NetmapStatus" json:"state,omitempty"` -} - -func (x *NodeInfo) Reset() { - *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfo) ProtoMessage() {} - -func (x *NodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead. -func (*NodeInfo) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{1} -} - -func (x *NodeInfo) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *NodeInfo) GetAddresses() []string { - if x != nil { - return x.Addresses - } - return nil -} - -func (x *NodeInfo) GetAttributes() []*NodeInfo_Attribute { - if x != nil { - return x.Attributes - } - return nil -} - -func (x *NodeInfo) GetState() NetmapStatus { - if x != nil { - return x.State - } - return NetmapStatus_STATUS_UNDEFINED -} - -// Network map structure. -type Netmap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Network map revision number. - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - // Nodes presented in network. - Nodes []*NodeInfo `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` -} - -func (x *Netmap) Reset() { - *x = Netmap{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Netmap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Netmap) ProtoMessage() {} - -func (x *Netmap) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Netmap.ProtoReflect.Descriptor instead. -func (*Netmap) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{2} -} - -func (x *Netmap) GetEpoch() uint64 { - if x != nil { - return x.Epoch - } - return 0 -} - -func (x *Netmap) GetNodes() []*NodeInfo { - if x != nil { - return x.Nodes - } - return nil -} - -// Shard description. -type ShardInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the shard. - Shard_ID []byte `protobuf:"bytes,1,opt,name=shard_ID,json=shardID,proto3" json:"shard_ID,omitempty"` - // Path to shard's metabase. - MetabasePath string `protobuf:"bytes,2,opt,name=metabase_path,json=metabasePath,proto3" json:"metabase_path,omitempty"` - // Shard's blobstor info. - Blobstor []*BlobstorInfo `protobuf:"bytes,3,rep,name=blobstor,proto3" json:"blobstor,omitempty"` - // Path to shard's write-cache, empty if disabled. - WritecachePath string `protobuf:"bytes,4,opt,name=writecache_path,json=writecachePath,proto3" json:"writecache_path,omitempty"` - // Work mode of the shard. - Mode ShardMode `protobuf:"varint,5,opt,name=mode,proto3,enum=control.ShardMode" json:"mode,omitempty"` - // Amount of errors occured. - ErrorCount uint32 `protobuf:"varint,6,opt,name=errorCount,proto3" json:"errorCount,omitempty"` - // Path to shard's pilorama storage. - PiloramaPath string `protobuf:"bytes,7,opt,name=pilorama_path,json=piloramaPath,proto3" json:"pilorama_path,omitempty"` -} - -func (x *ShardInfo) Reset() { - *x = ShardInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ShardInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ShardInfo) ProtoMessage() {} - -func (x *ShardInfo) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ShardInfo.ProtoReflect.Descriptor instead. -func (*ShardInfo) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{3} -} - -func (x *ShardInfo) GetShard_ID() []byte { - if x != nil { - return x.Shard_ID - } - return nil -} - -func (x *ShardInfo) GetMetabasePath() string { - if x != nil { - return x.MetabasePath - } - return "" -} - -func (x *ShardInfo) GetBlobstor() []*BlobstorInfo { - if x != nil { - return x.Blobstor - } - return nil -} - -func (x *ShardInfo) GetWritecachePath() string { - if x != nil { - return x.WritecachePath - } - return "" -} - -func (x *ShardInfo) GetMode() ShardMode { - if x != nil { - return x.Mode - } - return ShardMode_SHARD_MODE_UNDEFINED -} - -func (x *ShardInfo) GetErrorCount() uint32 { - if x != nil { - return x.ErrorCount - } - return 0 -} - -func (x *ShardInfo) GetPiloramaPath() string { - if x != nil { - return x.PiloramaPath - } - return "" -} - -// Blobstor component description. -type BlobstorInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the root. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Component type. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *BlobstorInfo) Reset() { - *x = BlobstorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlobstorInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlobstorInfo) ProtoMessage() {} - -func (x *BlobstorInfo) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlobstorInfo.ProtoReflect.Descriptor instead. -func (*BlobstorInfo) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{4} -} - -func (x *BlobstorInfo) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *BlobstorInfo) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -// ChainTarget is an object to which local overrides -// are applied. -type ChainTarget struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type ChainTarget_TargetType `protobuf:"varint,1,opt,name=type,proto3,enum=control.ChainTarget_TargetType" json:"type,omitempty"` - Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` -} - -func (x *ChainTarget) Reset() { - *x = ChainTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainTarget) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChainTarget) ProtoMessage() {} - -func (x *ChainTarget) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChainTarget.ProtoReflect.Descriptor instead. -func (*ChainTarget) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{5} -} - -func (x *ChainTarget) GetType() ChainTarget_TargetType { - if x != nil { - return x.Type - } - return ChainTarget_UNDEFINED -} - -func (x *ChainTarget) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Administrator-defined Attributes of the FrostFS Storage Node. -// -// `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8 -// string. Value can't be empty. -// -// Node's attributes are mostly used during Storage Policy evaluation to -// calculate object's placement and find a set of nodes satisfying policy -// requirements. There are some "well-known" node attributes common to all the -// Storage Nodes in the network and used implicitly with default values if not -// explicitly set: -// -// - Capacity \ -// Total available disk space in Gigabytes. -// - Price \ -// Price in GAS tokens for storing one GB of data during one Epoch. In node -// attributes it's a string presenting floating point number with comma or -// point delimiter for decimal part. In the Network Map it will be saved as -// 64-bit unsigned integer representing number of minimal token fractions. -// - Locode \ -// Node's geographic location in -// [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) -// format approximated to the nearest point defined in standard. -// - Country \ -// Country code in -// [ISO 3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) -// format. Calculated automatically from `Locode` attribute -// - Region \ -// Country's administative subdivision where node is located. Calculated -// automatically from `Locode` attribute based on `SubDiv` field. Presented -// in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. -// - City \ -// City, town, village or rural area name where node is located written -// without diacritics . Calculated automatically from `Locode` attribute. -// -// For detailed description of each well-known attribute please see the -// corresponding section in FrostFS Technical specification. -type NodeInfo_Attribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key of the node attribute. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Value of the node attribute. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // Parent keys, if any. For example for `City` it could be `Region` and - // `Country`. - Parents []string `protobuf:"bytes,3,rep,name=parents,proto3" json:"parents,omitempty"` -} - -func (x *NodeInfo_Attribute) Reset() { - *x = NodeInfo_Attribute{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_control_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeInfo_Attribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfo_Attribute) ProtoMessage() {} - -func (x *NodeInfo_Attribute) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_control_types_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeInfo_Attribute.ProtoReflect.Descriptor instead. -func (*NodeInfo_Attribute) Descriptor() ([]byte, []int) { - return file_pkg_services_control_types_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *NodeInfo_Attribute) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *NodeInfo_Attribute) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *NodeInfo_Attribute) GetParents() []string { - if x != nil { - return x.Parents - } - return nil -} - -var File_pkg_services_control_types_proto protoreflect.FileDescriptor - -var file_pkg_services_control_types_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x36, 0x0a, 0x09, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, - 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x22, 0x80, 0x02, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3b, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x4d, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x47, 0x0a, 0x06, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, - 0x94, 0x02, 0x0a, 0x09, 0x53, 0x68, 0x61, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, - 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x31, 0x0a, - 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x74, - 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x74, 0x6f, 0x72, - 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x6c, 0x6f, 0x72, 0x61, 0x6d, 0x61, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x6c, 0x6f, 0x72, 0x61, - 0x6d, 0x61, 0x50, 0x61, 0x74, 0x68, 0x22, 0x36, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x74, - 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa6, - 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x33, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x0a, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, - 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, - 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, - 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x04, 0x2a, 0x4e, 0x0a, 0x0c, 0x4e, 0x65, 0x74, 0x6d, 0x61, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x46, 0x46, - 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, - 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x6a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x45, 0x41, 0x4c, 0x54, - 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, 0x47, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x11, 0x0a, - 0x0d, 0x53, 0x48, 0x55, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, - 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x49, 0x4e, - 0x47, 0x10, 0x04, 0x2a, 0x6a, 0x0a, 0x09, 0x53, 0x68, 0x61, 0x72, 0x64, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, - 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, - 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, - 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x47, - 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x45, 0x47, 0x52, 0x41, - 0x44, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x42, - 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, - 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, - 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pkg_services_control_types_proto_rawDescOnce sync.Once - file_pkg_services_control_types_proto_rawDescData = file_pkg_services_control_types_proto_rawDesc -) - -func file_pkg_services_control_types_proto_rawDescGZIP() []byte { - file_pkg_services_control_types_proto_rawDescOnce.Do(func() { - file_pkg_services_control_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_services_control_types_proto_rawDescData) - }) - return file_pkg_services_control_types_proto_rawDescData -} - -var file_pkg_services_control_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_pkg_services_control_types_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_pkg_services_control_types_proto_goTypes = []interface{}{ - (NetmapStatus)(0), // 0: control.NetmapStatus - (HealthStatus)(0), // 1: control.HealthStatus - (ShardMode)(0), // 2: control.ShardMode - (ChainTarget_TargetType)(0), // 3: control.ChainTarget.TargetType - (*Signature)(nil), // 4: control.Signature - (*NodeInfo)(nil), // 5: control.NodeInfo - (*Netmap)(nil), // 6: control.Netmap - (*ShardInfo)(nil), // 7: control.ShardInfo - (*BlobstorInfo)(nil), // 8: control.BlobstorInfo - (*ChainTarget)(nil), // 9: control.ChainTarget - (*NodeInfo_Attribute)(nil), // 10: control.NodeInfo.Attribute -} -var file_pkg_services_control_types_proto_depIdxs = []int32{ - 10, // 0: control.NodeInfo.attributes:type_name -> control.NodeInfo.Attribute - 0, // 1: control.NodeInfo.state:type_name -> control.NetmapStatus - 5, // 2: control.Netmap.nodes:type_name -> control.NodeInfo - 8, // 3: control.ShardInfo.blobstor:type_name -> control.BlobstorInfo - 2, // 4: control.ShardInfo.mode:type_name -> control.ShardMode - 3, // 5: control.ChainTarget.type:type_name -> control.ChainTarget.TargetType - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_pkg_services_control_types_proto_init() } -func file_pkg_services_control_types_proto_init() { - if File_pkg_services_control_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pkg_services_control_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Signature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Netmap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShardInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlobstorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_control_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeInfo_Attribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_services_control_types_proto_rawDesc, - NumEnums: 4, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pkg_services_control_types_proto_goTypes, - DependencyIndexes: file_pkg_services_control_types_proto_depIdxs, - EnumInfos: file_pkg_services_control_types_proto_enumTypes, - MessageInfos: file_pkg_services_control_types_proto_msgTypes, - }.Build() - File_pkg_services_control_types_proto = out.File - file_pkg_services_control_types_proto_rawDesc = nil - file_pkg_services_control_types_proto_goTypes = nil - file_pkg_services_control_types_proto_depIdxs = nil -} diff --git a/pkg/services/control/types_frostfs.pb.go b/pkg/services/control/types_frostfs.pb.go index 858d85a1c..9aff26a98 100644 --- a/pkg/services/control/types_frostfs.pb.go +++ b/pkg/services/control/types_frostfs.pb.go @@ -2,7 +2,149 @@ package control -import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" +import ( + json "encoding/json" + fmt "fmt" + pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" + proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" + encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" + easyproto "github.com/VictoriaMetrics/easyproto" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" + strconv "strconv" +) + +type NetmapStatus int32 + +const ( + NetmapStatus_STATUS_UNDEFINED NetmapStatus = 0 + NetmapStatus_ONLINE NetmapStatus = 1 + NetmapStatus_OFFLINE NetmapStatus = 2 + NetmapStatus_MAINTENANCE NetmapStatus = 3 +) + +var ( + NetmapStatus_name = map[int32]string{ + 0: "STATUS_UNDEFINED", + 1: "ONLINE", + 2: "OFFLINE", + 3: "MAINTENANCE", + } + NetmapStatus_value = map[string]int32{ + "STATUS_UNDEFINED": 0, + "ONLINE": 1, + "OFFLINE": 2, + "MAINTENANCE": 3, + } +) + +func (x NetmapStatus) String() string { + if v, ok := NetmapStatus_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *NetmapStatus) FromString(s string) bool { + if v, ok := NetmapStatus_value[s]; ok { + *x = NetmapStatus(v) + return true + } + return false +} + +type HealthStatus int32 + +const ( + HealthStatus_HEALTH_STATUS_UNDEFINED HealthStatus = 0 + HealthStatus_STARTING HealthStatus = 1 + HealthStatus_READY HealthStatus = 2 + HealthStatus_SHUTTING_DOWN HealthStatus = 3 + HealthStatus_RECONFIGURING HealthStatus = 4 +) + +var ( + HealthStatus_name = map[int32]string{ + 0: "HEALTH_STATUS_UNDEFINED", + 1: "STARTING", + 2: "READY", + 3: "SHUTTING_DOWN", + 4: "RECONFIGURING", + } + HealthStatus_value = map[string]int32{ + "HEALTH_STATUS_UNDEFINED": 0, + "STARTING": 1, + "READY": 2, + "SHUTTING_DOWN": 3, + "RECONFIGURING": 4, + } +) + +func (x HealthStatus) String() string { + if v, ok := HealthStatus_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *HealthStatus) FromString(s string) bool { + if v, ok := HealthStatus_value[s]; ok { + *x = HealthStatus(v) + return true + } + return false +} + +type ShardMode int32 + +const ( + ShardMode_SHARD_MODE_UNDEFINED ShardMode = 0 + ShardMode_READ_WRITE ShardMode = 1 + ShardMode_READ_ONLY ShardMode = 2 + ShardMode_DEGRADED ShardMode = 3 + ShardMode_DEGRADED_READ_ONLY ShardMode = 4 +) + +var ( + ShardMode_name = map[int32]string{ + 0: "SHARD_MODE_UNDEFINED", + 1: "READ_WRITE", + 2: "READ_ONLY", + 3: "DEGRADED", + 4: "DEGRADED_READ_ONLY", + } + ShardMode_value = map[string]int32{ + "SHARD_MODE_UNDEFINED": 0, + "READ_WRITE": 1, + "READ_ONLY": 2, + "DEGRADED": 3, + "DEGRADED_READ_ONLY": 4, + } +) + +func (x ShardMode) String() string { + if v, ok := ShardMode_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *ShardMode) FromString(s string) bool { + if v, ok := ShardMode_value[s]; ok { + *x = ShardMode(v) + return true + } + return false +} + +type Signature struct { + Key []byte `json:"key"` + Sign []byte `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*Signature)(nil) + _ encoding.ProtoUnmarshaler = (*Signature)(nil) + _ json.Marshaler = (*Signature)(nil) + _ json.Unmarshaler = (*Signature)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -16,27 +158,155 @@ func (x *Signature) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *Signature) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Key) - offset += proto.BytesMarshal(2, buf[offset:], x.Sign) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *Signature) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *Signature) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Key) != 0 { + mm.AppendBytes(1, x.Key) + } + if len(x.Sign) != 0 { + mm.AppendBytes(2, x.Sign) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *Signature) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "Signature") + } + switch fc.FieldNum { + case 1: // Key + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Key") + } + x.Key = data + case 2: // Sign + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Sign") + } + x.Sign = data + } + } + return nil +} +func (x *Signature) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} +func (x *Signature) SetKey(v []byte) { + x.Key = v +} +func (x *Signature) GetSign() []byte { + if x != nil { + return x.Sign + } + return nil +} +func (x *Signature) SetSign(v []byte) { + x.Sign = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *Signature) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *Signature) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Key) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + out.Base64Bytes(x.Sign) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *Signature) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *Signature) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "key": + { + var f []byte + f = in.Bytes() + x.Key = f + } + case "signature": + { + var f []byte + f = in.Bytes() + x.Sign = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type NodeInfo_Attribute struct { + Key string `json:"key"` + Value string `json:"value"` + Parents []string `json:"parents"` +} + +var ( + _ encoding.ProtoMarshaler = (*NodeInfo_Attribute)(nil) + _ encoding.ProtoUnmarshaler = (*NodeInfo_Attribute)(nil) + _ json.Marshaler = (*NodeInfo_Attribute)(nil) + _ json.Unmarshaler = (*NodeInfo_Attribute)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -50,28 +320,199 @@ func (x *NodeInfo_Attribute) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *NodeInfo_Attribute) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.StringMarshal(1, buf[offset:], x.Key) - offset += proto.StringMarshal(2, buf[offset:], x.Value) - offset += proto.RepeatedStringMarshal(3, buf[offset:], x.Parents) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *NodeInfo_Attribute) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *NodeInfo_Attribute) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Key) != 0 { + mm.AppendString(1, x.Key) + } + if len(x.Value) != 0 { + mm.AppendString(2, x.Value) + } + for j := range x.Parents { + mm.AppendString(3, x.Parents[j]) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *NodeInfo_Attribute) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "NodeInfo_Attribute") + } + switch fc.FieldNum { + case 1: // Key + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Key") + } + x.Key = data + case 2: // Value + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Value") + } + x.Value = data + case 3: // Parents + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Parents") + } + x.Parents = append(x.Parents, data) + } + } + return nil +} +func (x *NodeInfo_Attribute) GetKey() string { + if x != nil { + return x.Key + } + return "" +} +func (x *NodeInfo_Attribute) SetKey(v string) { + x.Key = v +} +func (x *NodeInfo_Attribute) GetValue() string { + if x != nil { + return x.Value + } + return "" +} +func (x *NodeInfo_Attribute) SetValue(v string) { + x.Value = v +} +func (x *NodeInfo_Attribute) GetParents() []string { + if x != nil { + return x.Parents + } + return nil +} +func (x *NodeInfo_Attribute) SetParents(v []string) { + x.Parents = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *NodeInfo_Attribute) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *NodeInfo_Attribute) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.String(x.Key) + } + { + const prefix string = ",\"value\":" + out.RawString(prefix) + out.String(x.Value) + } + { + const prefix string = ",\"parents\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Parents { + if i != 0 { + out.RawByte(',') + } + out.String(x.Parents[i]) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *NodeInfo_Attribute) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *NodeInfo_Attribute) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "key": + { + var f string + f = in.String() + x.Key = f + } + case "value": + { + var f string + f = in.String() + x.Value = f + } + case "parents": + { + var f string + var list []string + in.Delim('[') + for !in.IsDelim(']') { + f = in.String() + list = append(list, f) + in.WantComma() + } + x.Parents = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type NodeInfo struct { + PublicKey []byte `json:"publicKey"` + Addresses []string `json:"addresses"` + Attributes []*NodeInfo_Attribute `json:"attributes"` + State NetmapStatus `json:"state"` +} + +var ( + _ encoding.ProtoMarshaler = (*NodeInfo)(nil) + _ encoding.ProtoUnmarshaler = (*NodeInfo)(nil) + _ json.Marshaler = (*NodeInfo)(nil) + _ json.Unmarshaler = (*NodeInfo)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -88,31 +529,263 @@ func (x *NodeInfo) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *NodeInfo) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.PublicKey) - offset += proto.RepeatedStringMarshal(2, buf[offset:], x.Addresses) - for i := range x.Attributes { - offset += proto.NestedStructureMarshal(3, buf[offset:], x.Attributes[i]) - } - offset += proto.EnumMarshal(4, buf[offset:], int32(x.State)) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *NodeInfo) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *NodeInfo) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.PublicKey) != 0 { + mm.AppendBytes(1, x.PublicKey) + } + for j := range x.Addresses { + mm.AppendString(2, x.Addresses[j]) + } + for i := range x.Attributes { + if x.Attributes[i] != nil && x.Attributes[i].StableSize() != 0 { + x.Attributes[i].EmitProtobuf(mm.AppendMessage(3)) + } + } + if int32(x.State) != 0 { + mm.AppendInt32(4, int32(x.State)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *NodeInfo) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "NodeInfo") + } + switch fc.FieldNum { + case 1: // PublicKey + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "PublicKey") + } + x.PublicKey = data + case 2: // Addresses + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Addresses") + } + x.Addresses = append(x.Addresses, data) + case 3: // Attributes + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Attributes") + } + x.Attributes = append(x.Attributes, new(NodeInfo_Attribute)) + ff := x.Attributes[len(x.Attributes)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 4: // State + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "State") + } + x.State = NetmapStatus(data) + } + } + return nil +} +func (x *NodeInfo) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} +func (x *NodeInfo) SetPublicKey(v []byte) { + x.PublicKey = v +} +func (x *NodeInfo) GetAddresses() []string { + if x != nil { + return x.Addresses + } + return nil +} +func (x *NodeInfo) SetAddresses(v []string) { + x.Addresses = v +} +func (x *NodeInfo) GetAttributes() []*NodeInfo_Attribute { + if x != nil { + return x.Attributes + } + return nil +} +func (x *NodeInfo) SetAttributes(v []*NodeInfo_Attribute) { + x.Attributes = v +} +func (x *NodeInfo) GetState() NetmapStatus { + if x != nil { + return x.State + } + return 0 +} +func (x *NodeInfo) SetState(v NetmapStatus) { + x.State = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *NodeInfo) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *NodeInfo) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"publicKey\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.PublicKey) + } + { + const prefix string = ",\"addresses\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Addresses { + if i != 0 { + out.RawByte(',') + } + out.String(x.Addresses[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"attributes\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Attributes { + if i != 0 { + out.RawByte(',') + } + x.Attributes[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + { + const prefix string = ",\"state\":" + out.RawString(prefix) + out.Int32(int32(x.State)) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *NodeInfo) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *NodeInfo) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "publicKey": + { + var f []byte + f = in.Bytes() + x.PublicKey = f + } + case "addresses": + { + var f string + var list []string + in.Delim('[') + for !in.IsDelim(']') { + f = in.String() + list = append(list, f) + in.WantComma() + } + x.Addresses = list + in.Delim(']') + } + case "attributes": + { + var f *NodeInfo_Attribute + var list []*NodeInfo_Attribute + in.Delim('[') + for !in.IsDelim(']') { + f = new(NodeInfo_Attribute) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Attributes = list + in.Delim(']') + } + case "state": + { + var f NetmapStatus + var parsedValue NetmapStatus + switch v := in.Interface().(type) { + case string: + if vv, ok := NetmapStatus_value[v]; ok { + parsedValue = NetmapStatus(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = NetmapStatus(vv) + case float64: + parsedValue = NetmapStatus(v) + } + f = parsedValue + x.State = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type Netmap struct { + Epoch uint64 `json:"epoch"` + Nodes []*NodeInfo `json:"nodes"` +} + +var ( + _ encoding.ProtoMarshaler = (*Netmap)(nil) + _ encoding.ProtoUnmarshaler = (*Netmap)(nil) + _ json.Marshaler = (*Netmap)(nil) + _ json.Unmarshaler = (*Netmap)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -127,29 +800,180 @@ func (x *Netmap) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *Netmap) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt64Marshal(1, buf[offset:], x.Epoch) - for i := range x.Nodes { - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Nodes[i]) - } - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *Netmap) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *Netmap) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Epoch != 0 { + mm.AppendUint64(1, x.Epoch) + } + for i := range x.Nodes { + if x.Nodes[i] != nil && x.Nodes[i].StableSize() != 0 { + x.Nodes[i].EmitProtobuf(mm.AppendMessage(2)) + } + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *Netmap) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "Netmap") + } + switch fc.FieldNum { + case 1: // Epoch + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Epoch") + } + x.Epoch = data + case 2: // Nodes + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Nodes") + } + x.Nodes = append(x.Nodes, new(NodeInfo)) + ff := x.Nodes[len(x.Nodes)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *Netmap) GetEpoch() uint64 { + if x != nil { + return x.Epoch + } + return 0 +} +func (x *Netmap) SetEpoch(v uint64) { + x.Epoch = v +} +func (x *Netmap) GetNodes() []*NodeInfo { + if x != nil { + return x.Nodes + } + return nil +} +func (x *Netmap) SetNodes(v []*NodeInfo) { + x.Nodes = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *Netmap) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *Netmap) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"epoch\":" + out.RawString(prefix[1:]) + out.Uint64(x.Epoch) + } + { + const prefix string = ",\"nodes\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Nodes { + if i != 0 { + out.RawByte(',') + } + x.Nodes[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *Netmap) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *Netmap) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "epoch": + { + var f uint64 + f = in.Uint64() + x.Epoch = f + } + case "nodes": + { + var f *NodeInfo + var list []*NodeInfo + in.Delim('[') + for !in.IsDelim(']') { + f = new(NodeInfo) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Nodes = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ShardInfo struct { + Shard_ID []byte `json:"shardID"` + MetabasePath string `json:"metabasePath"` + Blobstor []*BlobstorInfo `json:"blobstor"` + WritecachePath string `json:"writecachePath"` + Mode ShardMode `json:"mode"` + ErrorCount uint32 `json:"errorCount"` + PiloramaPath string `json:"piloramaPath"` +} + +var ( + _ encoding.ProtoMarshaler = (*ShardInfo)(nil) + _ encoding.ProtoUnmarshaler = (*ShardInfo)(nil) + _ json.Marshaler = (*ShardInfo)(nil) + _ json.Unmarshaler = (*ShardInfo)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -169,34 +993,336 @@ func (x *ShardInfo) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ShardInfo) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Shard_ID) - offset += proto.StringMarshal(2, buf[offset:], x.MetabasePath) - for i := range x.Blobstor { - offset += proto.NestedStructureMarshal(3, buf[offset:], x.Blobstor[i]) - } - offset += proto.StringMarshal(4, buf[offset:], x.WritecachePath) - offset += proto.EnumMarshal(5, buf[offset:], int32(x.Mode)) - offset += proto.UInt32Marshal(6, buf[offset:], x.ErrorCount) - offset += proto.StringMarshal(7, buf[offset:], x.PiloramaPath) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ShardInfo) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ShardInfo) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Shard_ID) != 0 { + mm.AppendBytes(1, x.Shard_ID) + } + if len(x.MetabasePath) != 0 { + mm.AppendString(2, x.MetabasePath) + } + for i := range x.Blobstor { + if x.Blobstor[i] != nil && x.Blobstor[i].StableSize() != 0 { + x.Blobstor[i].EmitProtobuf(mm.AppendMessage(3)) + } + } + if len(x.WritecachePath) != 0 { + mm.AppendString(4, x.WritecachePath) + } + if int32(x.Mode) != 0 { + mm.AppendInt32(5, int32(x.Mode)) + } + if x.ErrorCount != 0 { + mm.AppendUint32(6, x.ErrorCount) + } + if len(x.PiloramaPath) != 0 { + mm.AppendString(7, x.PiloramaPath) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ShardInfo) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ShardInfo") + } + switch fc.FieldNum { + case 1: // Shard_ID + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Shard_ID") + } + x.Shard_ID = data + case 2: // MetabasePath + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "MetabasePath") + } + x.MetabasePath = data + case 3: // Blobstor + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Blobstor") + } + x.Blobstor = append(x.Blobstor, new(BlobstorInfo)) + ff := x.Blobstor[len(x.Blobstor)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 4: // WritecachePath + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "WritecachePath") + } + x.WritecachePath = data + case 5: // Mode + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Mode") + } + x.Mode = ShardMode(data) + case 6: // ErrorCount + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ErrorCount") + } + x.ErrorCount = data + case 7: // PiloramaPath + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "PiloramaPath") + } + x.PiloramaPath = data + } + } + return nil +} +func (x *ShardInfo) GetShard_ID() []byte { + if x != nil { + return x.Shard_ID + } + return nil +} +func (x *ShardInfo) SetShard_ID(v []byte) { + x.Shard_ID = v +} +func (x *ShardInfo) GetMetabasePath() string { + if x != nil { + return x.MetabasePath + } + return "" +} +func (x *ShardInfo) SetMetabasePath(v string) { + x.MetabasePath = v +} +func (x *ShardInfo) GetBlobstor() []*BlobstorInfo { + if x != nil { + return x.Blobstor + } + return nil +} +func (x *ShardInfo) SetBlobstor(v []*BlobstorInfo) { + x.Blobstor = v +} +func (x *ShardInfo) GetWritecachePath() string { + if x != nil { + return x.WritecachePath + } + return "" +} +func (x *ShardInfo) SetWritecachePath(v string) { + x.WritecachePath = v +} +func (x *ShardInfo) GetMode() ShardMode { + if x != nil { + return x.Mode + } + return 0 +} +func (x *ShardInfo) SetMode(v ShardMode) { + x.Mode = v +} +func (x *ShardInfo) GetErrorCount() uint32 { + if x != nil { + return x.ErrorCount + } + return 0 +} +func (x *ShardInfo) SetErrorCount(v uint32) { + x.ErrorCount = v +} +func (x *ShardInfo) GetPiloramaPath() string { + if x != nil { + return x.PiloramaPath + } + return "" +} +func (x *ShardInfo) SetPiloramaPath(v string) { + x.PiloramaPath = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ShardInfo) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ShardInfo) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"shardID\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Shard_ID) + } + { + const prefix string = ",\"metabasePath\":" + out.RawString(prefix) + out.String(x.MetabasePath) + } + { + const prefix string = ",\"blobstor\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Blobstor { + if i != 0 { + out.RawByte(',') + } + x.Blobstor[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + { + const prefix string = ",\"writecachePath\":" + out.RawString(prefix) + out.String(x.WritecachePath) + } + { + const prefix string = ",\"mode\":" + out.RawString(prefix) + out.Int32(int32(x.Mode)) + } + { + const prefix string = ",\"errorCount\":" + out.RawString(prefix) + out.Uint32(x.ErrorCount) + } + { + const prefix string = ",\"piloramaPath\":" + out.RawString(prefix) + out.String(x.PiloramaPath) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ShardInfo) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ShardInfo) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "shardID": + { + var f []byte + f = in.Bytes() + x.Shard_ID = f + } + case "metabasePath": + { + var f string + f = in.String() + x.MetabasePath = f + } + case "blobstor": + { + var f *BlobstorInfo + var list []*BlobstorInfo + in.Delim('[') + for !in.IsDelim(']') { + f = new(BlobstorInfo) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Blobstor = list + in.Delim(']') + } + case "writecachePath": + { + var f string + f = in.String() + x.WritecachePath = f + } + case "mode": + { + var f ShardMode + var parsedValue ShardMode + switch v := in.Interface().(type) { + case string: + if vv, ok := ShardMode_value[v]; ok { + parsedValue = ShardMode(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = ShardMode(vv) + case float64: + parsedValue = ShardMode(v) + } + f = parsedValue + x.Mode = f + } + case "errorCount": + { + var f uint32 + f = in.Uint32() + x.ErrorCount = f + } + case "piloramaPath": + { + var f string + f = in.String() + x.PiloramaPath = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type BlobstorInfo struct { + Path string `json:"path"` + Type string `json:"type"` +} + +var ( + _ encoding.ProtoMarshaler = (*BlobstorInfo)(nil) + _ encoding.ProtoUnmarshaler = (*BlobstorInfo)(nil) + _ json.Marshaler = (*BlobstorInfo)(nil) + _ json.Unmarshaler = (*BlobstorInfo)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -209,27 +1335,195 @@ func (x *BlobstorInfo) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *BlobstorInfo) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.StringMarshal(1, buf[offset:], x.Path) - offset += proto.StringMarshal(2, buf[offset:], x.Type) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *BlobstorInfo) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *BlobstorInfo) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Path) != 0 { + mm.AppendString(1, x.Path) + } + if len(x.Type) != 0 { + mm.AppendString(2, x.Type) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *BlobstorInfo) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "BlobstorInfo") + } + switch fc.FieldNum { + case 1: // Path + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Path") + } + x.Path = data + case 2: // Type + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Type") + } + x.Type = data + } + } + return nil +} +func (x *BlobstorInfo) GetPath() string { + if x != nil { + return x.Path + } + return "" +} +func (x *BlobstorInfo) SetPath(v string) { + x.Path = v +} +func (x *BlobstorInfo) GetType() string { + if x != nil { + return x.Type + } + return "" +} +func (x *BlobstorInfo) SetType(v string) { + x.Type = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *BlobstorInfo) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *BlobstorInfo) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"path\":" + out.RawString(prefix[1:]) + out.String(x.Path) + } + { + const prefix string = ",\"type\":" + out.RawString(prefix) + out.String(x.Type) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *BlobstorInfo) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *BlobstorInfo) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "path": + { + var f string + f = in.String() + x.Path = f + } + case "type": + { + var f string + f = in.String() + x.Type = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ChainTarget_TargetType int32 + +const ( + ChainTarget_UNDEFINED ChainTarget_TargetType = 0 + ChainTarget_NAMESPACE ChainTarget_TargetType = 1 + ChainTarget_CONTAINER ChainTarget_TargetType = 2 + ChainTarget_USER ChainTarget_TargetType = 3 + ChainTarget_GROUP ChainTarget_TargetType = 4 +) + +var ( + ChainTarget_TargetType_name = map[int32]string{ + 0: "UNDEFINED", + 1: "NAMESPACE", + 2: "CONTAINER", + 3: "USER", + 4: "GROUP", + } + ChainTarget_TargetType_value = map[string]int32{ + "UNDEFINED": 0, + "NAMESPACE": 1, + "CONTAINER": 2, + "USER": 3, + "GROUP": 4, + } +) + +func (x ChainTarget_TargetType) String() string { + if v, ok := ChainTarget_TargetType_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *ChainTarget_TargetType) FromString(s string) bool { + if v, ok := ChainTarget_TargetType_value[s]; ok { + *x = ChainTarget_TargetType(v) + return true + } + return false +} + +type ChainTarget struct { + Type ChainTarget_TargetType `json:"type"` + Name string `json:"Name"` +} + +var ( + _ encoding.ProtoMarshaler = (*ChainTarget)(nil) + _ encoding.ProtoUnmarshaler = (*ChainTarget)(nil) + _ json.Marshaler = (*ChainTarget)(nil) + _ json.Unmarshaler = (*ChainTarget)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -242,23 +1536,154 @@ func (x *ChainTarget) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ChainTarget) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.EnumMarshal(1, buf[offset:], int32(x.Type)) - offset += proto.StringMarshal(2, buf[offset:], x.Name) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ChainTarget) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *ChainTarget) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if int32(x.Type) != 0 { + mm.AppendInt32(1, int32(x.Type)) + } + if len(x.Name) != 0 { + mm.AppendString(2, x.Name) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ChainTarget) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ChainTarget") + } + switch fc.FieldNum { + case 1: // Type + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Type") + } + x.Type = ChainTarget_TargetType(data) + case 2: // Name + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Name") + } + x.Name = data + } + } + return nil +} +func (x *ChainTarget) GetType() ChainTarget_TargetType { + if x != nil { + return x.Type + } + return 0 +} +func (x *ChainTarget) SetType(v ChainTarget_TargetType) { + x.Type = v +} +func (x *ChainTarget) GetName() string { + if x != nil { + return x.Name + } + return "" +} +func (x *ChainTarget) SetName(v string) { + x.Name = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ChainTarget) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ChainTarget) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + out.Int32(int32(x.Type)) + } + { + const prefix string = ",\"Name\":" + out.RawString(prefix) + out.String(x.Name) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ChainTarget) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ChainTarget) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + { + var f ChainTarget_TargetType + var parsedValue ChainTarget_TargetType + switch v := in.Interface().(type) { + case string: + if vv, ok := ChainTarget_TargetType_value[v]; ok { + parsedValue = ChainTarget_TargetType(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = ChainTarget_TargetType(vv) + case float64: + parsedValue = ChainTarget_TargetType(v) + } + f = parsedValue + x.Type = f + } + case "Name": + { + var f string + f = in.String() + x.Name = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } } diff --git a/pkg/services/control/types_test.go b/pkg/services/control/types_test.go deleted file mode 100644 index df0cdf141..000000000 --- a/pkg/services/control/types_test.go +++ /dev/null @@ -1,151 +0,0 @@ -package control_test - -import ( - "bytes" - "path/filepath" - "strconv" - "testing" - - "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/blobovniczatree" - "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/fstree" - "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control" - "github.com/google/uuid" -) - -func TestNetmap_StableMarshal(t *testing.T) { - testStableMarshal(t, generateNetmap(), new(control.Netmap), func(m1, m2 protoMessage) bool { - return equalNetmaps(m1.(*control.Netmap), m2.(*control.Netmap)) - }) -} - -func generateNetmap() *control.Netmap { - nm := new(control.Netmap) - nm.SetEpoch(13) - - const nodeCount = 2 - - nodes := make([]*control.NodeInfo, 0, nodeCount) - - for i := 0; i < nodeCount; i++ { - n := new(control.NodeInfo) - n.SetPublicKey(testData(33)) - n.SetAddresses([]string{testString(), testString()}) - n.SetState(control.NetmapStatus_ONLINE) - - const attrCount = 2 - - attrs := make([]*control.NodeInfo_Attribute, 0, attrCount) - - for j := 0; j < attrCount; j++ { - a := new(control.NodeInfo_Attribute) - a.SetKey(testString()) - a.SetValue(testString()) - - const parentsCount = 2 - - parents := make([]string, 0, parentsCount) - - for k := 0; k < parentsCount; k++ { - parents = append(parents, testString()) - } - - a.SetParents(parents) - - attrs = append(attrs, a) - } - - n.SetAttributes(attrs) - - nodes = append(nodes, n) - } - - nm.SetNodes(nodes) - - return nm -} - -func equalNetmaps(nm1, nm2 *control.Netmap) bool { - if nm1.GetEpoch() != nm2.GetEpoch() { - return false - } - - n1, n2 := nm1.GetNodes(), nm2.GetNodes() - - if len(n1) != len(n2) { - return false - } - - for i := range n1 { - if !equalNodeInfos(n1[i], n2[i]) { - return false - } - } - - return true -} - -func equalNodeInfos(n1, n2 *control.NodeInfo) bool { - if !bytes.Equal(n1.GetPublicKey(), n2.GetPublicKey()) || - n1.GetState() != n2.GetState() { - return false - } - - na1, na2 := n1.GetAddresses(), n2.GetAddresses() - - if len(na1) != len(na2) { - return false - } - - for i := range na1 { - if na1[i] != na2[i] { - return false - } - } - - a1, a2 := n1.GetAttributes(), n2.GetAttributes() - - if len(a1) != len(a2) { - return false - } - - for i := range a1 { - if a1[i].GetKey() != a2[i].GetKey() || a1[i].GetValue() != a2[i].GetValue() { - return false - } - - p1, p2 := a1[i].GetParents(), a2[i].GetParents() - - if len(p1) != len(p2) { - return false - } - - for j := range p1 { - if p1[j] != p2[j] { - return false - } - } - } - - return true -} - -func generateShardInfo(id int) *control.ShardInfo { - si := new(control.ShardInfo) - - path := "/nice/dir/awesome/files/" + strconv.Itoa(id) - - uid, _ := uuid.NewRandom() - bin, _ := uid.MarshalBinary() - - si.SetID(bin) - si.SetMode(control.ShardMode_READ_WRITE) - si.SetMetabasePath(filepath.Join(path, "meta")) - si.Blobstor = []*control.BlobstorInfo{ - {Type: fstree.Type, Path: filepath.Join(path, "fstree")}, - {Type: blobovniczatree.Type, Path: filepath.Join(path, "blobtree")}, - } - si.SetWriteCachePath(filepath.Join(path, "writecache")) - si.SetPiloramaPath(filepath.Join(path, "pilorama")) - - return si -} diff --git a/pkg/services/tree/service.pb.go b/pkg/services/tree/service.pb.go deleted file mode 100644 index f439e3f28..000000000 --- a/pkg/services/tree/service.pb.go +++ /dev/null @@ -1,3587 +0,0 @@ -//* -// Service for working with CRDT tree. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.0 -// source: pkg/services/tree/service.proto - -package tree - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetSubTreeRequest_Body_Order_Direction int32 - -const ( - GetSubTreeRequest_Body_Order_None GetSubTreeRequest_Body_Order_Direction = 0 - GetSubTreeRequest_Body_Order_Asc GetSubTreeRequest_Body_Order_Direction = 1 -) - -// Enum value maps for GetSubTreeRequest_Body_Order_Direction. -var ( - GetSubTreeRequest_Body_Order_Direction_name = map[int32]string{ - 0: "None", - 1: "Asc", - } - GetSubTreeRequest_Body_Order_Direction_value = map[string]int32{ - "None": 0, - "Asc": 1, - } -) - -func (x GetSubTreeRequest_Body_Order_Direction) Enum() *GetSubTreeRequest_Body_Order_Direction { - p := new(GetSubTreeRequest_Body_Order_Direction) - *p = x - return p -} - -func (x GetSubTreeRequest_Body_Order_Direction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetSubTreeRequest_Body_Order_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_services_tree_service_proto_enumTypes[0].Descriptor() -} - -func (GetSubTreeRequest_Body_Order_Direction) Type() protoreflect.EnumType { - return &file_pkg_services_tree_service_proto_enumTypes[0] -} - -func (x GetSubTreeRequest_Body_Order_Direction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetSubTreeRequest_Body_Order_Direction.Descriptor instead. -func (GetSubTreeRequest_Body_Order_Direction) EnumDescriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{10, 0, 0, 0} -} - -type AddRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *AddRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *AddRequest) Reset() { - *x = AddRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddRequest) ProtoMessage() {} - -func (x *AddRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead. -func (*AddRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{0} -} - -func (x *AddRequest) GetBody() *AddRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *AddRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type AddResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *AddResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *AddResponse) Reset() { - *x = AddResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddResponse) ProtoMessage() {} - -func (x *AddResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddResponse.ProtoReflect.Descriptor instead. -func (*AddResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{1} -} - -func (x *AddResponse) GetBody() *AddResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *AddResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type AddByPathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *AddByPathRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *AddByPathRequest) Reset() { - *x = AddByPathRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddByPathRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddByPathRequest) ProtoMessage() {} - -func (x *AddByPathRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddByPathRequest.ProtoReflect.Descriptor instead. -func (*AddByPathRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{2} -} - -func (x *AddByPathRequest) GetBody() *AddByPathRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *AddByPathRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type AddByPathResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *AddByPathResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *AddByPathResponse) Reset() { - *x = AddByPathResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddByPathResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddByPathResponse) ProtoMessage() {} - -func (x *AddByPathResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddByPathResponse.ProtoReflect.Descriptor instead. -func (*AddByPathResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{3} -} - -func (x *AddByPathResponse) GetBody() *AddByPathResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *AddByPathResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *RemoveRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveRequest) Reset() { - *x = RemoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveRequest) ProtoMessage() {} - -func (x *RemoveRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead. -func (*RemoveRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{4} -} - -func (x *RemoveRequest) GetBody() *RemoveRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type RemoveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *RemoveResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *RemoveResponse) Reset() { - *x = RemoveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveResponse) ProtoMessage() {} - -func (x *RemoveResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead. -func (*RemoveResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{5} -} - -func (x *RemoveResponse) GetBody() *RemoveResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *RemoveResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type MoveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *MoveRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *MoveRequest) Reset() { - *x = MoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MoveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveRequest) ProtoMessage() {} - -func (x *MoveRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveRequest.ProtoReflect.Descriptor instead. -func (*MoveRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{6} -} - -func (x *MoveRequest) GetBody() *MoveRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *MoveRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type MoveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *MoveResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *MoveResponse) Reset() { - *x = MoveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MoveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveResponse) ProtoMessage() {} - -func (x *MoveResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveResponse.ProtoReflect.Descriptor instead. -func (*MoveResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{7} -} - -func (x *MoveResponse) GetBody() *MoveResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *MoveResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type GetNodeByPathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *GetNodeByPathRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetNodeByPathRequest) Reset() { - *x = GetNodeByPathRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeByPathRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeByPathRequest) ProtoMessage() {} - -func (x *GetNodeByPathRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeByPathRequest.ProtoReflect.Descriptor instead. -func (*GetNodeByPathRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{8} -} - -func (x *GetNodeByPathRequest) GetBody() *GetNodeByPathRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetNodeByPathRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type GetNodeByPathResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *GetNodeByPathResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetNodeByPathResponse) Reset() { - *x = GetNodeByPathResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeByPathResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeByPathResponse) ProtoMessage() {} - -func (x *GetNodeByPathResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeByPathResponse.ProtoReflect.Descriptor instead. -func (*GetNodeByPathResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{9} -} - -func (x *GetNodeByPathResponse) GetBody() *GetNodeByPathResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetNodeByPathResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type GetSubTreeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *GetSubTreeRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetSubTreeRequest) Reset() { - *x = GetSubTreeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubTreeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubTreeRequest) ProtoMessage() {} - -func (x *GetSubTreeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubTreeRequest.ProtoReflect.Descriptor instead. -func (*GetSubTreeRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{10} -} - -func (x *GetSubTreeRequest) GetBody() *GetSubTreeRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetSubTreeRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type GetSubTreeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *GetSubTreeResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetSubTreeResponse) Reset() { - *x = GetSubTreeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubTreeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubTreeResponse) ProtoMessage() {} - -func (x *GetSubTreeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubTreeResponse.ProtoReflect.Descriptor instead. -func (*GetSubTreeResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{11} -} - -func (x *GetSubTreeResponse) GetBody() *GetSubTreeResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetSubTreeResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type TreeListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *TreeListRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *TreeListRequest) Reset() { - *x = TreeListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TreeListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TreeListRequest) ProtoMessage() {} - -func (x *TreeListRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TreeListRequest.ProtoReflect.Descriptor instead. -func (*TreeListRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{12} -} - -func (x *TreeListRequest) GetBody() *TreeListRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *TreeListRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type TreeListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *TreeListResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *TreeListResponse) Reset() { - *x = TreeListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TreeListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TreeListResponse) ProtoMessage() {} - -func (x *TreeListResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TreeListResponse.ProtoReflect.Descriptor instead. -func (*TreeListResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{13} -} - -func (x *TreeListResponse) GetBody() *TreeListResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *TreeListResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type ApplyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *ApplyRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ApplyRequest) Reset() { - *x = ApplyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyRequest) ProtoMessage() {} - -func (x *ApplyRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead. -func (*ApplyRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{14} -} - -func (x *ApplyRequest) GetBody() *ApplyRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ApplyRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type ApplyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *ApplyResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *ApplyResponse) Reset() { - *x = ApplyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyResponse) ProtoMessage() {} - -func (x *ApplyResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead. -func (*ApplyResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{15} -} - -func (x *ApplyResponse) GetBody() *ApplyResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *ApplyResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type GetOpLogRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *GetOpLogRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetOpLogRequest) Reset() { - *x = GetOpLogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetOpLogRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOpLogRequest) ProtoMessage() {} - -func (x *GetOpLogRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOpLogRequest.ProtoReflect.Descriptor instead. -func (*GetOpLogRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{16} -} - -func (x *GetOpLogRequest) GetBody() *GetOpLogRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetOpLogRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type GetOpLogResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *GetOpLogResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetOpLogResponse) Reset() { - *x = GetOpLogResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetOpLogResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOpLogResponse) ProtoMessage() {} - -func (x *GetOpLogResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOpLogResponse.ProtoReflect.Descriptor instead. -func (*GetOpLogResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{17} -} - -func (x *GetOpLogResponse) GetBody() *GetOpLogResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *GetOpLogResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type HealthcheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Response body. - Body *HealthcheckResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Response signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *HealthcheckResponse) Reset() { - *x = HealthcheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthcheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthcheckResponse) ProtoMessage() {} - -func (x *HealthcheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthcheckResponse.ProtoReflect.Descriptor instead. -func (*HealthcheckResponse) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{18} -} - -func (x *HealthcheckResponse) GetBody() *HealthcheckResponse_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *HealthcheckResponse) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type HealthcheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request body. - Body *HealthcheckRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // Request signature. - Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *HealthcheckRequest) Reset() { - *x = HealthcheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthcheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthcheckRequest) ProtoMessage() {} - -func (x *HealthcheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthcheckRequest.ProtoReflect.Descriptor instead. -func (*HealthcheckRequest) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{19} -} - -func (x *HealthcheckRequest) GetBody() *HealthcheckRequest_Body { - if x != nil { - return x.Body - } - return nil -} - -func (x *HealthcheckRequest) GetSignature() *Signature { - if x != nil { - return x.Signature - } - return nil -} - -type AddRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // ID of the parent to attach node to. - ParentId uint64 `protobuf:"varint,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - // Key-Value pairs with meta information. - Meta []*KeyValue `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"` - // Bearer token in V2 format. - BearerToken []byte `protobuf:"bytes,5,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` -} - -func (x *AddRequest_Body) Reset() { - *x = AddRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddRequest_Body) ProtoMessage() {} - -func (x *AddRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddRequest_Body.ProtoReflect.Descriptor instead. -func (*AddRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *AddRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *AddRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *AddRequest_Body) GetParentId() uint64 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *AddRequest_Body) GetMeta() []*KeyValue { - if x != nil { - return x.Meta - } - return nil -} - -func (x *AddRequest_Body) GetBearerToken() []byte { - if x != nil { - return x.BearerToken - } - return nil -} - -type AddResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the created node. - NodeId uint64 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` -} - -func (x *AddResponse_Body) Reset() { - *x = AddResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddResponse_Body) ProtoMessage() {} - -func (x *AddResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddResponse_Body.ProtoReflect.Descriptor instead. -func (*AddResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *AddResponse_Body) GetNodeId() uint64 { - if x != nil { - return x.NodeId - } - return 0 -} - -type AddByPathRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // Attribute to build path with. Default: "FileName". - PathAttribute string `protobuf:"bytes,3,opt,name=path_attribute,json=pathAttribute,proto3" json:"path_attribute,omitempty"` - // List of path components. - Path []string `protobuf:"bytes,4,rep,name=path,proto3" json:"path,omitempty"` - // Node meta-information. - Meta []*KeyValue `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"` - // Bearer token in V2 format. - BearerToken []byte `protobuf:"bytes,6,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` -} - -func (x *AddByPathRequest_Body) Reset() { - *x = AddByPathRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddByPathRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddByPathRequest_Body) ProtoMessage() {} - -func (x *AddByPathRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddByPathRequest_Body.ProtoReflect.Descriptor instead. -func (*AddByPathRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *AddByPathRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *AddByPathRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *AddByPathRequest_Body) GetPathAttribute() string { - if x != nil { - return x.PathAttribute - } - return "" -} - -func (x *AddByPathRequest_Body) GetPath() []string { - if x != nil { - return x.Path - } - return nil -} - -func (x *AddByPathRequest_Body) GetMeta() []*KeyValue { - if x != nil { - return x.Meta - } - return nil -} - -func (x *AddByPathRequest_Body) GetBearerToken() []byte { - if x != nil { - return x.BearerToken - } - return nil -} - -type AddByPathResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of all created nodes. The first one is the leaf. - Nodes []uint64 `protobuf:"varint,1,rep,packed,name=nodes,proto3" json:"nodes,omitempty"` - // ID of the parent node where new nodes were attached. - ParentId uint64 `protobuf:"varint,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` -} - -func (x *AddByPathResponse_Body) Reset() { - *x = AddByPathResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddByPathResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddByPathResponse_Body) ProtoMessage() {} - -func (x *AddByPathResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddByPathResponse_Body.ProtoReflect.Descriptor instead. -func (*AddByPathResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *AddByPathResponse_Body) GetNodes() []uint64 { - if x != nil { - return x.Nodes - } - return nil -} - -func (x *AddByPathResponse_Body) GetParentId() uint64 { - if x != nil { - return x.ParentId - } - return 0 -} - -type RemoveRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // ID of the node to remove. - NodeId uint64 `protobuf:"varint,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // Bearer token in V2 format. - BearerToken []byte `protobuf:"bytes,4,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` -} - -func (x *RemoveRequest_Body) Reset() { - *x = RemoveRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveRequest_Body) ProtoMessage() {} - -func (x *RemoveRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveRequest_Body.ProtoReflect.Descriptor instead. -func (*RemoveRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *RemoveRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *RemoveRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *RemoveRequest_Body) GetNodeId() uint64 { - if x != nil { - return x.NodeId - } - return 0 -} - -func (x *RemoveRequest_Body) GetBearerToken() []byte { - if x != nil { - return x.BearerToken - } - return nil -} - -type RemoveResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveResponse_Body) Reset() { - *x = RemoveResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveResponse_Body) ProtoMessage() {} - -func (x *RemoveResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveResponse_Body.ProtoReflect.Descriptor instead. -func (*RemoveResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{5, 0} -} - -type MoveRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // TODO import neo.fs.v2.refs.ContainerID directly. - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // ID of the new parent. - ParentId uint64 `protobuf:"varint,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - // ID of the node to move. - NodeId uint64 `protobuf:"varint,4,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // Node meta-information. - Meta []*KeyValue `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"` - // Bearer token in V2 format. - BearerToken []byte `protobuf:"bytes,6,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` -} - -func (x *MoveRequest_Body) Reset() { - *x = MoveRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MoveRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveRequest_Body) ProtoMessage() {} - -func (x *MoveRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveRequest_Body.ProtoReflect.Descriptor instead. -func (*MoveRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *MoveRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *MoveRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *MoveRequest_Body) GetParentId() uint64 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *MoveRequest_Body) GetNodeId() uint64 { - if x != nil { - return x.NodeId - } - return 0 -} - -func (x *MoveRequest_Body) GetMeta() []*KeyValue { - if x != nil { - return x.Meta - } - return nil -} - -func (x *MoveRequest_Body) GetBearerToken() []byte { - if x != nil { - return x.BearerToken - } - return nil -} - -type MoveResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MoveResponse_Body) Reset() { - *x = MoveResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MoveResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MoveResponse_Body) ProtoMessage() {} - -func (x *MoveResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MoveResponse_Body.ProtoReflect.Descriptor instead. -func (*MoveResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{7, 0} -} - -type GetNodeByPathRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // Attribute to build path with. Default: "FileName". - PathAttribute string `protobuf:"bytes,3,opt,name=path_attribute,json=pathAttribute,proto3" json:"path_attribute,omitempty"` - // List of path components. - Path []string `protobuf:"bytes,4,rep,name=path,proto3" json:"path,omitempty"` - // List of attributes to include in response. - Attributes []string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` - // Flag to return only the latest version of node. - LatestOnly bool `protobuf:"varint,6,opt,name=latest_only,json=latestOnly,proto3" json:"latest_only,omitempty"` - // Flag to return all stored attributes. - AllAttributes bool `protobuf:"varint,7,opt,name=all_attributes,json=allAttributes,proto3" json:"all_attributes,omitempty"` - // Bearer token in V2 format. - BearerToken []byte `protobuf:"bytes,8,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` -} - -func (x *GetNodeByPathRequest_Body) Reset() { - *x = GetNodeByPathRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeByPathRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeByPathRequest_Body) ProtoMessage() {} - -func (x *GetNodeByPathRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeByPathRequest_Body.ProtoReflect.Descriptor instead. -func (*GetNodeByPathRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *GetNodeByPathRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *GetNodeByPathRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *GetNodeByPathRequest_Body) GetPathAttribute() string { - if x != nil { - return x.PathAttribute - } - return "" -} - -func (x *GetNodeByPathRequest_Body) GetPath() []string { - if x != nil { - return x.Path - } - return nil -} - -func (x *GetNodeByPathRequest_Body) GetAttributes() []string { - if x != nil { - return x.Attributes - } - return nil -} - -func (x *GetNodeByPathRequest_Body) GetLatestOnly() bool { - if x != nil { - return x.LatestOnly - } - return false -} - -func (x *GetNodeByPathRequest_Body) GetAllAttributes() bool { - if x != nil { - return x.AllAttributes - } - return false -} - -func (x *GetNodeByPathRequest_Body) GetBearerToken() []byte { - if x != nil { - return x.BearerToken - } - return nil -} - -// Information about a single tree node. -type GetNodeByPathResponse_Info struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Node ID. - NodeId uint64 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // Timestamp of the last operation with the node. - Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Node meta-information. - Meta []*KeyValue `protobuf:"bytes,3,rep,name=meta,proto3" json:"meta,omitempty"` - // Parent ID. - ParentId uint64 `protobuf:"varint,4,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` -} - -func (x *GetNodeByPathResponse_Info) Reset() { - *x = GetNodeByPathResponse_Info{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeByPathResponse_Info) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeByPathResponse_Info) ProtoMessage() {} - -func (x *GetNodeByPathResponse_Info) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeByPathResponse_Info.ProtoReflect.Descriptor instead. -func (*GetNodeByPathResponse_Info) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{9, 0} -} - -func (x *GetNodeByPathResponse_Info) GetNodeId() uint64 { - if x != nil { - return x.NodeId - } - return 0 -} - -func (x *GetNodeByPathResponse_Info) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *GetNodeByPathResponse_Info) GetMeta() []*KeyValue { - if x != nil { - return x.Meta - } - return nil -} - -func (x *GetNodeByPathResponse_Info) GetParentId() uint64 { - if x != nil { - return x.ParentId - } - return 0 -} - -type GetNodeByPathResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of nodes stored by path. - Nodes []*GetNodeByPathResponse_Info `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` -} - -func (x *GetNodeByPathResponse_Body) Reset() { - *x = GetNodeByPathResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeByPathResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeByPathResponse_Body) ProtoMessage() {} - -func (x *GetNodeByPathResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeByPathResponse_Body.ProtoReflect.Descriptor instead. -func (*GetNodeByPathResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{9, 1} -} - -func (x *GetNodeByPathResponse_Body) GetNodes() []*GetNodeByPathResponse_Info { - if x != nil { - return x.Nodes - } - return nil -} - -type GetSubTreeRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // IDs of the root nodes of a subtree forest. - RootId []uint64 `protobuf:"varint,3,rep,name=root_id,json=rootId,proto3" json:"root_id,omitempty"` - // Optional depth of the traversal. Zero means return only root. - // Maximum depth is 10. - Depth uint32 `protobuf:"varint,4,opt,name=depth,proto3" json:"depth,omitempty"` - // Bearer token in V2 format. - BearerToken []byte `protobuf:"bytes,5,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` - // Result ordering. - OrderBy *GetSubTreeRequest_Body_Order `protobuf:"bytes,6,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` -} - -func (x *GetSubTreeRequest_Body) Reset() { - *x = GetSubTreeRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubTreeRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubTreeRequest_Body) ProtoMessage() {} - -func (x *GetSubTreeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubTreeRequest_Body.ProtoReflect.Descriptor instead. -func (*GetSubTreeRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{10, 0} -} - -func (x *GetSubTreeRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *GetSubTreeRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *GetSubTreeRequest_Body) GetRootId() []uint64 { - if x != nil { - return x.RootId - } - return nil -} - -func (x *GetSubTreeRequest_Body) GetDepth() uint32 { - if x != nil { - return x.Depth - } - return 0 -} - -func (x *GetSubTreeRequest_Body) GetBearerToken() []byte { - if x != nil { - return x.BearerToken - } - return nil -} - -func (x *GetSubTreeRequest_Body) GetOrderBy() *GetSubTreeRequest_Body_Order { - if x != nil { - return x.OrderBy - } - return nil -} - -type GetSubTreeRequest_Body_Order struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Direction GetSubTreeRequest_Body_Order_Direction `protobuf:"varint,1,opt,name=direction,proto3,enum=tree.GetSubTreeRequest_Body_Order_Direction" json:"direction,omitempty"` -} - -func (x *GetSubTreeRequest_Body_Order) Reset() { - *x = GetSubTreeRequest_Body_Order{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubTreeRequest_Body_Order) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubTreeRequest_Body_Order) ProtoMessage() {} - -func (x *GetSubTreeRequest_Body_Order) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubTreeRequest_Body_Order.ProtoReflect.Descriptor instead. -func (*GetSubTreeRequest_Body_Order) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{10, 0, 0} -} - -func (x *GetSubTreeRequest_Body_Order) GetDirection() GetSubTreeRequest_Body_Order_Direction { - if x != nil { - return x.Direction - } - return GetSubTreeRequest_Body_Order_None -} - -type GetSubTreeResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the node. - NodeId []uint64 `protobuf:"varint,1,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // ID of the parent. - ParentId []uint64 `protobuf:"varint,2,rep,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - // Time node was first added to a tree. - Timestamp []uint64 `protobuf:"varint,3,rep,name=timestamp,proto3" json:"timestamp,omitempty"` - // Node meta-information. - Meta []*KeyValue `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"` -} - -func (x *GetSubTreeResponse_Body) Reset() { - *x = GetSubTreeResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubTreeResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubTreeResponse_Body) ProtoMessage() {} - -func (x *GetSubTreeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubTreeResponse_Body.ProtoReflect.Descriptor instead. -func (*GetSubTreeResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{11, 0} -} - -func (x *GetSubTreeResponse_Body) GetNodeId() []uint64 { - if x != nil { - return x.NodeId - } - return nil -} - -func (x *GetSubTreeResponse_Body) GetParentId() []uint64 { - if x != nil { - return x.ParentId - } - return nil -} - -func (x *GetSubTreeResponse_Body) GetTimestamp() []uint64 { - if x != nil { - return x.Timestamp - } - return nil -} - -func (x *GetSubTreeResponse_Body) GetMeta() []*KeyValue { - if x != nil { - return x.Meta - } - return nil -} - -type TreeListRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` -} - -func (x *TreeListRequest_Body) Reset() { - *x = TreeListRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TreeListRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TreeListRequest_Body) ProtoMessage() {} - -func (x *TreeListRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TreeListRequest_Body.ProtoReflect.Descriptor instead. -func (*TreeListRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{12, 0} -} - -func (x *TreeListRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -type TreeListResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Tree IDs. - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` -} - -func (x *TreeListResponse_Body) Reset() { - *x = TreeListResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TreeListResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TreeListResponse_Body) ProtoMessage() {} - -func (x *TreeListResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TreeListResponse_Body.ProtoReflect.Descriptor instead. -func (*TreeListResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{13, 0} -} - -func (x *TreeListResponse_Body) GetIds() []string { - if x != nil { - return x.Ids - } - return nil -} - -type ApplyRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // Operation to be applied. - Operation *LogMove `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"` -} - -func (x *ApplyRequest_Body) Reset() { - *x = ApplyRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplyRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyRequest_Body) ProtoMessage() {} - -func (x *ApplyRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplyRequest_Body.ProtoReflect.Descriptor instead. -func (*ApplyRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{14, 0} -} - -func (x *ApplyRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *ApplyRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *ApplyRequest_Body) GetOperation() *LogMove { - if x != nil { - return x.Operation - } - return nil -} - -type ApplyResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ApplyResponse_Body) Reset() { - *x = ApplyResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplyResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyResponse_Body) ProtoMessage() {} - -func (x *ApplyResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplyResponse_Body.ProtoReflect.Descriptor instead. -func (*ApplyResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{15, 0} -} - -type GetOpLogRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Container ID in V2 format. - ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - // The name of the tree. - TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"` - // Starting height to return logs from. - Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - // Amount of operations to return. - Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` -} - -func (x *GetOpLogRequest_Body) Reset() { - *x = GetOpLogRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetOpLogRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOpLogRequest_Body) ProtoMessage() {} - -func (x *GetOpLogRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOpLogRequest_Body.ProtoReflect.Descriptor instead. -func (*GetOpLogRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{16, 0} -} - -func (x *GetOpLogRequest_Body) GetContainerId() []byte { - if x != nil { - return x.ContainerId - } - return nil -} - -func (x *GetOpLogRequest_Body) GetTreeId() string { - if x != nil { - return x.TreeId - } - return "" -} - -func (x *GetOpLogRequest_Body) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *GetOpLogRequest_Body) GetCount() uint64 { - if x != nil { - return x.Count - } - return 0 -} - -type GetOpLogResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Operation on a tree. - Operation *LogMove `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` -} - -func (x *GetOpLogResponse_Body) Reset() { - *x = GetOpLogResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetOpLogResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOpLogResponse_Body) ProtoMessage() {} - -func (x *GetOpLogResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOpLogResponse_Body.ProtoReflect.Descriptor instead. -func (*GetOpLogResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{17, 0} -} - -func (x *GetOpLogResponse_Body) GetOperation() *LogMove { - if x != nil { - return x.Operation - } - return nil -} - -type HealthcheckResponse_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HealthcheckResponse_Body) Reset() { - *x = HealthcheckResponse_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthcheckResponse_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthcheckResponse_Body) ProtoMessage() {} - -func (x *HealthcheckResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthcheckResponse_Body.ProtoReflect.Descriptor instead. -func (*HealthcheckResponse_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{18, 0} -} - -type HealthcheckRequest_Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HealthcheckRequest_Body) Reset() { - *x = HealthcheckRequest_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthcheckRequest_Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthcheckRequest_Body) ProtoMessage() {} - -func (x *HealthcheckRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthcheckRequest_Body.ProtoReflect.Descriptor instead. -func (*HealthcheckRequest_Body) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{19, 0} -} - -var File_pkg_services_tree_service_proto protoreflect.FileDescriptor - -var file_pkg_services_tree_service_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, - 0x72, 0x65, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x04, 0x74, 0x72, 0x65, 0x65, 0x1a, 0x1d, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, - 0xa6, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, - 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, - 0x65, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, - 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x1a, 0x1f, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x6f, - 0x64, 0x65, 0x49, 0x64, 0x22, 0xb9, 0x02, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, - 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xc4, 0x01, 0x0a, 0x04, 0x42, 0x6f, - 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x25, - 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b, - 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0xaf, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x42, - 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, - 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, - 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x39, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0xec, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x7e, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x76, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xaa, 0x02, 0x0a, 0x0b, 0x4d, 0x6f, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4d, - 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x1a, 0xbf, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, - 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6d, - 0x65, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, - 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x72, 0x0a, 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x6f, 0x76, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x85, 0x03, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, - 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, - 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x88, 0x02, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, - 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x5f, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0xbc, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x65, - 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x7e, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, - 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x1a, 0x3e, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, - 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x22, 0xc3, 0x03, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, - 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xcc, 0x02, 0x0a, 0x04, 0x42, 0x6f, 0x64, - 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, - 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, - 0x10, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, - 0x70, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x3d, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x42, 0x79, 0x1a, 0x73, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, - 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x41, 0x73, 0x63, 0x10, 0x01, 0x22, 0x83, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, - 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x8a, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1b, 0x0a, 0x07, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x08, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b, - 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x9b, 0x01, - 0x0a, 0x0f, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x29, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x10, - 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x0c, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, - 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, - 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, - 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x6f, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x09, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, - 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, - 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xe2, - 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x1a, 0x70, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, - 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, - 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x33, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, - 0x12, 0x2b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x6f, - 0x76, 0x65, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, - 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, - 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, - 0x22, 0x7e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, - 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, - 0x32, 0xd6, 0x04, 0x0a, 0x0b, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x2a, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x10, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, - 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74, 0x72, 0x65, 0x65, - 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x09, - 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x74, 0x72, 0x65, 0x65, - 0x2e, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x72, 0x65, 0x65, - 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2d, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4d, - 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x74, 0x72, 0x65, - 0x65, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x72, - 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x12, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x08, 0x54, - 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, - 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, - 0x12, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, - 0x70, 0x4c, 0x6f, 0x67, 0x12, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, - 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x72, - 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, - 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, - 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, - 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, - 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_pkg_services_tree_service_proto_rawDescOnce sync.Once - file_pkg_services_tree_service_proto_rawDescData = file_pkg_services_tree_service_proto_rawDesc -) - -func file_pkg_services_tree_service_proto_rawDescGZIP() []byte { - file_pkg_services_tree_service_proto_rawDescOnce.Do(func() { - file_pkg_services_tree_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_services_tree_service_proto_rawDescData) - }) - return file_pkg_services_tree_service_proto_rawDescData -} - -var file_pkg_services_tree_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pkg_services_tree_service_proto_msgTypes = make([]protoimpl.MessageInfo, 42) -var file_pkg_services_tree_service_proto_goTypes = []interface{}{ - (GetSubTreeRequest_Body_Order_Direction)(0), // 0: tree.GetSubTreeRequest.Body.Order.Direction - (*AddRequest)(nil), // 1: tree.AddRequest - (*AddResponse)(nil), // 2: tree.AddResponse - (*AddByPathRequest)(nil), // 3: tree.AddByPathRequest - (*AddByPathResponse)(nil), // 4: tree.AddByPathResponse - (*RemoveRequest)(nil), // 5: tree.RemoveRequest - (*RemoveResponse)(nil), // 6: tree.RemoveResponse - (*MoveRequest)(nil), // 7: tree.MoveRequest - (*MoveResponse)(nil), // 8: tree.MoveResponse - (*GetNodeByPathRequest)(nil), // 9: tree.GetNodeByPathRequest - (*GetNodeByPathResponse)(nil), // 10: tree.GetNodeByPathResponse - (*GetSubTreeRequest)(nil), // 11: tree.GetSubTreeRequest - (*GetSubTreeResponse)(nil), // 12: tree.GetSubTreeResponse - (*TreeListRequest)(nil), // 13: tree.TreeListRequest - (*TreeListResponse)(nil), // 14: tree.TreeListResponse - (*ApplyRequest)(nil), // 15: tree.ApplyRequest - (*ApplyResponse)(nil), // 16: tree.ApplyResponse - (*GetOpLogRequest)(nil), // 17: tree.GetOpLogRequest - (*GetOpLogResponse)(nil), // 18: tree.GetOpLogResponse - (*HealthcheckResponse)(nil), // 19: tree.HealthcheckResponse - (*HealthcheckRequest)(nil), // 20: tree.HealthcheckRequest - (*AddRequest_Body)(nil), // 21: tree.AddRequest.Body - (*AddResponse_Body)(nil), // 22: tree.AddResponse.Body - (*AddByPathRequest_Body)(nil), // 23: tree.AddByPathRequest.Body - (*AddByPathResponse_Body)(nil), // 24: tree.AddByPathResponse.Body - (*RemoveRequest_Body)(nil), // 25: tree.RemoveRequest.Body - (*RemoveResponse_Body)(nil), // 26: tree.RemoveResponse.Body - (*MoveRequest_Body)(nil), // 27: tree.MoveRequest.Body - (*MoveResponse_Body)(nil), // 28: tree.MoveResponse.Body - (*GetNodeByPathRequest_Body)(nil), // 29: tree.GetNodeByPathRequest.Body - (*GetNodeByPathResponse_Info)(nil), // 30: tree.GetNodeByPathResponse.Info - (*GetNodeByPathResponse_Body)(nil), // 31: tree.GetNodeByPathResponse.Body - (*GetSubTreeRequest_Body)(nil), // 32: tree.GetSubTreeRequest.Body - (*GetSubTreeRequest_Body_Order)(nil), // 33: tree.GetSubTreeRequest.Body.Order - (*GetSubTreeResponse_Body)(nil), // 34: tree.GetSubTreeResponse.Body - (*TreeListRequest_Body)(nil), // 35: tree.TreeListRequest.Body - (*TreeListResponse_Body)(nil), // 36: tree.TreeListResponse.Body - (*ApplyRequest_Body)(nil), // 37: tree.ApplyRequest.Body - (*ApplyResponse_Body)(nil), // 38: tree.ApplyResponse.Body - (*GetOpLogRequest_Body)(nil), // 39: tree.GetOpLogRequest.Body - (*GetOpLogResponse_Body)(nil), // 40: tree.GetOpLogResponse.Body - (*HealthcheckResponse_Body)(nil), // 41: tree.HealthcheckResponse.Body - (*HealthcheckRequest_Body)(nil), // 42: tree.HealthcheckRequest.Body - (*Signature)(nil), // 43: tree.Signature - (*KeyValue)(nil), // 44: tree.KeyValue - (*LogMove)(nil), // 45: tree.LogMove -} -var file_pkg_services_tree_service_proto_depIdxs = []int32{ - 21, // 0: tree.AddRequest.body:type_name -> tree.AddRequest.Body - 43, // 1: tree.AddRequest.signature:type_name -> tree.Signature - 22, // 2: tree.AddResponse.body:type_name -> tree.AddResponse.Body - 43, // 3: tree.AddResponse.signature:type_name -> tree.Signature - 23, // 4: tree.AddByPathRequest.body:type_name -> tree.AddByPathRequest.Body - 43, // 5: tree.AddByPathRequest.signature:type_name -> tree.Signature - 24, // 6: tree.AddByPathResponse.body:type_name -> tree.AddByPathResponse.Body - 43, // 7: tree.AddByPathResponse.signature:type_name -> tree.Signature - 25, // 8: tree.RemoveRequest.body:type_name -> tree.RemoveRequest.Body - 43, // 9: tree.RemoveRequest.signature:type_name -> tree.Signature - 26, // 10: tree.RemoveResponse.body:type_name -> tree.RemoveResponse.Body - 43, // 11: tree.RemoveResponse.signature:type_name -> tree.Signature - 27, // 12: tree.MoveRequest.body:type_name -> tree.MoveRequest.Body - 43, // 13: tree.MoveRequest.signature:type_name -> tree.Signature - 28, // 14: tree.MoveResponse.body:type_name -> tree.MoveResponse.Body - 43, // 15: tree.MoveResponse.signature:type_name -> tree.Signature - 29, // 16: tree.GetNodeByPathRequest.body:type_name -> tree.GetNodeByPathRequest.Body - 43, // 17: tree.GetNodeByPathRequest.signature:type_name -> tree.Signature - 31, // 18: tree.GetNodeByPathResponse.body:type_name -> tree.GetNodeByPathResponse.Body - 43, // 19: tree.GetNodeByPathResponse.signature:type_name -> tree.Signature - 32, // 20: tree.GetSubTreeRequest.body:type_name -> tree.GetSubTreeRequest.Body - 43, // 21: tree.GetSubTreeRequest.signature:type_name -> tree.Signature - 34, // 22: tree.GetSubTreeResponse.body:type_name -> tree.GetSubTreeResponse.Body - 43, // 23: tree.GetSubTreeResponse.signature:type_name -> tree.Signature - 35, // 24: tree.TreeListRequest.body:type_name -> tree.TreeListRequest.Body - 43, // 25: tree.TreeListRequest.signature:type_name -> tree.Signature - 36, // 26: tree.TreeListResponse.body:type_name -> tree.TreeListResponse.Body - 43, // 27: tree.TreeListResponse.signature:type_name -> tree.Signature - 37, // 28: tree.ApplyRequest.body:type_name -> tree.ApplyRequest.Body - 43, // 29: tree.ApplyRequest.signature:type_name -> tree.Signature - 38, // 30: tree.ApplyResponse.body:type_name -> tree.ApplyResponse.Body - 43, // 31: tree.ApplyResponse.signature:type_name -> tree.Signature - 39, // 32: tree.GetOpLogRequest.body:type_name -> tree.GetOpLogRequest.Body - 43, // 33: tree.GetOpLogRequest.signature:type_name -> tree.Signature - 40, // 34: tree.GetOpLogResponse.body:type_name -> tree.GetOpLogResponse.Body - 43, // 35: tree.GetOpLogResponse.signature:type_name -> tree.Signature - 41, // 36: tree.HealthcheckResponse.body:type_name -> tree.HealthcheckResponse.Body - 43, // 37: tree.HealthcheckResponse.signature:type_name -> tree.Signature - 42, // 38: tree.HealthcheckRequest.body:type_name -> tree.HealthcheckRequest.Body - 43, // 39: tree.HealthcheckRequest.signature:type_name -> tree.Signature - 44, // 40: tree.AddRequest.Body.meta:type_name -> tree.KeyValue - 44, // 41: tree.AddByPathRequest.Body.meta:type_name -> tree.KeyValue - 44, // 42: tree.MoveRequest.Body.meta:type_name -> tree.KeyValue - 44, // 43: tree.GetNodeByPathResponse.Info.meta:type_name -> tree.KeyValue - 30, // 44: tree.GetNodeByPathResponse.Body.nodes:type_name -> tree.GetNodeByPathResponse.Info - 33, // 45: tree.GetSubTreeRequest.Body.order_by:type_name -> tree.GetSubTreeRequest.Body.Order - 0, // 46: tree.GetSubTreeRequest.Body.Order.direction:type_name -> tree.GetSubTreeRequest.Body.Order.Direction - 44, // 47: tree.GetSubTreeResponse.Body.meta:type_name -> tree.KeyValue - 45, // 48: tree.ApplyRequest.Body.operation:type_name -> tree.LogMove - 45, // 49: tree.GetOpLogResponse.Body.operation:type_name -> tree.LogMove - 1, // 50: tree.TreeService.Add:input_type -> tree.AddRequest - 3, // 51: tree.TreeService.AddByPath:input_type -> tree.AddByPathRequest - 5, // 52: tree.TreeService.Remove:input_type -> tree.RemoveRequest - 7, // 53: tree.TreeService.Move:input_type -> tree.MoveRequest - 9, // 54: tree.TreeService.GetNodeByPath:input_type -> tree.GetNodeByPathRequest - 11, // 55: tree.TreeService.GetSubTree:input_type -> tree.GetSubTreeRequest - 13, // 56: tree.TreeService.TreeList:input_type -> tree.TreeListRequest - 15, // 57: tree.TreeService.Apply:input_type -> tree.ApplyRequest - 17, // 58: tree.TreeService.GetOpLog:input_type -> tree.GetOpLogRequest - 20, // 59: tree.TreeService.Healthcheck:input_type -> tree.HealthcheckRequest - 2, // 60: tree.TreeService.Add:output_type -> tree.AddResponse - 4, // 61: tree.TreeService.AddByPath:output_type -> tree.AddByPathResponse - 6, // 62: tree.TreeService.Remove:output_type -> tree.RemoveResponse - 8, // 63: tree.TreeService.Move:output_type -> tree.MoveResponse - 10, // 64: tree.TreeService.GetNodeByPath:output_type -> tree.GetNodeByPathResponse - 12, // 65: tree.TreeService.GetSubTree:output_type -> tree.GetSubTreeResponse - 14, // 66: tree.TreeService.TreeList:output_type -> tree.TreeListResponse - 16, // 67: tree.TreeService.Apply:output_type -> tree.ApplyResponse - 18, // 68: tree.TreeService.GetOpLog:output_type -> tree.GetOpLogResponse - 19, // 69: tree.TreeService.Healthcheck:output_type -> tree.HealthcheckResponse - 60, // [60:70] is the sub-list for method output_type - 50, // [50:60] is the sub-list for method input_type - 50, // [50:50] is the sub-list for extension type_name - 50, // [50:50] is the sub-list for extension extendee - 0, // [0:50] is the sub-list for field type_name -} - -func init() { file_pkg_services_tree_service_proto_init() } -func file_pkg_services_tree_service_proto_init() { - if File_pkg_services_tree_service_proto != nil { - return - } - file_pkg_services_tree_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_pkg_services_tree_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddByPathRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddByPathResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MoveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeByPathRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeByPathResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubTreeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubTreeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TreeListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TreeListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOpLogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOpLogResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthcheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthcheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddByPathRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddByPathResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MoveRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MoveResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeByPathRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeByPathResponse_Info); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeByPathResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubTreeRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubTreeRequest_Body_Order); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubTreeResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TreeListRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TreeListResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOpLogRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOpLogResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthcheckResponse_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthcheckRequest_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_services_tree_service_proto_rawDesc, - NumEnums: 1, - NumMessages: 42, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_pkg_services_tree_service_proto_goTypes, - DependencyIndexes: file_pkg_services_tree_service_proto_depIdxs, - EnumInfos: file_pkg_services_tree_service_proto_enumTypes, - MessageInfos: file_pkg_services_tree_service_proto_msgTypes, - }.Build() - File_pkg_services_tree_service_proto = out.File - file_pkg_services_tree_service_proto_rawDesc = nil - file_pkg_services_tree_service_proto_goTypes = nil - file_pkg_services_tree_service_proto_depIdxs = nil -} diff --git a/pkg/services/tree/service_frostfs.pb.go b/pkg/services/tree/service_frostfs.pb.go index 1a49c5c0c..c4d44253d 100644 --- a/pkg/services/tree/service_frostfs.pb.go +++ b/pkg/services/tree/service_frostfs.pb.go @@ -3,11 +3,32 @@ package tree import ( - binary "encoding/binary" + json "encoding/json" + fmt "fmt" + pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" + proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" + encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" + easyproto "github.com/VictoriaMetrics/easyproto" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" protowire "google.golang.org/protobuf/encoding/protowire" + strconv "strconv" ) -import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" +type AddRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + ParentId uint64 `json:"parentId"` + Meta []*KeyValue `json:"meta"` + BearerToken []byte `json:"bearerToken"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*AddRequest_Body)(nil) + _ json.Marshaler = (*AddRequest_Body)(nil) + _ json.Unmarshaler = (*AddRequest_Body)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -26,32 +47,262 @@ func (x *AddRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.UInt64Marshal(3, buf[offset:], x.ParentId) - for i := range x.Meta { - offset += proto.NestedStructureMarshal(4, buf[offset:], x.Meta[i]) - } - offset += proto.BytesMarshal(5, buf[offset:], x.BearerToken) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if x.ParentId != 0 { + mm.AppendUint64(3, x.ParentId) + } + for i := range x.Meta { + if x.Meta[i] != nil && x.Meta[i].StableSize() != 0 { + x.Meta[i].EmitProtobuf(mm.AppendMessage(4)) + } + } + if len(x.BearerToken) != 0 { + mm.AppendBytes(5, x.BearerToken) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // ParentId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ParentId") + } + x.ParentId = data + case 4: // Meta + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Meta") + } + x.Meta = append(x.Meta, new(KeyValue)) + ff := x.Meta[len(x.Meta)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 5: // BearerToken + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "BearerToken") + } + x.BearerToken = data + } + } + return nil +} +func (x *AddRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *AddRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *AddRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *AddRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *AddRequest_Body) GetParentId() uint64 { + if x != nil { + return x.ParentId + } + return 0 +} +func (x *AddRequest_Body) SetParentId(v uint64) { + x.ParentId = v +} +func (x *AddRequest_Body) GetMeta() []*KeyValue { + if x != nil { + return x.Meta + } + return nil +} +func (x *AddRequest_Body) SetMeta(v []*KeyValue) { + x.Meta = v +} +func (x *AddRequest_Body) GetBearerToken() []byte { + if x != nil { + return x.BearerToken + } + return nil +} +func (x *AddRequest_Body) SetBearerToken(v []byte) { + x.BearerToken = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"parentId\":" + out.RawString(prefix) + out.Uint64(x.ParentId) + } + { + const prefix string = ",\"meta\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Meta { + if i != 0 { + out.RawByte(',') + } + x.Meta[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + { + const prefix string = ",\"bearerToken\":" + out.RawString(prefix) + out.Base64Bytes(x.BearerToken) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "parentId": + { + var f uint64 + f = in.Uint64() + x.ParentId = f + } + case "meta": + { + var f *KeyValue + var list []*KeyValue + in.Delim('[') + for !in.IsDelim(']') { + f = new(KeyValue) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Meta = list + in.Delim(']') + } + case "bearerToken": + { + var f []byte + f = in.Bytes() + x.BearerToken = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddRequest struct { + Body *AddRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddRequest)(nil) + _ encoding.ProtoUnmarshaler = (*AddRequest)(nil) + _ json.Marshaler = (*AddRequest)(nil) + _ json.Unmarshaler = (*AddRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -64,27 +315,6 @@ func (x *AddRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -100,13 +330,164 @@ func (x *AddRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *AddRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *AddRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(AddRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *AddRequest) GetBody() *AddRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *AddRequest) SetBody(v *AddRequest_Body) { + x.Body = v +} +func (x *AddRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *AddRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *AddRequest_Body + f = new(AddRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddResponse_Body struct { + NodeId uint64 `json:"nodeId"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*AddResponse_Body)(nil) + _ json.Marshaler = (*AddResponse_Body)(nil) + _ json.Unmarshaler = (*AddResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -118,26 +499,125 @@ func (x *AddResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt64Marshal(1, buf[offset:], x.NodeId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.NodeId != 0 { + mm.AppendUint64(1, x.NodeId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddResponse_Body") + } + switch fc.FieldNum { + case 1: // NodeId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "NodeId") + } + x.NodeId = data + } + } + return nil +} +func (x *AddResponse_Body) GetNodeId() uint64 { + if x != nil { + return x.NodeId + } + return 0 +} +func (x *AddResponse_Body) SetNodeId(v uint64) { + x.NodeId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"nodeId\":" + out.RawString(prefix[1:]) + out.Uint64(x.NodeId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + { + var f uint64 + f = in.Uint64() + x.NodeId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddResponse struct { + Body *AddResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddResponse)(nil) + _ encoding.ProtoUnmarshaler = (*AddResponse)(nil) + _ json.Marshaler = (*AddResponse)(nil) + _ json.Unmarshaler = (*AddResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -150,27 +630,6 @@ func (x *AddResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -186,13 +645,169 @@ func (x *AddResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *AddResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *AddResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(AddResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *AddResponse) GetBody() *AddResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *AddResponse) SetBody(v *AddResponse_Body) { + x.Body = v +} +func (x *AddResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *AddResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *AddResponse_Body + f = new(AddResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddByPathRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + PathAttribute string `json:"pathAttribute"` + Path []string `json:"path"` + Meta []*KeyValue `json:"meta"` + BearerToken []byte `json:"bearerToken"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddByPathRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*AddByPathRequest_Body)(nil) + _ json.Marshaler = (*AddByPathRequest_Body)(nil) + _ json.Unmarshaler = (*AddByPathRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -211,33 +826,305 @@ func (x *AddByPathRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddByPathRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.StringMarshal(3, buf[offset:], x.PathAttribute) - offset += proto.RepeatedStringMarshal(4, buf[offset:], x.Path) - for i := range x.Meta { - offset += proto.NestedStructureMarshal(5, buf[offset:], x.Meta[i]) - } - offset += proto.BytesMarshal(6, buf[offset:], x.BearerToken) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddByPathRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddByPathRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if len(x.PathAttribute) != 0 { + mm.AppendString(3, x.PathAttribute) + } + for j := range x.Path { + mm.AppendString(4, x.Path[j]) + } + for i := range x.Meta { + if x.Meta[i] != nil && x.Meta[i].StableSize() != 0 { + x.Meta[i].EmitProtobuf(mm.AppendMessage(5)) + } + } + if len(x.BearerToken) != 0 { + mm.AppendBytes(6, x.BearerToken) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddByPathRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddByPathRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // PathAttribute + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "PathAttribute") + } + x.PathAttribute = data + case 4: // Path + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Path") + } + x.Path = append(x.Path, data) + case 5: // Meta + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Meta") + } + x.Meta = append(x.Meta, new(KeyValue)) + ff := x.Meta[len(x.Meta)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 6: // BearerToken + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "BearerToken") + } + x.BearerToken = data + } + } + return nil +} +func (x *AddByPathRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *AddByPathRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *AddByPathRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *AddByPathRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *AddByPathRequest_Body) GetPathAttribute() string { + if x != nil { + return x.PathAttribute + } + return "" +} +func (x *AddByPathRequest_Body) SetPathAttribute(v string) { + x.PathAttribute = v +} +func (x *AddByPathRequest_Body) GetPath() []string { + if x != nil { + return x.Path + } + return nil +} +func (x *AddByPathRequest_Body) SetPath(v []string) { + x.Path = v +} +func (x *AddByPathRequest_Body) GetMeta() []*KeyValue { + if x != nil { + return x.Meta + } + return nil +} +func (x *AddByPathRequest_Body) SetMeta(v []*KeyValue) { + x.Meta = v +} +func (x *AddByPathRequest_Body) GetBearerToken() []byte { + if x != nil { + return x.BearerToken + } + return nil +} +func (x *AddByPathRequest_Body) SetBearerToken(v []byte) { + x.BearerToken = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddByPathRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddByPathRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"pathAttribute\":" + out.RawString(prefix) + out.String(x.PathAttribute) + } + { + const prefix string = ",\"path\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Path { + if i != 0 { + out.RawByte(',') + } + out.String(x.Path[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"meta\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Meta { + if i != 0 { + out.RawByte(',') + } + x.Meta[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + { + const prefix string = ",\"bearerToken\":" + out.RawString(prefix) + out.Base64Bytes(x.BearerToken) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddByPathRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddByPathRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "pathAttribute": + { + var f string + f = in.String() + x.PathAttribute = f + } + case "path": + { + var f string + var list []string + in.Delim('[') + for !in.IsDelim(']') { + f = in.String() + list = append(list, f) + in.WantComma() + } + x.Path = list + in.Delim(']') + } + case "meta": + { + var f *KeyValue + var list []*KeyValue + in.Delim('[') + for !in.IsDelim(']') { + f = new(KeyValue) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Meta = list + in.Delim(']') + } + case "bearerToken": + { + var f []byte + f = in.Bytes() + x.BearerToken = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddByPathRequest struct { + Body *AddByPathRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddByPathRequest)(nil) + _ encoding.ProtoUnmarshaler = (*AddByPathRequest)(nil) + _ json.Marshaler = (*AddByPathRequest)(nil) + _ json.Unmarshaler = (*AddByPathRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -250,27 +1137,6 @@ func (x *AddByPathRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddByPathRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -286,13 +1152,165 @@ func (x *AddByPathRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *AddByPathRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *AddByPathRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddByPathRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddByPathRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddByPathRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddByPathRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(AddByPathRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *AddByPathRequest) GetBody() *AddByPathRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *AddByPathRequest) SetBody(v *AddByPathRequest_Body) { + x.Body = v +} +func (x *AddByPathRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *AddByPathRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddByPathRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddByPathRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddByPathRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddByPathRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *AddByPathRequest_Body + f = new(AddByPathRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddByPathResponse_Body struct { + Nodes []uint64 `json:"nodes"` + ParentId uint64 `json:"parentId"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddByPathResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*AddByPathResponse_Body)(nil) + _ json.Marshaler = (*AddByPathResponse_Body)(nil) + _ json.Unmarshaler = (*AddByPathResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -307,27 +1325,168 @@ func (x *AddByPathResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddByPathResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedUInt64Marshal(1, buf[offset:], x.Nodes) - offset += proto.UInt64Marshal(2, buf[offset:], x.ParentId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddByPathResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddByPathResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Nodes) != 0 { + mm.AppendUint64s(1, x.Nodes) + } + if x.ParentId != 0 { + mm.AppendUint64(2, x.ParentId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddByPathResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddByPathResponse_Body") + } + switch fc.FieldNum { + case 1: // Nodes + data, ok := fc.UnpackUint64s(nil) + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Nodes") + } + x.Nodes = data + case 2: // ParentId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ParentId") + } + x.ParentId = data + } + } + return nil +} +func (x *AddByPathResponse_Body) GetNodes() []uint64 { + if x != nil { + return x.Nodes + } + return nil +} +func (x *AddByPathResponse_Body) SetNodes(v []uint64) { + x.Nodes = v +} +func (x *AddByPathResponse_Body) GetParentId() uint64 { + if x != nil { + return x.ParentId + } + return 0 +} +func (x *AddByPathResponse_Body) SetParentId(v uint64) { + x.ParentId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddByPathResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddByPathResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"nodes\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Nodes { + if i != 0 { + out.RawByte(',') + } + out.Uint64(x.Nodes[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"parentId\":" + out.RawString(prefix) + out.Uint64(x.ParentId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddByPathResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddByPathResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + { + var f uint64 + var list []uint64 + in.Delim('[') + for !in.IsDelim(']') { + f = in.Uint64() + list = append(list, f) + in.WantComma() + } + x.Nodes = list + in.Delim(']') + } + case "parentId": + { + var f uint64 + f = in.Uint64() + x.ParentId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type AddByPathResponse struct { + Body *AddByPathResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*AddByPathResponse)(nil) + _ encoding.ProtoUnmarshaler = (*AddByPathResponse)(nil) + _ json.Marshaler = (*AddByPathResponse)(nil) + _ json.Unmarshaler = (*AddByPathResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -340,27 +1499,6 @@ func (x *AddByPathResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *AddByPathResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -376,13 +1514,167 @@ func (x *AddByPathResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *AddByPathResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *AddByPathResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *AddByPathResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *AddByPathResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *AddByPathResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "AddByPathResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(AddByPathResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *AddByPathResponse) GetBody() *AddByPathResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *AddByPathResponse) SetBody(v *AddByPathResponse_Body) { + x.Body = v +} +func (x *AddByPathResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *AddByPathResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *AddByPathResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *AddByPathResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *AddByPathResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *AddByPathResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *AddByPathResponse_Body + f = new(AddByPathResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + NodeId uint64 `json:"nodeId"` + BearerToken []byte `json:"bearerToken"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveRequest_Body)(nil) + _ json.Marshaler = (*RemoveRequest_Body)(nil) + _ json.Unmarshaler = (*RemoveRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -397,29 +1689,212 @@ func (x *RemoveRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.UInt64Marshal(3, buf[offset:], x.NodeId) - offset += proto.BytesMarshal(4, buf[offset:], x.BearerToken) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if x.NodeId != 0 { + mm.AppendUint64(3, x.NodeId) + } + if len(x.BearerToken) != 0 { + mm.AppendBytes(4, x.BearerToken) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // NodeId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "NodeId") + } + x.NodeId = data + case 4: // BearerToken + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "BearerToken") + } + x.BearerToken = data + } + } + return nil +} +func (x *RemoveRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *RemoveRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *RemoveRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *RemoveRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *RemoveRequest_Body) GetNodeId() uint64 { + if x != nil { + return x.NodeId + } + return 0 +} +func (x *RemoveRequest_Body) SetNodeId(v uint64) { + x.NodeId = v +} +func (x *RemoveRequest_Body) GetBearerToken() []byte { + if x != nil { + return x.BearerToken + } + return nil +} +func (x *RemoveRequest_Body) SetBearerToken(v []byte) { + x.BearerToken = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"nodeId\":" + out.RawString(prefix) + out.Uint64(x.NodeId) + } + { + const prefix string = ",\"bearerToken\":" + out.RawString(prefix) + out.Base64Bytes(x.BearerToken) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "nodeId": + { + var f uint64 + f = in.Uint64() + x.NodeId = f + } + case "bearerToken": + { + var f []byte + f = in.Bytes() + x.BearerToken = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveRequest struct { + Body *RemoveRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveRequest)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveRequest)(nil) + _ json.Marshaler = (*RemoveRequest)(nil) + _ json.Unmarshaler = (*RemoveRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -432,27 +1907,6 @@ func (x *RemoveRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -468,13 +1922,163 @@ func (x *RemoveRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveRequest) GetBody() *RemoveRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveRequest) SetBody(v *RemoveRequest_Body) { + x.Body = v +} +func (x *RemoveRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveRequest_Body + f = new(RemoveRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveResponse_Body)(nil) + _ json.Marshaler = (*RemoveResponse_Body)(nil) + _ json.Unmarshaler = (*RemoveResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -485,18 +2089,93 @@ func (x *RemoveResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type RemoveResponse struct { + Body *RemoveResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*RemoveResponse)(nil) + _ encoding.ProtoUnmarshaler = (*RemoveResponse)(nil) + _ json.Marshaler = (*RemoveResponse)(nil) + _ json.Unmarshaler = (*RemoveResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -509,27 +2188,6 @@ func (x *RemoveResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *RemoveResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -545,13 +2203,169 @@ func (x *RemoveResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *RemoveResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *RemoveResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *RemoveResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *RemoveResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *RemoveResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "RemoveResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(RemoveResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *RemoveResponse) GetBody() *RemoveResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *RemoveResponse) SetBody(v *RemoveResponse_Body) { + x.Body = v +} +func (x *RemoveResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *RemoveResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *RemoveResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *RemoveResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *RemoveResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *RemoveResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *RemoveResponse_Body + f = new(RemoveResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type MoveRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + ParentId uint64 `json:"parentId"` + NodeId uint64 `json:"nodeId"` + Meta []*KeyValue `json:"meta"` + BearerToken []byte `json:"bearerToken"` +} + +var ( + _ encoding.ProtoMarshaler = (*MoveRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*MoveRequest_Body)(nil) + _ json.Marshaler = (*MoveRequest_Body)(nil) + _ json.Unmarshaler = (*MoveRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -570,33 +2384,291 @@ func (x *MoveRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *MoveRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.UInt64Marshal(3, buf[offset:], x.ParentId) - offset += proto.UInt64Marshal(4, buf[offset:], x.NodeId) - for i := range x.Meta { - offset += proto.NestedStructureMarshal(5, buf[offset:], x.Meta[i]) - } - offset += proto.BytesMarshal(6, buf[offset:], x.BearerToken) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *MoveRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *MoveRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if x.ParentId != 0 { + mm.AppendUint64(3, x.ParentId) + } + if x.NodeId != 0 { + mm.AppendUint64(4, x.NodeId) + } + for i := range x.Meta { + if x.Meta[i] != nil && x.Meta[i].StableSize() != 0 { + x.Meta[i].EmitProtobuf(mm.AppendMessage(5)) + } + } + if len(x.BearerToken) != 0 { + mm.AppendBytes(6, x.BearerToken) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *MoveRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "MoveRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // ParentId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ParentId") + } + x.ParentId = data + case 4: // NodeId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "NodeId") + } + x.NodeId = data + case 5: // Meta + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Meta") + } + x.Meta = append(x.Meta, new(KeyValue)) + ff := x.Meta[len(x.Meta)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 6: // BearerToken + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "BearerToken") + } + x.BearerToken = data + } + } + return nil +} +func (x *MoveRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *MoveRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *MoveRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *MoveRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *MoveRequest_Body) GetParentId() uint64 { + if x != nil { + return x.ParentId + } + return 0 +} +func (x *MoveRequest_Body) SetParentId(v uint64) { + x.ParentId = v +} +func (x *MoveRequest_Body) GetNodeId() uint64 { + if x != nil { + return x.NodeId + } + return 0 +} +func (x *MoveRequest_Body) SetNodeId(v uint64) { + x.NodeId = v +} +func (x *MoveRequest_Body) GetMeta() []*KeyValue { + if x != nil { + return x.Meta + } + return nil +} +func (x *MoveRequest_Body) SetMeta(v []*KeyValue) { + x.Meta = v +} +func (x *MoveRequest_Body) GetBearerToken() []byte { + if x != nil { + return x.BearerToken + } + return nil +} +func (x *MoveRequest_Body) SetBearerToken(v []byte) { + x.BearerToken = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *MoveRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *MoveRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"parentId\":" + out.RawString(prefix) + out.Uint64(x.ParentId) + } + { + const prefix string = ",\"nodeId\":" + out.RawString(prefix) + out.Uint64(x.NodeId) + } + { + const prefix string = ",\"meta\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Meta { + if i != 0 { + out.RawByte(',') + } + x.Meta[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + { + const prefix string = ",\"bearerToken\":" + out.RawString(prefix) + out.Base64Bytes(x.BearerToken) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *MoveRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *MoveRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "parentId": + { + var f uint64 + f = in.Uint64() + x.ParentId = f + } + case "nodeId": + { + var f uint64 + f = in.Uint64() + x.NodeId = f + } + case "meta": + { + var f *KeyValue + var list []*KeyValue + in.Delim('[') + for !in.IsDelim(']') { + f = new(KeyValue) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Meta = list + in.Delim(']') + } + case "bearerToken": + { + var f []byte + f = in.Bytes() + x.BearerToken = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type MoveRequest struct { + Body *MoveRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*MoveRequest)(nil) + _ encoding.ProtoUnmarshaler = (*MoveRequest)(nil) + _ json.Marshaler = (*MoveRequest)(nil) + _ json.Unmarshaler = (*MoveRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -609,27 +2681,6 @@ func (x *MoveRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *MoveRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -645,13 +2696,163 @@ func (x *MoveRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *MoveRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *MoveRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *MoveRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *MoveRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *MoveRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "MoveRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(MoveRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *MoveRequest) GetBody() *MoveRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *MoveRequest) SetBody(v *MoveRequest_Body) { + x.Body = v +} +func (x *MoveRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *MoveRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *MoveRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *MoveRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *MoveRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *MoveRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *MoveRequest_Body + f = new(MoveRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type MoveResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*MoveResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*MoveResponse_Body)(nil) + _ json.Marshaler = (*MoveResponse_Body)(nil) + _ json.Unmarshaler = (*MoveResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -662,18 +2863,93 @@ func (x *MoveResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *MoveResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *MoveResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *MoveResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *MoveResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "MoveResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *MoveResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *MoveResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *MoveResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *MoveResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type MoveResponse struct { + Body *MoveResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*MoveResponse)(nil) + _ encoding.ProtoUnmarshaler = (*MoveResponse)(nil) + _ json.Marshaler = (*MoveResponse)(nil) + _ json.Unmarshaler = (*MoveResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -686,27 +2962,6 @@ func (x *MoveResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *MoveResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -722,13 +2977,171 @@ func (x *MoveResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *MoveResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *MoveResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *MoveResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *MoveResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *MoveResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "MoveResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(MoveResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *MoveResponse) GetBody() *MoveResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *MoveResponse) SetBody(v *MoveResponse_Body) { + x.Body = v +} +func (x *MoveResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *MoveResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *MoveResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *MoveResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *MoveResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *MoveResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *MoveResponse_Body + f = new(MoveResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNodeByPathRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + PathAttribute string `json:"pathAttribute"` + Path []string `json:"path"` + Attributes []string `json:"attributes"` + LatestOnly bool `json:"latestOnly"` + AllAttributes bool `json:"allAttributes"` + BearerToken []byte `json:"bearerToken"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNodeByPathRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetNodeByPathRequest_Body)(nil) + _ json.Marshaler = (*GetNodeByPathRequest_Body)(nil) + _ json.Unmarshaler = (*GetNodeByPathRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -747,33 +3160,356 @@ func (x *GetNodeByPathRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNodeByPathRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.StringMarshal(3, buf[offset:], x.PathAttribute) - offset += proto.RepeatedStringMarshal(4, buf[offset:], x.Path) - offset += proto.RepeatedStringMarshal(5, buf[offset:], x.Attributes) - offset += proto.BoolMarshal(6, buf[offset:], x.LatestOnly) - offset += proto.BoolMarshal(7, buf[offset:], x.AllAttributes) - offset += proto.BytesMarshal(8, buf[offset:], x.BearerToken) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNodeByPathRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNodeByPathRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if len(x.PathAttribute) != 0 { + mm.AppendString(3, x.PathAttribute) + } + for j := range x.Path { + mm.AppendString(4, x.Path[j]) + } + for j := range x.Attributes { + mm.AppendString(5, x.Attributes[j]) + } + if x.LatestOnly { + mm.AppendBool(6, x.LatestOnly) + } + if x.AllAttributes { + mm.AppendBool(7, x.AllAttributes) + } + if len(x.BearerToken) != 0 { + mm.AppendBytes(8, x.BearerToken) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNodeByPathRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNodeByPathRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // PathAttribute + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "PathAttribute") + } + x.PathAttribute = data + case 4: // Path + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Path") + } + x.Path = append(x.Path, data) + case 5: // Attributes + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Attributes") + } + x.Attributes = append(x.Attributes, data) + case 6: // LatestOnly + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "LatestOnly") + } + x.LatestOnly = data + case 7: // AllAttributes + data, ok := fc.Bool() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "AllAttributes") + } + x.AllAttributes = data + case 8: // BearerToken + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "BearerToken") + } + x.BearerToken = data + } + } + return nil +} +func (x *GetNodeByPathRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *GetNodeByPathRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *GetNodeByPathRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *GetNodeByPathRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *GetNodeByPathRequest_Body) GetPathAttribute() string { + if x != nil { + return x.PathAttribute + } + return "" +} +func (x *GetNodeByPathRequest_Body) SetPathAttribute(v string) { + x.PathAttribute = v +} +func (x *GetNodeByPathRequest_Body) GetPath() []string { + if x != nil { + return x.Path + } + return nil +} +func (x *GetNodeByPathRequest_Body) SetPath(v []string) { + x.Path = v +} +func (x *GetNodeByPathRequest_Body) GetAttributes() []string { + if x != nil { + return x.Attributes + } + return nil +} +func (x *GetNodeByPathRequest_Body) SetAttributes(v []string) { + x.Attributes = v +} +func (x *GetNodeByPathRequest_Body) GetLatestOnly() bool { + if x != nil { + return x.LatestOnly + } + return false +} +func (x *GetNodeByPathRequest_Body) SetLatestOnly(v bool) { + x.LatestOnly = v +} +func (x *GetNodeByPathRequest_Body) GetAllAttributes() bool { + if x != nil { + return x.AllAttributes + } + return false +} +func (x *GetNodeByPathRequest_Body) SetAllAttributes(v bool) { + x.AllAttributes = v +} +func (x *GetNodeByPathRequest_Body) GetBearerToken() []byte { + if x != nil { + return x.BearerToken + } + return nil +} +func (x *GetNodeByPathRequest_Body) SetBearerToken(v []byte) { + x.BearerToken = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNodeByPathRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNodeByPathRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"pathAttribute\":" + out.RawString(prefix) + out.String(x.PathAttribute) + } + { + const prefix string = ",\"path\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Path { + if i != 0 { + out.RawByte(',') + } + out.String(x.Path[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"attributes\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Attributes { + if i != 0 { + out.RawByte(',') + } + out.String(x.Attributes[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"latestOnly\":" + out.RawString(prefix) + out.Bool(x.LatestOnly) + } + { + const prefix string = ",\"allAttributes\":" + out.RawString(prefix) + out.Bool(x.AllAttributes) + } + { + const prefix string = ",\"bearerToken\":" + out.RawString(prefix) + out.Base64Bytes(x.BearerToken) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNodeByPathRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNodeByPathRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "pathAttribute": + { + var f string + f = in.String() + x.PathAttribute = f + } + case "path": + { + var f string + var list []string + in.Delim('[') + for !in.IsDelim(']') { + f = in.String() + list = append(list, f) + in.WantComma() + } + x.Path = list + in.Delim(']') + } + case "attributes": + { + var f string + var list []string + in.Delim('[') + for !in.IsDelim(']') { + f = in.String() + list = append(list, f) + in.WantComma() + } + x.Attributes = list + in.Delim(']') + } + case "latestOnly": + { + var f bool + f = in.Bool() + x.LatestOnly = f + } + case "allAttributes": + { + var f bool + f = in.Bool() + x.AllAttributes = f + } + case "bearerToken": + { + var f []byte + f = in.Bytes() + x.BearerToken = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNodeByPathRequest struct { + Body *GetNodeByPathRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNodeByPathRequest)(nil) + _ encoding.ProtoUnmarshaler = (*GetNodeByPathRequest)(nil) + _ json.Marshaler = (*GetNodeByPathRequest)(nil) + _ json.Unmarshaler = (*GetNodeByPathRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -786,27 +3522,6 @@ func (x *GetNodeByPathRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNodeByPathRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -822,13 +3537,167 @@ func (x *GetNodeByPathRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetNodeByPathRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetNodeByPathRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNodeByPathRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNodeByPathRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNodeByPathRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNodeByPathRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetNodeByPathRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetNodeByPathRequest) GetBody() *GetNodeByPathRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetNodeByPathRequest) SetBody(v *GetNodeByPathRequest_Body) { + x.Body = v +} +func (x *GetNodeByPathRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetNodeByPathRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNodeByPathRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNodeByPathRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNodeByPathRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNodeByPathRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetNodeByPathRequest_Body + f = new(GetNodeByPathRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNodeByPathResponse_Info struct { + NodeId uint64 `json:"nodeId"` + Timestamp uint64 `json:"timestamp"` + Meta []*KeyValue `json:"meta"` + ParentId uint64 `json:"parentId"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNodeByPathResponse_Info)(nil) + _ encoding.ProtoUnmarshaler = (*GetNodeByPathResponse_Info)(nil) + _ json.Marshaler = (*GetNodeByPathResponse_Info)(nil) + _ json.Unmarshaler = (*GetNodeByPathResponse_Info)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -845,31 +3714,232 @@ func (x *GetNodeByPathResponse_Info) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNodeByPathResponse_Info) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt64Marshal(1, buf[offset:], x.NodeId) - offset += proto.UInt64Marshal(2, buf[offset:], x.Timestamp) - for i := range x.Meta { - offset += proto.NestedStructureMarshal(3, buf[offset:], x.Meta[i]) - } - offset += proto.UInt64Marshal(4, buf[offset:], x.ParentId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNodeByPathResponse_Info) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNodeByPathResponse_Info) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.NodeId != 0 { + mm.AppendUint64(1, x.NodeId) + } + if x.Timestamp != 0 { + mm.AppendUint64(2, x.Timestamp) + } + for i := range x.Meta { + if x.Meta[i] != nil && x.Meta[i].StableSize() != 0 { + x.Meta[i].EmitProtobuf(mm.AppendMessage(3)) + } + } + if x.ParentId != 0 { + mm.AppendUint64(4, x.ParentId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNodeByPathResponse_Info) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNodeByPathResponse_Info") + } + switch fc.FieldNum { + case 1: // NodeId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "NodeId") + } + x.NodeId = data + case 2: // Timestamp + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Timestamp") + } + x.Timestamp = data + case 3: // Meta + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Meta") + } + x.Meta = append(x.Meta, new(KeyValue)) + ff := x.Meta[len(x.Meta)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 4: // ParentId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ParentId") + } + x.ParentId = data + } + } + return nil +} +func (x *GetNodeByPathResponse_Info) GetNodeId() uint64 { + if x != nil { + return x.NodeId + } + return 0 +} +func (x *GetNodeByPathResponse_Info) SetNodeId(v uint64) { + x.NodeId = v +} +func (x *GetNodeByPathResponse_Info) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} +func (x *GetNodeByPathResponse_Info) SetTimestamp(v uint64) { + x.Timestamp = v +} +func (x *GetNodeByPathResponse_Info) GetMeta() []*KeyValue { + if x != nil { + return x.Meta + } + return nil +} +func (x *GetNodeByPathResponse_Info) SetMeta(v []*KeyValue) { + x.Meta = v +} +func (x *GetNodeByPathResponse_Info) GetParentId() uint64 { + if x != nil { + return x.ParentId + } + return 0 +} +func (x *GetNodeByPathResponse_Info) SetParentId(v uint64) { + x.ParentId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNodeByPathResponse_Info) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNodeByPathResponse_Info) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"nodeId\":" + out.RawString(prefix[1:]) + out.Uint64(x.NodeId) + } + { + const prefix string = ",\"timestamp\":" + out.RawString(prefix) + out.Uint64(x.Timestamp) + } + { + const prefix string = ",\"meta\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Meta { + if i != 0 { + out.RawByte(',') + } + x.Meta[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + { + const prefix string = ",\"parentId\":" + out.RawString(prefix) + out.Uint64(x.ParentId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNodeByPathResponse_Info) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNodeByPathResponse_Info) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + { + var f uint64 + f = in.Uint64() + x.NodeId = f + } + case "timestamp": + { + var f uint64 + f = in.Uint64() + x.Timestamp = f + } + case "meta": + { + var f *KeyValue + var list []*KeyValue + in.Delim('[') + for !in.IsDelim(']') { + f = new(KeyValue) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Meta = list + in.Delim(']') + } + case "parentId": + { + var f uint64 + f = in.Uint64() + x.ParentId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNodeByPathResponse_Body struct { + Nodes []*GetNodeByPathResponse_Info `json:"nodes"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNodeByPathResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetNodeByPathResponse_Body)(nil) + _ json.Marshaler = (*GetNodeByPathResponse_Body)(nil) + _ json.Unmarshaler = (*GetNodeByPathResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -883,28 +3953,146 @@ func (x *GetNodeByPathResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNodeByPathResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - for i := range x.Nodes { - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Nodes[i]) - } - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNodeByPathResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNodeByPathResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for i := range x.Nodes { + if x.Nodes[i] != nil && x.Nodes[i].StableSize() != 0 { + x.Nodes[i].EmitProtobuf(mm.AppendMessage(1)) + } + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNodeByPathResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNodeByPathResponse_Body") + } + switch fc.FieldNum { + case 1: // Nodes + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Nodes") + } + x.Nodes = append(x.Nodes, new(GetNodeByPathResponse_Info)) + ff := x.Nodes[len(x.Nodes)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetNodeByPathResponse_Body) GetNodes() []*GetNodeByPathResponse_Info { + if x != nil { + return x.Nodes + } + return nil +} +func (x *GetNodeByPathResponse_Body) SetNodes(v []*GetNodeByPathResponse_Info) { + x.Nodes = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNodeByPathResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNodeByPathResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"nodes\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Nodes { + if i != 0 { + out.RawByte(',') + } + x.Nodes[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNodeByPathResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNodeByPathResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + { + var f *GetNodeByPathResponse_Info + var list []*GetNodeByPathResponse_Info + in.Delim('[') + for !in.IsDelim(']') { + f = new(GetNodeByPathResponse_Info) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Nodes = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetNodeByPathResponse struct { + Body *GetNodeByPathResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetNodeByPathResponse)(nil) + _ encoding.ProtoUnmarshaler = (*GetNodeByPathResponse)(nil) + _ json.Marshaler = (*GetNodeByPathResponse)(nil) + _ json.Unmarshaler = (*GetNodeByPathResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -917,27 +4105,6 @@ func (x *GetNodeByPathResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetNodeByPathResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -953,13 +4120,196 @@ func (x *GetNodeByPathResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetNodeByPathResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetNodeByPathResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetNodeByPathResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetNodeByPathResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetNodeByPathResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetNodeByPathResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetNodeByPathResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetNodeByPathResponse) GetBody() *GetNodeByPathResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetNodeByPathResponse) SetBody(v *GetNodeByPathResponse_Body) { + x.Body = v +} +func (x *GetNodeByPathResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetNodeByPathResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetNodeByPathResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetNodeByPathResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetNodeByPathResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetNodeByPathResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetNodeByPathResponse_Body + f = new(GetNodeByPathResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetSubTreeRequest_Body_Order_Direction int32 + +const ( + GetSubTreeRequest_Body_Order_None GetSubTreeRequest_Body_Order_Direction = 0 + GetSubTreeRequest_Body_Order_Asc GetSubTreeRequest_Body_Order_Direction = 1 +) + +var ( + GetSubTreeRequest_Body_Order_Direction_name = map[int32]string{ + 0: "None", + 1: "Asc", + } + GetSubTreeRequest_Body_Order_Direction_value = map[string]int32{ + "None": 0, + "Asc": 1, + } +) + +func (x GetSubTreeRequest_Body_Order_Direction) String() string { + if v, ok := GetSubTreeRequest_Body_Order_Direction_name[int32(x)]; ok { + return v + } + return strconv.FormatInt(int64(x), 10) +} +func (x *GetSubTreeRequest_Body_Order_Direction) FromString(s string) bool { + if v, ok := GetSubTreeRequest_Body_Order_Direction_value[s]; ok { + *x = GetSubTreeRequest_Body_Order_Direction(v) + return true + } + return false +} + +type GetSubTreeRequest_Body_Order struct { + Direction GetSubTreeRequest_Body_Order_Direction `json:"direction"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetSubTreeRequest_Body_Order)(nil) + _ encoding.ProtoUnmarshaler = (*GetSubTreeRequest_Body_Order)(nil) + _ json.Marshaler = (*GetSubTreeRequest_Body_Order)(nil) + _ json.Unmarshaler = (*GetSubTreeRequest_Body_Order)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -971,26 +4321,145 @@ func (x *GetSubTreeRequest_Body_Order) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetSubTreeRequest_Body_Order) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.EnumMarshal(1, buf[offset:], int32(x.Direction)) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetSubTreeRequest_Body_Order) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetSubTreeRequest_Body_Order) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if int32(x.Direction) != 0 { + mm.AppendInt32(1, int32(x.Direction)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetSubTreeRequest_Body_Order) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetSubTreeRequest_Body_Order") + } + switch fc.FieldNum { + case 1: // Direction + data, ok := fc.Int32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Direction") + } + x.Direction = GetSubTreeRequest_Body_Order_Direction(data) + } + } + return nil +} +func (x *GetSubTreeRequest_Body_Order) GetDirection() GetSubTreeRequest_Body_Order_Direction { + if x != nil { + return x.Direction + } + return 0 +} +func (x *GetSubTreeRequest_Body_Order) SetDirection(v GetSubTreeRequest_Body_Order_Direction) { + x.Direction = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetSubTreeRequest_Body_Order) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetSubTreeRequest_Body_Order) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"direction\":" + out.RawString(prefix[1:]) + out.Int32(int32(x.Direction)) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetSubTreeRequest_Body_Order) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetSubTreeRequest_Body_Order) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "direction": + { + var f GetSubTreeRequest_Body_Order_Direction + var parsedValue GetSubTreeRequest_Body_Order_Direction + switch v := in.Interface().(type) { + case string: + if vv, ok := GetSubTreeRequest_Body_Order_Direction_value[v]; ok { + parsedValue = GetSubTreeRequest_Body_Order_Direction(vv) + break + } + vv, err := strconv.ParseInt(v, 10, 32) + if err != nil { + in.AddError(err) + return + } + parsedValue = GetSubTreeRequest_Body_Order_Direction(vv) + case float64: + parsedValue = GetSubTreeRequest_Body_Order_Direction(v) + } + f = parsedValue + x.Direction = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetSubTreeRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + RootId []uint64 `json:"rootId"` + Depth uint32 `json:"depth"` + BearerToken []byte `json:"bearerToken"` + OrderBy *GetSubTreeRequest_Body_Order `json:"orderBy"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetSubTreeRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetSubTreeRequest_Body)(nil) + _ json.Marshaler = (*GetSubTreeRequest_Body)(nil) + _ json.Unmarshaler = (*GetSubTreeRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1009,36 +4478,287 @@ func (x *GetSubTreeRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetSubTreeRequest_Body) StableMarshal(buf []byte) []byte { +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetSubTreeRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *GetSubTreeRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { - return []byte{} + return } - if buf == nil { - buf = make([]byte, x.StableSize()) + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - for i := range x.RootId { - { - prefix := protowire.EncodeTag(protowire.Number(3), protowire.VarintType) - offset += binary.PutUvarint(buf[offset:], uint64(prefix)) - offset += binary.PutUvarint(buf[offset:], x.RootId[i]) + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + for j := range x.RootId { + mm.AppendUint64(3, x.RootId[j]) + } + if x.Depth != 0 { + mm.AppendUint32(4, x.Depth) + } + if len(x.BearerToken) != 0 { + mm.AppendBytes(5, x.BearerToken) + } + if x.OrderBy != nil && x.OrderBy.StableSize() != 0 { + x.OrderBy.EmitProtobuf(mm.AppendMessage(6)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetSubTreeRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetSubTreeRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // RootId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "RootId") + } + x.RootId = append(x.RootId, data) + case 4: // Depth + data, ok := fc.Uint32() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Depth") + } + x.Depth = data + case 5: // BearerToken + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "BearerToken") + } + x.BearerToken = data + case 6: // OrderBy + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "OrderBy") + } + x.OrderBy = new(GetSubTreeRequest_Body_Order) + if err := x.OrderBy.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } } } - offset += proto.UInt32Marshal(4, buf[offset:], x.Depth) - offset += proto.BytesMarshal(5, buf[offset:], x.BearerToken) - offset += proto.NestedStructureMarshal(6, buf[offset:], x.OrderBy) - return buf + return nil } +func (x *GetSubTreeRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *GetSubTreeRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *GetSubTreeRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *GetSubTreeRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *GetSubTreeRequest_Body) GetRootId() []uint64 { + if x != nil { + return x.RootId + } + return nil +} +func (x *GetSubTreeRequest_Body) SetRootId(v []uint64) { + x.RootId = v +} +func (x *GetSubTreeRequest_Body) GetDepth() uint32 { + if x != nil { + return x.Depth + } + return 0 +} +func (x *GetSubTreeRequest_Body) SetDepth(v uint32) { + x.Depth = v +} +func (x *GetSubTreeRequest_Body) GetBearerToken() []byte { + if x != nil { + return x.BearerToken + } + return nil +} +func (x *GetSubTreeRequest_Body) SetBearerToken(v []byte) { + x.BearerToken = v +} +func (x *GetSubTreeRequest_Body) GetOrderBy() *GetSubTreeRequest_Body_Order { + if x != nil { + return x.OrderBy + } + return nil +} +func (x *GetSubTreeRequest_Body) SetOrderBy(v *GetSubTreeRequest_Body_Order) { + x.OrderBy = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetSubTreeRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetSubTreeRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"rootId\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.RootId { + if i != 0 { + out.RawByte(',') + } + out.Uint64(x.RootId[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"depth\":" + out.RawString(prefix) + out.Uint32(x.Depth) + } + { + const prefix string = ",\"bearerToken\":" + out.RawString(prefix) + out.Base64Bytes(x.BearerToken) + } + { + const prefix string = ",\"orderBy\":" + out.RawString(prefix) + x.OrderBy.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetSubTreeRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetSubTreeRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "rootId": + { + var f uint64 + var list []uint64 + in.Delim('[') + for !in.IsDelim(']') { + f = in.Uint64() + list = append(list, f) + in.WantComma() + } + x.RootId = list + in.Delim(']') + } + case "depth": + { + var f uint32 + f = in.Uint32() + x.Depth = f + } + case "bearerToken": + { + var f []byte + f = in.Bytes() + x.BearerToken = f + } + case "orderBy": + { + var f *GetSubTreeRequest_Body_Order + f = new(GetSubTreeRequest_Body_Order) + f.UnmarshalEasyJSON(in) + x.OrderBy = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetSubTreeRequest struct { + Body *GetSubTreeRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetSubTreeRequest)(nil) + _ encoding.ProtoUnmarshaler = (*GetSubTreeRequest)(nil) + _ json.Marshaler = (*GetSubTreeRequest)(nil) + _ json.Unmarshaler = (*GetSubTreeRequest)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -1052,27 +4772,6 @@ func (x *GetSubTreeRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetSubTreeRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1088,13 +4787,167 @@ func (x *GetSubTreeRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetSubTreeRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetSubTreeRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetSubTreeRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetSubTreeRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetSubTreeRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetSubTreeRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetSubTreeRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetSubTreeRequest) GetBody() *GetSubTreeRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetSubTreeRequest) SetBody(v *GetSubTreeRequest_Body) { + x.Body = v +} +func (x *GetSubTreeRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetSubTreeRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetSubTreeRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetSubTreeRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetSubTreeRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetSubTreeRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetSubTreeRequest_Body + f = new(GetSubTreeRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetSubTreeResponse_Body struct { + NodeId []uint64 `json:"nodeId"` + ParentId []uint64 `json:"parentId"` + Timestamp []uint64 `json:"timestamp"` + Meta []*KeyValue `json:"meta"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetSubTreeResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetSubTreeResponse_Body)(nil) + _ json.Marshaler = (*GetSubTreeResponse_Body)(nil) + _ json.Unmarshaler = (*GetSubTreeResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1117,49 +4970,275 @@ func (x *GetSubTreeResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetSubTreeResponse_Body) StableMarshal(buf []byte) []byte { +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetSubTreeResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *GetSubTreeResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { - return []byte{} + return } - if buf == nil { - buf = make([]byte, x.StableSize()) + for j := range x.NodeId { + mm.AppendUint64(1, x.NodeId[j]) } - var offset int - for i := range x.NodeId { - { - prefix := protowire.EncodeTag(protowire.Number(1), protowire.VarintType) - offset += binary.PutUvarint(buf[offset:], uint64(prefix)) - offset += binary.PutUvarint(buf[offset:], x.NodeId[i]) - } + for j := range x.ParentId { + mm.AppendUint64(2, x.ParentId[j]) } - for i := range x.ParentId { - { - prefix := protowire.EncodeTag(protowire.Number(2), protowire.VarintType) - offset += binary.PutUvarint(buf[offset:], uint64(prefix)) - offset += binary.PutUvarint(buf[offset:], x.ParentId[i]) - } - } - for i := range x.Timestamp { - { - prefix := protowire.EncodeTag(protowire.Number(3), protowire.VarintType) - offset += binary.PutUvarint(buf[offset:], uint64(prefix)) - offset += binary.PutUvarint(buf[offset:], x.Timestamp[i]) - } + for j := range x.Timestamp { + mm.AppendUint64(3, x.Timestamp[j]) } for i := range x.Meta { - offset += proto.NestedStructureMarshal(4, buf[offset:], x.Meta[i]) + if x.Meta[i] != nil && x.Meta[i].StableSize() != 0 { + x.Meta[i].EmitProtobuf(mm.AppendMessage(4)) + } } - return buf } +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetSubTreeResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetSubTreeResponse_Body") + } + switch fc.FieldNum { + case 1: // NodeId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "NodeId") + } + x.NodeId = append(x.NodeId, data) + case 2: // ParentId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ParentId") + } + x.ParentId = append(x.ParentId, data) + case 3: // Timestamp + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Timestamp") + } + x.Timestamp = append(x.Timestamp, data) + case 4: // Meta + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Meta") + } + x.Meta = append(x.Meta, new(KeyValue)) + ff := x.Meta[len(x.Meta)-1] + if err := ff.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetSubTreeResponse_Body) GetNodeId() []uint64 { + if x != nil { + return x.NodeId + } + return nil +} +func (x *GetSubTreeResponse_Body) SetNodeId(v []uint64) { + x.NodeId = v +} +func (x *GetSubTreeResponse_Body) GetParentId() []uint64 { + if x != nil { + return x.ParentId + } + return nil +} +func (x *GetSubTreeResponse_Body) SetParentId(v []uint64) { + x.ParentId = v +} +func (x *GetSubTreeResponse_Body) GetTimestamp() []uint64 { + if x != nil { + return x.Timestamp + } + return nil +} +func (x *GetSubTreeResponse_Body) SetTimestamp(v []uint64) { + x.Timestamp = v +} +func (x *GetSubTreeResponse_Body) GetMeta() []*KeyValue { + if x != nil { + return x.Meta + } + return nil +} +func (x *GetSubTreeResponse_Body) SetMeta(v []*KeyValue) { + x.Meta = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetSubTreeResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetSubTreeResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"nodeId\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.NodeId { + if i != 0 { + out.RawByte(',') + } + out.Uint64(x.NodeId[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"parentId\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.ParentId { + if i != 0 { + out.RawByte(',') + } + out.Uint64(x.ParentId[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"timestamp\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Timestamp { + if i != 0 { + out.RawByte(',') + } + out.Uint64(x.Timestamp[i]) + } + out.RawByte(']') + } + { + const prefix string = ",\"meta\":" + out.RawString(prefix) + out.RawByte('[') + for i := range x.Meta { + if i != 0 { + out.RawByte(',') + } + x.Meta[i].MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetSubTreeResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetSubTreeResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + { + var f uint64 + var list []uint64 + in.Delim('[') + for !in.IsDelim(']') { + f = in.Uint64() + list = append(list, f) + in.WantComma() + } + x.NodeId = list + in.Delim(']') + } + case "parentId": + { + var f uint64 + var list []uint64 + in.Delim('[') + for !in.IsDelim(']') { + f = in.Uint64() + list = append(list, f) + in.WantComma() + } + x.ParentId = list + in.Delim(']') + } + case "timestamp": + { + var f uint64 + var list []uint64 + in.Delim('[') + for !in.IsDelim(']') { + f = in.Uint64() + list = append(list, f) + in.WantComma() + } + x.Timestamp = list + in.Delim(']') + } + case "meta": + { + var f *KeyValue + var list []*KeyValue + in.Delim('[') + for !in.IsDelim(']') { + f = new(KeyValue) + f.UnmarshalEasyJSON(in) + list = append(list, f) + in.WantComma() + } + x.Meta = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetSubTreeResponse struct { + Body *GetSubTreeResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetSubTreeResponse)(nil) + _ encoding.ProtoUnmarshaler = (*GetSubTreeResponse)(nil) + _ json.Marshaler = (*GetSubTreeResponse)(nil) + _ json.Unmarshaler = (*GetSubTreeResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1172,27 +5251,6 @@ func (x *GetSubTreeResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetSubTreeResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1208,13 +5266,164 @@ func (x *GetSubTreeResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetSubTreeResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetSubTreeResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetSubTreeResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetSubTreeResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetSubTreeResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetSubTreeResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetSubTreeResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetSubTreeResponse) GetBody() *GetSubTreeResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetSubTreeResponse) SetBody(v *GetSubTreeResponse_Body) { + x.Body = v +} +func (x *GetSubTreeResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetSubTreeResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetSubTreeResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetSubTreeResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetSubTreeResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetSubTreeResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetSubTreeResponse_Body + f = new(GetSubTreeResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TreeListRequest_Body struct { + ContainerId []byte `json:"containerId"` +} + +var ( + _ encoding.ProtoMarshaler = (*TreeListRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*TreeListRequest_Body)(nil) + _ json.Marshaler = (*TreeListRequest_Body)(nil) + _ json.Unmarshaler = (*TreeListRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1226,26 +5435,125 @@ func (x *TreeListRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TreeListRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TreeListRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TreeListRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TreeListRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TreeListRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + } + } + return nil +} +func (x *TreeListRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *TreeListRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TreeListRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TreeListRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TreeListRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TreeListRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TreeListRequest struct { + Body *TreeListRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*TreeListRequest)(nil) + _ encoding.ProtoUnmarshaler = (*TreeListRequest)(nil) + _ json.Marshaler = (*TreeListRequest)(nil) + _ json.Unmarshaler = (*TreeListRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1258,27 +5566,6 @@ func (x *TreeListRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TreeListRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1294,13 +5581,164 @@ func (x *TreeListRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *TreeListRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *TreeListRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TreeListRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TreeListRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TreeListRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TreeListRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(TreeListRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *TreeListRequest) GetBody() *TreeListRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *TreeListRequest) SetBody(v *TreeListRequest_Body) { + x.Body = v +} +func (x *TreeListRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *TreeListRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TreeListRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TreeListRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TreeListRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TreeListRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *TreeListRequest_Body + f = new(TreeListRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TreeListResponse_Body struct { + Ids []string `json:"ids"` +} + +var ( + _ encoding.ProtoMarshaler = (*TreeListResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*TreeListResponse_Body)(nil) + _ json.Marshaler = (*TreeListResponse_Body)(nil) + _ json.Unmarshaler = (*TreeListResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1312,26 +5750,139 @@ func (x *TreeListResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TreeListResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.RepeatedStringMarshal(1, buf[offset:], x.Ids) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TreeListResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TreeListResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + for j := range x.Ids { + mm.AppendString(1, x.Ids[j]) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TreeListResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TreeListResponse_Body") + } + switch fc.FieldNum { + case 1: // Ids + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Ids") + } + x.Ids = append(x.Ids, data) + } + } + return nil +} +func (x *TreeListResponse_Body) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} +func (x *TreeListResponse_Body) SetIds(v []string) { + x.Ids = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TreeListResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TreeListResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"ids\":" + out.RawString(prefix[1:]) + out.RawByte('[') + for i := range x.Ids { + if i != 0 { + out.RawByte(',') + } + out.String(x.Ids[i]) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TreeListResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TreeListResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "ids": + { + var f string + var list []string + in.Delim('[') + for !in.IsDelim(']') { + f = in.String() + list = append(list, f) + in.WantComma() + } + x.Ids = list + in.Delim(']') + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type TreeListResponse struct { + Body *TreeListResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*TreeListResponse)(nil) + _ encoding.ProtoUnmarshaler = (*TreeListResponse)(nil) + _ json.Marshaler = (*TreeListResponse)(nil) + _ json.Unmarshaler = (*TreeListResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1344,27 +5895,6 @@ func (x *TreeListResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *TreeListResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1380,13 +5910,166 @@ func (x *TreeListResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *TreeListResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *TreeListResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *TreeListResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *TreeListResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *TreeListResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "TreeListResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(TreeListResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *TreeListResponse) GetBody() *TreeListResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *TreeListResponse) SetBody(v *TreeListResponse_Body) { + x.Body = v +} +func (x *TreeListResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *TreeListResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *TreeListResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *TreeListResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *TreeListResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *TreeListResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *TreeListResponse_Body + f = new(TreeListResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ApplyRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + Operation *LogMove `json:"operation"` +} + +var ( + _ encoding.ProtoMarshaler = (*ApplyRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ApplyRequest_Body)(nil) + _ json.Marshaler = (*ApplyRequest_Body)(nil) + _ json.Unmarshaler = (*ApplyRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1400,28 +6083,187 @@ func (x *ApplyRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ApplyRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.NestedStructureMarshal(3, buf[offset:], x.Operation) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ApplyRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ApplyRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if x.Operation != nil && x.Operation.StableSize() != 0 { + x.Operation.EmitProtobuf(mm.AppendMessage(3)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ApplyRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ApplyRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // Operation + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Operation") + } + x.Operation = new(LogMove) + if err := x.Operation.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ApplyRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *ApplyRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *ApplyRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *ApplyRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *ApplyRequest_Body) GetOperation() *LogMove { + if x != nil { + return x.Operation + } + return nil +} +func (x *ApplyRequest_Body) SetOperation(v *LogMove) { + x.Operation = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ApplyRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ApplyRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"operation\":" + out.RawString(prefix) + x.Operation.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ApplyRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ApplyRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "operation": + { + var f *LogMove + f = new(LogMove) + f.UnmarshalEasyJSON(in) + x.Operation = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ApplyRequest struct { + Body *ApplyRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ApplyRequest)(nil) + _ encoding.ProtoUnmarshaler = (*ApplyRequest)(nil) + _ json.Marshaler = (*ApplyRequest)(nil) + _ json.Unmarshaler = (*ApplyRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1434,27 +6276,6 @@ func (x *ApplyRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ApplyRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1470,13 +6291,163 @@ func (x *ApplyRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ApplyRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ApplyRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ApplyRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ApplyRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ApplyRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ApplyRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ApplyRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ApplyRequest) GetBody() *ApplyRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ApplyRequest) SetBody(v *ApplyRequest_Body) { + x.Body = v +} +func (x *ApplyRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ApplyRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ApplyRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ApplyRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ApplyRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ApplyRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ApplyRequest_Body + f = new(ApplyRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ApplyResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*ApplyResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*ApplyResponse_Body)(nil) + _ json.Marshaler = (*ApplyResponse_Body)(nil) + _ json.Unmarshaler = (*ApplyResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1487,18 +6458,93 @@ func (x *ApplyResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ApplyResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ApplyResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ApplyResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ApplyResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ApplyResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ApplyResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ApplyResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ApplyResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ApplyResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type ApplyResponse struct { + Body *ApplyResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*ApplyResponse)(nil) + _ encoding.ProtoUnmarshaler = (*ApplyResponse)(nil) + _ json.Marshaler = (*ApplyResponse)(nil) + _ json.Unmarshaler = (*ApplyResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1511,27 +6557,6 @@ func (x *ApplyResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *ApplyResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1547,13 +6572,167 @@ func (x *ApplyResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *ApplyResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *ApplyResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *ApplyResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *ApplyResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *ApplyResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "ApplyResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(ApplyResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *ApplyResponse) GetBody() *ApplyResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *ApplyResponse) SetBody(v *ApplyResponse_Body) { + x.Body = v +} +func (x *ApplyResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *ApplyResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *ApplyResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *ApplyResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *ApplyResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *ApplyResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *ApplyResponse_Body + f = new(ApplyResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetOpLogRequest_Body struct { + ContainerId []byte `json:"containerId"` + TreeId string `json:"treeId"` + Height uint64 `json:"height"` + Count uint64 `json:"count"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetOpLogRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetOpLogRequest_Body)(nil) + _ json.Marshaler = (*GetOpLogRequest_Body)(nil) + _ json.Unmarshaler = (*GetOpLogRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1568,29 +6747,212 @@ func (x *GetOpLogRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetOpLogRequest_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId) - offset += proto.StringMarshal(2, buf[offset:], x.TreeId) - offset += proto.UInt64Marshal(3, buf[offset:], x.Height) - offset += proto.UInt64Marshal(4, buf[offset:], x.Count) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetOpLogRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetOpLogRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.ContainerId) != 0 { + mm.AppendBytes(1, x.ContainerId) + } + if len(x.TreeId) != 0 { + mm.AppendString(2, x.TreeId) + } + if x.Height != 0 { + mm.AppendUint64(3, x.Height) + } + if x.Count != 0 { + mm.AppendUint64(4, x.Count) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetOpLogRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetOpLogRequest_Body") + } + switch fc.FieldNum { + case 1: // ContainerId + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ContainerId") + } + x.ContainerId = data + case 2: // TreeId + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "TreeId") + } + x.TreeId = data + case 3: // Height + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Height") + } + x.Height = data + case 4: // Count + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Count") + } + x.Count = data + } + } + return nil +} +func (x *GetOpLogRequest_Body) GetContainerId() []byte { + if x != nil { + return x.ContainerId + } + return nil +} +func (x *GetOpLogRequest_Body) SetContainerId(v []byte) { + x.ContainerId = v +} +func (x *GetOpLogRequest_Body) GetTreeId() string { + if x != nil { + return x.TreeId + } + return "" +} +func (x *GetOpLogRequest_Body) SetTreeId(v string) { + x.TreeId = v +} +func (x *GetOpLogRequest_Body) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} +func (x *GetOpLogRequest_Body) SetHeight(v uint64) { + x.Height = v +} +func (x *GetOpLogRequest_Body) GetCount() uint64 { + if x != nil { + return x.Count + } + return 0 +} +func (x *GetOpLogRequest_Body) SetCount(v uint64) { + x.Count = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetOpLogRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetOpLogRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"containerId\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.ContainerId) + } + { + const prefix string = ",\"treeId\":" + out.RawString(prefix) + out.String(x.TreeId) + } + { + const prefix string = ",\"height\":" + out.RawString(prefix) + out.Uint64(x.Height) + } + { + const prefix string = ",\"count\":" + out.RawString(prefix) + out.Uint64(x.Count) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetOpLogRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetOpLogRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "containerId": + { + var f []byte + f = in.Bytes() + x.ContainerId = f + } + case "treeId": + { + var f string + f = in.String() + x.TreeId = f + } + case "height": + { + var f uint64 + f = in.Uint64() + x.Height = f + } + case "count": + { + var f uint64 + f = in.Uint64() + x.Count = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetOpLogRequest struct { + Body *GetOpLogRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetOpLogRequest)(nil) + _ encoding.ProtoUnmarshaler = (*GetOpLogRequest)(nil) + _ json.Marshaler = (*GetOpLogRequest)(nil) + _ json.Unmarshaler = (*GetOpLogRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1603,27 +6965,6 @@ func (x *GetOpLogRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetOpLogRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1639,13 +6980,164 @@ func (x *GetOpLogRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetOpLogRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetOpLogRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetOpLogRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetOpLogRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetOpLogRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetOpLogRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetOpLogRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetOpLogRequest) GetBody() *GetOpLogRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetOpLogRequest) SetBody(v *GetOpLogRequest_Body) { + x.Body = v +} +func (x *GetOpLogRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetOpLogRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetOpLogRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetOpLogRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetOpLogRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetOpLogRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetOpLogRequest_Body + f = new(GetOpLogRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetOpLogResponse_Body struct { + Operation *LogMove `json:"operation"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetOpLogResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*GetOpLogResponse_Body)(nil) + _ json.Marshaler = (*GetOpLogResponse_Body)(nil) + _ json.Unmarshaler = (*GetOpLogResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1657,26 +7149,129 @@ func (x *GetOpLogResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetOpLogResponse_Body) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Operation) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetOpLogResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetOpLogResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Operation != nil && x.Operation.StableSize() != 0 { + x.Operation.EmitProtobuf(mm.AppendMessage(1)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetOpLogResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetOpLogResponse_Body") + } + switch fc.FieldNum { + case 1: // Operation + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Operation") + } + x.Operation = new(LogMove) + if err := x.Operation.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetOpLogResponse_Body) GetOperation() *LogMove { + if x != nil { + return x.Operation + } + return nil +} +func (x *GetOpLogResponse_Body) SetOperation(v *LogMove) { + x.Operation = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetOpLogResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetOpLogResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"operation\":" + out.RawString(prefix[1:]) + x.Operation.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetOpLogResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetOpLogResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "operation": + { + var f *LogMove + f = new(LogMove) + f.UnmarshalEasyJSON(in) + x.Operation = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type GetOpLogResponse struct { + Body *GetOpLogResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*GetOpLogResponse)(nil) + _ encoding.ProtoUnmarshaler = (*GetOpLogResponse)(nil) + _ json.Marshaler = (*GetOpLogResponse)(nil) + _ json.Unmarshaler = (*GetOpLogResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1689,27 +7284,6 @@ func (x *GetOpLogResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *GetOpLogResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1725,13 +7299,163 @@ func (x *GetOpLogResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *GetOpLogResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *GetOpLogResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *GetOpLogResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *GetOpLogResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *GetOpLogResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "GetOpLogResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(GetOpLogResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *GetOpLogResponse) GetBody() *GetOpLogResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *GetOpLogResponse) SetBody(v *GetOpLogResponse_Body) { + x.Body = v +} +func (x *GetOpLogResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *GetOpLogResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *GetOpLogResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *GetOpLogResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *GetOpLogResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *GetOpLogResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *GetOpLogResponse_Body + f = new(GetOpLogResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthcheckResponse_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*HealthcheckResponse_Body)(nil) + _ encoding.ProtoUnmarshaler = (*HealthcheckResponse_Body)(nil) + _ json.Marshaler = (*HealthcheckResponse_Body)(nil) + _ json.Unmarshaler = (*HealthcheckResponse_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1742,18 +7466,93 @@ func (x *HealthcheckResponse_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthcheckResponse_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthcheckResponse_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthcheckResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthcheckResponse_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthcheckResponse_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthcheckResponse_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthcheckResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthcheckResponse_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthcheckResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthcheckResponse struct { + Body *HealthcheckResponse_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthcheckResponse)(nil) + _ encoding.ProtoUnmarshaler = (*HealthcheckResponse)(nil) + _ json.Marshaler = (*HealthcheckResponse)(nil) + _ json.Unmarshaler = (*HealthcheckResponse)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1766,27 +7565,6 @@ func (x *HealthcheckResponse) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthcheckResponse) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1802,13 +7580,163 @@ func (x *HealthcheckResponse) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *HealthcheckResponse) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *HealthcheckResponse) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthcheckResponse) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthcheckResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthcheckResponse) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthcheckResponse") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(HealthcheckResponse_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *HealthcheckResponse) GetBody() *HealthcheckResponse_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *HealthcheckResponse) SetBody(v *HealthcheckResponse_Body) { + x.Body = v +} +func (x *HealthcheckResponse) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *HealthcheckResponse) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthcheckResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthcheckResponse) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthcheckResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthcheckResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *HealthcheckResponse_Body + f = new(HealthcheckResponse_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthcheckRequest_Body struct { +} + +var ( + _ encoding.ProtoMarshaler = (*HealthcheckRequest_Body)(nil) + _ encoding.ProtoUnmarshaler = (*HealthcheckRequest_Body)(nil) + _ json.Marshaler = (*HealthcheckRequest_Body)(nil) + _ json.Unmarshaler = (*HealthcheckRequest_Body)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1819,18 +7747,93 @@ func (x *HealthcheckRequest_Body) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthcheckRequest_Body) StableMarshal(buf []byte) []byte { - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthcheckRequest_Body) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *HealthcheckRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthcheckRequest_Body) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthcheckRequest_Body") + } + switch fc.FieldNum { + } + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthcheckRequest_Body) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthcheckRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthcheckRequest_Body) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthcheckRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type HealthcheckRequest struct { + Body *HealthcheckRequest_Body `json:"body"` + Signature *Signature `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*HealthcheckRequest)(nil) + _ encoding.ProtoUnmarshaler = (*HealthcheckRequest)(nil) + _ json.Marshaler = (*HealthcheckRequest)(nil) + _ json.Unmarshaler = (*HealthcheckRequest)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -1843,27 +7846,6 @@ func (x *HealthcheckRequest) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *HealthcheckRequest) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body) - offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature) - return buf -} - // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // @@ -1879,9 +7861,149 @@ func (x *HealthcheckRequest) SignedDataSize() int { // // Structures with the same field values have the same signed data size. func (x *HealthcheckRequest) ReadSignedData(buf []byte) ([]byte, error) { - return x.GetBody().StableMarshal(buf), nil + return x.GetBody().MarshalProtobuf(buf), nil } -func (x *HealthcheckRequest) SetSignature(sig *Signature) { - x.Signature = sig +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *HealthcheckRequest) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *HealthcheckRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.Body != nil && x.Body.StableSize() != 0 { + x.Body.EmitProtobuf(mm.AppendMessage(1)) + } + if x.Signature != nil && x.Signature.StableSize() != 0 { + x.Signature.EmitProtobuf(mm.AppendMessage(2)) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *HealthcheckRequest) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "HealthcheckRequest") + } + switch fc.FieldNum { + case 1: // Body + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Body") + } + x.Body = new(HealthcheckRequest_Body) + if err := x.Body.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + case 2: // Signature + data, ok := fc.MessageData() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Signature") + } + x.Signature = new(Signature) + if err := x.Signature.UnmarshalProtobuf(data); err != nil { + return fmt.Errorf("unmarshal: %w", err) + } + } + } + return nil +} +func (x *HealthcheckRequest) GetBody() *HealthcheckRequest_Body { + if x != nil { + return x.Body + } + return nil +} +func (x *HealthcheckRequest) SetBody(v *HealthcheckRequest_Body) { + x.Body = v +} +func (x *HealthcheckRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} +func (x *HealthcheckRequest) SetSignature(v *Signature) { + x.Signature = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *HealthcheckRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *HealthcheckRequest) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"body\":" + out.RawString(prefix[1:]) + x.Body.MarshalEasyJSON(out) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + x.Signature.MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *HealthcheckRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *HealthcheckRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + { + var f *HealthcheckRequest_Body + f = new(HealthcheckRequest_Body) + f.UnmarshalEasyJSON(in) + x.Body = f + } + case "signature": + { + var f *Signature + f = new(Signature) + f.UnmarshalEasyJSON(in) + x.Signature = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } } diff --git a/pkg/services/tree/types.pb.go b/pkg/services/tree/types.pb.go deleted file mode 100644 index 6464ccb77..000000000 --- a/pkg/services/tree/types.pb.go +++ /dev/null @@ -1,320 +0,0 @@ -//* -// Auxiliary structures to use with tree service. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc v4.25.0 -// source: pkg/services/tree/types.proto - -package tree - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// KeyValue represents key-value pair attached to an object. -type KeyValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Attribute name. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Attribute value. - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *KeyValue) Reset() { - *x = KeyValue{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyValue) ProtoMessage() {} - -func (x *KeyValue) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead. -func (*KeyValue) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_types_proto_rawDescGZIP(), []int{0} -} - -func (x *KeyValue) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *KeyValue) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -// LogMove represents log-entry for a single move operation. -type LogMove struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the parent node. - ParentId uint64 `protobuf:"varint,1,opt,name=parent_id,json=parentID,proto3" json:"parent_id,omitempty"` - // Node meta information, including operation timestamp. - Meta []byte `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` - // ID of the node to move. - ChildId uint64 `protobuf:"varint,3,opt,name=child_id,json=childID,proto3" json:"child_id,omitempty"` -} - -func (x *LogMove) Reset() { - *x = LogMove{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogMove) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogMove) ProtoMessage() {} - -func (x *LogMove) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogMove.ProtoReflect.Descriptor instead. -func (*LogMove) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_types_proto_rawDescGZIP(), []int{1} -} - -func (x *LogMove) GetParentId() uint64 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *LogMove) GetMeta() []byte { - if x != nil { - return x.Meta - } - return nil -} - -func (x *LogMove) GetChildId() uint64 { - if x != nil { - return x.ChildId - } - return 0 -} - -// Signature of a message. -type Signature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Serialized public key as defined in FrostFS API. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Signature of a message body. - Sign []byte `protobuf:"bytes,2,opt,name=sign,json=signature,proto3" json:"sign,omitempty"` -} - -func (x *Signature) Reset() { - *x = Signature{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_services_tree_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Signature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Signature) ProtoMessage() {} - -func (x *Signature) ProtoReflect() protoreflect.Message { - mi := &file_pkg_services_tree_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Signature.ProtoReflect.Descriptor instead. -func (*Signature) Descriptor() ([]byte, []int) { - return file_pkg_services_tree_types_proto_rawDescGZIP(), []int{2} -} - -func (x *Signature) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *Signature) GetSign() []byte { - if x != nil { - return x.Sign - } - return nil -} - -var File_pkg_services_tree_types_proto protoreflect.FileDescriptor - -var file_pkg_services_tree_types_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, - 0x72, 0x65, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x55, 0x0a, 0x07, 0x4c, 0x6f, 0x67, - 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, - 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x44, - 0x22, 0x36, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, - 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, - 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, - 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_pkg_services_tree_types_proto_rawDescOnce sync.Once - file_pkg_services_tree_types_proto_rawDescData = file_pkg_services_tree_types_proto_rawDesc -) - -func file_pkg_services_tree_types_proto_rawDescGZIP() []byte { - file_pkg_services_tree_types_proto_rawDescOnce.Do(func() { - file_pkg_services_tree_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_services_tree_types_proto_rawDescData) - }) - return file_pkg_services_tree_types_proto_rawDescData -} - -var file_pkg_services_tree_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_pkg_services_tree_types_proto_goTypes = []interface{}{ - (*KeyValue)(nil), // 0: tree.KeyValue - (*LogMove)(nil), // 1: tree.LogMove - (*Signature)(nil), // 2: tree.Signature -} -var file_pkg_services_tree_types_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pkg_services_tree_types_proto_init() } -func file_pkg_services_tree_types_proto_init() { - if File_pkg_services_tree_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pkg_services_tree_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMove); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_services_tree_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Signature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_services_tree_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_pkg_services_tree_types_proto_goTypes, - DependencyIndexes: file_pkg_services_tree_types_proto_depIdxs, - MessageInfos: file_pkg_services_tree_types_proto_msgTypes, - }.Build() - File_pkg_services_tree_types_proto = out.File - file_pkg_services_tree_types_proto_rawDesc = nil - file_pkg_services_tree_types_proto_goTypes = nil - file_pkg_services_tree_types_proto_depIdxs = nil -} diff --git a/pkg/services/tree/types_frostfs.pb.go b/pkg/services/tree/types_frostfs.pb.go index 707fcc3cc..4399f8a8b 100644 --- a/pkg/services/tree/types_frostfs.pb.go +++ b/pkg/services/tree/types_frostfs.pb.go @@ -2,7 +2,28 @@ package tree -import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" +import ( + json "encoding/json" + fmt "fmt" + pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" + proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" + encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" + easyproto "github.com/VictoriaMetrics/easyproto" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" +) + +type KeyValue struct { + Key string `json:"key"` + Value []byte `json:"value"` +} + +var ( + _ encoding.ProtoMarshaler = (*KeyValue)(nil) + _ encoding.ProtoUnmarshaler = (*KeyValue)(nil) + _ json.Marshaler = (*KeyValue)(nil) + _ json.Unmarshaler = (*KeyValue)(nil) +) // StableSize returns the size of x in protobuf format. // @@ -16,27 +37,155 @@ func (x *KeyValue) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *KeyValue) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.StringMarshal(1, buf[offset:], x.Key) - offset += proto.BytesMarshal(2, buf[offset:], x.Value) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *KeyValue) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *KeyValue) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Key) != 0 { + mm.AppendString(1, x.Key) + } + if len(x.Value) != 0 { + mm.AppendBytes(2, x.Value) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *KeyValue) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "KeyValue") + } + switch fc.FieldNum { + case 1: // Key + data, ok := fc.String() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Key") + } + x.Key = data + case 2: // Value + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Value") + } + x.Value = data + } + } + return nil +} +func (x *KeyValue) GetKey() string { + if x != nil { + return x.Key + } + return "" +} +func (x *KeyValue) SetKey(v string) { + x.Key = v +} +func (x *KeyValue) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} +func (x *KeyValue) SetValue(v []byte) { + x.Value = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *KeyValue) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *KeyValue) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.String(x.Key) + } + { + const prefix string = ",\"value\":" + out.RawString(prefix) + out.Base64Bytes(x.Value) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *KeyValue) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *KeyValue) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "key": + { + var f string + f = in.String() + x.Key = f + } + case "value": + { + var f []byte + f = in.Bytes() + x.Value = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type LogMove struct { + ParentId uint64 `json:"parentID"` + Meta []byte `json:"meta"` + ChildId uint64 `json:"childID"` +} + +var ( + _ encoding.ProtoMarshaler = (*LogMove)(nil) + _ encoding.ProtoUnmarshaler = (*LogMove)(nil) + _ json.Marshaler = (*LogMove)(nil) + _ json.Unmarshaler = (*LogMove)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -50,28 +199,183 @@ func (x *LogMove) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *LogMove) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.UInt64Marshal(1, buf[offset:], x.ParentId) - offset += proto.BytesMarshal(2, buf[offset:], x.Meta) - offset += proto.UInt64Marshal(3, buf[offset:], x.ChildId) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *LogMove) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst } +func (x *LogMove) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if x.ParentId != 0 { + mm.AppendUint64(1, x.ParentId) + } + if len(x.Meta) != 0 { + mm.AppendBytes(2, x.Meta) + } + if x.ChildId != 0 { + mm.AppendUint64(3, x.ChildId) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *LogMove) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "LogMove") + } + switch fc.FieldNum { + case 1: // ParentId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ParentId") + } + x.ParentId = data + case 2: // Meta + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Meta") + } + x.Meta = data + case 3: // ChildId + data, ok := fc.Uint64() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "ChildId") + } + x.ChildId = data + } + } + return nil +} +func (x *LogMove) GetParentId() uint64 { + if x != nil { + return x.ParentId + } + return 0 +} +func (x *LogMove) SetParentId(v uint64) { + x.ParentId = v +} +func (x *LogMove) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} +func (x *LogMove) SetMeta(v []byte) { + x.Meta = v +} +func (x *LogMove) GetChildId() uint64 { + if x != nil { + return x.ChildId + } + return 0 +} +func (x *LogMove) SetChildId(v uint64) { + x.ChildId = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *LogMove) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *LogMove) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"parentID\":" + out.RawString(prefix[1:]) + out.Uint64(x.ParentId) + } + { + const prefix string = ",\"meta\":" + out.RawString(prefix) + out.Base64Bytes(x.Meta) + } + { + const prefix string = ",\"childID\":" + out.RawString(prefix) + out.Uint64(x.ChildId) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *LogMove) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *LogMove) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "parentID": + { + var f uint64 + f = in.Uint64() + x.ParentId = f + } + case "meta": + { + var f []byte + f = in.Bytes() + x.Meta = f + } + case "childID": + { + var f uint64 + f = in.Uint64() + x.ChildId = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} + +type Signature struct { + Key []byte `json:"key"` + Sign []byte `json:"signature"` +} + +var ( + _ encoding.ProtoMarshaler = (*Signature)(nil) + _ encoding.ProtoUnmarshaler = (*Signature)(nil) + _ json.Marshaler = (*Signature)(nil) + _ json.Unmarshaler = (*Signature)(nil) +) + // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. @@ -84,23 +388,138 @@ func (x *Signature) StableSize() (size int) { return size } -// StableMarshal marshals x in protobuf binary format with stable field order. -// -// If buffer length is less than x.StableSize(), new buffer is allocated. -// -// Returns any error encountered which did not allow writing the data completely. -// Otherwise, returns the buffer in which the data is written. -// -// Structures with the same field values have the same binary format. -func (x *Signature) StableMarshal(buf []byte) []byte { - if x == nil { - return []byte{} - } - if buf == nil { - buf = make([]byte, x.StableSize()) - } - var offset int - offset += proto.BytesMarshal(1, buf[offset:], x.Key) - offset += proto.BytesMarshal(2, buf[offset:], x.Sign) - return buf +// MarshalProtobuf implements the encoding.ProtoMarshaler interface. +func (x *Signature) MarshalProtobuf(dst []byte) []byte { + m := pool.MarshalerPool.Get() + defer pool.MarshalerPool.Put(m) + x.EmitProtobuf(m.MessageMarshaler()) + dst = m.Marshal(dst) + return dst +} + +func (x *Signature) EmitProtobuf(mm *easyproto.MessageMarshaler) { + if x == nil { + return + } + if len(x.Key) != 0 { + mm.AppendBytes(1, x.Key) + } + if len(x.Sign) != 0 { + mm.AppendBytes(2, x.Sign) + } +} + +// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. +func (x *Signature) UnmarshalProtobuf(src []byte) (err error) { + var fc easyproto.FieldContext + for len(src) > 0 { + src, err = fc.NextField(src) + if err != nil { + return fmt.Errorf("cannot read next field in %s", "Signature") + } + switch fc.FieldNum { + case 1: // Key + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Key") + } + x.Key = data + case 2: // Sign + data, ok := fc.Bytes() + if !ok { + return fmt.Errorf("cannot unmarshal field %s", "Sign") + } + x.Sign = data + } + } + return nil +} +func (x *Signature) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} +func (x *Signature) SetKey(v []byte) { + x.Key = v +} +func (x *Signature) GetSign() []byte { + if x != nil { + return x.Sign + } + return nil +} +func (x *Signature) SetSign(v []byte) { + x.Sign = v +} + +// MarshalJSON implements the json.Marshaler interface. +func (x *Signature) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + x.MarshalEasyJSON(&w) + return w.Buffer.BuildBytes(), w.Error +} +func (x *Signature) MarshalEasyJSON(out *jwriter.Writer) { + if x == nil { + out.RawString("null") + return + } + out.RawByte('{') + { + const prefix string = ",\"key\":" + out.RawString(prefix[1:]) + out.Base64Bytes(x.Key) + } + { + const prefix string = ",\"signature\":" + out.RawString(prefix) + out.Base64Bytes(x.Sign) + } + out.RawByte('}') +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (x *Signature) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + x.UnmarshalEasyJSON(&r) + return r.Error() +} +func (x *Signature) UnmarshalEasyJSON(in *jlexer.Lexer) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "key": + { + var f []byte + f = in.Bytes() + x.Key = f + } + case "signature": + { + var f []byte + f = in.Bytes() + x.Sign = f + } + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } }