frostfs-sdk-go/api/container/grpc/service_frostfs.pb.go

3158 lines
75 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package container
import (
json "encoding/json"
fmt "fmt"
grpc "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs/grpc"
grpc1 "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/session/grpc"
pool "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/util/pool"
proto "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/util/proto"
encoding "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/util/proto/encoding"
easyproto "github.com/VictoriaMetrics/easyproto"
jlexer "github.com/mailru/easyjson/jlexer"
jwriter "github.com/mailru/easyjson/jwriter"
)
type PutRequest_Body struct {
Container *Container `json:"container"`
Signature *grpc.SignatureRFC6979 `json:"signature"`
}
var (
_ encoding.ProtoMarshaler = (*PutRequest_Body)(nil)
_ encoding.ProtoUnmarshaler = (*PutRequest_Body)(nil)
_ json.Marshaler = (*PutRequest_Body)(nil)
_ json.Unmarshaler = (*PutRequest_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *PutRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Container)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *PutRequest_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 *PutRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Container != nil {
x.Container.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
x.Signature.EmitProtobuf(mm.AppendMessage(2))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *PutRequest_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", "PutRequest_Body")
}
switch fc.FieldNum {
case 1: // Container
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Container")
}
x.Container = new(Container)
if err := x.Container.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(grpc.SignatureRFC6979)
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *PutRequest_Body) GetContainer() *Container {
if x != nil {
return x.Container
}
return nil
}
func (x *PutRequest_Body) SetContainer(v *Container) {
x.Container = v
}
func (x *PutRequest_Body) GetSignature() *grpc.SignatureRFC6979 {
if x != nil {
return x.Signature
}
return nil
}
func (x *PutRequest_Body) SetSignature(v *grpc.SignatureRFC6979) {
x.Signature = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *PutRequest_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *PutRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *PutRequest_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *PutRequest_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 "container":
{
var f *Container
f = new(Container)
f.UnmarshalEasyJSON(in)
x.Container = f
}
case "signature":
{
var f *grpc.SignatureRFC6979
f = new(grpc.SignatureRFC6979)
f.UnmarshalEasyJSON(in)
x.Signature = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type PutRequest struct {
Body *PutRequest_Body `json:"body"`
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*PutRequest)(nil)
_ encoding.ProtoUnmarshaler = (*PutRequest)(nil)
_ json.Marshaler = (*PutRequest)(nil)
_ json.Unmarshaler = (*PutRequest)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *PutRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *PutRequest) 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 *PutRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *PutRequest) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *PutRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *PutRequest) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "PutRequest")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(PutRequest_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.RequestMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.RequestVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *PutRequest) GetBody() *PutRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *PutRequest) SetBody(v *PutRequest_Body) {
x.Body = v
}
func (x *PutRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *PutRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
x.MetaHeader = v
}
func (x *PutRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *PutRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *PutRequest) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *PutRequest) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *PutRequest) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *PutRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *PutRequest_Body
f = new(PutRequest_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.RequestMetaHeader
f = new(grpc1.RequestMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.RequestVerificationHeader
f = new(grpc1.RequestVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type PutResponse_Body struct {
ContainerId *grpc.ContainerID `json:"containerId"`
}
var (
_ encoding.ProtoMarshaler = (*PutResponse_Body)(nil)
_ encoding.ProtoUnmarshaler = (*PutResponse_Body)(nil)
_ json.Marshaler = (*PutResponse_Body)(nil)
_ json.Unmarshaler = (*PutResponse_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *PutResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.ContainerId)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *PutResponse_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 *PutResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.ContainerId != nil {
x.ContainerId.EmitProtobuf(mm.AppendMessage(1))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *PutResponse_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", "PutResponse_Body")
}
switch fc.FieldNum {
case 1: // ContainerId
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
}
x.ContainerId = new(grpc.ContainerID)
if err := x.ContainerId.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *PutResponse_Body) GetContainerId() *grpc.ContainerID {
if x != nil {
return x.ContainerId
}
return nil
}
func (x *PutResponse_Body) SetContainerId(v *grpc.ContainerID) {
x.ContainerId = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *PutResponse_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *PutResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *PutResponse_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *PutResponse_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 *grpc.ContainerID
f = new(grpc.ContainerID)
f.UnmarshalEasyJSON(in)
x.ContainerId = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type PutResponse struct {
Body *PutResponse_Body `json:"body"`
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*PutResponse)(nil)
_ encoding.ProtoUnmarshaler = (*PutResponse)(nil)
_ json.Marshaler = (*PutResponse)(nil)
_ json.Unmarshaler = (*PutResponse)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *PutResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *PutResponse) 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 *PutResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *PutResponse) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *PutResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *PutResponse) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "PutResponse")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(PutResponse_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.ResponseMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.ResponseVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *PutResponse) GetBody() *PutResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *PutResponse) SetBody(v *PutResponse_Body) {
x.Body = v
}
func (x *PutResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *PutResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
x.MetaHeader = v
}
func (x *PutResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *PutResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *PutResponse) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *PutResponse) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *PutResponse) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *PutResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *PutResponse_Body
f = new(PutResponse_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.ResponseMetaHeader
f = new(grpc1.ResponseMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.ResponseVerificationHeader
f = new(grpc1.ResponseVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type DeleteRequest_Body struct {
ContainerId *grpc.ContainerID `json:"containerId"`
Signature *grpc.SignatureRFC6979 `json:"signature"`
}
var (
_ encoding.ProtoMarshaler = (*DeleteRequest_Body)(nil)
_ encoding.ProtoUnmarshaler = (*DeleteRequest_Body)(nil)
_ json.Marshaler = (*DeleteRequest_Body)(nil)
_ json.Unmarshaler = (*DeleteRequest_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *DeleteRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.ContainerId)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *DeleteRequest_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 *DeleteRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.ContainerId != nil {
x.ContainerId.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
x.Signature.EmitProtobuf(mm.AppendMessage(2))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *DeleteRequest_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", "DeleteRequest_Body")
}
switch fc.FieldNum {
case 1: // ContainerId
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
}
x.ContainerId = new(grpc.ContainerID)
if err := x.ContainerId.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(grpc.SignatureRFC6979)
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *DeleteRequest_Body) GetContainerId() *grpc.ContainerID {
if x != nil {
return x.ContainerId
}
return nil
}
func (x *DeleteRequest_Body) SetContainerId(v *grpc.ContainerID) {
x.ContainerId = v
}
func (x *DeleteRequest_Body) GetSignature() *grpc.SignatureRFC6979 {
if x != nil {
return x.Signature
}
return nil
}
func (x *DeleteRequest_Body) SetSignature(v *grpc.SignatureRFC6979) {
x.Signature = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *DeleteRequest_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *DeleteRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *DeleteRequest_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *DeleteRequest_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 *grpc.ContainerID
f = new(grpc.ContainerID)
f.UnmarshalEasyJSON(in)
x.ContainerId = f
}
case "signature":
{
var f *grpc.SignatureRFC6979
f = new(grpc.SignatureRFC6979)
f.UnmarshalEasyJSON(in)
x.Signature = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type DeleteRequest struct {
Body *DeleteRequest_Body `json:"body"`
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*DeleteRequest)(nil)
_ encoding.ProtoUnmarshaler = (*DeleteRequest)(nil)
_ json.Marshaler = (*DeleteRequest)(nil)
_ json.Unmarshaler = (*DeleteRequest)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *DeleteRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *DeleteRequest) 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 *DeleteRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *DeleteRequest) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *DeleteRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *DeleteRequest) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "DeleteRequest")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(DeleteRequest_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.RequestMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.RequestVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *DeleteRequest) GetBody() *DeleteRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *DeleteRequest) SetBody(v *DeleteRequest_Body) {
x.Body = v
}
func (x *DeleteRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *DeleteRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
x.MetaHeader = v
}
func (x *DeleteRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *DeleteRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *DeleteRequest) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *DeleteRequest) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *DeleteRequest) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *DeleteRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *DeleteRequest_Body
f = new(DeleteRequest_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.RequestMetaHeader
f = new(grpc1.RequestMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.RequestVerificationHeader
f = new(grpc1.RequestVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type DeleteResponse_Body struct {
}
var (
_ encoding.ProtoMarshaler = (*DeleteResponse_Body)(nil)
_ encoding.ProtoUnmarshaler = (*DeleteResponse_Body)(nil)
_ json.Marshaler = (*DeleteResponse_Body)(nil)
_ json.Unmarshaler = (*DeleteResponse_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *DeleteResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *DeleteResponse_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 *DeleteResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *DeleteResponse_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", "DeleteResponse_Body")
}
switch fc.FieldNum {
}
}
return nil
}
// MarshalJSON implements the json.Marshaler interface.
func (x *DeleteResponse_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *DeleteResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
out.RawByte('{')
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *DeleteResponse_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *DeleteResponse_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 DeleteResponse struct {
Body *DeleteResponse_Body `json:"body"`
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*DeleteResponse)(nil)
_ encoding.ProtoUnmarshaler = (*DeleteResponse)(nil)
_ json.Marshaler = (*DeleteResponse)(nil)
_ json.Unmarshaler = (*DeleteResponse)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *DeleteResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *DeleteResponse) 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 *DeleteResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *DeleteResponse) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *DeleteResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *DeleteResponse) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "DeleteResponse")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(DeleteResponse_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.ResponseMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.ResponseVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *DeleteResponse) GetBody() *DeleteResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *DeleteResponse) SetBody(v *DeleteResponse_Body) {
x.Body = v
}
func (x *DeleteResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *DeleteResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
x.MetaHeader = v
}
func (x *DeleteResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *DeleteResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *DeleteResponse) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *DeleteResponse) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *DeleteResponse) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *DeleteResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *DeleteResponse_Body
f = new(DeleteResponse_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.ResponseMetaHeader
f = new(grpc1.ResponseMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.ResponseVerificationHeader
f = new(grpc1.ResponseVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type GetRequest_Body struct {
ContainerId *grpc.ContainerID `json:"containerId"`
}
var (
_ encoding.ProtoMarshaler = (*GetRequest_Body)(nil)
_ encoding.ProtoUnmarshaler = (*GetRequest_Body)(nil)
_ json.Marshaler = (*GetRequest_Body)(nil)
_ json.Unmarshaler = (*GetRequest_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *GetRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.ContainerId)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *GetRequest_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 *GetRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.ContainerId != nil {
x.ContainerId.EmitProtobuf(mm.AppendMessage(1))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *GetRequest_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", "GetRequest_Body")
}
switch fc.FieldNum {
case 1: // ContainerId
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
}
x.ContainerId = new(grpc.ContainerID)
if err := x.ContainerId.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *GetRequest_Body) GetContainerId() *grpc.ContainerID {
if x != nil {
return x.ContainerId
}
return nil
}
func (x *GetRequest_Body) SetContainerId(v *grpc.ContainerID) {
x.ContainerId = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *GetRequest_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *GetRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *GetRequest_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *GetRequest_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 *grpc.ContainerID
f = new(grpc.ContainerID)
f.UnmarshalEasyJSON(in)
x.ContainerId = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type GetRequest struct {
Body *GetRequest_Body `json:"body"`
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*GetRequest)(nil)
_ encoding.ProtoUnmarshaler = (*GetRequest)(nil)
_ json.Marshaler = (*GetRequest)(nil)
_ json.Unmarshaler = (*GetRequest)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *GetRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *GetRequest) 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 *GetRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *GetRequest) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *GetRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *GetRequest) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "GetRequest")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(GetRequest_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.RequestMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.RequestVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *GetRequest) GetBody() *GetRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *GetRequest) SetBody(v *GetRequest_Body) {
x.Body = v
}
func (x *GetRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *GetRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
x.MetaHeader = v
}
func (x *GetRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *GetRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *GetRequest) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *GetRequest) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *GetRequest) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *GetRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *GetRequest_Body
f = new(GetRequest_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.RequestMetaHeader
f = new(grpc1.RequestMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.RequestVerificationHeader
f = new(grpc1.RequestVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type GetResponse_Body struct {
Container *Container `json:"container"`
Signature *grpc.SignatureRFC6979 `json:"signature"`
SessionToken *grpc1.SessionToken `json:"sessionToken"`
}
var (
_ encoding.ProtoMarshaler = (*GetResponse_Body)(nil)
_ encoding.ProtoUnmarshaler = (*GetResponse_Body)(nil)
_ json.Marshaler = (*GetResponse_Body)(nil)
_ json.Unmarshaler = (*GetResponse_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *GetResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Container)
size += proto.NestedStructureSize(2, x.Signature)
size += proto.NestedStructureSize(3, x.SessionToken)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *GetResponse_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 *GetResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Container != nil {
x.Container.EmitProtobuf(mm.AppendMessage(1))
}
if x.Signature != nil {
x.Signature.EmitProtobuf(mm.AppendMessage(2))
}
if x.SessionToken != nil {
x.SessionToken.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *GetResponse_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", "GetResponse_Body")
}
switch fc.FieldNum {
case 1: // Container
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Container")
}
x.Container = new(Container)
if err := x.Container.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(grpc.SignatureRFC6979)
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // SessionToken
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "SessionToken")
}
x.SessionToken = new(grpc1.SessionToken)
if err := x.SessionToken.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *GetResponse_Body) GetContainer() *Container {
if x != nil {
return x.Container
}
return nil
}
func (x *GetResponse_Body) SetContainer(v *Container) {
x.Container = v
}
func (x *GetResponse_Body) GetSignature() *grpc.SignatureRFC6979 {
if x != nil {
return x.Signature
}
return nil
}
func (x *GetResponse_Body) SetSignature(v *grpc.SignatureRFC6979) {
x.Signature = v
}
func (x *GetResponse_Body) GetSessionToken() *grpc1.SessionToken {
if x != nil {
return x.SessionToken
}
return nil
}
func (x *GetResponse_Body) SetSessionToken(v *grpc1.SessionToken) {
x.SessionToken = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *GetResponse_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *GetResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *GetResponse_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *GetResponse_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 "container":
{
var f *Container
f = new(Container)
f.UnmarshalEasyJSON(in)
x.Container = f
}
case "signature":
{
var f *grpc.SignatureRFC6979
f = new(grpc.SignatureRFC6979)
f.UnmarshalEasyJSON(in)
x.Signature = f
}
case "sessionToken":
{
var f *grpc1.SessionToken
f = new(grpc1.SessionToken)
f.UnmarshalEasyJSON(in)
x.SessionToken = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type GetResponse struct {
Body *GetResponse_Body `json:"body"`
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*GetResponse)(nil)
_ encoding.ProtoUnmarshaler = (*GetResponse)(nil)
_ json.Marshaler = (*GetResponse)(nil)
_ json.Unmarshaler = (*GetResponse)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *GetResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *GetResponse) 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 *GetResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *GetResponse) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *GetResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *GetResponse) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "GetResponse")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(GetResponse_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.ResponseMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.ResponseVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *GetResponse) GetBody() *GetResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *GetResponse) SetBody(v *GetResponse_Body) {
x.Body = v
}
func (x *GetResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *GetResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
x.MetaHeader = v
}
func (x *GetResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *GetResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *GetResponse) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *GetResponse) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *GetResponse) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *GetResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *GetResponse_Body
f = new(GetResponse_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.ResponseMetaHeader
f = new(grpc1.ResponseMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.ResponseVerificationHeader
f = new(grpc1.ResponseVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type ListRequest_Body struct {
OwnerId *grpc.OwnerID `json:"ownerId"`
}
var (
_ encoding.ProtoMarshaler = (*ListRequest_Body)(nil)
_ encoding.ProtoUnmarshaler = (*ListRequest_Body)(nil)
_ json.Marshaler = (*ListRequest_Body)(nil)
_ json.Unmarshaler = (*ListRequest_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *ListRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.OwnerId)
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *ListRequest_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 *ListRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.OwnerId != nil {
x.OwnerId.EmitProtobuf(mm.AppendMessage(1))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *ListRequest_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", "ListRequest_Body")
}
switch fc.FieldNum {
case 1: // OwnerId
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "OwnerId")
}
x.OwnerId = new(grpc.OwnerID)
if err := x.OwnerId.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *ListRequest_Body) GetOwnerId() *grpc.OwnerID {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *ListRequest_Body) SetOwnerId(v *grpc.OwnerID) {
x.OwnerId = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *ListRequest_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *ListRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *ListRequest_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *ListRequest_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 "ownerId":
{
var f *grpc.OwnerID
f = new(grpc.OwnerID)
f.UnmarshalEasyJSON(in)
x.OwnerId = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type ListRequest struct {
Body *ListRequest_Body `json:"body"`
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*ListRequest)(nil)
_ encoding.ProtoUnmarshaler = (*ListRequest)(nil)
_ json.Marshaler = (*ListRequest)(nil)
_ json.Unmarshaler = (*ListRequest)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *ListRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *ListRequest) 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 *ListRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *ListRequest) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *ListRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *ListRequest) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "ListRequest")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(ListRequest_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.RequestMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.RequestVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *ListRequest) GetBody() *ListRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *ListRequest) SetBody(v *ListRequest_Body) {
x.Body = v
}
func (x *ListRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *ListRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
x.MetaHeader = v
}
func (x *ListRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *ListRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *ListRequest) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *ListRequest) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *ListRequest) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *ListRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *ListRequest_Body
f = new(ListRequest_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.RequestMetaHeader
f = new(grpc1.RequestMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.RequestVerificationHeader
f = new(grpc1.RequestVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type ListResponse_Body struct {
ContainerIds []grpc.ContainerID `json:"containerIds"`
}
var (
_ encoding.ProtoMarshaler = (*ListResponse_Body)(nil)
_ encoding.ProtoUnmarshaler = (*ListResponse_Body)(nil)
_ json.Marshaler = (*ListResponse_Body)(nil)
_ json.Unmarshaler = (*ListResponse_Body)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *ListResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
for i := range x.ContainerIds {
size += proto.NestedStructureSizeUnchecked(1, &x.ContainerIds[i])
}
return size
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *ListResponse_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 *ListResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
for i := range x.ContainerIds {
x.ContainerIds[i].EmitProtobuf(mm.AppendMessage(1))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *ListResponse_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", "ListResponse_Body")
}
switch fc.FieldNum {
case 1: // ContainerIds
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "ContainerIds")
}
x.ContainerIds = append(x.ContainerIds, grpc.ContainerID{})
ff := &x.ContainerIds[len(x.ContainerIds)-1]
if err := ff.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *ListResponse_Body) GetContainerIds() []grpc.ContainerID {
if x != nil {
return x.ContainerIds
}
return nil
}
func (x *ListResponse_Body) SetContainerIds(v []grpc.ContainerID) {
x.ContainerIds = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *ListResponse_Body) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *ListResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerIds\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.ContainerIds {
if i != 0 {
out.RawByte(',')
}
x.ContainerIds[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *ListResponse_Body) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *ListResponse_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 "containerIds":
{
var f grpc.ContainerID
var list []grpc.ContainerID
in.Delim('[')
for !in.IsDelim(']') {
f = grpc.ContainerID{}
f.UnmarshalEasyJSON(in)
list = append(list, f)
in.WantComma()
}
x.ContainerIds = list
in.Delim(']')
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
type ListResponse struct {
Body *ListResponse_Body `json:"body"`
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
}
var (
_ encoding.ProtoMarshaler = (*ListResponse)(nil)
_ encoding.ProtoUnmarshaler = (*ListResponse)(nil)
_ json.Marshaler = (*ListResponse)(nil)
_ json.Unmarshaler = (*ListResponse)(nil)
)
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *ListResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.MetaHeader)
size += proto.NestedStructureSize(3, x.VerifyHeader)
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 *ListResponse) 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 *ListResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().MarshalProtobuf(buf), nil
}
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
func (x *ListResponse) MarshalProtobuf(dst []byte) []byte {
m := pool.MarshalerPool.Get()
defer pool.MarshalerPool.Put(m)
x.EmitProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
return dst
}
func (x *ListResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
if x == nil {
return
}
if x.Body != nil {
x.Body.EmitProtobuf(mm.AppendMessage(1))
}
if x.MetaHeader != nil {
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
}
if x.VerifyHeader != nil {
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
}
}
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
func (x *ListResponse) UnmarshalProtobuf(src []byte) (err error) {
var fc easyproto.FieldContext
for len(src) > 0 {
src, err = fc.NextField(src)
if err != nil {
return fmt.Errorf("cannot read next field in %s", "ListResponse")
}
switch fc.FieldNum {
case 1: // Body
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "Body")
}
x.Body = new(ListResponse_Body)
if err := x.Body.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 2: // MetaHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
}
x.MetaHeader = new(grpc1.ResponseMetaHeader)
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
case 3: // VerifyHeader
data, ok := fc.MessageData()
if !ok {
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
}
x.VerifyHeader = new(grpc1.ResponseVerificationHeader)
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
return fmt.Errorf("unmarshal: %w", err)
}
}
}
return nil
}
func (x *ListResponse) GetBody() *ListResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *ListResponse) SetBody(v *ListResponse_Body) {
x.Body = v
}
func (x *ListResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
if x != nil {
return x.MetaHeader
}
return nil
}
func (x *ListResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
x.MetaHeader = v
}
func (x *ListResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
if x != nil {
return x.VerifyHeader
}
return nil
}
func (x *ListResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
x.VerifyHeader = v
}
// MarshalJSON implements the json.Marshaler interface.
func (x *ListResponse) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
x.MarshalEasyJSON(&w)
return w.Buffer.BuildBytes(), w.Error
}
func (x *ListResponse) MarshalEasyJSON(out *jwriter.Writer) {
if x == nil {
out.RawString("null")
return
}
first := true
out.RawByte('{')
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
{
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
out.RawByte('}')
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *ListResponse) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
x.UnmarshalEasyJSON(&r)
return r.Error()
}
func (x *ListResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 *ListResponse_Body
f = new(ListResponse_Body)
f.UnmarshalEasyJSON(in)
x.Body = f
}
case "metaHeader":
{
var f *grpc1.ResponseMetaHeader
f = new(grpc1.ResponseMetaHeader)
f.UnmarshalEasyJSON(in)
x.MetaHeader = f
}
case "verifyHeader":
{
var f *grpc1.ResponseVerificationHeader
f = new(grpc1.ResponseVerificationHeader)
f.UnmarshalEasyJSON(in)
x.VerifyHeader = f
}
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}