forked from TrueCloudLab/frostfs-node
7997 lines
185 KiB
Go
Generated
7997 lines
185 KiB
Go
Generated
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
|
|
|
package tree
|
|
|
|
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"
|
|
protowire "google.golang.org/protobuf/encoding/protowire"
|
|
strconv "strconv"
|
|
)
|
|
|
|
type AddRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
ParentId uint64 `json:"parentId"`
|
|
Meta []KeyValue `json:"meta"`
|
|
BearerToken []byte `json:"bearerToken"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddRequest_Body)(nil)
|
|
_ json.Marshaler = (*AddRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*AddRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddRequest_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.ParentId)
|
|
for i := range x.Meta {
|
|
size += proto.NestedStructureSizeUnchecked(4, &x.Meta[i])
|
|
}
|
|
size += proto.BytesSize(5, x.BearerToken)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if x.ParentId != 0 {
|
|
mm.AppendUint64(3, x.ParentId)
|
|
}
|
|
for i := range x.Meta {
|
|
x.Meta[i].EmitProtobuf(mm.AppendMessage(4))
|
|
}
|
|
if len(x.BearerToken) != 0 {
|
|
mm.AppendBytes(5, x.BearerToken)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // ParentId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ParentId")
|
|
}
|
|
x.ParentId = data
|
|
case 4: // Meta
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Meta")
|
|
}
|
|
x.Meta = append(x.Meta, KeyValue{})
|
|
ff := &x.Meta[len(x.Meta)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 5: // BearerToken
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "BearerToken")
|
|
}
|
|
x.BearerToken = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *AddRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *AddRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *AddRequest_Body) GetParentId() uint64 {
|
|
if x != nil {
|
|
return x.ParentId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *AddRequest_Body) SetParentId(v uint64) {
|
|
x.ParentId = v
|
|
}
|
|
func (x *AddRequest_Body) GetMeta() []KeyValue {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest_Body) SetMeta(v []KeyValue) {
|
|
x.Meta = v
|
|
}
|
|
func (x *AddRequest_Body) GetBearerToken() []byte {
|
|
if x != nil {
|
|
return x.BearerToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest_Body) SetBearerToken(v []byte) {
|
|
x.BearerToken = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"parentId\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.ParentId)
|
|
}
|
|
{
|
|
const prefix string = ",\"meta\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Meta {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Meta[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"bearerToken\":"
|
|
out.RawString(prefix)
|
|
out.Base64Bytes(x.BearerToken)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "parentId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.ParentId = f
|
|
}
|
|
case "meta":
|
|
{
|
|
var f KeyValue
|
|
var list []KeyValue
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = KeyValue{}
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Meta = list
|
|
in.Delim(']')
|
|
}
|
|
case "bearerToken":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.BearerToken = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddRequest struct {
|
|
Body *AddRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddRequest)(nil)
|
|
_ json.Marshaler = (*AddRequest)(nil)
|
|
_ json.Unmarshaler = (*AddRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddRequest) 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 *AddRequest) 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 *AddRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(AddRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest) GetBody() *AddRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest) SetBody(v *AddRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *AddRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *AddRequest_Body
|
|
f = new(AddRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddResponse_Body struct {
|
|
NodeId uint64 `json:"nodeId"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddResponse_Body)(nil)
|
|
_ json.Marshaler = (*AddResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*AddResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.UInt64Size(1, x.NodeId)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.NodeId != 0 {
|
|
mm.AppendUint64(1, x.NodeId)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // NodeId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "NodeId")
|
|
}
|
|
x.NodeId = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddResponse_Body) GetNodeId() uint64 {
|
|
if x != nil {
|
|
return x.NodeId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *AddResponse_Body) SetNodeId(v uint64) {
|
|
x.NodeId = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"nodeId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Uint64(x.NodeId)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "nodeId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.NodeId = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddResponse struct {
|
|
Body *AddResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddResponse)(nil)
|
|
_ json.Marshaler = (*AddResponse)(nil)
|
|
_ json.Unmarshaler = (*AddResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddResponse) 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 *AddResponse) 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 *AddResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(AddResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddResponse) GetBody() *AddResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddResponse) SetBody(v *AddResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *AddResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *AddResponse_Body
|
|
f = new(AddResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddByPathRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
PathAttribute string `json:"pathAttribute"`
|
|
Path []string `json:"path"`
|
|
Meta []KeyValue `json:"meta"`
|
|
BearerToken []byte `json:"bearerToken"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddByPathRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddByPathRequest_Body)(nil)
|
|
_ json.Marshaler = (*AddByPathRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*AddByPathRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddByPathRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.BytesSize(1, x.ContainerId)
|
|
size += proto.StringSize(2, x.TreeId)
|
|
size += proto.StringSize(3, x.PathAttribute)
|
|
size += proto.RepeatedStringSize(4, x.Path)
|
|
for i := range x.Meta {
|
|
size += proto.NestedStructureSizeUnchecked(5, &x.Meta[i])
|
|
}
|
|
size += proto.BytesSize(6, x.BearerToken)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddByPathRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddByPathRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if len(x.PathAttribute) != 0 {
|
|
mm.AppendString(3, x.PathAttribute)
|
|
}
|
|
for j := range x.Path {
|
|
mm.AppendString(4, x.Path[j])
|
|
}
|
|
for i := range x.Meta {
|
|
x.Meta[i].EmitProtobuf(mm.AppendMessage(5))
|
|
}
|
|
if len(x.BearerToken) != 0 {
|
|
mm.AppendBytes(6, x.BearerToken)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddByPathRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddByPathRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // PathAttribute
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "PathAttribute")
|
|
}
|
|
x.PathAttribute = data
|
|
case 4: // Path
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Path")
|
|
}
|
|
x.Path = append(x.Path, data)
|
|
case 5: // Meta
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Meta")
|
|
}
|
|
x.Meta = append(x.Meta, KeyValue{})
|
|
ff := &x.Meta[len(x.Meta)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 6: // BearerToken
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "BearerToken")
|
|
}
|
|
x.BearerToken = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *AddByPathRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *AddByPathRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *AddByPathRequest_Body) GetPathAttribute() string {
|
|
if x != nil {
|
|
return x.PathAttribute
|
|
}
|
|
return ""
|
|
}
|
|
func (x *AddByPathRequest_Body) SetPathAttribute(v string) {
|
|
x.PathAttribute = v
|
|
}
|
|
func (x *AddByPathRequest_Body) GetPath() []string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest_Body) SetPath(v []string) {
|
|
x.Path = v
|
|
}
|
|
func (x *AddByPathRequest_Body) GetMeta() []KeyValue {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest_Body) SetMeta(v []KeyValue) {
|
|
x.Meta = v
|
|
}
|
|
func (x *AddByPathRequest_Body) GetBearerToken() []byte {
|
|
if x != nil {
|
|
return x.BearerToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest_Body) SetBearerToken(v []byte) {
|
|
x.BearerToken = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddByPathRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddByPathRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"pathAttribute\":"
|
|
out.RawString(prefix)
|
|
out.String(x.PathAttribute)
|
|
}
|
|
{
|
|
const prefix string = ",\"path\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Path {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(x.Path[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"meta\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Meta {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Meta[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"bearerToken\":"
|
|
out.RawString(prefix)
|
|
out.Base64Bytes(x.BearerToken)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddByPathRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddByPathRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "pathAttribute":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.PathAttribute = f
|
|
}
|
|
case "path":
|
|
{
|
|
var f string
|
|
var list []string
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.String()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Path = list
|
|
in.Delim(']')
|
|
}
|
|
case "meta":
|
|
{
|
|
var f KeyValue
|
|
var list []KeyValue
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = KeyValue{}
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Meta = list
|
|
in.Delim(']')
|
|
}
|
|
case "bearerToken":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.BearerToken = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddByPathRequest struct {
|
|
Body *AddByPathRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddByPathRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddByPathRequest)(nil)
|
|
_ json.Marshaler = (*AddByPathRequest)(nil)
|
|
_ json.Unmarshaler = (*AddByPathRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddByPathRequest) 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 *AddByPathRequest) 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 *AddByPathRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddByPathRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddByPathRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddByPathRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddByPathRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(AddByPathRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest) GetBody() *AddByPathRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest) SetBody(v *AddByPathRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *AddByPathRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddByPathRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddByPathRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddByPathRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddByPathRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *AddByPathRequest_Body
|
|
f = new(AddByPathRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddByPathResponse_Body struct {
|
|
Nodes []uint64 `json:"nodes"`
|
|
ParentId uint64 `json:"parentId"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddByPathResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddByPathResponse_Body)(nil)
|
|
_ json.Marshaler = (*AddByPathResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*AddByPathResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddByPathResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
var n int
|
|
n, _ = proto.RepeatedUInt64Size(1, x.Nodes)
|
|
size += n
|
|
size += proto.UInt64Size(2, x.ParentId)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddByPathResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddByPathResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.Nodes) != 0 {
|
|
mm.AppendUint64s(1, x.Nodes)
|
|
}
|
|
if x.ParentId != 0 {
|
|
mm.AppendUint64(2, x.ParentId)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddByPathResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddByPathResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Nodes
|
|
data, ok := fc.UnpackUint64s(nil)
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Nodes")
|
|
}
|
|
x.Nodes = data
|
|
case 2: // ParentId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ParentId")
|
|
}
|
|
x.ParentId = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathResponse_Body) GetNodes() []uint64 {
|
|
if x != nil {
|
|
return x.Nodes
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathResponse_Body) SetNodes(v []uint64) {
|
|
x.Nodes = v
|
|
}
|
|
func (x *AddByPathResponse_Body) GetParentId() uint64 {
|
|
if x != nil {
|
|
return x.ParentId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *AddByPathResponse_Body) SetParentId(v uint64) {
|
|
x.ParentId = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddByPathResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddByPathResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"nodes\":"
|
|
out.RawString(prefix[1:])
|
|
out.RawByte('[')
|
|
for i := range x.Nodes {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Uint64(x.Nodes[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"parentId\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.ParentId)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddByPathResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddByPathResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "nodes":
|
|
{
|
|
var f uint64
|
|
var list []uint64
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.Uint64()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Nodes = list
|
|
in.Delim(']')
|
|
}
|
|
case "parentId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.ParentId = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type AddByPathResponse struct {
|
|
Body *AddByPathResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AddByPathResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AddByPathResponse)(nil)
|
|
_ json.Marshaler = (*AddByPathResponse)(nil)
|
|
_ json.Unmarshaler = (*AddByPathResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AddByPathResponse) 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 *AddByPathResponse) 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 *AddByPathResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AddByPathResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AddByPathResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AddByPathResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AddByPathResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(AddByPathResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathResponse) GetBody() *AddByPathResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathResponse) SetBody(v *AddByPathResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *AddByPathResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AddByPathResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AddByPathResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AddByPathResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AddByPathResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AddByPathResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *AddByPathResponse_Body
|
|
f = new(AddByPathResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type RemoveRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
NodeId uint64 `json:"nodeId"`
|
|
BearerToken []byte `json:"bearerToken"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*RemoveRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*RemoveRequest_Body)(nil)
|
|
_ json.Marshaler = (*RemoveRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*RemoveRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *RemoveRequest_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.NodeId)
|
|
size += proto.BytesSize(4, x.BearerToken)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *RemoveRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *RemoveRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if x.NodeId != 0 {
|
|
mm.AppendUint64(3, x.NodeId)
|
|
}
|
|
if len(x.BearerToken) != 0 {
|
|
mm.AppendBytes(4, x.BearerToken)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *RemoveRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "RemoveRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // NodeId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "NodeId")
|
|
}
|
|
x.NodeId = data
|
|
case 4: // BearerToken
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "BearerToken")
|
|
}
|
|
x.BearerToken = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *RemoveRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *RemoveRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *RemoveRequest_Body) GetNodeId() uint64 {
|
|
if x != nil {
|
|
return x.NodeId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *RemoveRequest_Body) SetNodeId(v uint64) {
|
|
x.NodeId = v
|
|
}
|
|
func (x *RemoveRequest_Body) GetBearerToken() []byte {
|
|
if x != nil {
|
|
return x.BearerToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveRequest_Body) SetBearerToken(v []byte) {
|
|
x.BearerToken = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *RemoveRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *RemoveRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"nodeId\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.NodeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"bearerToken\":"
|
|
out.RawString(prefix)
|
|
out.Base64Bytes(x.BearerToken)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *RemoveRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *RemoveRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "nodeId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.NodeId = f
|
|
}
|
|
case "bearerToken":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.BearerToken = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type RemoveRequest struct {
|
|
Body *RemoveRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*RemoveRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*RemoveRequest)(nil)
|
|
_ json.Marshaler = (*RemoveRequest)(nil)
|
|
_ json.Unmarshaler = (*RemoveRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *RemoveRequest) 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 *RemoveRequest) 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 *RemoveRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *RemoveRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *RemoveRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *RemoveRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "RemoveRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(RemoveRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveRequest) GetBody() *RemoveRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveRequest) SetBody(v *RemoveRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *RemoveRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *RemoveRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *RemoveRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *RemoveRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *RemoveRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *RemoveRequest_Body
|
|
f = new(RemoveRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type RemoveResponse_Body struct {
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*RemoveResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*RemoveResponse_Body)(nil)
|
|
_ json.Marshaler = (*RemoveResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*RemoveResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *RemoveResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *RemoveResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *RemoveResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *RemoveResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "RemoveResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *RemoveResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *RemoveResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *RemoveResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *RemoveResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type RemoveResponse struct {
|
|
Body *RemoveResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*RemoveResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*RemoveResponse)(nil)
|
|
_ json.Marshaler = (*RemoveResponse)(nil)
|
|
_ json.Unmarshaler = (*RemoveResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *RemoveResponse) 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 *RemoveResponse) 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 *RemoveResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *RemoveResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *RemoveResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *RemoveResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "RemoveResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(RemoveResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveResponse) GetBody() *RemoveResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveResponse) SetBody(v *RemoveResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *RemoveResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *RemoveResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *RemoveResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *RemoveResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *RemoveResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *RemoveResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *RemoveResponse_Body
|
|
f = new(RemoveResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type MoveRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
ParentId uint64 `json:"parentId"`
|
|
NodeId uint64 `json:"nodeId"`
|
|
Meta []KeyValue `json:"meta"`
|
|
BearerToken []byte `json:"bearerToken"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*MoveRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*MoveRequest_Body)(nil)
|
|
_ json.Marshaler = (*MoveRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*MoveRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *MoveRequest_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.ParentId)
|
|
size += proto.UInt64Size(4, x.NodeId)
|
|
for i := range x.Meta {
|
|
size += proto.NestedStructureSizeUnchecked(5, &x.Meta[i])
|
|
}
|
|
size += proto.BytesSize(6, x.BearerToken)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *MoveRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *MoveRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if x.ParentId != 0 {
|
|
mm.AppendUint64(3, x.ParentId)
|
|
}
|
|
if x.NodeId != 0 {
|
|
mm.AppendUint64(4, x.NodeId)
|
|
}
|
|
for i := range x.Meta {
|
|
x.Meta[i].EmitProtobuf(mm.AppendMessage(5))
|
|
}
|
|
if len(x.BearerToken) != 0 {
|
|
mm.AppendBytes(6, x.BearerToken)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *MoveRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "MoveRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // ParentId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ParentId")
|
|
}
|
|
x.ParentId = data
|
|
case 4: // NodeId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "NodeId")
|
|
}
|
|
x.NodeId = data
|
|
case 5: // Meta
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Meta")
|
|
}
|
|
x.Meta = append(x.Meta, KeyValue{})
|
|
ff := &x.Meta[len(x.Meta)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 6: // BearerToken
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "BearerToken")
|
|
}
|
|
x.BearerToken = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *MoveRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *MoveRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *MoveRequest_Body) GetParentId() uint64 {
|
|
if x != nil {
|
|
return x.ParentId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *MoveRequest_Body) SetParentId(v uint64) {
|
|
x.ParentId = v
|
|
}
|
|
func (x *MoveRequest_Body) GetNodeId() uint64 {
|
|
if x != nil {
|
|
return x.NodeId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *MoveRequest_Body) SetNodeId(v uint64) {
|
|
x.NodeId = v
|
|
}
|
|
func (x *MoveRequest_Body) GetMeta() []KeyValue {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest_Body) SetMeta(v []KeyValue) {
|
|
x.Meta = v
|
|
}
|
|
func (x *MoveRequest_Body) GetBearerToken() []byte {
|
|
if x != nil {
|
|
return x.BearerToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest_Body) SetBearerToken(v []byte) {
|
|
x.BearerToken = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *MoveRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *MoveRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"parentId\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.ParentId)
|
|
}
|
|
{
|
|
const prefix string = ",\"nodeId\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.NodeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"meta\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Meta {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Meta[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"bearerToken\":"
|
|
out.RawString(prefix)
|
|
out.Base64Bytes(x.BearerToken)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *MoveRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *MoveRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "parentId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.ParentId = f
|
|
}
|
|
case "nodeId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.NodeId = f
|
|
}
|
|
case "meta":
|
|
{
|
|
var f KeyValue
|
|
var list []KeyValue
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = KeyValue{}
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Meta = list
|
|
in.Delim(']')
|
|
}
|
|
case "bearerToken":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.BearerToken = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type MoveRequest struct {
|
|
Body *MoveRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*MoveRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*MoveRequest)(nil)
|
|
_ json.Marshaler = (*MoveRequest)(nil)
|
|
_ json.Unmarshaler = (*MoveRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *MoveRequest) 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 *MoveRequest) 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 *MoveRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *MoveRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *MoveRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *MoveRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "MoveRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(MoveRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest) GetBody() *MoveRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest) SetBody(v *MoveRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *MoveRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *MoveRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *MoveRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *MoveRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *MoveRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *MoveRequest_Body
|
|
f = new(MoveRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type MoveResponse_Body struct {
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*MoveResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*MoveResponse_Body)(nil)
|
|
_ json.Marshaler = (*MoveResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*MoveResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *MoveResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *MoveResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *MoveResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *MoveResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "MoveResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *MoveResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *MoveResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *MoveResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *MoveResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type MoveResponse struct {
|
|
Body *MoveResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*MoveResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*MoveResponse)(nil)
|
|
_ json.Marshaler = (*MoveResponse)(nil)
|
|
_ json.Unmarshaler = (*MoveResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *MoveResponse) 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 *MoveResponse) 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 *MoveResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *MoveResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *MoveResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *MoveResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "MoveResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(MoveResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveResponse) GetBody() *MoveResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveResponse) SetBody(v *MoveResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *MoveResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *MoveResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *MoveResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *MoveResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *MoveResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *MoveResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *MoveResponse_Body
|
|
f = new(MoveResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetNodeByPathRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
PathAttribute string `json:"pathAttribute"`
|
|
Path []string `json:"path"`
|
|
Attributes []string `json:"attributes"`
|
|
LatestOnly bool `json:"latestOnly"`
|
|
AllAttributes bool `json:"allAttributes"`
|
|
BearerToken []byte `json:"bearerToken"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetNodeByPathRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetNodeByPathRequest_Body)(nil)
|
|
_ json.Marshaler = (*GetNodeByPathRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*GetNodeByPathRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetNodeByPathRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.BytesSize(1, x.ContainerId)
|
|
size += proto.StringSize(2, x.TreeId)
|
|
size += proto.StringSize(3, x.PathAttribute)
|
|
size += proto.RepeatedStringSize(4, x.Path)
|
|
size += proto.RepeatedStringSize(5, x.Attributes)
|
|
size += proto.BoolSize(6, x.LatestOnly)
|
|
size += proto.BoolSize(7, x.AllAttributes)
|
|
size += proto.BytesSize(8, x.BearerToken)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetNodeByPathRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetNodeByPathRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if len(x.PathAttribute) != 0 {
|
|
mm.AppendString(3, x.PathAttribute)
|
|
}
|
|
for j := range x.Path {
|
|
mm.AppendString(4, x.Path[j])
|
|
}
|
|
for j := range x.Attributes {
|
|
mm.AppendString(5, x.Attributes[j])
|
|
}
|
|
if x.LatestOnly {
|
|
mm.AppendBool(6, x.LatestOnly)
|
|
}
|
|
if x.AllAttributes {
|
|
mm.AppendBool(7, x.AllAttributes)
|
|
}
|
|
if len(x.BearerToken) != 0 {
|
|
mm.AppendBytes(8, x.BearerToken)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetNodeByPathRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetNodeByPathRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // PathAttribute
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "PathAttribute")
|
|
}
|
|
x.PathAttribute = data
|
|
case 4: // Path
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Path")
|
|
}
|
|
x.Path = append(x.Path, data)
|
|
case 5: // Attributes
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Attributes")
|
|
}
|
|
x.Attributes = append(x.Attributes, data)
|
|
case 6: // LatestOnly
|
|
data, ok := fc.Bool()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "LatestOnly")
|
|
}
|
|
x.LatestOnly = data
|
|
case 7: // AllAttributes
|
|
data, ok := fc.Bool()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "AllAttributes")
|
|
}
|
|
x.AllAttributes = data
|
|
case 8: // BearerToken
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "BearerToken")
|
|
}
|
|
x.BearerToken = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetPathAttribute() string {
|
|
if x != nil {
|
|
return x.PathAttribute
|
|
}
|
|
return ""
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetPathAttribute(v string) {
|
|
x.PathAttribute = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetPath() []string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetPath(v []string) {
|
|
x.Path = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetAttributes() []string {
|
|
if x != nil {
|
|
return x.Attributes
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetAttributes(v []string) {
|
|
x.Attributes = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetLatestOnly() bool {
|
|
if x != nil {
|
|
return x.LatestOnly
|
|
}
|
|
return false
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetLatestOnly(v bool) {
|
|
x.LatestOnly = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetAllAttributes() bool {
|
|
if x != nil {
|
|
return x.AllAttributes
|
|
}
|
|
return false
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetAllAttributes(v bool) {
|
|
x.AllAttributes = v
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) GetBearerToken() []byte {
|
|
if x != nil {
|
|
return x.BearerToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) SetBearerToken(v []byte) {
|
|
x.BearerToken = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetNodeByPathRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"pathAttribute\":"
|
|
out.RawString(prefix)
|
|
out.String(x.PathAttribute)
|
|
}
|
|
{
|
|
const prefix string = ",\"path\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Path {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(x.Path[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"attributes\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Attributes {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(x.Attributes[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"latestOnly\":"
|
|
out.RawString(prefix)
|
|
out.Bool(x.LatestOnly)
|
|
}
|
|
{
|
|
const prefix string = ",\"allAttributes\":"
|
|
out.RawString(prefix)
|
|
out.Bool(x.AllAttributes)
|
|
}
|
|
{
|
|
const prefix string = ",\"bearerToken\":"
|
|
out.RawString(prefix)
|
|
out.Base64Bytes(x.BearerToken)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetNodeByPathRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetNodeByPathRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "pathAttribute":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.PathAttribute = f
|
|
}
|
|
case "path":
|
|
{
|
|
var f string
|
|
var list []string
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.String()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Path = list
|
|
in.Delim(']')
|
|
}
|
|
case "attributes":
|
|
{
|
|
var f string
|
|
var list []string
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.String()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Attributes = list
|
|
in.Delim(']')
|
|
}
|
|
case "latestOnly":
|
|
{
|
|
var f bool
|
|
f = in.Bool()
|
|
x.LatestOnly = f
|
|
}
|
|
case "allAttributes":
|
|
{
|
|
var f bool
|
|
f = in.Bool()
|
|
x.AllAttributes = f
|
|
}
|
|
case "bearerToken":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.BearerToken = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetNodeByPathRequest struct {
|
|
Body *GetNodeByPathRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetNodeByPathRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetNodeByPathRequest)(nil)
|
|
_ json.Marshaler = (*GetNodeByPathRequest)(nil)
|
|
_ json.Unmarshaler = (*GetNodeByPathRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetNodeByPathRequest) 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 *GetNodeByPathRequest) 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 *GetNodeByPathRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetNodeByPathRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetNodeByPathRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetNodeByPathRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetNodeByPathRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetNodeByPathRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest) GetBody() *GetNodeByPathRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest) SetBody(v *GetNodeByPathRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetNodeByPathRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetNodeByPathRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetNodeByPathRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetNodeByPathRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetNodeByPathRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *GetNodeByPathRequest_Body
|
|
f = new(GetNodeByPathRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetNodeByPathResponse_Info struct {
|
|
NodeId uint64 `json:"nodeId"`
|
|
Timestamp uint64 `json:"timestamp"`
|
|
Meta []KeyValue `json:"meta"`
|
|
ParentId uint64 `json:"parentId"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetNodeByPathResponse_Info)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetNodeByPathResponse_Info)(nil)
|
|
_ json.Marshaler = (*GetNodeByPathResponse_Info)(nil)
|
|
_ json.Unmarshaler = (*GetNodeByPathResponse_Info)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetNodeByPathResponse_Info) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.UInt64Size(1, x.NodeId)
|
|
size += proto.UInt64Size(2, x.Timestamp)
|
|
for i := range x.Meta {
|
|
size += proto.NestedStructureSizeUnchecked(3, &x.Meta[i])
|
|
}
|
|
size += proto.UInt64Size(4, x.ParentId)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetNodeByPathResponse_Info) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetNodeByPathResponse_Info) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.NodeId != 0 {
|
|
mm.AppendUint64(1, x.NodeId)
|
|
}
|
|
if x.Timestamp != 0 {
|
|
mm.AppendUint64(2, x.Timestamp)
|
|
}
|
|
for i := range x.Meta {
|
|
x.Meta[i].EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
if x.ParentId != 0 {
|
|
mm.AppendUint64(4, x.ParentId)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetNodeByPathResponse_Info) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetNodeByPathResponse_Info")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // NodeId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "NodeId")
|
|
}
|
|
x.NodeId = data
|
|
case 2: // Timestamp
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Timestamp")
|
|
}
|
|
x.Timestamp = data
|
|
case 3: // Meta
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Meta")
|
|
}
|
|
x.Meta = append(x.Meta, KeyValue{})
|
|
ff := &x.Meta[len(x.Meta)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 4: // ParentId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ParentId")
|
|
}
|
|
x.ParentId = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) GetNodeId() uint64 {
|
|
if x != nil {
|
|
return x.NodeId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) SetNodeId(v uint64) {
|
|
x.NodeId = v
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) GetTimestamp() uint64 {
|
|
if x != nil {
|
|
return x.Timestamp
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) SetTimestamp(v uint64) {
|
|
x.Timestamp = v
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) GetMeta() []KeyValue {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) SetMeta(v []KeyValue) {
|
|
x.Meta = v
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) GetParentId() uint64 {
|
|
if x != nil {
|
|
return x.ParentId
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) SetParentId(v uint64) {
|
|
x.ParentId = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetNodeByPathResponse_Info) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"nodeId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Uint64(x.NodeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"timestamp\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.Timestamp)
|
|
}
|
|
{
|
|
const prefix string = ",\"meta\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Meta {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Meta[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"parentId\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.ParentId)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetNodeByPathResponse_Info) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetNodeByPathResponse_Info) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "nodeId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.NodeId = f
|
|
}
|
|
case "timestamp":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.Timestamp = f
|
|
}
|
|
case "meta":
|
|
{
|
|
var f KeyValue
|
|
var list []KeyValue
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = KeyValue{}
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Meta = list
|
|
in.Delim(']')
|
|
}
|
|
case "parentId":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.ParentId = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetNodeByPathResponse_Body struct {
|
|
Nodes []GetNodeByPathResponse_Info `json:"nodes"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetNodeByPathResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetNodeByPathResponse_Body)(nil)
|
|
_ json.Marshaler = (*GetNodeByPathResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*GetNodeByPathResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetNodeByPathResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
for i := range x.Nodes {
|
|
size += proto.NestedStructureSizeUnchecked(1, &x.Nodes[i])
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetNodeByPathResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetNodeByPathResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
for i := range x.Nodes {
|
|
x.Nodes[i].EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetNodeByPathResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetNodeByPathResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Nodes
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Nodes")
|
|
}
|
|
x.Nodes = append(x.Nodes, GetNodeByPathResponse_Info{})
|
|
ff := &x.Nodes[len(x.Nodes)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse_Body) GetNodes() []GetNodeByPathResponse_Info {
|
|
if x != nil {
|
|
return x.Nodes
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse_Body) SetNodes(v []GetNodeByPathResponse_Info) {
|
|
x.Nodes = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetNodeByPathResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetNodeByPathResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"nodes\":"
|
|
out.RawString(prefix[1:])
|
|
out.RawByte('[')
|
|
for i := range x.Nodes {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Nodes[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetNodeByPathResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetNodeByPathResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "nodes":
|
|
{
|
|
var f GetNodeByPathResponse_Info
|
|
var list []GetNodeByPathResponse_Info
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = GetNodeByPathResponse_Info{}
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Nodes = list
|
|
in.Delim(']')
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetNodeByPathResponse struct {
|
|
Body *GetNodeByPathResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetNodeByPathResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetNodeByPathResponse)(nil)
|
|
_ json.Marshaler = (*GetNodeByPathResponse)(nil)
|
|
_ json.Unmarshaler = (*GetNodeByPathResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetNodeByPathResponse) 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 *GetNodeByPathResponse) 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 *GetNodeByPathResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetNodeByPathResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetNodeByPathResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetNodeByPathResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetNodeByPathResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetNodeByPathResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse) GetBody() *GetNodeByPathResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse) SetBody(v *GetNodeByPathResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetNodeByPathResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetNodeByPathResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetNodeByPathResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetNodeByPathResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetNodeByPathResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetNodeByPathResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *GetNodeByPathResponse_Body
|
|
f = new(GetNodeByPathResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetSubTreeRequest_Body_Order_Direction int32
|
|
|
|
const (
|
|
GetSubTreeRequest_Body_Order_None GetSubTreeRequest_Body_Order_Direction = 0
|
|
GetSubTreeRequest_Body_Order_Asc GetSubTreeRequest_Body_Order_Direction = 1
|
|
)
|
|
|
|
var (
|
|
GetSubTreeRequest_Body_Order_Direction_name = map[int32]string{
|
|
0: "None",
|
|
1: "Asc",
|
|
}
|
|
GetSubTreeRequest_Body_Order_Direction_value = map[string]int32{
|
|
"None": 0,
|
|
"Asc": 1,
|
|
}
|
|
)
|
|
|
|
func (x GetSubTreeRequest_Body_Order_Direction) String() string {
|
|
if v, ok := GetSubTreeRequest_Body_Order_Direction_name[int32(x)]; ok {
|
|
return v
|
|
}
|
|
return strconv.FormatInt(int64(x), 10)
|
|
}
|
|
func (x *GetSubTreeRequest_Body_Order_Direction) FromString(s string) bool {
|
|
if v, ok := GetSubTreeRequest_Body_Order_Direction_value[s]; ok {
|
|
*x = GetSubTreeRequest_Body_Order_Direction(v)
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
type GetSubTreeRequest_Body_Order struct {
|
|
Direction GetSubTreeRequest_Body_Order_Direction `json:"direction"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetSubTreeRequest_Body_Order)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetSubTreeRequest_Body_Order)(nil)
|
|
_ json.Marshaler = (*GetSubTreeRequest_Body_Order)(nil)
|
|
_ json.Unmarshaler = (*GetSubTreeRequest_Body_Order)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetSubTreeRequest_Body_Order) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.EnumSize(1, int32(x.Direction))
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetSubTreeRequest_Body_Order) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetSubTreeRequest_Body_Order) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if int32(x.Direction) != 0 {
|
|
mm.AppendInt32(1, int32(x.Direction))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetSubTreeRequest_Body_Order) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetSubTreeRequest_Body_Order")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Direction
|
|
data, ok := fc.Int32()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Direction")
|
|
}
|
|
x.Direction = GetSubTreeRequest_Body_Order_Direction(data)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest_Body_Order) GetDirection() GetSubTreeRequest_Body_Order_Direction {
|
|
if x != nil {
|
|
return x.Direction
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetSubTreeRequest_Body_Order) SetDirection(v GetSubTreeRequest_Body_Order_Direction) {
|
|
x.Direction = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetSubTreeRequest_Body_Order) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetSubTreeRequest_Body_Order) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"direction\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int32(int32(x.Direction))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetSubTreeRequest_Body_Order) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetSubTreeRequest_Body_Order) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "direction":
|
|
{
|
|
var f GetSubTreeRequest_Body_Order_Direction
|
|
var parsedValue GetSubTreeRequest_Body_Order_Direction
|
|
switch v := in.Interface().(type) {
|
|
case string:
|
|
if vv, ok := GetSubTreeRequest_Body_Order_Direction_value[v]; ok {
|
|
parsedValue = GetSubTreeRequest_Body_Order_Direction(vv)
|
|
break
|
|
}
|
|
vv, err := strconv.ParseInt(v, 10, 32)
|
|
if err != nil {
|
|
in.AddError(err)
|
|
return
|
|
}
|
|
parsedValue = GetSubTreeRequest_Body_Order_Direction(vv)
|
|
case float64:
|
|
parsedValue = GetSubTreeRequest_Body_Order_Direction(v)
|
|
}
|
|
f = parsedValue
|
|
x.Direction = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetSubTreeRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
RootId []uint64 `json:"rootId"`
|
|
Depth uint32 `json:"depth"`
|
|
BearerToken []byte `json:"bearerToken"`
|
|
OrderBy *GetSubTreeRequest_Body_Order `json:"orderBy"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetSubTreeRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetSubTreeRequest_Body)(nil)
|
|
_ json.Marshaler = (*GetSubTreeRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*GetSubTreeRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetSubTreeRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.BytesSize(1, x.ContainerId)
|
|
size += proto.StringSize(2, x.TreeId)
|
|
for i := range x.RootId {
|
|
size += protowire.SizeGroup(protowire.Number(3), protowire.SizeVarint(x.RootId[i]))
|
|
}
|
|
size += proto.UInt32Size(4, x.Depth)
|
|
size += proto.BytesSize(5, x.BearerToken)
|
|
size += proto.NestedStructureSize(6, x.OrderBy)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetSubTreeRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetSubTreeRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
for j := range x.RootId {
|
|
mm.AppendUint64(3, x.RootId[j])
|
|
}
|
|
if x.Depth != 0 {
|
|
mm.AppendUint32(4, x.Depth)
|
|
}
|
|
if len(x.BearerToken) != 0 {
|
|
mm.AppendBytes(5, x.BearerToken)
|
|
}
|
|
if x.OrderBy != nil {
|
|
x.OrderBy.EmitProtobuf(mm.AppendMessage(6))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetSubTreeRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetSubTreeRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // RootId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "RootId")
|
|
}
|
|
x.RootId = append(x.RootId, data)
|
|
case 4: // Depth
|
|
data, ok := fc.Uint32()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Depth")
|
|
}
|
|
x.Depth = data
|
|
case 5: // BearerToken
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "BearerToken")
|
|
}
|
|
x.BearerToken = data
|
|
case 6: // OrderBy
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "OrderBy")
|
|
}
|
|
x.OrderBy = new(GetSubTreeRequest_Body_Order)
|
|
if err := x.OrderBy.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *GetSubTreeRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *GetSubTreeRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *GetSubTreeRequest_Body) GetRootId() []uint64 {
|
|
if x != nil {
|
|
return x.RootId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest_Body) SetRootId(v []uint64) {
|
|
x.RootId = v
|
|
}
|
|
func (x *GetSubTreeRequest_Body) GetDepth() uint32 {
|
|
if x != nil {
|
|
return x.Depth
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetSubTreeRequest_Body) SetDepth(v uint32) {
|
|
x.Depth = v
|
|
}
|
|
func (x *GetSubTreeRequest_Body) GetBearerToken() []byte {
|
|
if x != nil {
|
|
return x.BearerToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest_Body) SetBearerToken(v []byte) {
|
|
x.BearerToken = v
|
|
}
|
|
func (x *GetSubTreeRequest_Body) GetOrderBy() *GetSubTreeRequest_Body_Order {
|
|
if x != nil {
|
|
return x.OrderBy
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest_Body) SetOrderBy(v *GetSubTreeRequest_Body_Order) {
|
|
x.OrderBy = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetSubTreeRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetSubTreeRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"rootId\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.RootId {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Uint64(x.RootId[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"depth\":"
|
|
out.RawString(prefix)
|
|
out.Uint32(x.Depth)
|
|
}
|
|
{
|
|
const prefix string = ",\"bearerToken\":"
|
|
out.RawString(prefix)
|
|
out.Base64Bytes(x.BearerToken)
|
|
}
|
|
{
|
|
const prefix string = ",\"orderBy\":"
|
|
out.RawString(prefix)
|
|
x.OrderBy.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetSubTreeRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetSubTreeRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "rootId":
|
|
{
|
|
var f uint64
|
|
var list []uint64
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.Uint64()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.RootId = list
|
|
in.Delim(']')
|
|
}
|
|
case "depth":
|
|
{
|
|
var f uint32
|
|
f = in.Uint32()
|
|
x.Depth = f
|
|
}
|
|
case "bearerToken":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.BearerToken = f
|
|
}
|
|
case "orderBy":
|
|
{
|
|
var f *GetSubTreeRequest_Body_Order
|
|
f = new(GetSubTreeRequest_Body_Order)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.OrderBy = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetSubTreeRequest struct {
|
|
Body *GetSubTreeRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetSubTreeRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetSubTreeRequest)(nil)
|
|
_ json.Marshaler = (*GetSubTreeRequest)(nil)
|
|
_ json.Unmarshaler = (*GetSubTreeRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetSubTreeRequest) 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 *GetSubTreeRequest) 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 *GetSubTreeRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetSubTreeRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetSubTreeRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetSubTreeRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetSubTreeRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetSubTreeRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest) GetBody() *GetSubTreeRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest) SetBody(v *GetSubTreeRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetSubTreeRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetSubTreeRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetSubTreeRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetSubTreeRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetSubTreeRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *GetSubTreeRequest_Body
|
|
f = new(GetSubTreeRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetSubTreeResponse_Body struct {
|
|
NodeId []uint64 `json:"nodeId"`
|
|
ParentId []uint64 `json:"parentId"`
|
|
Timestamp []uint64 `json:"timestamp"`
|
|
Meta []KeyValue `json:"meta"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetSubTreeResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetSubTreeResponse_Body)(nil)
|
|
_ json.Marshaler = (*GetSubTreeResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*GetSubTreeResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetSubTreeResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
for i := range x.NodeId {
|
|
size += protowire.SizeGroup(protowire.Number(1), protowire.SizeVarint(x.NodeId[i]))
|
|
}
|
|
for i := range x.ParentId {
|
|
size += protowire.SizeGroup(protowire.Number(2), protowire.SizeVarint(x.ParentId[i]))
|
|
}
|
|
for i := range x.Timestamp {
|
|
size += protowire.SizeGroup(protowire.Number(3), protowire.SizeVarint(x.Timestamp[i]))
|
|
}
|
|
for i := range x.Meta {
|
|
size += proto.NestedStructureSizeUnchecked(4, &x.Meta[i])
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetSubTreeResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetSubTreeResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
for j := range x.NodeId {
|
|
mm.AppendUint64(1, x.NodeId[j])
|
|
}
|
|
for j := range x.ParentId {
|
|
mm.AppendUint64(2, x.ParentId[j])
|
|
}
|
|
for j := range x.Timestamp {
|
|
mm.AppendUint64(3, x.Timestamp[j])
|
|
}
|
|
for i := range x.Meta {
|
|
x.Meta[i].EmitProtobuf(mm.AppendMessage(4))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetSubTreeResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetSubTreeResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // NodeId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "NodeId")
|
|
}
|
|
x.NodeId = append(x.NodeId, data)
|
|
case 2: // ParentId
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ParentId")
|
|
}
|
|
x.ParentId = append(x.ParentId, data)
|
|
case 3: // Timestamp
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Timestamp")
|
|
}
|
|
x.Timestamp = append(x.Timestamp, data)
|
|
case 4: // Meta
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Meta")
|
|
}
|
|
x.Meta = append(x.Meta, KeyValue{})
|
|
ff := &x.Meta[len(x.Meta)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse_Body) GetNodeId() []uint64 {
|
|
if x != nil {
|
|
return x.NodeId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse_Body) SetNodeId(v []uint64) {
|
|
x.NodeId = v
|
|
}
|
|
func (x *GetSubTreeResponse_Body) GetParentId() []uint64 {
|
|
if x != nil {
|
|
return x.ParentId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse_Body) SetParentId(v []uint64) {
|
|
x.ParentId = v
|
|
}
|
|
func (x *GetSubTreeResponse_Body) GetTimestamp() []uint64 {
|
|
if x != nil {
|
|
return x.Timestamp
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse_Body) SetTimestamp(v []uint64) {
|
|
x.Timestamp = v
|
|
}
|
|
func (x *GetSubTreeResponse_Body) GetMeta() []KeyValue {
|
|
if x != nil {
|
|
return x.Meta
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse_Body) SetMeta(v []KeyValue) {
|
|
x.Meta = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetSubTreeResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetSubTreeResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"nodeId\":"
|
|
out.RawString(prefix[1:])
|
|
out.RawByte('[')
|
|
for i := range x.NodeId {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Uint64(x.NodeId[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"parentId\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.ParentId {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Uint64(x.ParentId[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"timestamp\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Timestamp {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Uint64(x.Timestamp[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
{
|
|
const prefix string = ",\"meta\":"
|
|
out.RawString(prefix)
|
|
out.RawByte('[')
|
|
for i := range x.Meta {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Meta[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetSubTreeResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetSubTreeResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "nodeId":
|
|
{
|
|
var f uint64
|
|
var list []uint64
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.Uint64()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.NodeId = list
|
|
in.Delim(']')
|
|
}
|
|
case "parentId":
|
|
{
|
|
var f uint64
|
|
var list []uint64
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.Uint64()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.ParentId = list
|
|
in.Delim(']')
|
|
}
|
|
case "timestamp":
|
|
{
|
|
var f uint64
|
|
var list []uint64
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.Uint64()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Timestamp = list
|
|
in.Delim(']')
|
|
}
|
|
case "meta":
|
|
{
|
|
var f KeyValue
|
|
var list []KeyValue
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = KeyValue{}
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Meta = list
|
|
in.Delim(']')
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetSubTreeResponse struct {
|
|
Body *GetSubTreeResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetSubTreeResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetSubTreeResponse)(nil)
|
|
_ json.Marshaler = (*GetSubTreeResponse)(nil)
|
|
_ json.Unmarshaler = (*GetSubTreeResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetSubTreeResponse) 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 *GetSubTreeResponse) 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 *GetSubTreeResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetSubTreeResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetSubTreeResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetSubTreeResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetSubTreeResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetSubTreeResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse) GetBody() *GetSubTreeResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse) SetBody(v *GetSubTreeResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetSubTreeResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetSubTreeResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetSubTreeResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetSubTreeResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetSubTreeResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetSubTreeResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *GetSubTreeResponse_Body
|
|
f = new(GetSubTreeResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type TreeListRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*TreeListRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*TreeListRequest_Body)(nil)
|
|
_ json.Marshaler = (*TreeListRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*TreeListRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *TreeListRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.BytesSize(1, x.ContainerId)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *TreeListRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *TreeListRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *TreeListRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "TreeListRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *TreeListRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *TreeListRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *TreeListRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *TreeListRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type TreeListRequest struct {
|
|
Body *TreeListRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*TreeListRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*TreeListRequest)(nil)
|
|
_ json.Marshaler = (*TreeListRequest)(nil)
|
|
_ json.Unmarshaler = (*TreeListRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *TreeListRequest) 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 *TreeListRequest) 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 *TreeListRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *TreeListRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *TreeListRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *TreeListRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "TreeListRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(TreeListRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListRequest) GetBody() *TreeListRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListRequest) SetBody(v *TreeListRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *TreeListRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *TreeListRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *TreeListRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *TreeListRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *TreeListRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *TreeListRequest_Body
|
|
f = new(TreeListRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type TreeListResponse_Body struct {
|
|
Ids []string `json:"ids"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*TreeListResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*TreeListResponse_Body)(nil)
|
|
_ json.Marshaler = (*TreeListResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*TreeListResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *TreeListResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.RepeatedStringSize(1, x.Ids)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *TreeListResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *TreeListResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
for j := range x.Ids {
|
|
mm.AppendString(1, x.Ids[j])
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *TreeListResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "TreeListResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Ids
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Ids")
|
|
}
|
|
x.Ids = append(x.Ids, data)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListResponse_Body) GetIds() []string {
|
|
if x != nil {
|
|
return x.Ids
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListResponse_Body) SetIds(v []string) {
|
|
x.Ids = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *TreeListResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *TreeListResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"ids\":"
|
|
out.RawString(prefix[1:])
|
|
out.RawByte('[')
|
|
for i := range x.Ids {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(x.Ids[i])
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *TreeListResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *TreeListResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "ids":
|
|
{
|
|
var f string
|
|
var list []string
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = in.String()
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Ids = list
|
|
in.Delim(']')
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type TreeListResponse struct {
|
|
Body *TreeListResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*TreeListResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*TreeListResponse)(nil)
|
|
_ json.Marshaler = (*TreeListResponse)(nil)
|
|
_ json.Unmarshaler = (*TreeListResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *TreeListResponse) 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 *TreeListResponse) 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 *TreeListResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *TreeListResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *TreeListResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *TreeListResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "TreeListResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(TreeListResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListResponse) GetBody() *TreeListResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListResponse) SetBody(v *TreeListResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *TreeListResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *TreeListResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *TreeListResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *TreeListResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *TreeListResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *TreeListResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *TreeListResponse_Body
|
|
f = new(TreeListResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type ApplyRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
Operation *LogMove `json:"operation"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*ApplyRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*ApplyRequest_Body)(nil)
|
|
_ json.Marshaler = (*ApplyRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*ApplyRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *ApplyRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.BytesSize(1, x.ContainerId)
|
|
size += proto.StringSize(2, x.TreeId)
|
|
size += proto.NestedStructureSize(3, x.Operation)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *ApplyRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *ApplyRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if x.Operation != nil {
|
|
x.Operation.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *ApplyRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "ApplyRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // Operation
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Operation")
|
|
}
|
|
x.Operation = new(LogMove)
|
|
if err := x.Operation.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *ApplyRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *ApplyRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *ApplyRequest_Body) GetOperation() *LogMove {
|
|
if x != nil {
|
|
return x.Operation
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyRequest_Body) SetOperation(v *LogMove) {
|
|
x.Operation = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *ApplyRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *ApplyRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"operation\":"
|
|
out.RawString(prefix)
|
|
x.Operation.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *ApplyRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *ApplyRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "operation":
|
|
{
|
|
var f *LogMove
|
|
f = new(LogMove)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Operation = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type ApplyRequest struct {
|
|
Body *ApplyRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*ApplyRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*ApplyRequest)(nil)
|
|
_ json.Marshaler = (*ApplyRequest)(nil)
|
|
_ json.Unmarshaler = (*ApplyRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *ApplyRequest) 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 *ApplyRequest) 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 *ApplyRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *ApplyRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *ApplyRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *ApplyRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "ApplyRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(ApplyRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyRequest) GetBody() *ApplyRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyRequest) SetBody(v *ApplyRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *ApplyRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *ApplyRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *ApplyRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *ApplyRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *ApplyRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *ApplyRequest_Body
|
|
f = new(ApplyRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type ApplyResponse_Body struct {
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*ApplyResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*ApplyResponse_Body)(nil)
|
|
_ json.Marshaler = (*ApplyResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*ApplyResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *ApplyResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *ApplyResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *ApplyResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *ApplyResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "ApplyResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *ApplyResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *ApplyResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *ApplyResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *ApplyResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type ApplyResponse struct {
|
|
Body *ApplyResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*ApplyResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*ApplyResponse)(nil)
|
|
_ json.Marshaler = (*ApplyResponse)(nil)
|
|
_ json.Unmarshaler = (*ApplyResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *ApplyResponse) 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 *ApplyResponse) 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 *ApplyResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *ApplyResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *ApplyResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *ApplyResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "ApplyResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(ApplyResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyResponse) GetBody() *ApplyResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyResponse) SetBody(v *ApplyResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *ApplyResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *ApplyResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *ApplyResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *ApplyResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *ApplyResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *ApplyResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *ApplyResponse_Body
|
|
f = new(ApplyResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetOpLogRequest_Body struct {
|
|
ContainerId []byte `json:"containerId"`
|
|
TreeId string `json:"treeId"`
|
|
Height uint64 `json:"height"`
|
|
Count uint64 `json:"count"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetOpLogRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetOpLogRequest_Body)(nil)
|
|
_ json.Marshaler = (*GetOpLogRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*GetOpLogRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetOpLogRequest_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)
|
|
size += proto.UInt64Size(4, x.Count)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetOpLogRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetOpLogRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if len(x.ContainerId) != 0 {
|
|
mm.AppendBytes(1, x.ContainerId)
|
|
}
|
|
if len(x.TreeId) != 0 {
|
|
mm.AppendString(2, x.TreeId)
|
|
}
|
|
if x.Height != 0 {
|
|
mm.AppendUint64(3, x.Height)
|
|
}
|
|
if x.Count != 0 {
|
|
mm.AppendUint64(4, x.Count)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetOpLogRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetOpLogRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // ContainerId
|
|
data, ok := fc.Bytes()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
}
|
|
x.ContainerId = data
|
|
case 2: // TreeId
|
|
data, ok := fc.String()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "TreeId")
|
|
}
|
|
x.TreeId = data
|
|
case 3: // Height
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Height")
|
|
}
|
|
x.Height = data
|
|
case 4: // Count
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Count")
|
|
}
|
|
x.Count = data
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogRequest_Body) GetContainerId() []byte {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogRequest_Body) SetContainerId(v []byte) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *GetOpLogRequest_Body) GetTreeId() string {
|
|
if x != nil {
|
|
return x.TreeId
|
|
}
|
|
return ""
|
|
}
|
|
func (x *GetOpLogRequest_Body) SetTreeId(v string) {
|
|
x.TreeId = v
|
|
}
|
|
func (x *GetOpLogRequest_Body) GetHeight() uint64 {
|
|
if x != nil {
|
|
return x.Height
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetOpLogRequest_Body) SetHeight(v uint64) {
|
|
x.Height = v
|
|
}
|
|
func (x *GetOpLogRequest_Body) GetCount() uint64 {
|
|
if x != nil {
|
|
return x.Count
|
|
}
|
|
return 0
|
|
}
|
|
func (x *GetOpLogRequest_Body) SetCount(v uint64) {
|
|
x.Count = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetOpLogRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetOpLogRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(x.ContainerId)
|
|
}
|
|
{
|
|
const prefix string = ",\"treeId\":"
|
|
out.RawString(prefix)
|
|
out.String(x.TreeId)
|
|
}
|
|
{
|
|
const prefix string = ",\"height\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.Height)
|
|
}
|
|
{
|
|
const prefix string = ",\"count\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.Count)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetOpLogRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetOpLogRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "containerId":
|
|
{
|
|
var f []byte
|
|
f = in.Bytes()
|
|
x.ContainerId = f
|
|
}
|
|
case "treeId":
|
|
{
|
|
var f string
|
|
f = in.String()
|
|
x.TreeId = f
|
|
}
|
|
case "height":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.Height = f
|
|
}
|
|
case "count":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.Count = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetOpLogRequest struct {
|
|
Body *GetOpLogRequest_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetOpLogRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetOpLogRequest)(nil)
|
|
_ json.Marshaler = (*GetOpLogRequest)(nil)
|
|
_ json.Unmarshaler = (*GetOpLogRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetOpLogRequest) 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 *GetOpLogRequest) 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 *GetOpLogRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetOpLogRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetOpLogRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetOpLogRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetOpLogRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetOpLogRequest_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogRequest) GetBody() *GetOpLogRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogRequest) SetBody(v *GetOpLogRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetOpLogRequest) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogRequest) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetOpLogRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetOpLogRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetOpLogRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetOpLogRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *GetOpLogRequest_Body
|
|
f = new(GetOpLogRequest_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetOpLogResponse_Body struct {
|
|
Operation *LogMove `json:"operation"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetOpLogResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetOpLogResponse_Body)(nil)
|
|
_ json.Marshaler = (*GetOpLogResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*GetOpLogResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetOpLogResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.Operation)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetOpLogResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetOpLogResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Operation != nil {
|
|
x.Operation.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetOpLogResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetOpLogResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Operation
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Operation")
|
|
}
|
|
x.Operation = new(LogMove)
|
|
if err := x.Operation.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogResponse_Body) GetOperation() *LogMove {
|
|
if x != nil {
|
|
return x.Operation
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogResponse_Body) SetOperation(v *LogMove) {
|
|
x.Operation = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetOpLogResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetOpLogResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"operation\":"
|
|
out.RawString(prefix[1:])
|
|
x.Operation.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetOpLogResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetOpLogResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "operation":
|
|
{
|
|
var f *LogMove
|
|
f = new(LogMove)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Operation = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type GetOpLogResponse struct {
|
|
Body *GetOpLogResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetOpLogResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetOpLogResponse)(nil)
|
|
_ json.Marshaler = (*GetOpLogResponse)(nil)
|
|
_ json.Unmarshaler = (*GetOpLogResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetOpLogResponse) 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 *GetOpLogResponse) 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 *GetOpLogResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetOpLogResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetOpLogResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetOpLogResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetOpLogResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetOpLogResponse_Body)
|
|
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
case 2: // Signature
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
}
|
|
x.Signature = new(Signature)
|
|
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogResponse) GetBody() *GetOpLogResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogResponse) SetBody(v *GetOpLogResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetOpLogResponse) GetSignature() *Signature {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetOpLogResponse) SetSignature(v *Signature) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetOpLogResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetOpLogResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetOpLogResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetOpLogResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "body":
|
|
{
|
|
var f *GetOpLogResponse_Body
|
|
f = new(GetOpLogResponse_Body)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Body = f
|
|
}
|
|
case "signature":
|
|
{
|
|
var f *Signature
|
|
f = new(Signature)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Signature = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type HealthcheckResponse_Body struct {
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*HealthcheckResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*HealthcheckResponse_Body)(nil)
|
|
_ json.Marshaler = (*HealthcheckResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*HealthcheckResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *HealthcheckResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
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) {
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *HealthcheckResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "HealthcheckResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *HealthcheckResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *HealthcheckResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *HealthcheckResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *HealthcheckResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
|
|
type HealthcheckResponse struct {
|
|
Body *HealthcheckResponse_Body `json:"body"`
|
|
Signature *Signature `json:"signature"`
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*HealthcheckResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*HealthcheckResponse)(nil)
|
|
_ json.Marshaler = (*HealthcheckResponse)(nil)
|
|
_ json.Unmarshaler = (*HealthcheckResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
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 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()
|
|
}
|
|
}
|