frostfs-node/pkg/services/control/service_frostfs.pb.go
Evgenii Stratonikov 5e9a97fd3e
All checks were successful
DCO action / DCO (pull_request) Successful in 5m13s
Build / Build Components (1.22) (pull_request) Successful in 6m30s
Build / Build Components (1.23) (pull_request) Successful in 6m31s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m59s
Tests and linters / Run gofumpt (pull_request) Successful in 57s
Tests and linters / Tests (1.22) (pull_request) Successful in 2m21s
Tests and linters / Tests (1.23) (pull_request) Successful in 2m19s
Tests and linters / Staticcheck (pull_request) Successful in 2m26s
Tests and linters / Lint (pull_request) Successful in 2m49s
Tests and linters / gopls check (pull_request) Successful in 3m6s
Tests and linters / Tests with -race (pull_request) Successful in 3m16s
Vulncheck / Vulncheck (pull_request) Successful in 45s
[#1336] go.mod: Update api-go and sdk-go
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-27 14:48:43 +03:00

15031 lines
373 KiB
Go
Generated

// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package control
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.
//
// Structures with the same field values have the same binary size.
func (x *HealthCheckRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *HealthCheckRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *HealthCheckRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *HealthCheckRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *HealthCheckResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.EnumSize(1, int32(x.NetmapStatus))
size += proto.EnumSize(2, int32(x.HealthStatus))
return size
}
// 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.
func (x *HealthCheckResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *HealthCheckResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *HealthCheckResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SetNetmapStatusRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.EnumSize(1, int32(x.Status))
size += proto.BoolSize(2, x.ForceMaintenance)
return size
}
// 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.
func (x *SetNetmapStatusRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SetNetmapStatusRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SetNetmapStatusRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SetNetmapStatusResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *SetNetmapStatusResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SetNetmapStatusResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SetNetmapStatusResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *GetNetmapStatusRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *GetNetmapStatusRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *GetNetmapStatusRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *GetNetmapStatusRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *GetNetmapStatusResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.EnumSize(1, int32(x.Status))
size += proto.UInt64Size(2, x.Epoch)
return size
}
// 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.
func (x *GetNetmapStatusResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *GetNetmapStatusResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *GetNetmapStatusResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *DropObjectsRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.AddressList)
return size
}
// 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.
func (x *DropObjectsRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *DropObjectsRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *DropObjectsRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *DropObjectsResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *DropObjectsResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *DropObjectsResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *DropObjectsResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ListShardsRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *ListShardsRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ListShardsRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ListShardsRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ListShardsResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
for i := range x.Shards {
size += proto.NestedStructureSize(1, x.Shards[i])
}
return size
}
// 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].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.
func (x *ListShardsResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ListShardsResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ListShardsResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SetShardModeRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Shard_ID)
size += proto.EnumSize(2, int32(x.Mode))
size += proto.BoolSize(3, x.ResetErrorCounter)
return size
}
// 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.
func (x *SetShardModeRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SetShardModeRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SetShardModeRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SetShardModeResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *SetShardModeResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SetShardModeResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SetShardModeResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SynchronizeTreeRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.BytesSize(1, x.ContainerId)
size += proto.StringSize(2, x.TreeId)
size += proto.UInt64Size(3, x.Height)
return size
}
// 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.
func (x *SynchronizeTreeRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SynchronizeTreeRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SynchronizeTreeRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SynchronizeTreeResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *SynchronizeTreeResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SynchronizeTreeResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SynchronizeTreeResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *EvacuateShardRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Shard_ID)
size += proto.BoolSize(2, x.IgnoreErrors)
return size
}
// 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.
func (x *EvacuateShardRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *EvacuateShardRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *EvacuateShardRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *EvacuateShardResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.UInt32Size(1, x.Count)
return size
}
// 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.
func (x *EvacuateShardResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *EvacuateShardResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *EvacuateShardResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *FlushCacheRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Shard_ID)
size += proto.BoolSize(2, x.Seal)
return size
}
// 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.
func (x *FlushCacheRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *FlushCacheRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *FlushCacheRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *FlushCacheResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *FlushCacheResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *FlushCacheResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *FlushCacheResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *DoctorRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.UInt32Size(1, x.Concurrency)
size += proto.BoolSize(2, x.RemoveDuplicates)
return size
}
// 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.
func (x *DoctorRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *DoctorRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *DoctorRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *DoctorResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *DoctorResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *DoctorResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *DoctorResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *StartShardEvacuationRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Shard_ID)
size += proto.BoolSize(2, x.IgnoreErrors)
size += proto.UInt32Size(3, x.Scope)
return size
}
// 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.
func (x *StartShardEvacuationRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *StartShardEvacuationRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *StartShardEvacuationRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *StartShardEvacuationResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *StartShardEvacuationResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *StartShardEvacuationResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *StartShardEvacuationResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *GetShardEvacuationStatusRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *GetShardEvacuationStatusRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *GetShardEvacuationStatusRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *GetShardEvacuationStatusRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *GetShardEvacuationStatusResponse_Body_UnixTimestamp) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.Int64Size(1, x.Value)
return size
}
// 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.
func (x *GetShardEvacuationStatusResponse_Body_Duration) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.Int64Size(1, x.Seconds)
return size
}
// 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.
func (x *GetShardEvacuationStatusResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.UInt64Size(1, x.TotalObjects)
size += proto.UInt64Size(2, x.EvacuatedObjects)
size += proto.UInt64Size(3, x.FailedObjects)
size += proto.RepeatedBytesSize(4, x.Shard_ID)
size += proto.EnumSize(5, int32(x.Status))
size += proto.NestedStructureSize(6, x.Duration)
size += proto.NestedStructureSize(7, x.StartedAt)
size += proto.StringSize(8, x.ErrorMessage)
size += proto.UInt64Size(9, x.SkippedObjects)
size += proto.UInt64Size(10, x.TotalTrees)
size += proto.UInt64Size(11, x.EvacuatedTrees)
size += proto.UInt64Size(12, x.FailedTrees)
return size
}
// 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.EmitProtobuf(mm.AppendMessage(6))
}
if x.StartedAt != nil {
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.
func (x *GetShardEvacuationStatusResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *GetShardEvacuationStatusResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *GetShardEvacuationStatusResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ResetShardEvacuationStatusRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *ResetShardEvacuationStatusRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ResetShardEvacuationStatusRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ResetShardEvacuationStatusRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ResetShardEvacuationStatusResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *ResetShardEvacuationStatusResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ResetShardEvacuationStatusResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ResetShardEvacuationStatusResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *StopShardEvacuationRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *StopShardEvacuationRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *StopShardEvacuationRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *StopShardEvacuationRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *StopShardEvacuationResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *StopShardEvacuationResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *StopShardEvacuationResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *StopShardEvacuationResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *AddChainLocalOverrideRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Target)
size += proto.BytesSize(2, x.Chain)
return size
}
// 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.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.
func (x *AddChainLocalOverrideRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *AddChainLocalOverrideRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *AddChainLocalOverrideRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *AddChainLocalOverrideResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.BytesSize(1, x.ChainId)
return size
}
// 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.
func (x *AddChainLocalOverrideResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *AddChainLocalOverrideResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *AddChainLocalOverrideResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *GetChainLocalOverrideRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Target)
size += proto.BytesSize(2, x.ChainId)
return size
}
// 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.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.
func (x *GetChainLocalOverrideRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *GetChainLocalOverrideRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *GetChainLocalOverrideRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *GetChainLocalOverrideResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.BytesSize(1, x.Chain)
return size
}
// 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.
func (x *GetChainLocalOverrideResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *GetChainLocalOverrideResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *GetChainLocalOverrideResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ListChainLocalOverridesRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Target)
return size
}
// 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.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.
func (x *ListChainLocalOverridesRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ListChainLocalOverridesRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ListChainLocalOverridesRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ListChainLocalOverridesResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Chains)
return size
}
// 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.
func (x *ListChainLocalOverridesResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ListChainLocalOverridesResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ListChainLocalOverridesResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ListTargetsLocalOverridesRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.StringSize(1, x.ChainName)
return size
}
// 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.
func (x *ListTargetsLocalOverridesRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ListTargetsLocalOverridesRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ListTargetsLocalOverridesRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *ListTargetsLocalOverridesResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
for i := range x.Targets {
size += proto.NestedStructureSize(1, x.Targets[i])
}
return size
}
// 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].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.
func (x *ListTargetsLocalOverridesResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *ListTargetsLocalOverridesResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *ListTargetsLocalOverridesResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *RemoveChainLocalOverrideRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Target)
size += proto.BytesSize(2, x.ChainId)
return size
}
// 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.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.
func (x *RemoveChainLocalOverrideRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *RemoveChainLocalOverrideRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *RemoveChainLocalOverrideRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *RemoveChainLocalOverrideResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *RemoveChainLocalOverrideResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *RemoveChainLocalOverrideResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *RemoveChainLocalOverrideResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *RemoveChainLocalOverridesByTargetRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Target)
return size
}
// 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.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.
func (x *RemoveChainLocalOverridesByTargetRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *RemoveChainLocalOverridesByTargetRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *RemoveChainLocalOverridesByTargetRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *RemoveChainLocalOverridesByTargetResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *RemoveChainLocalOverridesByTargetResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *RemoveChainLocalOverridesByTargetResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *RemoveChainLocalOverridesByTargetResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SealWriteCacheRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Shard_ID)
size += proto.BoolSize(2, x.IgnoreErrors)
size += proto.BoolSize(3, x.Async)
size += proto.BoolSize(4, x.RestoreMode)
size += proto.BoolSize(5, x.Shrink)
return size
}
// 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.
func (x *SealWriteCacheRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SealWriteCacheRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SealWriteCacheRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *SealWriteCacheResponse_Body_Status) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.BytesSize(1, x.Shard_ID)
size += proto.BoolSize(2, x.Success)
size += proto.StringSize(3, x.Error)
return size
}
// 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.
func (x *SealWriteCacheResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
for i := range x.Results {
size += proto.NestedStructureSize(1, x.Results[i])
}
return size
}
// 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].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.
func (x *SealWriteCacheResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *SealWriteCacheResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *SealWriteCacheResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *DetachShardsRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.RepeatedBytesSize(1, x.Shard_ID)
return size
}
// 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.
func (x *DetachShardsRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *DetachShardsRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *DetachShardsRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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.
func (x *DetachShardsResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// 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.
func (x *DetachShardsResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// ReadSignedData fills buf with signed data of x.
// If buffer length is less than x.SignedDataSize(), 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 signed data.
func (x *DetachShardsResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *DetachShardsResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// 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.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
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()
}
}