Some checks failed
Tests and linters / Tests (1.19) (pull_request) Successful in 17m39s
DCO action / DCO (pull_request) Failing after 17m51s
Tests and linters / Tests (1.20) (pull_request) Successful in 17m52s
Tests and linters / Tests with -race (pull_request) Successful in 18m17s
Tests and linters / Lint (pull_request) Failing after 22m20s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
5482 lines
139 KiB
Go
Generated
5482 lines
139 KiB
Go
Generated
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
|
|
|
package container
|
|
|
|
import (
|
|
json "encoding/json"
|
|
fmt "fmt"
|
|
grpc2 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
|
|
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
|
grpc1 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
|
|
pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool"
|
|
proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
|
encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding"
|
|
easyproto "github.com/VictoriaMetrics/easyproto"
|
|
jlexer "github.com/mailru/easyjson/jlexer"
|
|
jwriter "github.com/mailru/easyjson/jwriter"
|
|
)
|
|
|
|
type PutRequest_Body struct {
|
|
Container *Container `json:"container"`
|
|
Signature *grpc.SignatureRFC6979 `json:"signature"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Container.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil && x.Signature.StableSize() != 0 {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"container\":"
|
|
out.RawString(prefix[1:])
|
|
x.Container.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *PutRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type PutRequest struct {
|
|
Body *PutRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *PutRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type PutResponse_Body struct {
|
|
ContainerId *grpc.ContainerID `json:"containerId"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
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()
|
|
}
|
|
}
|
|
func (x *PutResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type PutResponse struct {
|
|
Body *PutResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *PutResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type DeleteRequest_Body struct {
|
|
ContainerId *grpc.ContainerID `json:"containerId"`
|
|
Signature *grpc.SignatureRFC6979 `json:"signature"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.ContainerId.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil && x.Signature.StableSize() != 0 {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
x.ContainerId.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *DeleteRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type DeleteRequest struct {
|
|
Body *DeleteRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *DeleteRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type DeleteResponse_Body struct {
|
|
messageData []byte
|
|
}
|
|
|
|
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 {
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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()
|
|
}
|
|
}
|
|
func (x *DeleteResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type DeleteResponse struct {
|
|
Body *DeleteResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *DeleteResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetRequest_Body struct {
|
|
ContainerId *grpc.ContainerID `json:"containerId"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
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()
|
|
}
|
|
}
|
|
func (x *GetRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetRequest struct {
|
|
Body *GetRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *GetRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetResponse_Body struct {
|
|
Container *Container `json:"container"`
|
|
Signature *grpc.SignatureRFC6979 `json:"signature"`
|
|
SessionToken *grpc1.SessionToken `json:"sessionToken"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Container.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil && x.Signature.StableSize() != 0 {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.SessionToken != nil && x.SessionToken.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"container\":"
|
|
out.RawString(prefix[1:])
|
|
x.Container.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *GetResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetResponse struct {
|
|
Body *GetResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *GetResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type ListRequest_Body struct {
|
|
OwnerId *grpc.OwnerID `json:"ownerId"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"ownerId\":"
|
|
out.RawString(prefix[1:])
|
|
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()
|
|
}
|
|
}
|
|
func (x *ListRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type ListRequest struct {
|
|
Body *ListRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *ListRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type ListResponse_Body struct {
|
|
ContainerIds []*grpc.ContainerID `json:"containerIds"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.NestedStructureSize(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 {
|
|
if x.ContainerIds[i] != nil && x.ContainerIds[i].StableSize() != 0 {
|
|
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, new(grpc.ContainerID))
|
|
ff := x.ContainerIds[len(x.ContainerIds)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerIds\":"
|
|
out.RawString(prefix[1:])
|
|
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 = new(grpc.ContainerID)
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.ContainerIds = list
|
|
in.Delim(']')
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func (x *ListResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type ListResponse struct {
|
|
Body *ListResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
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.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
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
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"body\":"
|
|
out.RawString(prefix[1:])
|
|
x.Body.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
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()
|
|
}
|
|
}
|
|
func (x *ListResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type SetExtendedACLRequest_Body struct {
|
|
Eacl *grpc2.EACLTable `json:"eacl"`
|
|
Signature *grpc.SignatureRFC6979 `json:"signature"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*SetExtendedACLRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*SetExtendedACLRequest_Body)(nil)
|
|
_ json.Marshaler = (*SetExtendedACLRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*SetExtendedACLRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *SetExtendedACLRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.Eacl)
|
|
size += proto.NestedStructureSize(2, x.Signature)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *SetExtendedACLRequest_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 *SetExtendedACLRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Eacl != nil && x.Eacl.StableSize() != 0 {
|
|
x.Eacl.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil && x.Signature.StableSize() != 0 {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *SetExtendedACLRequest_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", "SetExtendedACLRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Eacl
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Eacl")
|
|
}
|
|
x.Eacl = new(grpc2.EACLTable)
|
|
if err := x.Eacl.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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest_Body) GetEacl() *grpc2.EACLTable {
|
|
if x != nil {
|
|
return x.Eacl
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest_Body) SetEacl(v *grpc2.EACLTable) {
|
|
x.Eacl = v
|
|
}
|
|
func (x *SetExtendedACLRequest_Body) GetSignature() *grpc.SignatureRFC6979 {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest_Body) SetSignature(v *grpc.SignatureRFC6979) {
|
|
x.Signature = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *SetExtendedACLRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *SetExtendedACLRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"eacl\":"
|
|
out.RawString(prefix[1:])
|
|
x.Eacl.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *SetExtendedACLRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *SetExtendedACLRequest_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 "eacl":
|
|
{
|
|
var f *grpc2.EACLTable
|
|
f = new(grpc2.EACLTable)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Eacl = 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()
|
|
}
|
|
}
|
|
func (x *SetExtendedACLRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type SetExtendedACLRequest struct {
|
|
Body *SetExtendedACLRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*SetExtendedACLRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*SetExtendedACLRequest)(nil)
|
|
_ json.Marshaler = (*SetExtendedACLRequest)(nil)
|
|
_ json.Unmarshaler = (*SetExtendedACLRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *SetExtendedACLRequest) 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 *SetExtendedACLRequest) 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 *SetExtendedACLRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *SetExtendedACLRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *SetExtendedACLRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil && x.Body.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *SetExtendedACLRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "SetExtendedACLRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(SetExtendedACLRequest_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest) GetBody() *SetExtendedACLRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest) SetBody(v *SetExtendedACLRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *SetExtendedACLRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
|
|
if x != nil {
|
|
return x.MetaHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
|
|
x.MetaHeader = v
|
|
}
|
|
func (x *SetExtendedACLRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
|
|
if x != nil {
|
|
return x.VerifyHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
|
|
x.VerifyHeader = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *SetExtendedACLRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *SetExtendedACLRequest) 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 = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"verifyHeader\":"
|
|
out.RawString(prefix)
|
|
x.VerifyHeader.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *SetExtendedACLRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *SetExtendedACLRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.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 *SetExtendedACLRequest_Body
|
|
f = new(SetExtendedACLRequest_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()
|
|
}
|
|
}
|
|
func (x *SetExtendedACLRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type SetExtendedACLResponse_Body struct {
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*SetExtendedACLResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*SetExtendedACLResponse_Body)(nil)
|
|
_ json.Marshaler = (*SetExtendedACLResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*SetExtendedACLResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *SetExtendedACLResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *SetExtendedACLResponse_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 *SetExtendedACLResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *SetExtendedACLResponse_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", "SetExtendedACLResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *SetExtendedACLResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *SetExtendedACLResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *SetExtendedACLResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *SetExtendedACLResponse_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()
|
|
}
|
|
}
|
|
func (x *SetExtendedACLResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type SetExtendedACLResponse struct {
|
|
Body *SetExtendedACLResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*SetExtendedACLResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*SetExtendedACLResponse)(nil)
|
|
_ json.Marshaler = (*SetExtendedACLResponse)(nil)
|
|
_ json.Unmarshaler = (*SetExtendedACLResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *SetExtendedACLResponse) 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 *SetExtendedACLResponse) 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 *SetExtendedACLResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *SetExtendedACLResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *SetExtendedACLResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil && x.Body.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *SetExtendedACLResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "SetExtendedACLResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(SetExtendedACLResponse_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLResponse) GetBody() *SetExtendedACLResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLResponse) SetBody(v *SetExtendedACLResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *SetExtendedACLResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
|
|
if x != nil {
|
|
return x.MetaHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
|
|
x.MetaHeader = v
|
|
}
|
|
func (x *SetExtendedACLResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
|
|
if x != nil {
|
|
return x.VerifyHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *SetExtendedACLResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
|
|
x.VerifyHeader = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *SetExtendedACLResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *SetExtendedACLResponse) 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 = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"verifyHeader\":"
|
|
out.RawString(prefix)
|
|
x.VerifyHeader.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *SetExtendedACLResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *SetExtendedACLResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.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 *SetExtendedACLResponse_Body
|
|
f = new(SetExtendedACLResponse_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()
|
|
}
|
|
}
|
|
func (x *SetExtendedACLResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetExtendedACLRequest_Body struct {
|
|
ContainerId *grpc.ContainerID `json:"containerId"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
_ json.Marshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetExtendedACLRequest_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 *GetExtendedACLRequest_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 *GetExtendedACLRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.ContainerId != nil && x.ContainerId.StableSize() != 0 {
|
|
x.ContainerId.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetExtendedACLRequest_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", "GetExtendedACLRequest_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLRequest_Body) GetContainerId() *grpc.ContainerID {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLRequest_Body) SetContainerId(v *grpc.ContainerID) {
|
|
x.ContainerId = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetExtendedACLRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetExtendedACLRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix[1:])
|
|
x.ContainerId.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetExtendedACLRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetExtendedACLRequest_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()
|
|
}
|
|
}
|
|
func (x *GetExtendedACLRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetExtendedACLRequest struct {
|
|
Body *GetExtendedACLRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetExtendedACLRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetExtendedACLRequest)(nil)
|
|
_ json.Marshaler = (*GetExtendedACLRequest)(nil)
|
|
_ json.Unmarshaler = (*GetExtendedACLRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetExtendedACLRequest) 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 *GetExtendedACLRequest) 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 *GetExtendedACLRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetExtendedACLRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetExtendedACLRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil && x.Body.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetExtendedACLRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetExtendedACLRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetExtendedACLRequest_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLRequest) GetBody() *GetExtendedACLRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLRequest) SetBody(v *GetExtendedACLRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetExtendedACLRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
|
|
if x != nil {
|
|
return x.MetaHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
|
|
x.MetaHeader = v
|
|
}
|
|
func (x *GetExtendedACLRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
|
|
if x != nil {
|
|
return x.VerifyHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
|
|
x.VerifyHeader = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetExtendedACLRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetExtendedACLRequest) 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 = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"verifyHeader\":"
|
|
out.RawString(prefix)
|
|
x.VerifyHeader.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetExtendedACLRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetExtendedACLRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.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 *GetExtendedACLRequest_Body
|
|
f = new(GetExtendedACLRequest_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()
|
|
}
|
|
}
|
|
func (x *GetExtendedACLRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetExtendedACLResponse_Body struct {
|
|
Eacl *grpc2.EACLTable `json:"eacl"`
|
|
Signature *grpc.SignatureRFC6979 `json:"signature"`
|
|
SessionToken *grpc1.SessionToken `json:"sessionToken"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
_ json.Marshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetExtendedACLResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.Eacl)
|
|
size += proto.NestedStructureSize(2, x.Signature)
|
|
size += proto.NestedStructureSize(3, x.SessionToken)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetExtendedACLResponse_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 *GetExtendedACLResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Eacl != nil && x.Eacl.StableSize() != 0 {
|
|
x.Eacl.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.Signature != nil && x.Signature.StableSize() != 0 {
|
|
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.SessionToken != nil && x.SessionToken.StableSize() != 0 {
|
|
x.SessionToken.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetExtendedACLResponse_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", "GetExtendedACLResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Eacl
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Eacl")
|
|
}
|
|
x.Eacl = new(grpc2.EACLTable)
|
|
if err := x.Eacl.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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) GetEacl() *grpc2.EACLTable {
|
|
if x != nil {
|
|
return x.Eacl
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) SetEacl(v *grpc2.EACLTable) {
|
|
x.Eacl = v
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) GetSignature() *grpc.SignatureRFC6979 {
|
|
if x != nil {
|
|
return x.Signature
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) SetSignature(v *grpc.SignatureRFC6979) {
|
|
x.Signature = v
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) GetSessionToken() *grpc1.SessionToken {
|
|
if x != nil {
|
|
return x.SessionToken
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) SetSessionToken(v *grpc1.SessionToken) {
|
|
x.SessionToken = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetExtendedACLResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"eacl\":"
|
|
out.RawString(prefix[1:])
|
|
x.Eacl.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"signature\":"
|
|
out.RawString(prefix)
|
|
x.Signature.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"sessionToken\":"
|
|
out.RawString(prefix)
|
|
x.SessionToken.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetExtendedACLResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetExtendedACLResponse_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 "eacl":
|
|
{
|
|
var f *grpc2.EACLTable
|
|
f = new(grpc2.EACLTable)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.Eacl = 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()
|
|
}
|
|
}
|
|
func (x *GetExtendedACLResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type GetExtendedACLResponse struct {
|
|
Body *GetExtendedACLResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*GetExtendedACLResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*GetExtendedACLResponse)(nil)
|
|
_ json.Marshaler = (*GetExtendedACLResponse)(nil)
|
|
_ json.Unmarshaler = (*GetExtendedACLResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *GetExtendedACLResponse) 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 *GetExtendedACLResponse) 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 *GetExtendedACLResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *GetExtendedACLResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *GetExtendedACLResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil && x.Body.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *GetExtendedACLResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "GetExtendedACLResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(GetExtendedACLResponse_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse) GetBody() *GetExtendedACLResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse) SetBody(v *GetExtendedACLResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *GetExtendedACLResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
|
|
if x != nil {
|
|
return x.MetaHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
|
|
x.MetaHeader = v
|
|
}
|
|
func (x *GetExtendedACLResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
|
|
if x != nil {
|
|
return x.VerifyHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *GetExtendedACLResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
|
|
x.VerifyHeader = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *GetExtendedACLResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *GetExtendedACLResponse) 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 = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"verifyHeader\":"
|
|
out.RawString(prefix)
|
|
x.VerifyHeader.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *GetExtendedACLResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *GetExtendedACLResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.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 *GetExtendedACLResponse_Body
|
|
f = new(GetExtendedACLResponse_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()
|
|
}
|
|
}
|
|
func (x *GetExtendedACLResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type AnnounceUsedSpaceRequest_Body_Announcement struct {
|
|
Epoch uint64 `json:"epoch"`
|
|
ContainerId *grpc.ContainerID `json:"containerId"`
|
|
UsedSpace uint64 `json:"usedSpace"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AnnounceUsedSpaceRequest_Body_Announcement)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AnnounceUsedSpaceRequest_Body_Announcement)(nil)
|
|
_ json.Marshaler = (*AnnounceUsedSpaceRequest_Body_Announcement)(nil)
|
|
_ json.Unmarshaler = (*AnnounceUsedSpaceRequest_Body_Announcement)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.UInt64Size(1, x.Epoch)
|
|
size += proto.NestedStructureSize(2, x.ContainerId)
|
|
size += proto.UInt64Size(3, x.UsedSpace)
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Epoch != 0 {
|
|
mm.AppendUint64(1, x.Epoch)
|
|
}
|
|
if x.ContainerId != nil && x.ContainerId.StableSize() != 0 {
|
|
x.ContainerId.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.UsedSpace != 0 {
|
|
mm.AppendUint64(3, x.UsedSpace)
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AnnounceUsedSpaceRequest_Body_Announcement")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Epoch
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Epoch")
|
|
}
|
|
x.Epoch = data
|
|
case 2: // 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 3: // UsedSpace
|
|
data, ok := fc.Uint64()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "UsedSpace")
|
|
}
|
|
x.UsedSpace = data
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) GetEpoch() uint64 {
|
|
if x != nil {
|
|
return x.Epoch
|
|
}
|
|
return 0
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) SetEpoch(v uint64) {
|
|
x.Epoch = v
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) GetContainerId() *grpc.ContainerID {
|
|
if x != nil {
|
|
return x.ContainerId
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) SetContainerId(v *grpc.ContainerID) {
|
|
x.ContainerId = v
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) GetUsedSpace() uint64 {
|
|
if x != nil {
|
|
return x.UsedSpace
|
|
}
|
|
return 0
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) SetUsedSpace(v uint64) {
|
|
x.UsedSpace = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"epoch\":"
|
|
out.RawString(prefix[1:])
|
|
out.Uint64(x.Epoch)
|
|
}
|
|
{
|
|
const prefix string = ",\"containerId\":"
|
|
out.RawString(prefix)
|
|
x.ContainerId.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"usedSpace\":"
|
|
out.RawString(prefix)
|
|
out.Uint64(x.UsedSpace)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "epoch":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.Epoch = f
|
|
}
|
|
case "containerId":
|
|
{
|
|
var f *grpc.ContainerID
|
|
f = new(grpc.ContainerID)
|
|
f.UnmarshalEasyJSON(in)
|
|
x.ContainerId = f
|
|
}
|
|
case "usedSpace":
|
|
{
|
|
var f uint64
|
|
f = in.Uint64()
|
|
x.UsedSpace = f
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body_Announcement) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type AnnounceUsedSpaceRequest_Body struct {
|
|
Announcements []*AnnounceUsedSpaceRequest_Body_Announcement `json:"announcements"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AnnounceUsedSpaceRequest_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AnnounceUsedSpaceRequest_Body)(nil)
|
|
_ json.Marshaler = (*AnnounceUsedSpaceRequest_Body)(nil)
|
|
_ json.Unmarshaler = (*AnnounceUsedSpaceRequest_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AnnounceUsedSpaceRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
for i := range x.Announcements {
|
|
size += proto.NestedStructureSize(1, x.Announcements[i])
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_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 *AnnounceUsedSpaceRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
for i := range x.Announcements {
|
|
if x.Announcements[i] != nil && x.Announcements[i].StableSize() != 0 {
|
|
x.Announcements[i].EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_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", "AnnounceUsedSpaceRequest_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Announcements
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Announcements")
|
|
}
|
|
x.Announcements = append(x.Announcements, new(AnnounceUsedSpaceRequest_Body_Announcement))
|
|
ff := x.Announcements[len(x.Announcements)-1]
|
|
if err := ff.UnmarshalProtobuf(data); err != nil {
|
|
return fmt.Errorf("unmarshal: %w", err)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body) GetAnnouncements() []*AnnounceUsedSpaceRequest_Body_Announcement {
|
|
if x != nil {
|
|
return x.Announcements
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body) SetAnnouncements(v []*AnnounceUsedSpaceRequest_Body_Announcement) {
|
|
x.Announcements = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
{
|
|
const prefix string = ",\"announcements\":"
|
|
out.RawString(prefix[1:])
|
|
out.RawByte('[')
|
|
for i := range x.Announcements {
|
|
if i != 0 {
|
|
out.RawByte(',')
|
|
}
|
|
x.Announcements[i].MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_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 "announcements":
|
|
{
|
|
var f *AnnounceUsedSpaceRequest_Body_Announcement
|
|
var list []*AnnounceUsedSpaceRequest_Body_Announcement
|
|
in.Delim('[')
|
|
for !in.IsDelim(']') {
|
|
f = new(AnnounceUsedSpaceRequest_Body_Announcement)
|
|
f.UnmarshalEasyJSON(in)
|
|
list = append(list, f)
|
|
in.WantComma()
|
|
}
|
|
x.Announcements = list
|
|
in.Delim(']')
|
|
}
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type AnnounceUsedSpaceRequest struct {
|
|
Body *AnnounceUsedSpaceRequest_Body `json:"body"`
|
|
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AnnounceUsedSpaceRequest)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AnnounceUsedSpaceRequest)(nil)
|
|
_ json.Marshaler = (*AnnounceUsedSpaceRequest)(nil)
|
|
_ json.Unmarshaler = (*AnnounceUsedSpaceRequest)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AnnounceUsedSpaceRequest) 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 *AnnounceUsedSpaceRequest) 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 *AnnounceUsedSpaceRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AnnounceUsedSpaceRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil && x.Body.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AnnounceUsedSpaceRequest")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(AnnounceUsedSpaceRequest_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) GetBody() *AnnounceUsedSpaceRequest_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) SetBody(v *AnnounceUsedSpaceRequest_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
|
|
if x != nil {
|
|
return x.MetaHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
|
|
x.MetaHeader = v
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
|
|
if x != nil {
|
|
return x.VerifyHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
|
|
x.VerifyHeader = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) 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 = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"verifyHeader\":"
|
|
out.RawString(prefix)
|
|
x.VerifyHeader.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AnnounceUsedSpaceRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.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 *AnnounceUsedSpaceRequest_Body
|
|
f = new(AnnounceUsedSpaceRequest_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()
|
|
}
|
|
}
|
|
func (x *AnnounceUsedSpaceRequest) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type AnnounceUsedSpaceResponse_Body struct {
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AnnounceUsedSpaceResponse_Body)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AnnounceUsedSpaceResponse_Body)(nil)
|
|
_ json.Marshaler = (*AnnounceUsedSpaceResponse_Body)(nil)
|
|
_ json.Unmarshaler = (*AnnounceUsedSpaceResponse_Body)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AnnounceUsedSpaceResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
return size
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse_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 *AnnounceUsedSpaceResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse_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", "AnnounceUsedSpaceResponse_Body")
|
|
}
|
|
switch fc.FieldNum {
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse_Body) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
if x == nil {
|
|
out.RawString("null")
|
|
return
|
|
}
|
|
out.RawByte('{')
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse_Body) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse_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()
|
|
}
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse_Body) MessageData() []byte {
|
|
return x.messageData
|
|
}
|
|
|
|
type AnnounceUsedSpaceResponse struct {
|
|
Body *AnnounceUsedSpaceResponse_Body `json:"body"`
|
|
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
messageData []byte
|
|
}
|
|
|
|
var (
|
|
_ encoding.ProtoMarshaler = (*AnnounceUsedSpaceResponse)(nil)
|
|
_ encoding.ProtoUnmarshaler = (*AnnounceUsedSpaceResponse)(nil)
|
|
_ json.Marshaler = (*AnnounceUsedSpaceResponse)(nil)
|
|
_ json.Unmarshaler = (*AnnounceUsedSpaceResponse)(nil)
|
|
)
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *AnnounceUsedSpaceResponse) 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 *AnnounceUsedSpaceResponse) 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 *AnnounceUsedSpaceResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
return x.GetBody().MarshalProtobuf(buf), nil
|
|
}
|
|
|
|
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse) MarshalProtobuf(dst []byte) []byte {
|
|
m := pool.MarshalerPool.Get()
|
|
defer pool.MarshalerPool.Put(m)
|
|
x.EmitProtobuf(m.MessageMarshaler())
|
|
dst = m.Marshal(dst)
|
|
return dst
|
|
}
|
|
|
|
func (x *AnnounceUsedSpaceResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
if x == nil {
|
|
return
|
|
}
|
|
if x.Body != nil && x.Body.StableSize() != 0 {
|
|
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
}
|
|
if x.MetaHeader != nil && x.MetaHeader.StableSize() != 0 {
|
|
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
}
|
|
if x.VerifyHeader != nil && x.VerifyHeader.StableSize() != 0 {
|
|
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
}
|
|
}
|
|
|
|
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
var fc easyproto.FieldContext
|
|
for len(src) > 0 {
|
|
src, err = fc.NextField(src)
|
|
if err != nil {
|
|
return fmt.Errorf("cannot read next field in %s", "AnnounceUsedSpaceResponse")
|
|
}
|
|
switch fc.FieldNum {
|
|
case 1: // Body
|
|
data, ok := fc.MessageData()
|
|
if !ok {
|
|
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
}
|
|
x.Body = new(AnnounceUsedSpaceResponse_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)
|
|
}
|
|
}
|
|
}
|
|
x.messageData = src
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) GetBody() *AnnounceUsedSpaceResponse_Body {
|
|
if x != nil {
|
|
return x.Body
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) SetBody(v *AnnounceUsedSpaceResponse_Body) {
|
|
x.Body = v
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
|
|
if x != nil {
|
|
return x.MetaHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
|
|
x.MetaHeader = v
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
|
|
if x != nil {
|
|
return x.VerifyHeader
|
|
}
|
|
return nil
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
|
|
x.VerifyHeader = v
|
|
}
|
|
|
|
// MarshalJSON implements the json.Marshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
x.MarshalEasyJSON(&w)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) 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 = ",\"metaHeader\":"
|
|
out.RawString(prefix)
|
|
x.MetaHeader.MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"verifyHeader\":"
|
|
out.RawString(prefix)
|
|
x.VerifyHeader.MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
func (x *AnnounceUsedSpaceResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
x.UnmarshalEasyJSON(&r)
|
|
return r.Error()
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.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 *AnnounceUsedSpaceResponse_Body
|
|
f = new(AnnounceUsedSpaceResponse_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()
|
|
}
|
|
}
|
|
func (x *AnnounceUsedSpaceResponse) MessageData() []byte {
|
|
return x.messageData
|
|
}
|