From fabdd78d634f0e1eaaa5576085b63810e2fedea1 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 12 Aug 2020 12:57:28 +0300 Subject: [PATCH] Add pre-release jindo branch --- accounting/v2/service.pb.go | 1494 +++++ accounting/v2/service.proto | 75 + acl/v2/types.pb.go | 1478 +++++ acl/v2/types.proto | 106 + container/v2/service.pb.go | 6794 ++++++++++++++++++++++ container/v2/service.proto | 285 + container/v2/types.pb.go | 808 +++ container/v2/types.proto | 40 + netmap/v2/types.pb.go | 2448 ++++++++ netmap/v2/types.proto | 92 + object/v2/service.pb.go | 10393 ++++++++++++++++++++++++++++++++++ object/v2/service.proto | 407 ++ object/v2/types.pb.go | 1986 +++++++ object/v2/types.proto | 85 + refs/v2/types.pb.go | 970 ++++ refs/v2/types.proto | 32 + service/v2/meta.pb.go | 3168 +++++++++++ service/v2/meta.proto | 129 + service/v2/verify.pb.go | 1156 ++++ service/v2/verify.proto | 43 + session/v2/service.pb.go | 1385 +++++ session/v2/service.proto | 60 + storagegroup/v2/types.pb.go | 483 ++ storagegroup/v2/types.proto | 30 + 24 files changed, 33947 insertions(+) create mode 100644 accounting/v2/service.pb.go create mode 100644 accounting/v2/service.proto create mode 100644 acl/v2/types.pb.go create mode 100644 acl/v2/types.proto create mode 100644 container/v2/service.pb.go create mode 100644 container/v2/service.proto create mode 100644 container/v2/types.pb.go create mode 100644 container/v2/types.proto create mode 100644 netmap/v2/types.pb.go create mode 100644 netmap/v2/types.proto create mode 100644 object/v2/service.pb.go create mode 100644 object/v2/service.proto create mode 100644 object/v2/types.pb.go create mode 100644 object/v2/types.proto create mode 100644 refs/v2/types.pb.go create mode 100644 refs/v2/types.proto create mode 100644 service/v2/meta.pb.go create mode 100644 service/v2/meta.proto create mode 100644 service/v2/verify.pb.go create mode 100644 service/v2/verify.proto create mode 100644 session/v2/service.pb.go create mode 100644 session/v2/service.proto create mode 100644 storagegroup/v2/types.pb.go create mode 100644 storagegroup/v2/types.proto diff --git a/accounting/v2/service.pb.go b/accounting/v2/service.pb.go new file mode 100644 index 0000000..7d8eba9 --- /dev/null +++ b/accounting/v2/service.pb.go @@ -0,0 +1,1494 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: accounting/v2/service.proto + +package v2 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v21 "github.com/nspcc-dev/neofs-api-go/refs/v2" + v2 "github.com/nspcc-dev/neofs-api-go/service/v2" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Message defines the request body of Balance method. +// +// To indicate the account for which the balance is requested, it's identifier +// is used. +// +// To gain access to the requested information, the request body must be formed +// according to the requirements from the system specification. +type BalanceRequest struct { + // Body of the balance request message. + Body *BalanceRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BalanceRequest) Reset() { *m = BalanceRequest{} } +func (m *BalanceRequest) String() string { return proto.CompactTextString(m) } +func (*BalanceRequest) ProtoMessage() {} +func (*BalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_bac189e9286e823b, []int{0} +} +func (m *BalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalanceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceRequest.Merge(m, src) +} +func (m *BalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *BalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceRequest proto.InternalMessageInfo + +func (m *BalanceRequest) GetBody() *BalanceRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *BalanceRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *BalanceRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type BalanceRequest_Body struct { + // Carries user identifier in NeoFS system for which the balance + // is requested. + OwnerId *v21.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BalanceRequest_Body) Reset() { *m = BalanceRequest_Body{} } +func (m *BalanceRequest_Body) String() string { return proto.CompactTextString(m) } +func (*BalanceRequest_Body) ProtoMessage() {} +func (*BalanceRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_bac189e9286e823b, []int{0, 0} +} +func (m *BalanceRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalanceRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalanceRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BalanceRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceRequest_Body.Merge(m, src) +} +func (m *BalanceRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *BalanceRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceRequest_Body proto.InternalMessageInfo + +func (m *BalanceRequest_Body) GetOwnerId() *v21.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +// Decimal represents the decimal numbers. +type Decimal struct { + // value carries number value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + // precision carries value precision. + Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Decimal) Reset() { *m = Decimal{} } +func (m *Decimal) String() string { return proto.CompactTextString(m) } +func (*Decimal) ProtoMessage() {} +func (*Decimal) Descriptor() ([]byte, []int) { + return fileDescriptor_bac189e9286e823b, []int{1} +} +func (m *Decimal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Decimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Decimal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Decimal) XXX_Merge(src proto.Message) { + xxx_messageInfo_Decimal.Merge(m, src) +} +func (m *Decimal) XXX_Size() int { + return m.Size() +} +func (m *Decimal) XXX_DiscardUnknown() { + xxx_messageInfo_Decimal.DiscardUnknown(m) +} + +var xxx_messageInfo_Decimal proto.InternalMessageInfo + +func (m *Decimal) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *Decimal) GetPrecision() uint32 { + if m != nil { + return m.Precision + } + return 0 +} + +// Message defines the response body of Balance method. +// +// The amount of funds is calculated in decimal numbers. +type BalanceResponse struct { + // Body of the balance response message. + Body *BalanceResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BalanceResponse) Reset() { *m = BalanceResponse{} } +func (m *BalanceResponse) String() string { return proto.CompactTextString(m) } +func (*BalanceResponse) ProtoMessage() {} +func (*BalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bac189e9286e823b, []int{2} +} +func (m *BalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceResponse.Merge(m, src) +} +func (m *BalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *BalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceResponse proto.InternalMessageInfo + +func (m *BalanceResponse) GetBody() *BalanceResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *BalanceResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *BalanceResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type BalanceResponse_Body struct { + // Carries the amount of funds on the account. + Balance *Decimal `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BalanceResponse_Body) Reset() { *m = BalanceResponse_Body{} } +func (m *BalanceResponse_Body) String() string { return proto.CompactTextString(m) } +func (*BalanceResponse_Body) ProtoMessage() {} +func (*BalanceResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_bac189e9286e823b, []int{2, 0} +} +func (m *BalanceResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalanceResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalanceResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BalanceResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceResponse_Body.Merge(m, src) +} +func (m *BalanceResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *BalanceResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceResponse_Body proto.InternalMessageInfo + +func (m *BalanceResponse_Body) GetBalance() *Decimal { + if m != nil { + return m.Balance + } + return nil +} + +func init() { + proto.RegisterType((*BalanceRequest)(nil), "accounting.v2.BalanceRequest") + proto.RegisterType((*BalanceRequest_Body)(nil), "accounting.v2.BalanceRequest.Body") + proto.RegisterType((*Decimal)(nil), "accounting.v2.Decimal") + proto.RegisterType((*BalanceResponse)(nil), "accounting.v2.BalanceResponse") + proto.RegisterType((*BalanceResponse_Body)(nil), "accounting.v2.BalanceResponse.Body") +} + +func init() { proto.RegisterFile("accounting/v2/service.proto", fileDescriptor_bac189e9286e823b) } + +var fileDescriptor_bac189e9286e823b = []byte{ + // 457 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x6a, 0x13, 0x41, + 0x14, 0xc6, 0xdd, 0xb4, 0x1a, 0x3d, 0x35, 0x2a, 0x63, 0xd5, 0x12, 0xed, 0x22, 0x11, 0x45, 0x90, + 0xcc, 0xca, 0x16, 0xd4, 0x1b, 0x95, 0x86, 0x22, 0x8d, 0xe2, 0x1f, 0x56, 0x28, 0xe2, 0x4d, 0x99, + 0xcc, 0x9e, 0xa4, 0x03, 0xc9, 0xcc, 0xba, 0xb3, 0x59, 0xc9, 0x23, 0x78, 0xeb, 0x95, 0xcf, 0xe0, + 0x93, 0x78, 0xe9, 0x23, 0x48, 0x7c, 0x11, 0x99, 0x3f, 0x49, 0xba, 0xb2, 0x6d, 0xef, 0x76, 0xce, + 0xf9, 0xce, 0x37, 0xe7, 0xfb, 0xb1, 0x03, 0xb7, 0x19, 0xe7, 0x6a, 0x2a, 0x0b, 0x21, 0x47, 0x51, + 0x19, 0x47, 0x1a, 0xf3, 0x52, 0x70, 0xa4, 0x59, 0xae, 0x0a, 0x45, 0x5a, 0xab, 0x26, 0x2d, 0xe3, + 0xf6, 0xf5, 0x1c, 0x87, 0xda, 0xa8, 0x8a, 0x59, 0x86, 0xda, 0x69, 0xda, 0x37, 0xfc, 0x88, 0xa9, + 0x4f, 0xb0, 0x60, 0xbe, 0x7c, 0xeb, 0x58, 0xb9, 0xc4, 0x5c, 0x0c, 0x67, 0xae, 0xd1, 0xf9, 0xd6, + 0x80, 0x2b, 0x3d, 0x36, 0x66, 0x92, 0x63, 0x82, 0x5f, 0xa6, 0xa8, 0x0b, 0xf2, 0x04, 0xd6, 0x07, + 0x2a, 0x9d, 0x6d, 0x05, 0x77, 0x83, 0x87, 0x1b, 0x71, 0x87, 0x56, 0x6e, 0xa5, 0x55, 0x31, 0xed, + 0xa9, 0x74, 0x96, 0x58, 0x3d, 0x79, 0x01, 0x1b, 0xe6, 0xc6, 0xc3, 0x23, 0x64, 0x29, 0xe6, 0x5b, + 0x0d, 0x3b, 0xbe, 0x4d, 0x17, 0x19, 0xca, 0x98, 0xfa, 0xa1, 0xb7, 0x58, 0xb0, 0x7d, 0x2b, 0x4a, + 0x60, 0xb2, 0xfc, 0x26, 0xaf, 0xa1, 0xe5, 0x56, 0x5b, 0x38, 0xac, 0x59, 0x87, 0xfb, 0x35, 0x0e, + 0x07, 0x46, 0x27, 0x38, 0x2b, 0x84, 0x92, 0xde, 0xe9, 0xb2, 0x9b, 0x75, 0xa7, 0xf6, 0x0e, 0xac, + 0x9b, 0xcd, 0xc8, 0x23, 0xb8, 0xa8, 0xbe, 0x4a, 0xcc, 0x0f, 0x45, 0xea, 0xf3, 0x5c, 0xa3, 0x06, + 0x9b, 0xf1, 0x7a, 0x6f, 0x1a, 0xfd, 0xbd, 0xa4, 0x69, 0x15, 0xfd, 0xb4, 0xf3, 0x1c, 0x9a, 0x7b, + 0xc8, 0xc5, 0x84, 0x8d, 0xc9, 0x26, 0x9c, 0x2f, 0xd9, 0x78, 0x8a, 0x76, 0x68, 0x2d, 0x71, 0x07, + 0x72, 0x07, 0x2e, 0x65, 0x39, 0x72, 0xa1, 0x85, 0x92, 0x36, 0x5f, 0x2b, 0x59, 0x15, 0x3a, 0xdf, + 0x1b, 0x70, 0x75, 0x49, 0x47, 0x67, 0x4a, 0x6a, 0x24, 0x4f, 0x2b, 0x2c, 0xef, 0x9d, 0xc4, 0xd2, + 0xa9, 0x8f, 0xc3, 0x7c, 0x59, 0x07, 0x33, 0xac, 0xa2, 0x70, 0x53, 0x27, 0xd0, 0x7c, 0x53, 0x4f, + 0xf3, 0x41, 0x9d, 0xc5, 0x99, 0x38, 0x9f, 0x79, 0x9c, 0x8f, 0xa1, 0x39, 0x70, 0x3b, 0xfb, 0x44, + 0x37, 0xff, 0x4b, 0xe4, 0xf9, 0x25, 0x0b, 0x59, 0x7c, 0x00, 0xb0, 0xbb, 0x54, 0x90, 0x7d, 0x68, + 0xfa, 0xcc, 0x64, 0xfb, 0xd4, 0xff, 0xaa, 0x1d, 0x9e, 0x8e, 0xaa, 0xf7, 0xe9, 0xd7, 0x3c, 0x0c, + 0x7e, 0xcf, 0xc3, 0xe0, 0xcf, 0x3c, 0x0c, 0x7e, 0xfc, 0x0d, 0xcf, 0x7d, 0x8e, 0x46, 0xa2, 0x38, + 0x9a, 0x0e, 0x28, 0x57, 0x93, 0x48, 0xea, 0x8c, 0xf3, 0x6e, 0x8a, 0x65, 0x24, 0x51, 0x0d, 0x75, + 0x97, 0x65, 0xa2, 0x3b, 0x52, 0x51, 0xe5, 0x71, 0xfd, 0x6c, 0x6c, 0xbe, 0x43, 0xf5, 0xea, 0x23, + 0xdd, 0xfd, 0xd0, 0xa7, 0xab, 0x1d, 0x07, 0x17, 0xec, 0xc3, 0xd8, 0xf9, 0x17, 0x00, 0x00, 0xff, + 0xff, 0x07, 0x70, 0x83, 0xd8, 0x8b, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// AccountingClient is the client API for Accounting service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AccountingClient interface { + // Returns the amount of funds for the requested NeoFS account. + Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) +} + +type accountingClient struct { + cc *grpc.ClientConn +} + +func NewAccountingClient(cc *grpc.ClientConn) AccountingClient { + return &accountingClient{cc} +} + +func (c *accountingClient) Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) { + out := new(BalanceResponse) + err := c.cc.Invoke(ctx, "/accounting.v2.Accounting/Balance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountingServer is the server API for Accounting service. +type AccountingServer interface { + // Returns the amount of funds for the requested NeoFS account. + Balance(context.Context, *BalanceRequest) (*BalanceResponse, error) +} + +// UnimplementedAccountingServer can be embedded to have forward compatible implementations. +type UnimplementedAccountingServer struct { +} + +func (*UnimplementedAccountingServer) Balance(ctx context.Context, req *BalanceRequest) (*BalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") +} + +func RegisterAccountingServer(s *grpc.Server, srv AccountingServer) { + s.RegisterService(&_Accounting_serviceDesc, srv) +} + +func _Accounting_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountingServer).Balance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/accounting.v2.Accounting/Balance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountingServer).Balance(ctx, req.(*BalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Accounting_serviceDesc = grpc.ServiceDesc{ + ServiceName: "accounting.v2.Accounting", + HandlerType: (*AccountingServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Balance", + Handler: _Accounting_Balance_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "accounting/v2/service.proto", +} + +func (m *BalanceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BalanceRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BalanceRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalanceRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Decimal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Decimal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Decimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Precision != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Precision)) + i-- + dAtA[i] = 0x10 + } + if m.Value != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BalanceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BalanceResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BalanceResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalanceResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Balance != nil { + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *BalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BalanceRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Decimal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovService(uint64(m.Value)) + } + if m.Precision != 0 { + n += 1 + sovService(uint64(m.Precision)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BalanceResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BalanceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &BalanceRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalanceRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v21.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Decimal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Decimal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Decimal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Precision", wireType) + } + m.Precision = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Precision |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalanceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &BalanceResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalanceResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Balance == nil { + m.Balance = &Decimal{} + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/accounting/v2/service.proto b/accounting/v2/service.proto new file mode 100644 index 0000000..6c12c6b --- /dev/null +++ b/accounting/v2/service.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; + +package accounting.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/accounting/v2"; +option csharp_namespace = "NeoFS.API.Accounting"; + +import "refs/v2/types.proto"; +import "service/v2/meta.proto"; +import "service/v2/verify.proto"; + +// The service provides methods for obtaining information +// about the account balance in NeoFS system. +service Accounting { + // Returns the amount of funds for the requested NeoFS account. + rpc Balance (BalanceRequest) returns (BalanceResponse); +} + +// Message defines the request body of Balance method. +// +// To indicate the account for which the balance is requested, it's identifier +// is used. +// +// To gain access to the requested information, the request body must be formed +// according to the requirements from the system specification. +message BalanceRequest { + message Body { + // Carries user identifier in NeoFS system for which the balance + // is requested. + refs.v2.OwnerID owner_id = 1; + } + + // Body of the balance request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +// Decimal represents the decimal numbers. +message Decimal { + // value carries number value. + int64 value = 1; + + // precision carries value precision. + uint32 precision = 2; +} + +// Message defines the response body of Balance method. +// +// The amount of funds is calculated in decimal numbers. +message BalanceResponse { + message Body { + // Carries the amount of funds on the account. + Decimal balance = 1; + } + + // Body of the balance response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} diff --git a/acl/v2/types.pb.go b/acl/v2/types.pb.go new file mode 100644 index 0000000..06711e2 --- /dev/null +++ b/acl/v2/types.pb.go @@ -0,0 +1,1478 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: acl/v2/types.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v2 "github.com/nspcc-dev/neofs-api-go/refs/v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Target of the access control rule in access control list. +type Target int32 + +const ( + // Unknown target, default value. + Target_UNKNOWN Target = 0 + // User target rule is applied if sender is the owner of the container.v2. + Target_USER Target = 1 + // System target rule is applied if sender is the storage node within the + // container or inner ring node. + Target_SYSTEM Target = 2 + // Others target rule is applied if sender is not user or system target. + Target_OTHERS Target = 3 +) + +var Target_name = map[int32]string{ + 0: "UNKNOWN", + 1: "USER", + 2: "SYSTEM", + 3: "OTHERS", +} + +var Target_value = map[string]int32{ + "UNKNOWN": 0, + "USER": 1, + "SYSTEM": 2, + "OTHERS": 3, +} + +func (x Target) String() string { + return proto.EnumName(Target_name, int32(x)) +} + +func (Target) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0} +} + +// Operation is an enumeration of operation types. +type EACLRecord_Operation int32 + +const ( + EACLRecord_OPERATION_UNKNOWN EACLRecord_Operation = 0 + EACLRecord_GET EACLRecord_Operation = 1 + EACLRecord_HEAD EACLRecord_Operation = 2 + EACLRecord_PUT EACLRecord_Operation = 3 + EACLRecord_DELETE EACLRecord_Operation = 4 + EACLRecord_SEARCH EACLRecord_Operation = 5 + EACLRecord_GETRANGE EACLRecord_Operation = 6 + EACLRecord_GETRANGEHASH EACLRecord_Operation = 7 +) + +var EACLRecord_Operation_name = map[int32]string{ + 0: "OPERATION_UNKNOWN", + 1: "GET", + 2: "HEAD", + 3: "PUT", + 4: "DELETE", + 5: "SEARCH", + 6: "GETRANGE", + 7: "GETRANGEHASH", +} + +var EACLRecord_Operation_value = map[string]int32{ + "OPERATION_UNKNOWN": 0, + "GET": 1, + "HEAD": 2, + "PUT": 3, + "DELETE": 4, + "SEARCH": 5, + "GETRANGE": 6, + "GETRANGEHASH": 7, +} + +func (x EACLRecord_Operation) String() string { + return proto.EnumName(EACLRecord_Operation_name, int32(x)) +} + +func (EACLRecord_Operation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0, 0} +} + +// Action is an enumeration of EACL actions. +type EACLRecord_Action int32 + +const ( + EACLRecord_ACTION_UNKNOWN EACLRecord_Action = 0 + EACLRecord_ALLOW EACLRecord_Action = 1 + EACLRecord_DENY EACLRecord_Action = 2 +) + +var EACLRecord_Action_name = map[int32]string{ + 0: "ACTION_UNKNOWN", + 1: "ALLOW", + 2: "DENY", +} + +var EACLRecord_Action_value = map[string]int32{ + "ACTION_UNKNOWN": 0, + "ALLOW": 1, + "DENY": 2, +} + +func (x EACLRecord_Action) String() string { + return proto.EnumName(EACLRecord_Action_name, int32(x)) +} + +func (EACLRecord_Action) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0, 1} +} + +// Header is an enumeration of filtering header types. +type EACLRecord_FilterInfo_Header int32 + +const ( + EACLRecord_FilterInfo_HEADER_UNKNOWN EACLRecord_FilterInfo_Header = 0 + EACLRecord_FilterInfo_REQUEST EACLRecord_FilterInfo_Header = 1 + EACLRecord_FilterInfo_OBJECT EACLRecord_FilterInfo_Header = 2 +) + +var EACLRecord_FilterInfo_Header_name = map[int32]string{ + 0: "HEADER_UNKNOWN", + 1: "REQUEST", + 2: "OBJECT", +} + +var EACLRecord_FilterInfo_Header_value = map[string]int32{ + "HEADER_UNKNOWN": 0, + "REQUEST": 1, + "OBJECT": 2, +} + +func (x EACLRecord_FilterInfo_Header) String() string { + return proto.EnumName(EACLRecord_FilterInfo_Header_name, int32(x)) +} + +func (EACLRecord_FilterInfo_Header) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0, 0, 0} +} + +// MatchType is an enumeration of match types. +type EACLRecord_FilterInfo_MatchType int32 + +const ( + EACLRecord_FilterInfo_MATCH_UNKNOWN EACLRecord_FilterInfo_MatchType = 0 + EACLRecord_FilterInfo_STRING_EQUAL EACLRecord_FilterInfo_MatchType = 1 + EACLRecord_FilterInfo_STRING_NOT_EQUAL EACLRecord_FilterInfo_MatchType = 2 +) + +var EACLRecord_FilterInfo_MatchType_name = map[int32]string{ + 0: "MATCH_UNKNOWN", + 1: "STRING_EQUAL", + 2: "STRING_NOT_EQUAL", +} + +var EACLRecord_FilterInfo_MatchType_value = map[string]int32{ + "MATCH_UNKNOWN": 0, + "STRING_EQUAL": 1, + "STRING_NOT_EQUAL": 2, +} + +func (x EACLRecord_FilterInfo_MatchType) String() string { + return proto.EnumName(EACLRecord_FilterInfo_MatchType_name, int32(x)) +} + +func (EACLRecord_FilterInfo_MatchType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0, 0, 1} +} + +// EACLRecord groups information about extended ACL rule. +type EACLRecord struct { + // Operation carries type of operation. + Operation EACLRecord_Operation `protobuf:"varint,1,opt,name=operation,json=Operation,proto3,enum=acl.v2.EACLRecord_Operation" json:"operation,omitempty"` + // Action carries ACL target action. + Action EACLRecord_Action `protobuf:"varint,2,opt,name=action,json=Action,proto3,enum=acl.v2.EACLRecord_Action" json:"action,omitempty"` + // filters carries set of filters. + Filters []*EACLRecord_FilterInfo `protobuf:"bytes,3,rep,name=filters,json=Filters,proto3" json:"filters,omitempty"` + // targets carries information about extended ACL target list. + Targets []*EACLRecord_TargetInfo `protobuf:"bytes,4,rep,name=targets,json=Targets,proto3" json:"targets,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EACLRecord) Reset() { *m = EACLRecord{} } +func (m *EACLRecord) String() string { return proto.CompactTextString(m) } +func (*EACLRecord) ProtoMessage() {} +func (*EACLRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0} +} +func (m *EACLRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EACLRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EACLRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EACLRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_EACLRecord.Merge(m, src) +} +func (m *EACLRecord) XXX_Size() int { + return m.Size() +} +func (m *EACLRecord) XXX_DiscardUnknown() { + xxx_messageInfo_EACLRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_EACLRecord proto.InternalMessageInfo + +func (m *EACLRecord) GetOperation() EACLRecord_Operation { + if m != nil { + return m.Operation + } + return EACLRecord_OPERATION_UNKNOWN +} + +func (m *EACLRecord) GetAction() EACLRecord_Action { + if m != nil { + return m.Action + } + return EACLRecord_ACTION_UNKNOWN +} + +func (m *EACLRecord) GetFilters() []*EACLRecord_FilterInfo { + if m != nil { + return m.Filters + } + return nil +} + +func (m *EACLRecord) GetTargets() []*EACLRecord_TargetInfo { + if m != nil { + return m.Targets + } + return nil +} + +// FilterInfo groups information about filter. +type EACLRecord_FilterInfo struct { + // Header carries type of header. + Header EACLRecord_FilterInfo_Header `protobuf:"varint,1,opt,name=header,json=HeaderType,proto3,enum=acl.v2.EACLRecord_FilterInfo_Header" json:"header,omitempty"` + // MatchType carries type of match. + MatchType EACLRecord_FilterInfo_MatchType `protobuf:"varint,2,opt,name=match_type,json=MatchType,proto3,enum=acl.v2.EACLRecord_FilterInfo_MatchType" json:"match_type,omitempty"` + // header_name carries name of filtering header. + HeaderName string `protobuf:"bytes,3,opt,name=header_name,json=Name,proto3" json:"header_name,omitempty"` + // header_val carries value of filtering header. + HeaderVal string `protobuf:"bytes,4,opt,name=header_val,json=Value,proto3" json:"header_val,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EACLRecord_FilterInfo) Reset() { *m = EACLRecord_FilterInfo{} } +func (m *EACLRecord_FilterInfo) String() string { return proto.CompactTextString(m) } +func (*EACLRecord_FilterInfo) ProtoMessage() {} +func (*EACLRecord_FilterInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0, 0} +} +func (m *EACLRecord_FilterInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EACLRecord_FilterInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EACLRecord_FilterInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EACLRecord_FilterInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_EACLRecord_FilterInfo.Merge(m, src) +} +func (m *EACLRecord_FilterInfo) XXX_Size() int { + return m.Size() +} +func (m *EACLRecord_FilterInfo) XXX_DiscardUnknown() { + xxx_messageInfo_EACLRecord_FilterInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_EACLRecord_FilterInfo proto.InternalMessageInfo + +func (m *EACLRecord_FilterInfo) GetHeader() EACLRecord_FilterInfo_Header { + if m != nil { + return m.Header + } + return EACLRecord_FilterInfo_HEADER_UNKNOWN +} + +func (m *EACLRecord_FilterInfo) GetMatchType() EACLRecord_FilterInfo_MatchType { + if m != nil { + return m.MatchType + } + return EACLRecord_FilterInfo_MATCH_UNKNOWN +} + +func (m *EACLRecord_FilterInfo) GetHeaderName() string { + if m != nil { + return m.HeaderName + } + return "" +} + +func (m *EACLRecord_FilterInfo) GetHeaderVal() string { + if m != nil { + return m.HeaderVal + } + return "" +} + +// TargetInfo groups information about extended ACL target. +type EACLRecord_TargetInfo struct { + // target carries target of ACL rule. + Target Target `protobuf:"varint,1,opt,name=target,json=Role,proto3,enum=acl.v2.Target" json:"target,omitempty"` + // key_list carries public keys of ACL target. + KeyList [][]byte `protobuf:"bytes,2,rep,name=key_list,json=Keys,proto3" json:"key_list,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EACLRecord_TargetInfo) Reset() { *m = EACLRecord_TargetInfo{} } +func (m *EACLRecord_TargetInfo) String() string { return proto.CompactTextString(m) } +func (*EACLRecord_TargetInfo) ProtoMessage() {} +func (*EACLRecord_TargetInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{0, 1} +} +func (m *EACLRecord_TargetInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EACLRecord_TargetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EACLRecord_TargetInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EACLRecord_TargetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_EACLRecord_TargetInfo.Merge(m, src) +} +func (m *EACLRecord_TargetInfo) XXX_Size() int { + return m.Size() +} +func (m *EACLRecord_TargetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_EACLRecord_TargetInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_EACLRecord_TargetInfo proto.InternalMessageInfo + +func (m *EACLRecord_TargetInfo) GetTarget() Target { + if m != nil { + return m.Target + } + return Target_UNKNOWN +} + +func (m *EACLRecord_TargetInfo) GetKeyList() [][]byte { + if m != nil { + return m.KeyList + } + return nil +} + +// EACLRecord carries the information about extended ACL rules. +type EACLTable struct { + // Carries identifier of the container that should use given + // access control rules. + ContainerId *v2.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=ContainerID,proto3" json:"container_id,omitempty"` + // Records carries list of extended ACL rule records. + Records []*EACLRecord `protobuf:"bytes,2,rep,name=records,json=Records,proto3" json:"records,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EACLTable) Reset() { *m = EACLTable{} } +func (m *EACLTable) String() string { return proto.CompactTextString(m) } +func (*EACLTable) ProtoMessage() {} +func (*EACLTable) Descriptor() ([]byte, []int) { + return fileDescriptor_ab60484daff20d3c, []int{1} +} +func (m *EACLTable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EACLTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EACLTable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EACLTable) XXX_Merge(src proto.Message) { + xxx_messageInfo_EACLTable.Merge(m, src) +} +func (m *EACLTable) XXX_Size() int { + return m.Size() +} +func (m *EACLTable) XXX_DiscardUnknown() { + xxx_messageInfo_EACLTable.DiscardUnknown(m) +} + +var xxx_messageInfo_EACLTable proto.InternalMessageInfo + +func (m *EACLTable) GetContainerId() *v2.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +func (m *EACLTable) GetRecords() []*EACLRecord { + if m != nil { + return m.Records + } + return nil +} + +func init() { + proto.RegisterEnum("acl.v2.Target", Target_name, Target_value) + proto.RegisterEnum("acl.v2.EACLRecord_Operation", EACLRecord_Operation_name, EACLRecord_Operation_value) + proto.RegisterEnum("acl.v2.EACLRecord_Action", EACLRecord_Action_name, EACLRecord_Action_value) + proto.RegisterEnum("acl.v2.EACLRecord_FilterInfo_Header", EACLRecord_FilterInfo_Header_name, EACLRecord_FilterInfo_Header_value) + proto.RegisterEnum("acl.v2.EACLRecord_FilterInfo_MatchType", EACLRecord_FilterInfo_MatchType_name, EACLRecord_FilterInfo_MatchType_value) + proto.RegisterType((*EACLRecord)(nil), "acl.v2.EACLRecord") + proto.RegisterType((*EACLRecord_FilterInfo)(nil), "acl.v2.EACLRecord.FilterInfo") + proto.RegisterType((*EACLRecord_TargetInfo)(nil), "acl.v2.EACLRecord.TargetInfo") + proto.RegisterType((*EACLTable)(nil), "acl.v2.EACLTable") +} + +func init() { proto.RegisterFile("acl/v2/types.proto", fileDescriptor_ab60484daff20d3c) } + +var fileDescriptor_ab60484daff20d3c = []byte{ + // 674 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xdd, 0x6e, 0xda, 0x4a, + 0x10, 0x8e, 0x8d, 0x63, 0x60, 0x20, 0x68, 0xb3, 0x27, 0xe7, 0x88, 0x44, 0xa7, 0x08, 0xa1, 0x48, + 0x45, 0x55, 0x63, 0x14, 0xaa, 0x2a, 0x52, 0xaf, 0xea, 0xc0, 0xf2, 0x93, 0x10, 0x93, 0xac, 0x4d, + 0xa3, 0xf4, 0x06, 0x6d, 0xcc, 0x92, 0xa0, 0x1a, 0x8c, 0x6c, 0x07, 0x89, 0x37, 0xe9, 0x33, 0xf4, + 0xb2, 0x4f, 0x51, 0xa9, 0x37, 0x7d, 0x84, 0x2a, 0x7d, 0x91, 0x6a, 0xbd, 0x10, 0x50, 0x9a, 0xe6, + 0x6a, 0xc7, 0x33, 0xdf, 0xb7, 0x33, 0xdf, 0xcc, 0x78, 0x01, 0x33, 0xd7, 0xab, 0xcc, 0xaa, 0x95, + 0x68, 0x3e, 0xe5, 0xa1, 0x31, 0x0d, 0xfc, 0xc8, 0xc7, 0x3a, 0x73, 0x3d, 0x63, 0x56, 0xdd, 0xfb, + 0x27, 0xe0, 0xc3, 0xf0, 0x51, 0xb0, 0xf4, 0x55, 0x07, 0x20, 0x66, 0xad, 0x43, 0xb9, 0xeb, 0x07, + 0x03, 0xfc, 0x0e, 0xd2, 0xfe, 0x94, 0x07, 0x2c, 0x1a, 0xf9, 0x93, 0xbc, 0x52, 0x54, 0xca, 0xb9, + 0xea, 0xff, 0x86, 0xe4, 0x1b, 0x2b, 0x98, 0xd1, 0x5d, 0x62, 0x68, 0xfa, 0xc1, 0xc4, 0x87, 0xa0, + 0x33, 0x37, 0x26, 0xaa, 0x31, 0x71, 0xf7, 0x09, 0xa2, 0x19, 0x03, 0xa8, 0x2e, 0x4f, 0x7c, 0x04, + 0xc9, 0xe1, 0xc8, 0x8b, 0x78, 0x10, 0xe6, 0x13, 0xc5, 0x44, 0x39, 0x53, 0x7d, 0xf1, 0x04, 0xa7, + 0x11, 0x23, 0xda, 0x93, 0xa1, 0x4f, 0x93, 0xd2, 0x0e, 0x05, 0x31, 0x62, 0xc1, 0x0d, 0x8f, 0xc2, + 0xbc, 0xf6, 0x57, 0xa2, 0x13, 0x23, 0x24, 0x51, 0xda, 0xe1, 0xde, 0x77, 0x15, 0x60, 0x75, 0x21, + 0x7e, 0x0f, 0xfa, 0x2d, 0x67, 0x03, 0x1e, 0x2c, 0xc4, 0xee, 0x3f, 0x9b, 0xdf, 0x68, 0xc5, 0x58, + 0x0a, 0xf2, 0x74, 0xe6, 0x53, 0x8e, 0x1b, 0x00, 0x63, 0x16, 0xb9, 0xb7, 0x7d, 0xd1, 0xd5, 0x85, + 0xf2, 0x97, 0xcf, 0xdf, 0x72, 0x26, 0xf0, 0x82, 0x4c, 0xd3, 0x0f, 0x26, 0xde, 0x85, 0x8c, 0xac, + 0xa4, 0x3f, 0x61, 0x63, 0x9e, 0x4f, 0x14, 0x95, 0x72, 0x9a, 0x6a, 0x16, 0x1b, 0x8b, 0x10, 0x2c, + 0x42, 0x33, 0xe6, 0xe5, 0xb5, 0x38, 0xb2, 0xf9, 0x81, 0x79, 0x77, 0xbc, 0xf4, 0x16, 0x74, 0x59, + 0x0b, 0xc6, 0x90, 0x6b, 0x11, 0xb3, 0x4e, 0x68, 0xbf, 0x67, 0x9d, 0x5a, 0xdd, 0x4b, 0x0b, 0x6d, + 0xe0, 0x0c, 0x24, 0x29, 0xb9, 0xe8, 0x11, 0xdb, 0x41, 0x0a, 0x06, 0xd0, 0xbb, 0xc7, 0x27, 0xa4, + 0xe6, 0x20, 0xb5, 0xd4, 0x80, 0xb5, 0xcc, 0xdb, 0xb0, 0x75, 0x66, 0x3a, 0xb5, 0xd6, 0x1a, 0x11, + 0x41, 0xd6, 0x76, 0x68, 0xdb, 0x6a, 0xf6, 0xc9, 0x45, 0xcf, 0xec, 0x20, 0x05, 0xef, 0x00, 0x5a, + 0x78, 0xac, 0xae, 0xb3, 0xf0, 0xaa, 0x7b, 0x27, 0x00, 0xab, 0x26, 0xe3, 0x7d, 0xd0, 0xe5, 0x50, + 0x16, 0xcd, 0xcc, 0x2d, 0xdb, 0x20, 0x31, 0x54, 0xa3, 0xbe, 0xc7, 0xf1, 0x7f, 0x90, 0xfa, 0xc4, + 0xe7, 0x7d, 0x6f, 0x14, 0x46, 0x79, 0xb5, 0x98, 0x28, 0x67, 0xa9, 0x76, 0xca, 0xe7, 0x61, 0x69, + 0x06, 0x6b, 0xbb, 0xf4, 0x2f, 0x6c, 0x77, 0xcf, 0x09, 0x35, 0x9d, 0x76, 0xd7, 0x5a, 0xab, 0x2b, + 0x09, 0x89, 0x26, 0x11, 0x62, 0x52, 0xa0, 0x09, 0xb5, 0x48, 0x15, 0xae, 0xf3, 0x9e, 0x83, 0x12, + 0x42, 0x5f, 0x9d, 0x74, 0x88, 0x43, 0x90, 0x26, 0x6c, 0x9b, 0x98, 0xb4, 0xd6, 0x42, 0x9b, 0x38, + 0x0b, 0xa9, 0x26, 0x71, 0xa8, 0x69, 0x35, 0x09, 0xd2, 0x85, 0xb2, 0xe5, 0x57, 0xcb, 0xb4, 0x5b, + 0x28, 0x59, 0x3a, 0x84, 0xe5, 0x36, 0x62, 0xc8, 0x99, 0xb5, 0x47, 0x19, 0xd3, 0xb0, 0x69, 0x76, + 0x3a, 0xdd, 0x4b, 0x99, 0xb3, 0x4e, 0xac, 0x2b, 0xa4, 0x96, 0x02, 0x48, 0x8b, 0xc9, 0x3a, 0xec, + 0xda, 0xe3, 0xf8, 0x08, 0xb2, 0xae, 0x3f, 0x89, 0xd8, 0x68, 0xc2, 0x83, 0xfe, 0x68, 0x10, 0x6b, + 0xcf, 0x54, 0x77, 0x0c, 0xf1, 0xb7, 0x09, 0xf1, 0xb5, 0x65, 0xb0, 0x5d, 0xa7, 0x99, 0xb5, 0x0f, + 0xfc, 0x1a, 0x92, 0x41, 0xbc, 0x1b, 0x61, 0xdc, 0x87, 0x4c, 0x15, 0xff, 0xb9, 0x36, 0x34, 0x29, + 0xcf, 0xf0, 0xd5, 0x11, 0xe8, 0xb2, 0x8d, 0x62, 0xaa, 0xab, 0xfa, 0x52, 0xa0, 0xf5, 0x6c, 0x42, + 0xe5, 0x7c, 0xed, 0x2b, 0xdb, 0x21, 0x67, 0x48, 0x8d, 0x67, 0xed, 0xb4, 0x08, 0xb5, 0x51, 0xe2, + 0xf8, 0xe4, 0xdb, 0x7d, 0x41, 0xf9, 0x71, 0x5f, 0x50, 0x7e, 0xde, 0x17, 0x94, 0xcf, 0xbf, 0x0a, + 0x1b, 0x1f, 0xcb, 0x37, 0xa3, 0xe8, 0xf6, 0xee, 0xda, 0x70, 0xfd, 0x71, 0x65, 0x12, 0x4e, 0x5d, + 0xf7, 0x60, 0xc0, 0x67, 0x95, 0x09, 0xf7, 0x87, 0xe1, 0x01, 0x9b, 0x8e, 0x0e, 0x6e, 0xfc, 0x8a, + 0x7c, 0x46, 0xbe, 0xa8, 0x5b, 0x16, 0xf7, 0x1b, 0xb6, 0x61, 0x9e, 0xb7, 0x0d, 0xd3, 0xf5, 0xae, + 0xf5, 0xf8, 0xd1, 0x78, 0xf3, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x1e, 0x3c, 0xb6, 0x67, 0x04, + 0x00, 0x00, +} + +func (m *EACLRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EACLRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EACLRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Targets) > 0 { + for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Targets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Action != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x10 + } + if m.Operation != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Operation)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EACLRecord_FilterInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EACLRecord_FilterInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EACLRecord_FilterInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.HeaderVal) > 0 { + i -= len(m.HeaderVal) + copy(dAtA[i:], m.HeaderVal) + i = encodeVarintTypes(dAtA, i, uint64(len(m.HeaderVal))) + i-- + dAtA[i] = 0x22 + } + if len(m.HeaderName) > 0 { + i -= len(m.HeaderName) + copy(dAtA[i:], m.HeaderName) + i = encodeVarintTypes(dAtA, i, uint64(len(m.HeaderName))) + i-- + dAtA[i] = 0x1a + } + if m.MatchType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.MatchType)) + i-- + dAtA[i] = 0x10 + } + if m.Header != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Header)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EACLRecord_TargetInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EACLRecord_TargetInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EACLRecord_TargetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.KeyList) > 0 { + for iNdEx := len(m.KeyList) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.KeyList[iNdEx]) + copy(dAtA[i:], m.KeyList[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyList[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Target != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Target)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EACLTable) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EACLTable) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EACLTable) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EACLRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Operation != 0 { + n += 1 + sovTypes(uint64(m.Operation)) + } + if m.Action != 0 { + n += 1 + sovTypes(uint64(m.Action)) + } + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Targets) > 0 { + for _, e := range m.Targets { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *EACLRecord_FilterInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != 0 { + n += 1 + sovTypes(uint64(m.Header)) + } + if m.MatchType != 0 { + n += 1 + sovTypes(uint64(m.MatchType)) + } + l = len(m.HeaderName) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.HeaderVal) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *EACLRecord_TargetInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Target != 0 { + n += 1 + sovTypes(uint64(m.Target)) + } + if len(m.KeyList) > 0 { + for _, b := range m.KeyList { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *EACLTable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EACLRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EACLRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EACLRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) + } + m.Operation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Operation |= EACLRecord_Operation(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + m.Action = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Action |= EACLRecord_Action(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, &EACLRecord_FilterInfo{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Targets = append(m.Targets, &EACLRecord_TargetInfo{}) + if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EACLRecord_FilterInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilterInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilterInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + m.Header = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Header |= EACLRecord_FilterInfo_Header(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchType", wireType) + } + m.MatchType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MatchType |= EACLRecord_FilterInfo_MatchType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HeaderName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HeaderName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HeaderVal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HeaderVal = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EACLRecord_TargetInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TargetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TargetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + m.Target = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Target |= Target(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyList", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyList = append(m.KeyList, make([]byte, postIndex-iNdEx)) + copy(m.KeyList[len(m.KeyList)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EACLTable) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EACLTable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EACLTable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v2.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &EACLRecord{}) + if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/acl/v2/types.proto b/acl/v2/types.proto new file mode 100644 index 0000000..58bbe25 --- /dev/null +++ b/acl/v2/types.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +package acl.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/acl/v2"; +option csharp_namespace = "NeoFS.API.Acl"; + +import "refs/v2/types.proto"; + +// Target of the access control rule in access control list. +enum Target { + // Unknown target, default value. + UNKNOWN = 0; + + // User target rule is applied if sender is the owner of the container.v2. + USER = 1; + + // System target rule is applied if sender is the storage node within the + // container or inner ring node. + SYSTEM = 2; + + // Others target rule is applied if sender is not user or system target. + OTHERS = 3; +} + +// EACLRecord groups information about extended ACL rule. +message EACLRecord { + // Operation is an enumeration of operation types. + enum Operation { + OPERATION_UNKNOWN = 0; + GET = 1; + HEAD = 2; + PUT = 3; + DELETE = 4; + SEARCH = 5; + GETRANGE = 6; + GETRANGEHASH = 7; + } + + // Operation carries type of operation. + Operation operation = 1 [json_name = "Operation"]; + + // Action is an enumeration of EACL actions. + enum Action { + ACTION_UNKNOWN = 0; + ALLOW = 1; + DENY = 2; + } + + // Action carries ACL target action. + Action action = 2 [json_name = "Action"]; + + // FilterInfo groups information about filter. + message FilterInfo { + // Header is an enumeration of filtering header types. + enum Header { + HEADER_UNKNOWN = 0; + REQUEST = 1; + OBJECT = 2; + } + + // Header carries type of header. + Header header = 1 [json_name = "HeaderType"]; + + // MatchType is an enumeration of match types. + enum MatchType { + MATCH_UNKNOWN = 0; + STRING_EQUAL = 1; + STRING_NOT_EQUAL = 2; + } + + // MatchType carries type of match. + MatchType match_type = 2 [json_name = "MatchType"]; + + // header_name carries name of filtering header. + string header_name = 3 [json_name="Name"]; + + // header_val carries value of filtering header. + string header_val = 4 [json_name="Value"]; + } + + // filters carries set of filters. + repeated FilterInfo filters = 3 [json_name="Filters"]; + + // TargetInfo groups information about extended ACL target. + message TargetInfo { + // target carries target of ACL rule. + acl.v2.Target target = 1 [json_name="Role"]; + + // key_list carries public keys of ACL target. + repeated bytes key_list = 2 [json_name="Keys"]; + } + + // targets carries information about extended ACL target list. + repeated TargetInfo targets = 4 [json_name="Targets"]; +} + +// EACLRecord carries the information about extended ACL rules. +message EACLTable { + // Carries identifier of the container that should use given + // access control rules. + refs.v2.ContainerID container_id = 1 [json_name="ContainerID"]; + + // Records carries list of extended ACL rule records. + repeated EACLRecord records = 2 [json_name="Records"]; +} diff --git a/container/v2/service.pb.go b/container/v2/service.pb.go new file mode 100644 index 0000000..29fd633 --- /dev/null +++ b/container/v2/service.pb.go @@ -0,0 +1,6794 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: container/v2/service.proto + +package v2 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v22 "github.com/nspcc-dev/neofs-api-go/acl/v2" + v21 "github.com/nspcc-dev/neofs-api-go/refs/v2" + v2 "github.com/nspcc-dev/neofs-api-go/service/v2" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type PutRequest struct { + // Body of container put request message. + Body *PutRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRequest) Reset() { *m = PutRequest{} } +func (m *PutRequest) String() string { return proto.CompactTextString(m) } +func (*PutRequest) ProtoMessage() {} +func (*PutRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{0} +} +func (m *PutRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest.Merge(m, src) +} +func (m *PutRequest) XXX_Size() int { + return m.Size() +} +func (m *PutRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest proto.InternalMessageInfo + +func (m *PutRequest) GetBody() *PutRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *PutRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *PutRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type PutRequest_Body struct { + // Container to create in NeoFS. + Container *Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"` + // Public Key of container owner. It can be public key of the owner + // or it can be public key that bound in neofs.id smart-contract. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Signature of stable-marshalled container according to RFC-6979. + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRequest_Body) Reset() { *m = PutRequest_Body{} } +func (m *PutRequest_Body) String() string { return proto.CompactTextString(m) } +func (*PutRequest_Body) ProtoMessage() {} +func (*PutRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{0, 0} +} +func (m *PutRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest_Body.Merge(m, src) +} +func (m *PutRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *PutRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest_Body proto.InternalMessageInfo + +func (m *PutRequest_Body) GetContainer() *Container { + if m != nil { + return m.Container + } + return nil +} + +func (m *PutRequest_Body) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *PutRequest_Body) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type PutResponse struct { + // Body of container put response message. + Body *PutResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutResponse) Reset() { *m = PutResponse{} } +func (m *PutResponse) String() string { return proto.CompactTextString(m) } +func (*PutResponse) ProtoMessage() {} +func (*PutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{1} +} +func (m *PutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutResponse.Merge(m, src) +} +func (m *PutResponse) XXX_Size() int { + return m.Size() +} +func (m *PutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PutResponse proto.InternalMessageInfo + +func (m *PutResponse) GetBody() *PutResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *PutResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *PutResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type PutResponse_Body struct { + // container_id carries identifier of the new container.v2. + ContainerId *v21.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutResponse_Body) Reset() { *m = PutResponse_Body{} } +func (m *PutResponse_Body) String() string { return proto.CompactTextString(m) } +func (*PutResponse_Body) ProtoMessage() {} +func (*PutResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{1, 0} +} +func (m *PutResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutResponse_Body.Merge(m, src) +} +func (m *PutResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *PutResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_PutResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_PutResponse_Body proto.InternalMessageInfo + +func (m *PutResponse_Body) GetContainerId() *v21.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +type DeleteRequest struct { + // Body of container delete request message. + Body *DeleteRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } +func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest) ProtoMessage() {} +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{2} +} +func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest.Merge(m, src) +} +func (m *DeleteRequest) XXX_Size() int { + return m.Size() +} +func (m *DeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo + +func (m *DeleteRequest) GetBody() *DeleteRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *DeleteRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *DeleteRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type DeleteRequest_Body struct { + // container_id carries identifier of the container to delete + // from NeoFS. + ContainerId *v21.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Signature of container id according to RFC-6979. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteRequest_Body) Reset() { *m = DeleteRequest_Body{} } +func (m *DeleteRequest_Body) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest_Body) ProtoMessage() {} +func (*DeleteRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{2, 0} +} +func (m *DeleteRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest_Body.Merge(m, src) +} +func (m *DeleteRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *DeleteRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest_Body proto.InternalMessageInfo + +func (m *DeleteRequest_Body) GetContainerId() *v21.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +func (m *DeleteRequest_Body) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +// DeleteResponse is empty because delete operation is asynchronous and done +// via consensus in inner ring nodes +type DeleteResponse struct { + // Body of container delete response message. + Body *DeleteResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } +func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse) ProtoMessage() {} +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{3} +} +func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse.Merge(m, src) +} +func (m *DeleteResponse) XXX_Size() int { + return m.Size() +} +func (m *DeleteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo + +func (m *DeleteResponse) GetBody() *DeleteResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *DeleteResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *DeleteResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type DeleteResponse_Body struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteResponse_Body) Reset() { *m = DeleteResponse_Body{} } +func (m *DeleteResponse_Body) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse_Body) ProtoMessage() {} +func (*DeleteResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{3, 0} +} +func (m *DeleteResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse_Body.Merge(m, src) +} +func (m *DeleteResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *DeleteResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteResponse_Body proto.InternalMessageInfo + +type GetRequest struct { + // Body of container get request message. + Body *GetRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRequest) Reset() { *m = GetRequest{} } +func (m *GetRequest) String() string { return proto.CompactTextString(m) } +func (*GetRequest) ProtoMessage() {} +func (*GetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{4} +} +func (m *GetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest.Merge(m, src) +} +func (m *GetRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest proto.InternalMessageInfo + +func (m *GetRequest) GetBody() *GetRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetRequest_Body struct { + // container_id carries identifier of the container to get. + ContainerId *v21.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRequest_Body) Reset() { *m = GetRequest_Body{} } +func (m *GetRequest_Body) String() string { return proto.CompactTextString(m) } +func (*GetRequest_Body) ProtoMessage() {} +func (*GetRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{4, 0} +} +func (m *GetRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest_Body.Merge(m, src) +} +func (m *GetRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *GetRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest_Body proto.InternalMessageInfo + +func (m *GetRequest_Body) GetContainerId() *v21.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +type GetResponse struct { + // Body of container get response message. + Body *GetResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse) Reset() { *m = GetResponse{} } +func (m *GetResponse) String() string { return proto.CompactTextString(m) } +func (*GetResponse) ProtoMessage() {} +func (*GetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{5} +} +func (m *GetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse.Merge(m, src) +} +func (m *GetResponse) XXX_Size() int { + return m.Size() +} +func (m *GetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse proto.InternalMessageInfo + +func (m *GetResponse) GetBody() *GetResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetResponse_Body struct { + // Container that has been requested. + Container *Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse_Body) Reset() { *m = GetResponse_Body{} } +func (m *GetResponse_Body) String() string { return proto.CompactTextString(m) } +func (*GetResponse_Body) ProtoMessage() {} +func (*GetResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{5, 0} +} +func (m *GetResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse_Body.Merge(m, src) +} +func (m *GetResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *GetResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse_Body proto.InternalMessageInfo + +func (m *GetResponse_Body) GetContainer() *Container { + if m != nil { + return m.Container + } + return nil +} + +type ListRequest struct { + // Body of list containers request message. + Body *ListRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListRequest) Reset() { *m = ListRequest{} } +func (m *ListRequest) String() string { return proto.CompactTextString(m) } +func (*ListRequest) ProtoMessage() {} +func (*ListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{6} +} +func (m *ListRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListRequest.Merge(m, src) +} +func (m *ListRequest) XXX_Size() int { + return m.Size() +} +func (m *ListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListRequest proto.InternalMessageInfo + +func (m *ListRequest) GetBody() *ListRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *ListRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *ListRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type ListRequest_Body struct { + // owner_id carries identifier of the container owner. + OwnerId *v21.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListRequest_Body) Reset() { *m = ListRequest_Body{} } +func (m *ListRequest_Body) String() string { return proto.CompactTextString(m) } +func (*ListRequest_Body) ProtoMessage() {} +func (*ListRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{6, 0} +} +func (m *ListRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListRequest_Body.Merge(m, src) +} +func (m *ListRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *ListRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_ListRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_ListRequest_Body proto.InternalMessageInfo + +func (m *ListRequest_Body) GetOwnerId() *v21.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +type ListResponse struct { + // Body of list containers response message. + Body *ListResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListResponse) Reset() { *m = ListResponse{} } +func (m *ListResponse) String() string { return proto.CompactTextString(m) } +func (*ListResponse) ProtoMessage() {} +func (*ListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{7} +} +func (m *ListResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListResponse.Merge(m, src) +} +func (m *ListResponse) XXX_Size() int { + return m.Size() +} +func (m *ListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListResponse proto.InternalMessageInfo + +func (m *ListResponse) GetBody() *ListResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *ListResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *ListResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type ListResponse_Body struct { + // ContainerIDs carries list of identifiers of the containers that belong to the owner. + ContainerIds []*v21.ContainerID `protobuf:"bytes,1,rep,name=container_ids,json=containerIds,proto3" json:"container_ids,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListResponse_Body) Reset() { *m = ListResponse_Body{} } +func (m *ListResponse_Body) String() string { return proto.CompactTextString(m) } +func (*ListResponse_Body) ProtoMessage() {} +func (*ListResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{7, 0} +} +func (m *ListResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListResponse_Body.Merge(m, src) +} +func (m *ListResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *ListResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_ListResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_ListResponse_Body proto.InternalMessageInfo + +func (m *ListResponse_Body) GetContainerIds() []*v21.ContainerID { + if m != nil { + return m.ContainerIds + } + return nil +} + +type SetExtendedACLRequest struct { + // Body of set extended acl request message. + Body *SetExtendedACLRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetExtendedACLRequest) Reset() { *m = SetExtendedACLRequest{} } +func (m *SetExtendedACLRequest) String() string { return proto.CompactTextString(m) } +func (*SetExtendedACLRequest) ProtoMessage() {} +func (*SetExtendedACLRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{8} +} +func (m *SetExtendedACLRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetExtendedACLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetExtendedACLRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetExtendedACLRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetExtendedACLRequest.Merge(m, src) +} +func (m *SetExtendedACLRequest) XXX_Size() int { + return m.Size() +} +func (m *SetExtendedACLRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetExtendedACLRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetExtendedACLRequest proto.InternalMessageInfo + +func (m *SetExtendedACLRequest) GetBody() *SetExtendedACLRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *SetExtendedACLRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *SetExtendedACLRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type SetExtendedACLRequest_Body struct { + // Extended ACL to set for the container.v2. + Eacl *v22.EACLTable `protobuf:"bytes,1,opt,name=eacl,proto3" json:"eacl,omitempty"` + // Signature of stable-marshalled Extended ACL according to RFC-6979. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetExtendedACLRequest_Body) Reset() { *m = SetExtendedACLRequest_Body{} } +func (m *SetExtendedACLRequest_Body) String() string { return proto.CompactTextString(m) } +func (*SetExtendedACLRequest_Body) ProtoMessage() {} +func (*SetExtendedACLRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{8, 0} +} +func (m *SetExtendedACLRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetExtendedACLRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetExtendedACLRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetExtendedACLRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetExtendedACLRequest_Body.Merge(m, src) +} +func (m *SetExtendedACLRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *SetExtendedACLRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_SetExtendedACLRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_SetExtendedACLRequest_Body proto.InternalMessageInfo + +func (m *SetExtendedACLRequest_Body) GetEacl() *v22.EACLTable { + if m != nil { + return m.Eacl + } + return nil +} + +func (m *SetExtendedACLRequest_Body) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type SetExtendedACLResponse struct { + // Body of set extended acl response message. + Body *SetExtendedACLResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetExtendedACLResponse) Reset() { *m = SetExtendedACLResponse{} } +func (m *SetExtendedACLResponse) String() string { return proto.CompactTextString(m) } +func (*SetExtendedACLResponse) ProtoMessage() {} +func (*SetExtendedACLResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{9} +} +func (m *SetExtendedACLResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetExtendedACLResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetExtendedACLResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetExtendedACLResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetExtendedACLResponse.Merge(m, src) +} +func (m *SetExtendedACLResponse) XXX_Size() int { + return m.Size() +} +func (m *SetExtendedACLResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SetExtendedACLResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SetExtendedACLResponse proto.InternalMessageInfo + +func (m *SetExtendedACLResponse) GetBody() *SetExtendedACLResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *SetExtendedACLResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *SetExtendedACLResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type SetExtendedACLResponse_Body struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetExtendedACLResponse_Body) Reset() { *m = SetExtendedACLResponse_Body{} } +func (m *SetExtendedACLResponse_Body) String() string { return proto.CompactTextString(m) } +func (*SetExtendedACLResponse_Body) ProtoMessage() {} +func (*SetExtendedACLResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{9, 0} +} +func (m *SetExtendedACLResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetExtendedACLResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetExtendedACLResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetExtendedACLResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetExtendedACLResponse_Body.Merge(m, src) +} +func (m *SetExtendedACLResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *SetExtendedACLResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_SetExtendedACLResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_SetExtendedACLResponse_Body proto.InternalMessageInfo + +type GetExtendedACLRequest struct { + // Body of get extended acl request message. + Body *GetExtendedACLRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetExtendedACLRequest) Reset() { *m = GetExtendedACLRequest{} } +func (m *GetExtendedACLRequest) String() string { return proto.CompactTextString(m) } +func (*GetExtendedACLRequest) ProtoMessage() {} +func (*GetExtendedACLRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{10} +} +func (m *GetExtendedACLRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExtendedACLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExtendedACLRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetExtendedACLRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExtendedACLRequest.Merge(m, src) +} +func (m *GetExtendedACLRequest) XXX_Size() int { + return m.Size() +} +func (m *GetExtendedACLRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetExtendedACLRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExtendedACLRequest proto.InternalMessageInfo + +func (m *GetExtendedACLRequest) GetBody() *GetExtendedACLRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetExtendedACLRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetExtendedACLRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetExtendedACLRequest_Body struct { + // container_id carries identifier of the container that has Extended ACL. + ContainerId *v21.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetExtendedACLRequest_Body) Reset() { *m = GetExtendedACLRequest_Body{} } +func (m *GetExtendedACLRequest_Body) String() string { return proto.CompactTextString(m) } +func (*GetExtendedACLRequest_Body) ProtoMessage() {} +func (*GetExtendedACLRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{10, 0} +} +func (m *GetExtendedACLRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExtendedACLRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExtendedACLRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetExtendedACLRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExtendedACLRequest_Body.Merge(m, src) +} +func (m *GetExtendedACLRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *GetExtendedACLRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetExtendedACLRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExtendedACLRequest_Body proto.InternalMessageInfo + +func (m *GetExtendedACLRequest_Body) GetContainerId() *v21.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +type GetExtendedACLResponse struct { + // Body of get extended acl response message. + Body *GetExtendedACLResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetExtendedACLResponse) Reset() { *m = GetExtendedACLResponse{} } +func (m *GetExtendedACLResponse) String() string { return proto.CompactTextString(m) } +func (*GetExtendedACLResponse) ProtoMessage() {} +func (*GetExtendedACLResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{11} +} +func (m *GetExtendedACLResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExtendedACLResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExtendedACLResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetExtendedACLResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExtendedACLResponse.Merge(m, src) +} +func (m *GetExtendedACLResponse) XXX_Size() int { + return m.Size() +} +func (m *GetExtendedACLResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetExtendedACLResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExtendedACLResponse proto.InternalMessageInfo + +func (m *GetExtendedACLResponse) GetBody() *GetExtendedACLResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetExtendedACLResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetExtendedACLResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetExtendedACLResponse_Body struct { + // Extended ACL that has been requested if it was set up. + Eacl *v22.EACLTable `protobuf:"bytes,1,opt,name=eacl,proto3" json:"eacl,omitempty"` + // Signature of stable-marshalled Extended ACL according to RFC-6979. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetExtendedACLResponse_Body) Reset() { *m = GetExtendedACLResponse_Body{} } +func (m *GetExtendedACLResponse_Body) String() string { return proto.CompactTextString(m) } +func (*GetExtendedACLResponse_Body) ProtoMessage() {} +func (*GetExtendedACLResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_1c484d370787a129, []int{11, 0} +} +func (m *GetExtendedACLResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExtendedACLResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExtendedACLResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetExtendedACLResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExtendedACLResponse_Body.Merge(m, src) +} +func (m *GetExtendedACLResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *GetExtendedACLResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetExtendedACLResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExtendedACLResponse_Body proto.InternalMessageInfo + +func (m *GetExtendedACLResponse_Body) GetEacl() *v22.EACLTable { + if m != nil { + return m.Eacl + } + return nil +} + +func (m *GetExtendedACLResponse_Body) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +func init() { + proto.RegisterType((*PutRequest)(nil), "container.v2.PutRequest") + proto.RegisterType((*PutRequest_Body)(nil), "container.v2.PutRequest.Body") + proto.RegisterType((*PutResponse)(nil), "container.v2.PutResponse") + proto.RegisterType((*PutResponse_Body)(nil), "container.v2.PutResponse.Body") + proto.RegisterType((*DeleteRequest)(nil), "container.v2.DeleteRequest") + proto.RegisterType((*DeleteRequest_Body)(nil), "container.v2.DeleteRequest.Body") + proto.RegisterType((*DeleteResponse)(nil), "container.v2.DeleteResponse") + proto.RegisterType((*DeleteResponse_Body)(nil), "container.v2.DeleteResponse.Body") + proto.RegisterType((*GetRequest)(nil), "container.v2.GetRequest") + proto.RegisterType((*GetRequest_Body)(nil), "container.v2.GetRequest.Body") + proto.RegisterType((*GetResponse)(nil), "container.v2.GetResponse") + proto.RegisterType((*GetResponse_Body)(nil), "container.v2.GetResponse.Body") + proto.RegisterType((*ListRequest)(nil), "container.v2.ListRequest") + proto.RegisterType((*ListRequest_Body)(nil), "container.v2.ListRequest.Body") + proto.RegisterType((*ListResponse)(nil), "container.v2.ListResponse") + proto.RegisterType((*ListResponse_Body)(nil), "container.v2.ListResponse.Body") + proto.RegisterType((*SetExtendedACLRequest)(nil), "container.v2.SetExtendedACLRequest") + proto.RegisterType((*SetExtendedACLRequest_Body)(nil), "container.v2.SetExtendedACLRequest.Body") + proto.RegisterType((*SetExtendedACLResponse)(nil), "container.v2.SetExtendedACLResponse") + proto.RegisterType((*SetExtendedACLResponse_Body)(nil), "container.v2.SetExtendedACLResponse.Body") + proto.RegisterType((*GetExtendedACLRequest)(nil), "container.v2.GetExtendedACLRequest") + proto.RegisterType((*GetExtendedACLRequest_Body)(nil), "container.v2.GetExtendedACLRequest.Body") + proto.RegisterType((*GetExtendedACLResponse)(nil), "container.v2.GetExtendedACLResponse") + proto.RegisterType((*GetExtendedACLResponse_Body)(nil), "container.v2.GetExtendedACLResponse.Body") +} + +func init() { proto.RegisterFile("container/v2/service.proto", fileDescriptor_1c484d370787a129) } + +var fileDescriptor_1c484d370787a129 = []byte{ + // 811 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x97, 0x41, 0x4f, 0x13, 0x41, + 0x14, 0xc7, 0xdd, 0x6d, 0x03, 0xf2, 0x5a, 0x88, 0x0e, 0x02, 0x65, 0x85, 0x8a, 0x55, 0x0c, 0xc6, + 0xb0, 0x8d, 0x45, 0x62, 0x34, 0x22, 0x29, 0x05, 0xd7, 0x0a, 0x2a, 0x59, 0x0c, 0x07, 0x8d, 0x21, + 0xdb, 0xdd, 0x07, 0x6c, 0x2c, 0xbb, 0xb5, 0xbb, 0x2d, 0xd6, 0xa3, 0x67, 0x63, 0x3c, 0x78, 0xf0, + 0xec, 0xd1, 0x83, 0x31, 0x7e, 0x01, 0x8f, 0x7a, 0xf4, 0x0b, 0x98, 0x18, 0x3c, 0xfb, 0x1d, 0xcc, + 0xee, 0x4e, 0xdb, 0x9d, 0xba, 0x2d, 0xd5, 0x7a, 0x58, 0x6e, 0xec, 0xcc, 0x7f, 0x1e, 0xef, 0xfd, + 0xfa, 0x9f, 0x99, 0x37, 0x20, 0xa8, 0xa6, 0x61, 0x2b, 0xba, 0x81, 0xe5, 0x74, 0x35, 0x93, 0xb6, + 0xb0, 0x5c, 0xd5, 0x55, 0x14, 0x4b, 0x65, 0xd3, 0x36, 0x49, 0xbc, 0x31, 0x27, 0x56, 0x33, 0x02, + 0x51, 0xd4, 0xa2, 0xa3, 0xb1, 0x6b, 0x25, 0xb4, 0x3c, 0x85, 0x90, 0x60, 0x56, 0xfb, 0x67, 0x86, + 0xcb, 0xb8, 0x6d, 0xb5, 0x0e, 0x8e, 0xd0, 0xf8, 0xce, 0xf8, 0x1e, 0xda, 0x0a, 0x1d, 0x1e, 0xf3, + 0x0d, 0x57, 0xb1, 0xac, 0x6f, 0xd7, 0xbc, 0x89, 0xd4, 0x17, 0x1e, 0x60, 0xbd, 0x62, 0xcb, 0xf8, + 0xb4, 0x82, 0x96, 0x4d, 0x2e, 0x43, 0xb4, 0x60, 0x6a, 0xb5, 0x04, 0x37, 0xc5, 0xcd, 0xc4, 0x32, + 0x93, 0xa2, 0x3f, 0x3d, 0xb1, 0xa9, 0x13, 0x97, 0x4c, 0xad, 0x26, 0xbb, 0x52, 0x72, 0x13, 0x62, + 0xce, 0x3f, 0xda, 0xda, 0x45, 0x45, 0xc3, 0x72, 0x82, 0xa7, 0x2b, 0xeb, 0x75, 0x56, 0x33, 0x22, + 0x5d, 0x74, 0x17, 0x6d, 0xe5, 0xb6, 0x2b, 0x92, 0x61, 0xaf, 0xf1, 0x37, 0xb9, 0x03, 0x83, 0x5e, + 0x46, 0xf5, 0x08, 0x11, 0x37, 0xc2, 0x74, 0x40, 0x84, 0x4d, 0x47, 0xa7, 0xab, 0x8a, 0xad, 0x9b, + 0x06, 0x8d, 0x14, 0xf7, 0xd6, 0x7a, 0x5f, 0xc2, 0x73, 0x88, 0x3a, 0x99, 0x91, 0x79, 0x18, 0x68, + 0x64, 0x4e, 0x6b, 0x19, 0x63, 0x6b, 0xc9, 0xd5, 0x3f, 0xe4, 0xa6, 0x92, 0x4c, 0x02, 0x94, 0x2a, + 0x85, 0xa2, 0xae, 0x6e, 0x3d, 0xc1, 0x9a, 0x5b, 0x49, 0x5c, 0x1e, 0xf0, 0x46, 0x56, 0xb1, 0x46, + 0x26, 0x60, 0xc0, 0xd2, 0x77, 0x0c, 0xc5, 0xae, 0x94, 0xd1, 0xcd, 0x32, 0x2e, 0x37, 0x07, 0x52, + 0xaf, 0x79, 0x88, 0xb9, 0x84, 0xac, 0x92, 0x69, 0x58, 0x48, 0x32, 0x0c, 0xca, 0x64, 0x00, 0x4a, + 0x4f, 0xe8, 0x67, 0xb9, 0x18, 0xc4, 0x32, 0xc9, 0x92, 0xf0, 0x56, 0xb5, 0x81, 0xb9, 0x1a, 0x0c, + 0xf3, 0x42, 0x50, 0x88, 0x43, 0x69, 0x2e, 0x52, 0x9a, 0x57, 0xa1, 0x69, 0xd3, 0x2d, 0x5d, 0xa3, + 0x15, 0x9d, 0x12, 0x1d, 0xff, 0x31, 0x2c, 0xf3, 0xcb, 0x72, 0xac, 0xa1, 0xcc, 0x6b, 0xa9, 0x8f, + 0x3c, 0x0c, 0x2e, 0x63, 0x11, 0x6d, 0xac, 0xfb, 0xeb, 0x0a, 0x03, 0x65, 0x8a, 0x85, 0xc2, 0x48, + 0xc3, 0x6a, 0xb1, 0xc7, 0x3d, 0x42, 0x61, 0x5d, 0xc4, 0xb7, 0xba, 0xe8, 0x3b, 0x07, 0x43, 0x75, + 0x0e, 0xd4, 0x48, 0xf3, 0x0c, 0xb3, 0xb3, 0xc1, 0xcc, 0xc2, 0xee, 0xa5, 0x3e, 0x0f, 0x5b, 0xea, + 0x25, 0x0f, 0x20, 0x61, 0x77, 0xe7, 0x4d, 0x53, 0x17, 0x56, 0x33, 0xf4, 0xbc, 0x43, 0x5e, 0xf1, + 0x10, 0x73, 0xcb, 0xec, 0xe6, 0xd0, 0xf0, 0x09, 0xc3, 0xfb, 0x43, 0x2f, 0xf4, 0x74, 0x04, 0xa7, + 0x5e, 0xf0, 0x10, 0x5b, 0xd3, 0xad, 0x86, 0x41, 0x3a, 0x02, 0xf1, 0x09, 0xc3, 0xea, 0x90, 0x39, + 0x8a, 0xe3, 0x12, 0x1c, 0x37, 0xf7, 0x19, 0x77, 0x9c, 0x68, 0xb8, 0xe3, 0xfe, 0xbe, 0xe7, 0x8c, + 0x7e, 0x57, 0x91, 0xd7, 0x52, 0x6f, 0x78, 0x88, 0x7b, 0xb5, 0x51, 0x5b, 0xcc, 0x31, 0x14, 0xce, + 0x04, 0x51, 0x08, 0xbb, 0x2f, 0xb2, 0x14, 0xc4, 0x35, 0x18, 0xf4, 0x6f, 0x15, 0x2b, 0xc1, 0x4d, + 0x45, 0xda, 0xee, 0x95, 0xb8, 0x6f, 0xaf, 0x58, 0xa9, 0x0f, 0x3c, 0x8c, 0x6c, 0xa0, 0xbd, 0xf2, + 0xcc, 0x46, 0x43, 0x43, 0x2d, 0x9b, 0x5b, 0xab, 0xbb, 0xe4, 0x06, 0xc3, 0x67, 0x86, 0xe5, 0x13, + 0xb8, 0x24, 0xac, 0x7e, 0x59, 0xa5, 0x98, 0xa6, 0x21, 0x8a, 0x8a, 0x5a, 0xa4, 0x15, 0x9d, 0x14, + 0x15, 0xb5, 0xe8, 0x84, 0x59, 0xc9, 0xe6, 0xd6, 0x1e, 0x28, 0x85, 0x22, 0xca, 0xee, 0xf4, 0x21, + 0x97, 0xc9, 0x2f, 0x0e, 0x46, 0x5b, 0xab, 0xa7, 0x8e, 0x5a, 0x60, 0x88, 0x5d, 0xec, 0x4c, 0xec, + 0xa8, 0x5c, 0x2e, 0xef, 0x78, 0x18, 0x91, 0xfe, 0xde, 0x20, 0xd2, 0x51, 0x32, 0x48, 0xcf, 0x57, + 0xce, 0x27, 0x1e, 0x46, 0xa5, 0x7f, 0x30, 0x85, 0x74, 0xc4, 0x4c, 0xf1, 0x3f, 0x77, 0x52, 0xe6, + 0x73, 0x04, 0xfa, 0x37, 0xbc, 0x24, 0xc8, 0x75, 0x88, 0xac, 0x57, 0x6c, 0x92, 0x68, 0xf7, 0x38, + 0x12, 0xc6, 0xdb, 0xf6, 0xfa, 0x24, 0x07, 0x7d, 0x5e, 0xc7, 0x46, 0x4e, 0x77, 0xe8, 0x7d, 0x85, + 0x89, 0x4e, 0x4d, 0x9e, 0x93, 0x80, 0x84, 0x7f, 0x24, 0xd0, 0xec, 0x96, 0x5a, 0x13, 0xf0, 0x37, + 0x18, 0x0b, 0x10, 0x75, 0xee, 0x0b, 0x32, 0xde, 0xf6, 0x26, 0x15, 0x84, 0xf6, 0xd7, 0x0b, 0x79, + 0x04, 0x43, 0xec, 0xe1, 0x40, 0xce, 0x75, 0x71, 0xd8, 0x0a, 0xe7, 0xbb, 0x39, 0x5f, 0x9c, 0xe0, + 0x52, 0xc7, 0xe0, 0x52, 0x37, 0xc1, 0x83, 0x7d, 0xba, 0xb4, 0xf9, 0xf5, 0x20, 0xc9, 0x7d, 0x3b, + 0x48, 0x72, 0x3f, 0x0e, 0x92, 0xdc, 0xdb, 0x9f, 0xc9, 0x63, 0x0f, 0xc5, 0x1d, 0xdd, 0xde, 0xad, + 0x14, 0x44, 0xd5, 0xdc, 0x4b, 0x1b, 0x56, 0x49, 0x55, 0x67, 0x35, 0xac, 0xa6, 0x0d, 0x34, 0xb7, + 0xad, 0x59, 0xa5, 0xa4, 0xcf, 0xee, 0x98, 0x69, 0xff, 0xdb, 0xfb, 0x3d, 0x3f, 0x7c, 0x0f, 0xcd, + 0x5b, 0x1b, 0x62, 0x76, 0x3d, 0xdf, 0xdc, 0x5d, 0x85, 0x3e, 0xf7, 0x1d, 0x3d, 0xf7, 0x3b, 0x00, + 0x00, 0xff, 0xff, 0x7e, 0x5a, 0xa3, 0x54, 0xe6, 0x0f, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ServiceClient is the client API for Service service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ServiceClient interface { + // Put invokes 'Put' method in container smart-contract and returns + // response immediately. After new block in morph chain, request is verified + // by inner ring nodes. After one more block in morph chain, container + // added into smart-contract storage. + Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) + // Delete invokes 'Delete' method in container smart-contract and returns + // response immediately. After new block in morph chain, request is verified + // by inner ring nodes. After one more block in morph chain, container + // removed from smart-contract storage. + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) + // Get returns container from container smart-contract storage. + Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) + // List returns all owner's containers from container smart-contract + // storage. + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + // SetExtendedACL invokes 'SetEACL' method in container smart-contract and + // returns response immediately. After new block in morph chain, + // Extended ACL added into smart-contract storage. + SetExtendedACL(ctx context.Context, in *SetExtendedACLRequest, opts ...grpc.CallOption) (*SetExtendedACLResponse, error) + // GetExtendedACL returns Extended ACL table and signature from container + // smart-contract storage. + GetExtendedACL(ctx context.Context, in *GetExtendedACLRequest, opts ...grpc.CallOption) (*GetExtendedACLResponse, error) +} + +type serviceClient struct { + cc *grpc.ClientConn +} + +func NewServiceClient(cc *grpc.ClientConn) ServiceClient { + return &serviceClient{cc} +} + +func (c *serviceClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) { + out := new(PutResponse) + err := c.cc.Invoke(ctx, "/container.v2.Service/Put", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, "/container.v2.Service/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { + out := new(GetResponse) + err := c.cc.Invoke(ctx, "/container.v2.Service/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/container.v2.Service/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) SetExtendedACL(ctx context.Context, in *SetExtendedACLRequest, opts ...grpc.CallOption) (*SetExtendedACLResponse, error) { + out := new(SetExtendedACLResponse) + err := c.cc.Invoke(ctx, "/container.v2.Service/SetExtendedACL", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetExtendedACL(ctx context.Context, in *GetExtendedACLRequest, opts ...grpc.CallOption) (*GetExtendedACLResponse, error) { + out := new(GetExtendedACLResponse) + err := c.cc.Invoke(ctx, "/container.v2.Service/GetExtendedACL", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceServer is the server API for Service service. +type ServiceServer interface { + // Put invokes 'Put' method in container smart-contract and returns + // response immediately. After new block in morph chain, request is verified + // by inner ring nodes. After one more block in morph chain, container + // added into smart-contract storage. + Put(context.Context, *PutRequest) (*PutResponse, error) + // Delete invokes 'Delete' method in container smart-contract and returns + // response immediately. After new block in morph chain, request is verified + // by inner ring nodes. After one more block in morph chain, container + // removed from smart-contract storage. + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + // Get returns container from container smart-contract storage. + Get(context.Context, *GetRequest) (*GetResponse, error) + // List returns all owner's containers from container smart-contract + // storage. + List(context.Context, *ListRequest) (*ListResponse, error) + // SetExtendedACL invokes 'SetEACL' method in container smart-contract and + // returns response immediately. After new block in morph chain, + // Extended ACL added into smart-contract storage. + SetExtendedACL(context.Context, *SetExtendedACLRequest) (*SetExtendedACLResponse, error) + // GetExtendedACL returns Extended ACL table and signature from container + // smart-contract storage. + GetExtendedACL(context.Context, *GetExtendedACLRequest) (*GetExtendedACLResponse, error) +} + +// UnimplementedServiceServer can be embedded to have forward compatible implementations. +type UnimplementedServiceServer struct { +} + +func (*UnimplementedServiceServer) Put(ctx context.Context, req *PutRequest) (*PutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Put not implemented") +} +func (*UnimplementedServiceServer) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedServiceServer) Get(ctx context.Context, req *GetRequest) (*GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedServiceServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedServiceServer) SetExtendedACL(ctx context.Context, req *SetExtendedACLRequest) (*SetExtendedACLResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetExtendedACL not implemented") +} +func (*UnimplementedServiceServer) GetExtendedACL(ctx context.Context, req *GetExtendedACLRequest) (*GetExtendedACLResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExtendedACL not implemented") +} + +func RegisterServiceServer(s *grpc.Server, srv ServiceServer) { + s.RegisterService(&_Service_serviceDesc, srv) +} + +func _Service_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).Put(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/container.v2.Service/Put", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).Put(ctx, req.(*PutRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/container.v2.Service/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/container.v2.Service/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).Get(ctx, req.(*GetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/container.v2.Service/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_SetExtendedACL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetExtendedACLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).SetExtendedACL(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/container.v2.Service/SetExtendedACL", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).SetExtendedACL(ctx, req.(*SetExtendedACLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetExtendedACL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExtendedACLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetExtendedACL(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/container.v2.Service/GetExtendedACL", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetExtendedACL(ctx, req.(*GetExtendedACLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Service_serviceDesc = grpc.ServiceDesc{ + ServiceName: "container.v2.Service", + HandlerType: (*ServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Put", + Handler: _Service_Put_Handler, + }, + { + MethodName: "Delete", + Handler: _Service_Delete_Handler, + }, + { + MethodName: "Get", + Handler: _Service_Get_Handler, + }, + { + MethodName: "List", + Handler: _Service_List_Handler, + }, + { + MethodName: "SetExtendedACL", + Handler: _Service_SetExtendedACL_Handler, + }, + { + MethodName: "GetExtendedACL", + Handler: _Service_GetExtendedACL_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "container/v2/service.proto", +} + +func (m *PutRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintService(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintService(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if m.Container != nil { + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintService(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *GetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Container != nil { + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ContainerIds) > 0 { + for iNdEx := len(m.ContainerIds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContainerIds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SetExtendedACLRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetExtendedACLRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetExtendedACLRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SetExtendedACLRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetExtendedACLRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetExtendedACLRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintService(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if m.Eacl != nil { + { + size, err := m.Eacl.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SetExtendedACLResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetExtendedACLResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetExtendedACLResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SetExtendedACLResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetExtendedACLResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetExtendedACLResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *GetExtendedACLRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExtendedACLRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExtendedACLRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetExtendedACLRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExtendedACLRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExtendedACLRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetExtendedACLResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExtendedACLResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExtendedACLResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetExtendedACLResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExtendedACLResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExtendedACLResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintService(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if m.Eacl != nil { + { + size, err := m.Eacl.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PutRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Container != nil { + l = m.Container.Size() + n += 1 + l + sovService(uint64(l)) + } + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Container != nil { + l = m.Container.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ListResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ContainerIds) > 0 { + for _, e := range m.ContainerIds { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SetExtendedACLRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SetExtendedACLRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Eacl != nil { + l = m.Eacl.Size() + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SetExtendedACLResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SetExtendedACLResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetExtendedACLRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetExtendedACLRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetExtendedACLResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetExtendedACLResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Eacl != nil { + l = m.Eacl.Size() + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PutRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PutRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PutRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &PutRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &Container{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &PutResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v21.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &DeleteRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v21.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &DeleteResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v21.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &Container{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &ListRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v21.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &ListResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerIds = append(m.ContainerIds, &v21.ContainerID{}) + if err := m.ContainerIds[len(m.ContainerIds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetExtendedACLRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetExtendedACLRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetExtendedACLRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &SetExtendedACLRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetExtendedACLRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Eacl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Eacl == nil { + m.Eacl = &v22.EACLTable{} + } + if err := m.Eacl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetExtendedACLResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetExtendedACLResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetExtendedACLResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &SetExtendedACLResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetExtendedACLResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetExtendedACLRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetExtendedACLRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetExtendedACLRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetExtendedACLRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetExtendedACLRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v21.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetExtendedACLResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetExtendedACLResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetExtendedACLResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetExtendedACLResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetExtendedACLResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Eacl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Eacl == nil { + m.Eacl = &v22.EACLTable{} + } + if err := m.Eacl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/container/v2/service.proto b/container/v2/service.proto new file mode 100644 index 0000000..720abc6 --- /dev/null +++ b/container/v2/service.proto @@ -0,0 +1,285 @@ +syntax = "proto3"; + +package container.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/container/v2"; +option csharp_namespace = "NeoFS.API.Container"; + +import "acl/v2/types.proto"; +import "container/v2/types.proto"; +import "refs/v2/types.proto"; +import "service/v2/meta.proto"; +import "service/v2/verify.proto"; + +// Service provides API to access container smart-contract in morph chain +// via NeoFS node. +service Service { + // Put invokes 'Put' method in container smart-contract and returns + // response immediately. After new block in morph chain, request is verified + // by inner ring nodes. After one more block in morph chain, container + // added into smart-contract storage. + rpc Put(PutRequest) returns (PutResponse); + + // Delete invokes 'Delete' method in container smart-contract and returns + // response immediately. After new block in morph chain, request is verified + // by inner ring nodes. After one more block in morph chain, container + // removed from smart-contract storage. + rpc Delete(DeleteRequest) returns (DeleteResponse); + + // Get returns container from container smart-contract storage. + rpc Get(GetRequest) returns (GetResponse); + + // List returns all owner's containers from container smart-contract + // storage. + rpc List(ListRequest) returns (ListResponse); + + // SetExtendedACL invokes 'SetEACL' method in container smart-contract and + // returns response immediately. After new block in morph chain, + // Extended ACL added into smart-contract storage. + rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); + + // GetExtendedACL returns Extended ACL table and signature from container + // smart-contract storage. + rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); +} + +message PutRequest { + message Body { + // Container to create in NeoFS. + container.v2.Container container = 1; + + // Public Key of container owner. It can be public key of the owner + // or it can be public key that bound in neofs.id smart-contract. + bytes public_key = 2; + + // Signature of stable-marshalled container according to RFC-6979. + bytes signature = 3; + } + + // Body of container put request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message PutResponse { + message Body { + // container_id carries identifier of the new container.v2. + refs.v2.ContainerID container_id = 1; + } + + // Body of container put response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message DeleteRequest { + message Body { + // container_id carries identifier of the container to delete + // from NeoFS. + refs.v2.ContainerID container_id = 1; + + // Signature of container id according to RFC-6979. + bytes signature = 2; + } + + // Body of container delete request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +// DeleteResponse is empty because delete operation is asynchronous and done +// via consensus in inner ring nodes +message DeleteResponse { + message Body {} + + // Body of container delete response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message GetRequest { + message Body { + // container_id carries identifier of the container to get. + refs.v2.ContainerID container_id = 1; + } + + // Body of container get request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message GetResponse { + message Body { + // Container that has been requested. + container.v2.Container container = 1; + } + + // Body of container get response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message ListRequest { + message Body { + // owner_id carries identifier of the container owner. + refs.v2.OwnerID owner_id = 1; + } + + // Body of list containers request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message ListResponse { + message Body { + // ContainerIDs carries list of identifiers of the containers that belong to the owner. + repeated refs.v2.ContainerID container_ids = 1; + } + + // Body of list containers response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message SetExtendedACLRequest { + message Body { + // Extended ACL to set for the container.v2. + acl.v2.EACLTable eacl = 1; + + // Signature of stable-marshalled Extended ACL according to RFC-6979. + bytes signature = 2; + } + + // Body of set extended acl request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message SetExtendedACLResponse { + message Body { } + + // Body of set extended acl response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message GetExtendedACLRequest { + message Body { + // container_id carries identifier of the container that has Extended ACL. + refs.v2.ContainerID container_id = 1; + } + + // Body of get extended acl request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message GetExtendedACLResponse { + message Body { + // Extended ACL that has been requested if it was set up. + acl.v2.EACLTable eacl = 1; + + // Signature of stable-marshalled Extended ACL according to RFC-6979. + bytes signature = 2; + } + + // Body of get extended acl response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} diff --git a/container/v2/types.pb.go b/container/v2/types.pb.go new file mode 100644 index 0000000..28c03d7 --- /dev/null +++ b/container/v2/types.pb.go @@ -0,0 +1,808 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: container/v2/types.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v21 "github.com/nspcc-dev/neofs-api-go/netmap/v2" + v2 "github.com/nspcc-dev/neofs-api-go/refs/v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Container is a structure that defines object placement behaviour. Objects +// can be stored only within containers. They define placement rule, attributes +// and access control information. ID of the container is a 32 byte long +// SHA256 hash of stable-marshalled container message. +type Container struct { + // OwnerID carries identifier of the container owner. + OwnerId *v2.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // Nonce is a 16 byte UUID, used to avoid collisions of container id. + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // BasicACL contains access control rules for owner, system, others groups and + // permission bits for bearer token and Extended ACL. + BasicAcl uint32 `protobuf:"varint,3,opt,name=basic_acl,json=basicAcl,proto3" json:"basic_acl,omitempty"` + // Attributes define any immutable characteristics of container.v2. + Attributes []*Container_Attribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` + // Rules define storage policy for the object inside the container.v2. + Rules *v21.PlacementRule `protobuf:"bytes,5,opt,name=rules,proto3" json:"rules,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Container) Reset() { *m = Container{} } +func (m *Container) String() string { return proto.CompactTextString(m) } +func (*Container) ProtoMessage() {} +func (*Container) Descriptor() ([]byte, []int) { + return fileDescriptor_4fee8fa43abbe82f, []int{0} +} +func (m *Container) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Container.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Container) XXX_Merge(src proto.Message) { + xxx_messageInfo_Container.Merge(m, src) +} +func (m *Container) XXX_Size() int { + return m.Size() +} +func (m *Container) XXX_DiscardUnknown() { + xxx_messageInfo_Container.DiscardUnknown(m) +} + +var xxx_messageInfo_Container proto.InternalMessageInfo + +func (m *Container) GetOwnerId() *v2.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +func (m *Container) GetNonce() []byte { + if m != nil { + return m.Nonce + } + return nil +} + +func (m *Container) GetBasicAcl() uint32 { + if m != nil { + return m.BasicAcl + } + return 0 +} + +func (m *Container) GetAttributes() []*Container_Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Container) GetRules() *v21.PlacementRule { + if m != nil { + return m.Rules + } + return nil +} + +// Attribute is a key-value pair of strings. +type Container_Attribute struct { + // Key of immutable container attribute. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Value of immutable container attribute. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Container_Attribute) Reset() { *m = Container_Attribute{} } +func (m *Container_Attribute) String() string { return proto.CompactTextString(m) } +func (*Container_Attribute) ProtoMessage() {} +func (*Container_Attribute) Descriptor() ([]byte, []int) { + return fileDescriptor_4fee8fa43abbe82f, []int{0, 0} +} +func (m *Container_Attribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Container_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Container_Attribute.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Container_Attribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_Container_Attribute.Merge(m, src) +} +func (m *Container_Attribute) XXX_Size() int { + return m.Size() +} +func (m *Container_Attribute) XXX_DiscardUnknown() { + xxx_messageInfo_Container_Attribute.DiscardUnknown(m) +} + +var xxx_messageInfo_Container_Attribute proto.InternalMessageInfo + +func (m *Container_Attribute) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Container_Attribute) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func init() { + proto.RegisterType((*Container)(nil), "container.v2.Container") + proto.RegisterType((*Container_Attribute)(nil), "container.v2.Container.Attribute") +} + +func init() { proto.RegisterFile("container/v2/types.proto", fileDescriptor_4fee8fa43abbe82f) } + +var fileDescriptor_4fee8fa43abbe82f = []byte{ + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xd1, 0x4a, 0xc3, 0x30, + 0x18, 0x85, 0xed, 0xe6, 0x74, 0xcd, 0x26, 0x8c, 0x4c, 0x21, 0x4c, 0x28, 0xd5, 0xab, 0x82, 0x2c, + 0x85, 0xee, 0x09, 0xaa, 0x22, 0xec, 0x46, 0x47, 0x04, 0x2f, 0xbc, 0x19, 0x69, 0xf6, 0x6f, 0x16, + 0xbb, 0xa4, 0x34, 0x69, 0x65, 0xcf, 0xe1, 0x8d, 0xcf, 0xe0, 0x93, 0x78, 0xe9, 0x23, 0xc8, 0x7c, + 0x11, 0x69, 0xcb, 0xe6, 0xd8, 0x5d, 0xfe, 0xff, 0x9c, 0x13, 0xce, 0x97, 0x20, 0x22, 0x94, 0x34, + 0x3c, 0x96, 0x90, 0xf9, 0x45, 0xe0, 0x9b, 0x55, 0x0a, 0x9a, 0xa6, 0x99, 0x32, 0x0a, 0x77, 0xb7, + 0x0a, 0x2d, 0x82, 0xc1, 0x99, 0x04, 0xb3, 0xe4, 0xe9, 0x9e, 0x69, 0xd0, 0xcf, 0x60, 0xae, 0xf7, + 0x96, 0x97, 0xef, 0x0d, 0x64, 0xdf, 0x6c, 0xc2, 0xf8, 0x0a, 0xb5, 0xd5, 0x9b, 0x84, 0x6c, 0x1a, + 0xcf, 0x88, 0xe5, 0x5a, 0x5e, 0x27, 0xe8, 0xd1, 0x32, 0x45, 0x8b, 0x80, 0x3e, 0x94, 0xc2, 0xf8, + 0x96, 0x1d, 0x57, 0x8e, 0xf1, 0x0c, 0x9f, 0xa2, 0x96, 0x54, 0x52, 0x00, 0x69, 0xb8, 0x96, 0xd7, + 0x65, 0xf5, 0x80, 0xcf, 0x91, 0x1d, 0x71, 0x1d, 0x8b, 0x29, 0x17, 0x09, 0x69, 0xba, 0x96, 0x77, + 0xc2, 0xda, 0xd5, 0x22, 0x14, 0x09, 0x0e, 0x11, 0xe2, 0xc6, 0x64, 0x71, 0x94, 0x1b, 0xd0, 0xe4, + 0xd0, 0x6d, 0x7a, 0x9d, 0xe0, 0x82, 0xee, 0x96, 0xa7, 0xdb, 0x32, 0x34, 0xdc, 0x38, 0xd9, 0x4e, + 0x08, 0x53, 0xd4, 0xca, 0xf2, 0x04, 0x34, 0x69, 0x55, 0xfd, 0x08, 0xad, 0x61, 0xcb, 0xe8, 0x24, + 0xe1, 0x02, 0x96, 0x20, 0x0d, 0xcb, 0x13, 0x60, 0xb5, 0x6d, 0x30, 0x42, 0xf6, 0xf6, 0x22, 0xdc, + 0x43, 0xcd, 0x57, 0x58, 0x55, 0x68, 0x36, 0x2b, 0x8f, 0x25, 0x44, 0xc1, 0x93, 0xbc, 0x86, 0xb0, + 0x59, 0x3d, 0x5c, 0x3f, 0x7d, 0xad, 0x1d, 0xeb, 0x7b, 0xed, 0x58, 0x3f, 0x6b, 0xc7, 0xfa, 0xf8, + 0x75, 0x0e, 0x9e, 0xe9, 0x22, 0x36, 0x2f, 0x79, 0x44, 0x85, 0x5a, 0xfa, 0x52, 0xa7, 0x42, 0x0c, + 0x67, 0x50, 0xf8, 0x12, 0xd4, 0x5c, 0x0f, 0x79, 0x1a, 0x0f, 0x17, 0xca, 0xdf, 0xfd, 0x9d, 0xcf, + 0x46, 0xff, 0x1e, 0xd4, 0xdd, 0x23, 0x0d, 0x27, 0xe3, 0x7f, 0xa4, 0xe8, 0xa8, 0x7a, 0xf4, 0xd1, + 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x73, 0x26, 0x7e, 0xca, 0x01, 0x00, 0x00, +} + +func (m *Container) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Container) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Container) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Rules != nil { + { + size, err := m.Rules.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.BasicAcl != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BasicAcl)) + i-- + dAtA[i] = 0x18 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x12 + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Container_Attribute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Container_Attribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Container_Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Container) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.BasicAcl != 0 { + n += 1 + sovTypes(uint64(m.BasicAcl)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Rules != nil { + l = m.Rules.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Container_Attribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Container) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Container: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v2.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BasicAcl", wireType) + } + m.BasicAcl = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BasicAcl |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Container_Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rules == nil { + m.Rules = &v21.PlacementRule{} + } + if err := m.Rules.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Container_Attribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/container/v2/types.proto b/container/v2/types.proto new file mode 100644 index 0000000..5897b8c --- /dev/null +++ b/container/v2/types.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package container.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/container/v2"; +option csharp_namespace = "NeoFS.API.Container"; + +import "netmap/v2/types.proto"; +import "refs/v2/types.proto"; + +// Container is a structure that defines object placement behaviour. Objects +// can be stored only within containers. They define placement rule, attributes +// and access control information. ID of the container is a 32 byte long +// SHA256 hash of stable-marshalled container message. +message Container { + // OwnerID carries identifier of the container owner. + refs.v2.OwnerID owner_id = 1; + + // Nonce is a 16 byte UUID, used to avoid collisions of container id. + bytes nonce = 2; + + // BasicACL contains access control rules for owner, system, others groups and + // permission bits for bearer token and Extended ACL. + uint32 basic_acl = 3; + + // Attribute is a key-value pair of strings. + message Attribute { + // Key of immutable container attribute. + string key = 1; + + // Value of immutable container attribute. + string value = 2; + } + + // Attributes define any immutable characteristics of container.v2. + repeated Attribute attributes = 4; + + // Rules define storage policy for the object inside the container.v2. + netmap.v2.PlacementRule rules = 5; +} diff --git a/netmap/v2/types.pb.go b/netmap/v2/types.pb.go new file mode 100644 index 0000000..a83e195 --- /dev/null +++ b/netmap/v2/types.pb.go @@ -0,0 +1,2448 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: netmap/v2/types.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type PlacementRule_SFGroup_Filter_SimpleFilter_Operation int32 + +const ( + PlacementRule_SFGroup_Filter_SimpleFilter_NP PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 0 + PlacementRule_SFGroup_Filter_SimpleFilter_EQ PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 1 + PlacementRule_SFGroup_Filter_SimpleFilter_NE PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 2 + PlacementRule_SFGroup_Filter_SimpleFilter_GT PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 3 + PlacementRule_SFGroup_Filter_SimpleFilter_GE PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 4 + PlacementRule_SFGroup_Filter_SimpleFilter_LT PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 5 + PlacementRule_SFGroup_Filter_SimpleFilter_LE PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 6 + PlacementRule_SFGroup_Filter_SimpleFilter_OR PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 7 + PlacementRule_SFGroup_Filter_SimpleFilter_AND PlacementRule_SFGroup_Filter_SimpleFilter_Operation = 8 +) + +var PlacementRule_SFGroup_Filter_SimpleFilter_Operation_name = map[int32]string{ + 0: "NP", + 1: "EQ", + 2: "NE", + 3: "GT", + 4: "GE", + 5: "LT", + 6: "LE", + 7: "OR", + 8: "AND", +} + +var PlacementRule_SFGroup_Filter_SimpleFilter_Operation_value = map[string]int32{ + "NP": 0, + "EQ": 1, + "NE": 2, + "GT": 3, + "GE": 4, + "LT": 5, + "LE": 6, + "OR": 7, + "AND": 8, +} + +func (x PlacementRule_SFGroup_Filter_SimpleFilter_Operation) String() string { + return proto.EnumName(PlacementRule_SFGroup_Filter_SimpleFilter_Operation_name, int32(x)) +} + +func (PlacementRule_SFGroup_Filter_SimpleFilter_Operation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0, 0, 0, 1, 0} +} + +// Represents the enumeration of various states of the NeoFS node. +type NodeInfo_State int32 + +const ( + // Undefined state. + NodeInfo_UNKNOWN NodeInfo_State = 0 + // Active state in the network. + NodeInfo_ONLINE NodeInfo_State = 1 + // Network unavailable state. + NodeInfo_OFFLINE NodeInfo_State = 2 +) + +var NodeInfo_State_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ONLINE", + 2: "OFFLINE", +} + +var NodeInfo_State_value = map[string]int32{ + "UNKNOWN": 0, + "ONLINE": 1, + "OFFLINE": 2, +} + +func (x NodeInfo_State) String() string { + return proto.EnumName(NodeInfo_State_name, int32(x)) +} + +func (NodeInfo_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{1, 0} +} + +type PlacementRule struct { + ReplFactor uint32 `protobuf:"varint,1,opt,name=repl_factor,json=replFactor,proto3" json:"repl_factor,omitempty"` + SfGroups []*PlacementRule_SFGroup `protobuf:"bytes,2,rep,name=sf_groups,json=sfGroups,proto3" json:"sf_groups,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlacementRule) Reset() { *m = PlacementRule{} } +func (m *PlacementRule) String() string { return proto.CompactTextString(m) } +func (*PlacementRule) ProtoMessage() {} +func (*PlacementRule) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0} +} +func (m *PlacementRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRule.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlacementRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRule.Merge(m, src) +} +func (m *PlacementRule) XXX_Size() int { + return m.Size() +} +func (m *PlacementRule) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRule.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRule proto.InternalMessageInfo + +func (m *PlacementRule) GetReplFactor() uint32 { + if m != nil { + return m.ReplFactor + } + return 0 +} + +func (m *PlacementRule) GetSfGroups() []*PlacementRule_SFGroup { + if m != nil { + return m.SfGroups + } + return nil +} + +type PlacementRule_SFGroup struct { + Filters []*PlacementRule_SFGroup_Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + Selectors []*PlacementRule_SFGroup_Selector `protobuf:"bytes,2,rep,name=selectors,proto3" json:"selectors,omitempty"` + Exclude []uint32 `protobuf:"varint,3,rep,packed,name=exclude,proto3" json:"exclude,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlacementRule_SFGroup) Reset() { *m = PlacementRule_SFGroup{} } +func (m *PlacementRule_SFGroup) String() string { return proto.CompactTextString(m) } +func (*PlacementRule_SFGroup) ProtoMessage() {} +func (*PlacementRule_SFGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0, 0} +} +func (m *PlacementRule_SFGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRule_SFGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRule_SFGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlacementRule_SFGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRule_SFGroup.Merge(m, src) +} +func (m *PlacementRule_SFGroup) XXX_Size() int { + return m.Size() +} +func (m *PlacementRule_SFGroup) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRule_SFGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRule_SFGroup proto.InternalMessageInfo + +func (m *PlacementRule_SFGroup) GetFilters() []*PlacementRule_SFGroup_Filter { + if m != nil { + return m.Filters + } + return nil +} + +func (m *PlacementRule_SFGroup) GetSelectors() []*PlacementRule_SFGroup_Selector { + if m != nil { + return m.Selectors + } + return nil +} + +func (m *PlacementRule_SFGroup) GetExclude() []uint32 { + if m != nil { + return m.Exclude + } + return nil +} + +type PlacementRule_SFGroup_Filter struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + F *PlacementRule_SFGroup_Filter_SimpleFilter `protobuf:"bytes,2,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlacementRule_SFGroup_Filter) Reset() { *m = PlacementRule_SFGroup_Filter{} } +func (m *PlacementRule_SFGroup_Filter) String() string { return proto.CompactTextString(m) } +func (*PlacementRule_SFGroup_Filter) ProtoMessage() {} +func (*PlacementRule_SFGroup_Filter) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0, 0, 0} +} +func (m *PlacementRule_SFGroup_Filter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRule_SFGroup_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRule_SFGroup_Filter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlacementRule_SFGroup_Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRule_SFGroup_Filter.Merge(m, src) +} +func (m *PlacementRule_SFGroup_Filter) XXX_Size() int { + return m.Size() +} +func (m *PlacementRule_SFGroup_Filter) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRule_SFGroup_Filter.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRule_SFGroup_Filter proto.InternalMessageInfo + +func (m *PlacementRule_SFGroup_Filter) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *PlacementRule_SFGroup_Filter) GetF() *PlacementRule_SFGroup_Filter_SimpleFilter { + if m != nil { + return m.F + } + return nil +} + +type PlacementRule_SFGroup_Filter_SimpleFilters struct { + Filters []*PlacementRule_SFGroup_Filter_SimpleFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) Reset() { + *m = PlacementRule_SFGroup_Filter_SimpleFilters{} +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) String() string { + return proto.CompactTextString(m) +} +func (*PlacementRule_SFGroup_Filter_SimpleFilters) ProtoMessage() {} +func (*PlacementRule_SFGroup_Filter_SimpleFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0, 0, 0, 0} +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilters.Merge(m, src) +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) XXX_Size() int { + return m.Size() +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilters proto.InternalMessageInfo + +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) GetFilters() []*PlacementRule_SFGroup_Filter_SimpleFilter { + if m != nil { + return m.Filters + } + return nil +} + +type PlacementRule_SFGroup_Filter_SimpleFilter struct { + Op PlacementRule_SFGroup_Filter_SimpleFilter_Operation `protobuf:"varint,1,opt,name=op,proto3,enum=netmap.v2.PlacementRule_SFGroup_Filter_SimpleFilter_Operation" json:"op,omitempty"` + // Types that are valid to be assigned to Args: + // *PlacementRule_SFGroup_Filter_SimpleFilter_Value + // *PlacementRule_SFGroup_Filter_SimpleFilter_FArgs + Args isPlacementRule_SFGroup_Filter_SimpleFilter_Args `protobuf_oneof:"args"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) Reset() { + *m = PlacementRule_SFGroup_Filter_SimpleFilter{} +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) String() string { + return proto.CompactTextString(m) +} +func (*PlacementRule_SFGroup_Filter_SimpleFilter) ProtoMessage() {} +func (*PlacementRule_SFGroup_Filter_SimpleFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0, 0, 0, 1} +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilter.Merge(m, src) +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) XXX_Size() int { + return m.Size() +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRule_SFGroup_Filter_SimpleFilter proto.InternalMessageInfo + +type isPlacementRule_SFGroup_Filter_SimpleFilter_Args interface { + isPlacementRule_SFGroup_Filter_SimpleFilter_Args() + MarshalTo([]byte) (int, error) + Size() int +} + +type PlacementRule_SFGroup_Filter_SimpleFilter_Value struct { + Value string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` +} +type PlacementRule_SFGroup_Filter_SimpleFilter_FArgs struct { + FArgs *PlacementRule_SFGroup_Filter_SimpleFilters `protobuf:"bytes,3,opt,name=f_args,json=fArgs,proto3,oneof" json:"f_args,omitempty"` +} + +func (*PlacementRule_SFGroup_Filter_SimpleFilter_Value) isPlacementRule_SFGroup_Filter_SimpleFilter_Args() { +} +func (*PlacementRule_SFGroup_Filter_SimpleFilter_FArgs) isPlacementRule_SFGroup_Filter_SimpleFilter_Args() { +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) GetArgs() isPlacementRule_SFGroup_Filter_SimpleFilter_Args { + if m != nil { + return m.Args + } + return nil +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) GetOp() PlacementRule_SFGroup_Filter_SimpleFilter_Operation { + if m != nil { + return m.Op + } + return PlacementRule_SFGroup_Filter_SimpleFilter_NP +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) GetValue() string { + if x, ok := m.GetArgs().(*PlacementRule_SFGroup_Filter_SimpleFilter_Value); ok { + return x.Value + } + return "" +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) GetFArgs() *PlacementRule_SFGroup_Filter_SimpleFilters { + if x, ok := m.GetArgs().(*PlacementRule_SFGroup_Filter_SimpleFilter_FArgs); ok { + return x.FArgs + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*PlacementRule_SFGroup_Filter_SimpleFilter) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*PlacementRule_SFGroup_Filter_SimpleFilter_Value)(nil), + (*PlacementRule_SFGroup_Filter_SimpleFilter_FArgs)(nil), + } +} + +type PlacementRule_SFGroup_Selector struct { + Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlacementRule_SFGroup_Selector) Reset() { *m = PlacementRule_SFGroup_Selector{} } +func (m *PlacementRule_SFGroup_Selector) String() string { return proto.CompactTextString(m) } +func (*PlacementRule_SFGroup_Selector) ProtoMessage() {} +func (*PlacementRule_SFGroup_Selector) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{0, 0, 1} +} +func (m *PlacementRule_SFGroup_Selector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRule_SFGroup_Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRule_SFGroup_Selector.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlacementRule_SFGroup_Selector) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRule_SFGroup_Selector.Merge(m, src) +} +func (m *PlacementRule_SFGroup_Selector) XXX_Size() int { + return m.Size() +} +func (m *PlacementRule_SFGroup_Selector) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRule_SFGroup_Selector.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRule_SFGroup_Selector proto.InternalMessageInfo + +func (m *PlacementRule_SFGroup_Selector) GetCount() uint32 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *PlacementRule_SFGroup_Selector) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +// Groups the information about the NeoFS node. +type NodeInfo struct { + // Carries network address of the NeoFS node. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Carries public key of the NeoFS node in a binary format. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Carries list of the NeoFS node attributes in a string key-value format. + Attributes []*NodeInfo_Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` + // Carries state of the NeoFS node. + State NodeInfo_State `protobuf:"varint,4,opt,name=state,proto3,enum=netmap.v2.NodeInfo_State" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeInfo) Reset() { *m = NodeInfo{} } +func (m *NodeInfo) String() string { return proto.CompactTextString(m) } +func (*NodeInfo) ProtoMessage() {} +func (*NodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{1} +} +func (m *NodeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeInfo.Merge(m, src) +} +func (m *NodeInfo) XXX_Size() int { + return m.Size() +} +func (m *NodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeInfo proto.InternalMessageInfo + +func (m *NodeInfo) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *NodeInfo) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *NodeInfo) GetAttributes() []*NodeInfo_Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *NodeInfo) GetState() NodeInfo_State { + if m != nil { + return m.State + } + return NodeInfo_UNKNOWN +} + +// Groups attributes of the NeoFS node. +type NodeInfo_Attribute struct { + // Carries string key to the node attribute. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Carries string value of the node attribute. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeInfo_Attribute) Reset() { *m = NodeInfo_Attribute{} } +func (m *NodeInfo_Attribute) String() string { return proto.CompactTextString(m) } +func (*NodeInfo_Attribute) ProtoMessage() {} +func (*NodeInfo_Attribute) Descriptor() ([]byte, []int) { + return fileDescriptor_059adda2b6daaf64, []int{1, 0} +} +func (m *NodeInfo_Attribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeInfo_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeInfo_Attribute.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NodeInfo_Attribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeInfo_Attribute.Merge(m, src) +} +func (m *NodeInfo_Attribute) XXX_Size() int { + return m.Size() +} +func (m *NodeInfo_Attribute) XXX_DiscardUnknown() { + xxx_messageInfo_NodeInfo_Attribute.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeInfo_Attribute proto.InternalMessageInfo + +func (m *NodeInfo_Attribute) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *NodeInfo_Attribute) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func init() { + proto.RegisterEnum("netmap.v2.PlacementRule_SFGroup_Filter_SimpleFilter_Operation", PlacementRule_SFGroup_Filter_SimpleFilter_Operation_name, PlacementRule_SFGroup_Filter_SimpleFilter_Operation_value) + proto.RegisterEnum("netmap.v2.NodeInfo_State", NodeInfo_State_name, NodeInfo_State_value) + proto.RegisterType((*PlacementRule)(nil), "netmap.v2.PlacementRule") + proto.RegisterType((*PlacementRule_SFGroup)(nil), "netmap.v2.PlacementRule.SFGroup") + proto.RegisterType((*PlacementRule_SFGroup_Filter)(nil), "netmap.v2.PlacementRule.SFGroup.Filter") + proto.RegisterType((*PlacementRule_SFGroup_Filter_SimpleFilters)(nil), "netmap.v2.PlacementRule.SFGroup.Filter.SimpleFilters") + proto.RegisterType((*PlacementRule_SFGroup_Filter_SimpleFilter)(nil), "netmap.v2.PlacementRule.SFGroup.Filter.SimpleFilter") + proto.RegisterType((*PlacementRule_SFGroup_Selector)(nil), "netmap.v2.PlacementRule.SFGroup.Selector") + proto.RegisterType((*NodeInfo)(nil), "netmap.v2.NodeInfo") + proto.RegisterType((*NodeInfo_Attribute)(nil), "netmap.v2.NodeInfo.Attribute") +} + +func init() { proto.RegisterFile("netmap/v2/types.proto", fileDescriptor_059adda2b6daaf64) } + +var fileDescriptor_059adda2b6daaf64 = []byte{ + // 633 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6b, 0xdb, 0x4a, + 0x10, 0xb6, 0xa4, 0x58, 0xb6, 0xc6, 0xf1, 0x43, 0x2c, 0x79, 0x0f, 0x3d, 0x43, 0xfc, 0x8c, 0x2f, + 0xcf, 0xa5, 0x58, 0x06, 0xa5, 0x3d, 0xa6, 0xe0, 0x50, 0x3b, 0x0d, 0x09, 0x6b, 0x77, 0x9d, 0x52, + 0xe8, 0xc5, 0xc8, 0xf2, 0xca, 0x15, 0x95, 0xb5, 0x42, 0xbb, 0x32, 0xcd, 0x2f, 0x69, 0x7f, 0x40, + 0x4f, 0xfd, 0x11, 0x3d, 0xf7, 0xd0, 0x43, 0x7f, 0x42, 0x49, 0xa1, 0xbf, 0xa3, 0xec, 0xda, 0x72, + 0x9d, 0x12, 0x48, 0xc9, 0x69, 0x34, 0xdf, 0xce, 0xf7, 0xcd, 0xec, 0xcc, 0x68, 0xe1, 0xef, 0x84, + 0x8a, 0xa5, 0x9f, 0xf6, 0x56, 0x5e, 0x4f, 0x5c, 0xa5, 0x94, 0xbb, 0x69, 0xc6, 0x04, 0x43, 0xd6, + 0x1a, 0x76, 0x57, 0x5e, 0xfb, 0x93, 0x09, 0xf5, 0x71, 0xec, 0x07, 0x74, 0x49, 0x13, 0x41, 0xf2, + 0x98, 0xa2, 0xff, 0xa0, 0x96, 0xd1, 0x34, 0x9e, 0x86, 0x7e, 0x20, 0x58, 0xe6, 0x68, 0x2d, 0xad, + 0x53, 0x27, 0x20, 0xa1, 0xa1, 0x42, 0xd0, 0x31, 0x58, 0x3c, 0x9c, 0x2e, 0x32, 0x96, 0xa7, 0xdc, + 0xd1, 0x5b, 0x46, 0xa7, 0xe6, 0xb5, 0xdc, 0xad, 0xa2, 0x7b, 0x43, 0xcd, 0x9d, 0x0c, 0x4f, 0x65, + 0x20, 0xa9, 0xf2, 0x50, 0x7d, 0xf0, 0xc6, 0x97, 0x32, 0x54, 0x36, 0x28, 0xea, 0x43, 0x25, 0x8c, + 0x62, 0x41, 0x33, 0xee, 0x68, 0x4a, 0xe8, 0xff, 0xbb, 0x84, 0xdc, 0xa1, 0x8a, 0x27, 0x05, 0x0f, + 0x9d, 0x82, 0xc5, 0x69, 0x4c, 0x65, 0x65, 0x45, 0x35, 0x0f, 0xee, 0x14, 0x99, 0x6c, 0x18, 0xe4, + 0x17, 0x17, 0x39, 0x50, 0xa1, 0x6f, 0x83, 0x38, 0x9f, 0x53, 0xc7, 0x68, 0x19, 0x9d, 0x3a, 0x29, + 0xdc, 0xc6, 0x0f, 0x03, 0xcc, 0x75, 0x5a, 0x64, 0x83, 0xf1, 0x86, 0x5e, 0xa9, 0xa6, 0x58, 0x44, + 0x7e, 0xa2, 0x13, 0xd0, 0x42, 0x47, 0x6f, 0x69, 0x9d, 0x9a, 0xf7, 0xe8, 0x0f, 0x8b, 0x77, 0x27, + 0xd1, 0x32, 0x8d, 0xe9, 0xe6, 0x26, 0x5a, 0xd8, 0x98, 0x42, 0x7d, 0x17, 0xe2, 0x08, 0xff, 0xde, + 0x97, 0xfb, 0x49, 0x17, 0x22, 0x8d, 0x0f, 0x3a, 0xec, 0xef, 0x9e, 0x20, 0x0c, 0x3a, 0x4b, 0xd5, + 0x35, 0xfe, 0xf2, 0x9e, 0xdc, 0x47, 0xdb, 0x1d, 0xa5, 0x34, 0xf3, 0x45, 0xc4, 0x12, 0xa2, 0xb3, + 0x14, 0xfd, 0x03, 0xe5, 0x95, 0x1f, 0xe7, 0x54, 0x75, 0xc2, 0x7a, 0x56, 0x22, 0x6b, 0x17, 0x61, + 0x30, 0xc3, 0xa9, 0x9f, 0x2d, 0xb8, 0x63, 0xa8, 0x16, 0x3d, 0xbe, 0x4f, 0x2e, 0x2e, 0xf5, 0xc2, + 0x7e, 0xb6, 0xe0, 0xed, 0x4b, 0xb0, 0xb6, 0x89, 0x91, 0x09, 0x3a, 0x1e, 0xdb, 0x25, 0x69, 0x07, + 0xcf, 0x6d, 0x4d, 0xf9, 0x03, 0x5b, 0x97, 0xf6, 0xf4, 0xd2, 0x36, 0x94, 0x1d, 0xd8, 0x7b, 0xd2, + 0x5e, 0x5c, 0xda, 0x65, 0x65, 0x07, 0xb6, 0x29, 0xed, 0x88, 0xd8, 0x15, 0x54, 0x01, 0xa3, 0x8f, + 0x9f, 0xda, 0xd5, 0x13, 0x13, 0xf6, 0x64, 0x8d, 0x0d, 0x0f, 0xaa, 0xc5, 0x66, 0xa0, 0x03, 0x28, + 0x07, 0x2c, 0x4f, 0xc4, 0xe6, 0x07, 0x58, 0x3b, 0xc5, 0xfc, 0xf5, 0xed, 0xfc, 0xdb, 0xef, 0x74, + 0xa8, 0x62, 0x36, 0xa7, 0x67, 0x49, 0xc8, 0xe4, 0x0e, 0xf9, 0xf3, 0x79, 0x46, 0x39, 0xdf, 0xac, + 0x48, 0xe1, 0xa2, 0x43, 0x80, 0x34, 0x9f, 0xc5, 0x51, 0x30, 0x2d, 0xf8, 0xfb, 0xc4, 0x5a, 0x23, + 0xe7, 0xf4, 0x0a, 0x1d, 0x03, 0xf8, 0x42, 0x64, 0xd1, 0x2c, 0x17, 0x94, 0xab, 0xfd, 0xab, 0x79, + 0x87, 0x3b, 0xbd, 0x2a, 0x32, 0xb8, 0xfd, 0x22, 0x8a, 0xec, 0x10, 0x50, 0x0f, 0xca, 0x5c, 0xf8, + 0x82, 0x3a, 0x7b, 0x6a, 0xa2, 0xff, 0xde, 0xc6, 0x9c, 0xc8, 0x00, 0xb2, 0x8e, 0x6b, 0x1c, 0x81, + 0xb5, 0x55, 0xba, 0x65, 0xa9, 0x0f, 0x6e, 0x8c, 0x73, 0x33, 0xcc, 0x76, 0x17, 0xca, 0x4a, 0x04, + 0xd5, 0xa0, 0xf2, 0x02, 0x9f, 0xe3, 0xd1, 0x4b, 0x6c, 0x97, 0x10, 0x80, 0x39, 0xc2, 0x17, 0x67, + 0x78, 0x60, 0x6b, 0xf2, 0x60, 0x34, 0x1c, 0x2a, 0x47, 0x3f, 0x19, 0x7f, 0xbe, 0x6e, 0x6a, 0x5f, + 0xaf, 0x9b, 0xda, 0xb7, 0xeb, 0xa6, 0xf6, 0xfe, 0x7b, 0xb3, 0xf4, 0xea, 0xe1, 0x22, 0x12, 0xaf, + 0xf3, 0x99, 0x1b, 0xb0, 0x65, 0x2f, 0xe1, 0x69, 0x10, 0x74, 0xe7, 0x74, 0xd5, 0x4b, 0x28, 0x0b, + 0x79, 0xd7, 0x4f, 0xa3, 0xee, 0x82, 0xf5, 0xb6, 0x0f, 0xd6, 0x47, 0xdd, 0xc6, 0x94, 0x0d, 0x27, + 0x6e, 0x7f, 0x7c, 0xe6, 0x62, 0x85, 0xce, 0x4c, 0xf5, 0x7c, 0x1d, 0xfd, 0x0c, 0x00, 0x00, 0xff, + 0xff, 0xb9, 0x8b, 0x54, 0xcf, 0xd7, 0x04, 0x00, 0x00, +} + +func (m *PlacementRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlacementRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SfGroups) > 0 { + for iNdEx := len(m.SfGroups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SfGroups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.ReplFactor != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ReplFactor)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PlacementRule_SFGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlacementRule_SFGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Exclude) > 0 { + dAtA2 := make([]byte, len(m.Exclude)*10) + var j1 int + for _, num := range m.Exclude { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintTypes(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x1a + } + if len(m.Selectors) > 0 { + for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PlacementRule_SFGroup_Filter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlacementRule_SFGroup_Filter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup_Filter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.F != nil { + { + size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Args != nil { + { + size := m.Args.Size() + i -= size + if _, err := m.Args.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.Op != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Op)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter_Value) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter_Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter_FArgs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter_FArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FArgs != nil { + { + size, err := m.FArgs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *PlacementRule_SFGroup_Selector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlacementRule_SFGroup_Selector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRule_SFGroup_Selector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if m.Count != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *NodeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x20 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NodeInfo_Attribute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeInfo_Attribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeInfo_Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PlacementRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReplFactor != 0 { + n += 1 + sovTypes(uint64(m.ReplFactor)) + } + if len(m.SfGroups) > 0 { + for _, e := range m.SfGroups { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PlacementRule_SFGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Exclude) > 0 { + l = 0 + for _, e := range m.Exclude { + l += sovTypes(uint64(e)) + } + n += 1 + sovTypes(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PlacementRule_SFGroup_Filter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Op != 0 { + n += 1 + sovTypes(uint64(m.Op)) + } + if m.Args != nil { + n += m.Args.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PlacementRule_SFGroup_Filter_SimpleFilter_Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovTypes(uint64(l)) + return n +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter_FArgs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FArgs != nil { + l = m.FArgs.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *PlacementRule_SFGroup_Selector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Count != 0 { + n += 1 + sovTypes(uint64(m.Count)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NodeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NodeInfo_Attribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PlacementRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PlacementRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PlacementRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplFactor", wireType) + } + m.ReplFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReplFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SfGroups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SfGroups = append(m.SfGroups, &PlacementRule_SFGroup{}) + if err := m.SfGroups[len(m.SfGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRule_SFGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SFGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SFGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, &PlacementRule_SFGroup_Filter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Selectors = append(m.Selectors, &PlacementRule_SFGroup_Selector{}) + if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exclude = append(m.Exclude, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Exclude) == 0 { + m.Exclude = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exclude = append(m.Exclude, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Exclude", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRule_SFGroup_Filter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Filter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Filter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &PlacementRule_SFGroup_Filter_SimpleFilter{} + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimpleFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimpleFilters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, &PlacementRule_SFGroup_Filter_SimpleFilter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRule_SFGroup_Filter_SimpleFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimpleFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimpleFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + } + m.Op = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Op |= PlacementRule_SFGroup_Filter_SimpleFilter_Operation(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = &PlacementRule_SFGroup_Filter_SimpleFilter_Value{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FArgs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &PlacementRule_SFGroup_Filter_SimpleFilters{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Args = &PlacementRule_SFGroup_Filter_SimpleFilter_FArgs{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRule_SFGroup_Selector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Selector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Selector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &NodeInfo_Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= NodeInfo_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeInfo_Attribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/netmap/v2/types.proto b/netmap/v2/types.proto new file mode 100644 index 0000000..2d12ea5 --- /dev/null +++ b/netmap/v2/types.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; + +package netmap.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/netmap/v2"; +option csharp_namespace = "NeoFS.API.Netmap"; + +message PlacementRule { + uint32 repl_factor = 1; + + message SFGroup { + message Filter { + string key = 1; + + message SimpleFilters { + repeated SimpleFilter filters = 1; + } + + message SimpleFilter { + enum Operation { + NP = 0; + EQ = 1; + NE = 2; + GT = 3; + GE = 4; + LT = 5; + LE = 6; + OR = 7; + AND = 8; + } + + Operation op = 1; + + oneof args { + string value = 2; + SimpleFilters f_args = 3; + } + } + + SimpleFilter f = 2; + } + + repeated Filter filters = 1; + + message Selector { + uint32 count = 1; + string key = 2; + } + + repeated Selector selectors = 2; + + repeated uint32 exclude = 3; + } + + repeated SFGroup sf_groups = 2; +} + +// Groups the information about the NeoFS node. +message NodeInfo { + // Carries network address of the NeoFS node. + string address = 1; + + // Carries public key of the NeoFS node in a binary format. + bytes public_key = 2; + + // Groups attributes of the NeoFS node. + message Attribute { + // Carries string key to the node attribute. + string key = 1; + + // Carries string value of the node attribute. + string value = 2; + } + + // Carries list of the NeoFS node attributes in a string key-value format. + repeated Attribute attributes = 3; + + // Represents the enumeration of various states of the NeoFS node. + enum State { + // Undefined state. + UNKNOWN = 0; + + // Active state in the network. + ONLINE = 1; + + // Network unavailable state. + OFFLINE = 2; + } + + // Carries state of the NeoFS node. + State state = 4; +} \ No newline at end of file diff --git a/object/v2/service.pb.go b/object/v2/service.pb.go new file mode 100644 index 0000000..ce67752 --- /dev/null +++ b/object/v2/service.pb.go @@ -0,0 +1,10393 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: object/v2/service.proto + +package v2 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v21 "github.com/nspcc-dev/neofs-api-go/refs/v2" + v2 "github.com/nspcc-dev/neofs-api-go/service/v2" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type SearchRequest_Body_Query_Filter_MatchType int32 + +const ( + SearchRequest_Body_Query_Filter_MATCH_UNKNOWN SearchRequest_Body_Query_Filter_MatchType = 0 + SearchRequest_Body_Query_Filter_STRING_EQUAL SearchRequest_Body_Query_Filter_MatchType = 1 +) + +var SearchRequest_Body_Query_Filter_MatchType_name = map[int32]string{ + 0: "MATCH_UNKNOWN", + 1: "STRING_EQUAL", +} + +var SearchRequest_Body_Query_Filter_MatchType_value = map[string]int32{ + "MATCH_UNKNOWN": 0, + "STRING_EQUAL": 1, +} + +func (x SearchRequest_Body_Query_Filter_MatchType) String() string { + return proto.EnumName(SearchRequest_Body_Query_Filter_MatchType_name, int32(x)) +} + +func (SearchRequest_Body_Query_Filter_MatchType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{8, 0, 0, 0, 0} +} + +type GetRequest struct { + // Body of get object request message. + Body *GetRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRequest) Reset() { *m = GetRequest{} } +func (m *GetRequest) String() string { return proto.CompactTextString(m) } +func (*GetRequest) ProtoMessage() {} +func (*GetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{0} +} +func (m *GetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest.Merge(m, src) +} +func (m *GetRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest proto.InternalMessageInfo + +func (m *GetRequest) GetBody() *GetRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetRequest_Body struct { + // Address of the requested object.v2. + Address *v21.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Carries the raw option flag of the request. + // Raw request is sent to receive only the objects + // that are physically stored on the server. + Raw bool `protobuf:"varint,2,opt,name=raw,proto3" json:"raw,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRequest_Body) Reset() { *m = GetRequest_Body{} } +func (m *GetRequest_Body) String() string { return proto.CompactTextString(m) } +func (*GetRequest_Body) ProtoMessage() {} +func (*GetRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{0, 0} +} +func (m *GetRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequest_Body.Merge(m, src) +} +func (m *GetRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *GetRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequest_Body proto.InternalMessageInfo + +func (m *GetRequest_Body) GetAddress() *v21.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *GetRequest_Body) GetRaw() bool { + if m != nil { + return m.Raw + } + return false +} + +type GetResponse struct { + // Body of get object response message. + Body *GetResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse) Reset() { *m = GetResponse{} } +func (m *GetResponse) String() string { return proto.CompactTextString(m) } +func (*GetResponse) ProtoMessage() {} +func (*GetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{1} +} +func (m *GetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse.Merge(m, src) +} +func (m *GetResponse) XXX_Size() int { + return m.Size() +} +func (m *GetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse proto.InternalMessageInfo + +func (m *GetResponse) GetBody() *GetResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetResponse_Body struct { + // Carries the single message of the response stream. + // + // Types that are valid to be assigned to ObjectPart: + // *GetResponse_Body_Init_ + // *GetResponse_Body_Chunk + ObjectPart isGetResponse_Body_ObjectPart `protobuf_oneof:"object_part"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse_Body) Reset() { *m = GetResponse_Body{} } +func (m *GetResponse_Body) String() string { return proto.CompactTextString(m) } +func (*GetResponse_Body) ProtoMessage() {} +func (*GetResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{1, 0} +} +func (m *GetResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse_Body.Merge(m, src) +} +func (m *GetResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *GetResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse_Body proto.InternalMessageInfo + +type isGetResponse_Body_ObjectPart interface { + isGetResponse_Body_ObjectPart() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetResponse_Body_Init_ struct { + Init *GetResponse_Body_Init `protobuf:"bytes,1,opt,name=init,proto3,oneof" json:"init,omitempty"` +} +type GetResponse_Body_Chunk struct { + Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3,oneof" json:"chunk,omitempty"` +} + +func (*GetResponse_Body_Init_) isGetResponse_Body_ObjectPart() {} +func (*GetResponse_Body_Chunk) isGetResponse_Body_ObjectPart() {} + +func (m *GetResponse_Body) GetObjectPart() isGetResponse_Body_ObjectPart { + if m != nil { + return m.ObjectPart + } + return nil +} + +func (m *GetResponse_Body) GetInit() *GetResponse_Body_Init { + if x, ok := m.GetObjectPart().(*GetResponse_Body_Init_); ok { + return x.Init + } + return nil +} + +func (m *GetResponse_Body) GetChunk() []byte { + if x, ok := m.GetObjectPart().(*GetResponse_Body_Chunk); ok { + return x.Chunk + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GetResponse_Body) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*GetResponse_Body_Init_)(nil), + (*GetResponse_Body_Chunk)(nil), + } +} + +// Initialization parameters of the object got from NeoFS. +type GetResponse_Body_Init struct { + // Object ID + ObjectId *v21.ObjectID `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + // Object signature + Signature *v2.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // Object header. + Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetResponse_Body_Init) Reset() { *m = GetResponse_Body_Init{} } +func (m *GetResponse_Body_Init) String() string { return proto.CompactTextString(m) } +func (*GetResponse_Body_Init) ProtoMessage() {} +func (*GetResponse_Body_Init) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{1, 0, 0} +} +func (m *GetResponse_Body_Init) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetResponse_Body_Init) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetResponse_Body_Init.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetResponse_Body_Init) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetResponse_Body_Init.Merge(m, src) +} +func (m *GetResponse_Body_Init) XXX_Size() int { + return m.Size() +} +func (m *GetResponse_Body_Init) XXX_DiscardUnknown() { + xxx_messageInfo_GetResponse_Body_Init.DiscardUnknown(m) +} + +var xxx_messageInfo_GetResponse_Body_Init proto.InternalMessageInfo + +func (m *GetResponse_Body_Init) GetObjectId() *v21.ObjectID { + if m != nil { + return m.ObjectId + } + return nil +} + +func (m *GetResponse_Body_Init) GetSignature() *v2.Signature { + if m != nil { + return m.Signature + } + return nil +} + +func (m *GetResponse_Body_Init) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +type PutRequest struct { + // Body of put object request message. + Body *PutRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRequest) Reset() { *m = PutRequest{} } +func (m *PutRequest) String() string { return proto.CompactTextString(m) } +func (*PutRequest) ProtoMessage() {} +func (*PutRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{2} +} +func (m *PutRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest.Merge(m, src) +} +func (m *PutRequest) XXX_Size() int { + return m.Size() +} +func (m *PutRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest proto.InternalMessageInfo + +func (m *PutRequest) GetBody() *PutRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *PutRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *PutRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type PutRequest_Body struct { + // Carries the single part of the query stream. + // + // Types that are valid to be assigned to ObjectPart: + // *PutRequest_Body_Init_ + // *PutRequest_Body_Chunk + ObjectPart isPutRequest_Body_ObjectPart `protobuf_oneof:"object_part"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRequest_Body) Reset() { *m = PutRequest_Body{} } +func (m *PutRequest_Body) String() string { return proto.CompactTextString(m) } +func (*PutRequest_Body) ProtoMessage() {} +func (*PutRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{2, 0} +} +func (m *PutRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest_Body.Merge(m, src) +} +func (m *PutRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *PutRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest_Body proto.InternalMessageInfo + +type isPutRequest_Body_ObjectPart interface { + isPutRequest_Body_ObjectPart() + MarshalTo([]byte) (int, error) + Size() int +} + +type PutRequest_Body_Init_ struct { + Init *PutRequest_Body_Init `protobuf:"bytes,1,opt,name=init,proto3,oneof" json:"init,omitempty"` +} +type PutRequest_Body_Chunk struct { + Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3,oneof" json:"chunk,omitempty"` +} + +func (*PutRequest_Body_Init_) isPutRequest_Body_ObjectPart() {} +func (*PutRequest_Body_Chunk) isPutRequest_Body_ObjectPart() {} + +func (m *PutRequest_Body) GetObjectPart() isPutRequest_Body_ObjectPart { + if m != nil { + return m.ObjectPart + } + return nil +} + +func (m *PutRequest_Body) GetInit() *PutRequest_Body_Init { + if x, ok := m.GetObjectPart().(*PutRequest_Body_Init_); ok { + return x.Init + } + return nil +} + +func (m *PutRequest_Body) GetChunk() []byte { + if x, ok := m.GetObjectPart().(*PutRequest_Body_Chunk); ok { + return x.Chunk + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*PutRequest_Body) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*PutRequest_Body_Init_)(nil), + (*PutRequest_Body_Chunk)(nil), + } +} + +// Groups initialization parameters of object placement in NeoFS. +type PutRequest_Body_Init struct { + // Object ID, where available + ObjectId *v21.ObjectID `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + // Object signature, were available + Signature *v2.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // Header of the object to save in the system. + Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` + // Number of the object copies to store within the RPC call. + // Default zero value is processed according to the + // container placement rules. + CopiesNumber uint32 `protobuf:"varint,4,opt,name=copies_number,json=copiesNumber,proto3" json:"copies_number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRequest_Body_Init) Reset() { *m = PutRequest_Body_Init{} } +func (m *PutRequest_Body_Init) String() string { return proto.CompactTextString(m) } +func (*PutRequest_Body_Init) ProtoMessage() {} +func (*PutRequest_Body_Init) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{2, 0, 0} +} +func (m *PutRequest_Body_Init) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRequest_Body_Init) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRequest_Body_Init.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutRequest_Body_Init) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRequest_Body_Init.Merge(m, src) +} +func (m *PutRequest_Body_Init) XXX_Size() int { + return m.Size() +} +func (m *PutRequest_Body_Init) XXX_DiscardUnknown() { + xxx_messageInfo_PutRequest_Body_Init.DiscardUnknown(m) +} + +var xxx_messageInfo_PutRequest_Body_Init proto.InternalMessageInfo + +func (m *PutRequest_Body_Init) GetObjectId() *v21.ObjectID { + if m != nil { + return m.ObjectId + } + return nil +} + +func (m *PutRequest_Body_Init) GetSignature() *v2.Signature { + if m != nil { + return m.Signature + } + return nil +} + +func (m *PutRequest_Body_Init) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *PutRequest_Body_Init) GetCopiesNumber() uint32 { + if m != nil { + return m.CopiesNumber + } + return 0 +} + +type PutResponse struct { + // Body of put object response message. + Body *PutResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutResponse) Reset() { *m = PutResponse{} } +func (m *PutResponse) String() string { return proto.CompactTextString(m) } +func (*PutResponse) ProtoMessage() {} +func (*PutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{3} +} +func (m *PutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutResponse.Merge(m, src) +} +func (m *PutResponse) XXX_Size() int { + return m.Size() +} +func (m *PutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PutResponse proto.InternalMessageInfo + +func (m *PutResponse) GetBody() *PutResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *PutResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *PutResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type PutResponse_Body struct { + // Carries identifier of the saved object.v2. + // It is used to access an object in the container.v2. + ObjectId *v21.ObjectID `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutResponse_Body) Reset() { *m = PutResponse_Body{} } +func (m *PutResponse_Body) String() string { return proto.CompactTextString(m) } +func (*PutResponse_Body) ProtoMessage() {} +func (*PutResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{3, 0} +} +func (m *PutResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PutResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutResponse_Body.Merge(m, src) +} +func (m *PutResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *PutResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_PutResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_PutResponse_Body proto.InternalMessageInfo + +func (m *PutResponse_Body) GetObjectId() *v21.ObjectID { + if m != nil { + return m.ObjectId + } + return nil +} + +type DeleteRequest struct { + // Body of delete object request message. + Body *DeleteRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } +func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest) ProtoMessage() {} +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{4} +} +func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest.Merge(m, src) +} +func (m *DeleteRequest) XXX_Size() int { + return m.Size() +} +func (m *DeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo + +func (m *DeleteRequest) GetBody() *DeleteRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *DeleteRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *DeleteRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type DeleteRequest_Body struct { + // Carries the address of the object to be deleted. + Address *v21.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Carries identifier the object owner. + OwnerId *v21.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteRequest_Body) Reset() { *m = DeleteRequest_Body{} } +func (m *DeleteRequest_Body) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest_Body) ProtoMessage() {} +func (*DeleteRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{4, 0} +} +func (m *DeleteRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest_Body.Merge(m, src) +} +func (m *DeleteRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *DeleteRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest_Body proto.InternalMessageInfo + +func (m *DeleteRequest_Body) GetAddress() *v21.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *DeleteRequest_Body) GetOwnerId() *v21.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +// DeleteResponse is empty because we cannot guarantee permanent object removal +// in distributed system. +type DeleteResponse struct { + // Body of delete object response message. + Body *DeleteResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } +func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse) ProtoMessage() {} +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{5} +} +func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse.Merge(m, src) +} +func (m *DeleteResponse) XXX_Size() int { + return m.Size() +} +func (m *DeleteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo + +func (m *DeleteResponse) GetBody() *DeleteResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *DeleteResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *DeleteResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type DeleteResponse_Body struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteResponse_Body) Reset() { *m = DeleteResponse_Body{} } +func (m *DeleteResponse_Body) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse_Body) ProtoMessage() {} +func (*DeleteResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{5, 0} +} +func (m *DeleteResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DeleteResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse_Body.Merge(m, src) +} +func (m *DeleteResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *DeleteResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteResponse_Body proto.InternalMessageInfo + +type HeadRequest struct { + // Body of head object request message. + Body *HeadRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeadRequest) Reset() { *m = HeadRequest{} } +func (m *HeadRequest) String() string { return proto.CompactTextString(m) } +func (*HeadRequest) ProtoMessage() {} +func (*HeadRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{6} +} +func (m *HeadRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeadRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HeadRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeadRequest.Merge(m, src) +} +func (m *HeadRequest) XXX_Size() int { + return m.Size() +} +func (m *HeadRequest) XXX_DiscardUnknown() { + xxx_messageInfo_HeadRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_HeadRequest proto.InternalMessageInfo + +func (m *HeadRequest) GetBody() *HeadRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *HeadRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *HeadRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type HeadRequest_Body struct { + // Address of the object with the requested header. + Address *v21.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Return only minimal header subset + MainOnly bool `protobuf:"varint,2,opt,name=main_only,json=mainOnly,proto3" json:"main_only,omitempty"` + // Carries the raw option flag of the request. + // Raw request is sent to receive only the headers of the objects + // that are physically stored on the server. + Raw bool `protobuf:"varint,3,opt,name=raw,proto3" json:"raw,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeadRequest_Body) Reset() { *m = HeadRequest_Body{} } +func (m *HeadRequest_Body) String() string { return proto.CompactTextString(m) } +func (*HeadRequest_Body) ProtoMessage() {} +func (*HeadRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{6, 0} +} +func (m *HeadRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeadRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeadRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HeadRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeadRequest_Body.Merge(m, src) +} +func (m *HeadRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *HeadRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_HeadRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_HeadRequest_Body proto.InternalMessageInfo + +func (m *HeadRequest_Body) GetAddress() *v21.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *HeadRequest_Body) GetMainOnly() bool { + if m != nil { + return m.MainOnly + } + return false +} + +func (m *HeadRequest_Body) GetRaw() bool { + if m != nil { + return m.Raw + } + return false +} + +type HeadResponse struct { + // Body of head object response message. + Body *HeadResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeadResponse) Reset() { *m = HeadResponse{} } +func (m *HeadResponse) String() string { return proto.CompactTextString(m) } +func (*HeadResponse) ProtoMessage() {} +func (*HeadResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{7} +} +func (m *HeadResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeadResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HeadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeadResponse.Merge(m, src) +} +func (m *HeadResponse) XXX_Size() int { + return m.Size() +} +func (m *HeadResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HeadResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_HeadResponse proto.InternalMessageInfo + +func (m *HeadResponse) GetBody() *HeadResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *HeadResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *HeadResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type HeadResponse_Body struct { + // Carries the requested object header or it's part + // + // Types that are valid to be assigned to Head: + // *HeadResponse_Body_Header + // *HeadResponse_Body_ShortHeader_ + Head isHeadResponse_Body_Head `protobuf_oneof:"head"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeadResponse_Body) Reset() { *m = HeadResponse_Body{} } +func (m *HeadResponse_Body) String() string { return proto.CompactTextString(m) } +func (*HeadResponse_Body) ProtoMessage() {} +func (*HeadResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{7, 0} +} +func (m *HeadResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeadResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeadResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HeadResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeadResponse_Body.Merge(m, src) +} +func (m *HeadResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *HeadResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_HeadResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_HeadResponse_Body proto.InternalMessageInfo + +type isHeadResponse_Body_Head interface { + isHeadResponse_Body_Head() + MarshalTo([]byte) (int, error) + Size() int +} + +type HeadResponse_Body_Header struct { + Header *Header `protobuf:"bytes,1,opt,name=header,proto3,oneof" json:"header,omitempty"` +} +type HeadResponse_Body_ShortHeader_ struct { + ShortHeader *HeadResponse_Body_ShortHeader `protobuf:"bytes,2,opt,name=short_header,json=shortHeader,proto3,oneof" json:"short_header,omitempty"` +} + +func (*HeadResponse_Body_Header) isHeadResponse_Body_Head() {} +func (*HeadResponse_Body_ShortHeader_) isHeadResponse_Body_Head() {} + +func (m *HeadResponse_Body) GetHead() isHeadResponse_Body_Head { + if m != nil { + return m.Head + } + return nil +} + +func (m *HeadResponse_Body) GetHeader() *Header { + if x, ok := m.GetHead().(*HeadResponse_Body_Header); ok { + return x.Header + } + return nil +} + +func (m *HeadResponse_Body) GetShortHeader() *HeadResponse_Body_ShortHeader { + if x, ok := m.GetHead().(*HeadResponse_Body_ShortHeader_); ok { + return x.ShortHeader + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HeadResponse_Body) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HeadResponse_Body_Header)(nil), + (*HeadResponse_Body_ShortHeader_)(nil), + } +} + +type HeadResponse_Body_ShortHeader struct { + // Object format version. + Version *v2.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Epoch when the object was created + CreationEpoch uint64 `protobuf:"varint,2,opt,name=creation_epoch,json=creationEpoch,proto3" json:"creation_epoch,omitempty"` + // Object's owner + OwnerId *v21.OwnerID `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // Type of the object payload content + ObjectType ObjectType `protobuf:"varint,4,opt,name=object_type,json=objectType,proto3,enum=object.v2.ObjectType" json:"object_type,omitempty"` + // Size of payload in bytes. + // 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown + PayloadLength uint64 `protobuf:"varint,5,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeadResponse_Body_ShortHeader) Reset() { *m = HeadResponse_Body_ShortHeader{} } +func (m *HeadResponse_Body_ShortHeader) String() string { return proto.CompactTextString(m) } +func (*HeadResponse_Body_ShortHeader) ProtoMessage() {} +func (*HeadResponse_Body_ShortHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{7, 0, 0} +} +func (m *HeadResponse_Body_ShortHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeadResponse_Body_ShortHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeadResponse_Body_ShortHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HeadResponse_Body_ShortHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeadResponse_Body_ShortHeader.Merge(m, src) +} +func (m *HeadResponse_Body_ShortHeader) XXX_Size() int { + return m.Size() +} +func (m *HeadResponse_Body_ShortHeader) XXX_DiscardUnknown() { + xxx_messageInfo_HeadResponse_Body_ShortHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_HeadResponse_Body_ShortHeader proto.InternalMessageInfo + +func (m *HeadResponse_Body_ShortHeader) GetVersion() *v2.Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *HeadResponse_Body_ShortHeader) GetCreationEpoch() uint64 { + if m != nil { + return m.CreationEpoch + } + return 0 +} + +func (m *HeadResponse_Body_ShortHeader) GetOwnerId() *v21.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +func (m *HeadResponse_Body_ShortHeader) GetObjectType() ObjectType { + if m != nil { + return m.ObjectType + } + return ObjectType_REGULAR +} + +func (m *HeadResponse_Body_ShortHeader) GetPayloadLength() uint64 { + if m != nil { + return m.PayloadLength + } + return 0 +} + +type SearchRequest struct { + // Body of search object request message. + Body *SearchRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchRequest) Reset() { *m = SearchRequest{} } +func (m *SearchRequest) String() string { return proto.CompactTextString(m) } +func (*SearchRequest) ProtoMessage() {} +func (*SearchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{8} +} +func (m *SearchRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchRequest.Merge(m, src) +} +func (m *SearchRequest) XXX_Size() int { + return m.Size() +} +func (m *SearchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SearchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchRequest proto.InternalMessageInfo + +func (m *SearchRequest) GetBody() *SearchRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *SearchRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *SearchRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type SearchRequest_Body struct { + // Carries search container identifier. + ContainerId *v21.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + Query *SearchRequest_Body_Query `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchRequest_Body) Reset() { *m = SearchRequest_Body{} } +func (m *SearchRequest_Body) String() string { return proto.CompactTextString(m) } +func (*SearchRequest_Body) ProtoMessage() {} +func (*SearchRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{8, 0} +} +func (m *SearchRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchRequest_Body.Merge(m, src) +} +func (m *SearchRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *SearchRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_SearchRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchRequest_Body proto.InternalMessageInfo + +func (m *SearchRequest_Body) GetContainerId() *v21.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +func (m *SearchRequest_Body) GetQuery() *SearchRequest_Body_Query { + if m != nil { + return m.Query + } + return nil +} + +type SearchRequest_Body_Query struct { + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Filters []*SearchRequest_Body_Query_Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchRequest_Body_Query) Reset() { *m = SearchRequest_Body_Query{} } +func (m *SearchRequest_Body_Query) String() string { return proto.CompactTextString(m) } +func (*SearchRequest_Body_Query) ProtoMessage() {} +func (*SearchRequest_Body_Query) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{8, 0, 0} +} +func (m *SearchRequest_Body_Query) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchRequest_Body_Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchRequest_Body_Query.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchRequest_Body_Query) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchRequest_Body_Query.Merge(m, src) +} +func (m *SearchRequest_Body_Query) XXX_Size() int { + return m.Size() +} +func (m *SearchRequest_Body_Query) XXX_DiscardUnknown() { + xxx_messageInfo_SearchRequest_Body_Query.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchRequest_Body_Query proto.InternalMessageInfo + +func (m *SearchRequest_Body_Query) GetVersion() uint32 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *SearchRequest_Body_Query) GetFilters() []*SearchRequest_Body_Query_Filter { + if m != nil { + return m.Filters + } + return nil +} + +type SearchRequest_Body_Query_Filter struct { + MatchType SearchRequest_Body_Query_Filter_MatchType `protobuf:"varint,1,opt,name=match_type,json=matchType,proto3,enum=object.v2.SearchRequest_Body_Query_Filter_MatchType" json:"match_type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchRequest_Body_Query_Filter) Reset() { *m = SearchRequest_Body_Query_Filter{} } +func (m *SearchRequest_Body_Query_Filter) String() string { return proto.CompactTextString(m) } +func (*SearchRequest_Body_Query_Filter) ProtoMessage() {} +func (*SearchRequest_Body_Query_Filter) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{8, 0, 0, 0} +} +func (m *SearchRequest_Body_Query_Filter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchRequest_Body_Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchRequest_Body_Query_Filter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchRequest_Body_Query_Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchRequest_Body_Query_Filter.Merge(m, src) +} +func (m *SearchRequest_Body_Query_Filter) XXX_Size() int { + return m.Size() +} +func (m *SearchRequest_Body_Query_Filter) XXX_DiscardUnknown() { + xxx_messageInfo_SearchRequest_Body_Query_Filter.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchRequest_Body_Query_Filter proto.InternalMessageInfo + +func (m *SearchRequest_Body_Query_Filter) GetMatchType() SearchRequest_Body_Query_Filter_MatchType { + if m != nil { + return m.MatchType + } + return SearchRequest_Body_Query_Filter_MATCH_UNKNOWN +} + +func (m *SearchRequest_Body_Query_Filter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SearchRequest_Body_Query_Filter) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +type SearchResponse struct { + // Body of search object response message. + Body *SearchResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchResponse) Reset() { *m = SearchResponse{} } +func (m *SearchResponse) String() string { return proto.CompactTextString(m) } +func (*SearchResponse) ProtoMessage() {} +func (*SearchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{9} +} +func (m *SearchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchResponse.Merge(m, src) +} +func (m *SearchResponse) XXX_Size() int { + return m.Size() +} +func (m *SearchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SearchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchResponse proto.InternalMessageInfo + +func (m *SearchResponse) GetBody() *SearchResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *SearchResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *SearchResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type SearchResponse_Body struct { + // Carries list of object identifiers that match the search query. + IdList []*v21.ObjectID `protobuf:"bytes,1,rep,name=id_list,json=idList,proto3" json:"id_list,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchResponse_Body) Reset() { *m = SearchResponse_Body{} } +func (m *SearchResponse_Body) String() string { return proto.CompactTextString(m) } +func (*SearchResponse_Body) ProtoMessage() {} +func (*SearchResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{9, 0} +} +func (m *SearchResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchResponse_Body.Merge(m, src) +} +func (m *SearchResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *SearchResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_SearchResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchResponse_Body proto.InternalMessageInfo + +func (m *SearchResponse_Body) GetIdList() []*v21.ObjectID { + if m != nil { + return m.IdList + } + return nil +} + +// Range groups the parameters of object payload range. +type Range struct { + // Carries the offset of the range from the object payload start. + Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + // Carries the length of the object payload range. + Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Range) Reset() { *m = Range{} } +func (m *Range) String() string { return proto.CompactTextString(m) } +func (*Range) ProtoMessage() {} +func (*Range) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{10} +} +func (m *Range) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Range.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Range) XXX_Merge(src proto.Message) { + xxx_messageInfo_Range.Merge(m, src) +} +func (m *Range) XXX_Size() int { + return m.Size() +} +func (m *Range) XXX_DiscardUnknown() { + xxx_messageInfo_Range.DiscardUnknown(m) +} + +var xxx_messageInfo_Range proto.InternalMessageInfo + +func (m *Range) GetOffset() uint64 { + if m != nil { + return m.Offset + } + return 0 +} + +func (m *Range) GetLength() uint64 { + if m != nil { + return m.Length + } + return 0 +} + +type GetRangeRequest struct { + // Body of get range object request message. + Body *GetRangeRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeRequest) Reset() { *m = GetRangeRequest{} } +func (m *GetRangeRequest) String() string { return proto.CompactTextString(m) } +func (*GetRangeRequest) ProtoMessage() {} +func (*GetRangeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{11} +} +func (m *GetRangeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeRequest.Merge(m, src) +} +func (m *GetRangeRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRangeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeRequest proto.InternalMessageInfo + +func (m *GetRangeRequest) GetBody() *GetRangeRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetRangeRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetRangeRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetRangeRequest_Body struct { + // Address carries address of the object that contains the requested payload range. + Address *v21.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Range carries the parameters of the requested payload range. + Range *Range `protobuf:"bytes,2,opt,name=range,proto3" json:"range,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeRequest_Body) Reset() { *m = GetRangeRequest_Body{} } +func (m *GetRangeRequest_Body) String() string { return proto.CompactTextString(m) } +func (*GetRangeRequest_Body) ProtoMessage() {} +func (*GetRangeRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{11, 0} +} +func (m *GetRangeRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeRequest_Body.Merge(m, src) +} +func (m *GetRangeRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *GetRangeRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeRequest_Body proto.InternalMessageInfo + +func (m *GetRangeRequest_Body) GetAddress() *v21.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *GetRangeRequest_Body) GetRange() *Range { + if m != nil { + return m.Range + } + return nil +} + +type GetRangeResponse struct { + // Body of get range object response message. + Body *GetRangeResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeResponse) Reset() { *m = GetRangeResponse{} } +func (m *GetRangeResponse) String() string { return proto.CompactTextString(m) } +func (*GetRangeResponse) ProtoMessage() {} +func (*GetRangeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{12} +} +func (m *GetRangeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeResponse.Merge(m, src) +} +func (m *GetRangeResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRangeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeResponse proto.InternalMessageInfo + +func (m *GetRangeResponse) GetBody() *GetRangeResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetRangeResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetRangeResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetRangeResponse_Body struct { + // Carries part of the object payload. + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeResponse_Body) Reset() { *m = GetRangeResponse_Body{} } +func (m *GetRangeResponse_Body) String() string { return proto.CompactTextString(m) } +func (*GetRangeResponse_Body) ProtoMessage() {} +func (*GetRangeResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{12, 0} +} +func (m *GetRangeResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeResponse_Body.Merge(m, src) +} +func (m *GetRangeResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *GetRangeResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeResponse_Body proto.InternalMessageInfo + +func (m *GetRangeResponse_Body) GetChunk() []byte { + if m != nil { + return m.Chunk + } + return nil +} + +type GetRangeHashRequest struct { + // Body of get range hash object request message. + Body *GetRangeHashRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeHashRequest) Reset() { *m = GetRangeHashRequest{} } +func (m *GetRangeHashRequest) String() string { return proto.CompactTextString(m) } +func (*GetRangeHashRequest) ProtoMessage() {} +func (*GetRangeHashRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{13} +} +func (m *GetRangeHashRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeHashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeHashRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeHashRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeHashRequest.Merge(m, src) +} +func (m *GetRangeHashRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRangeHashRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeHashRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeHashRequest proto.InternalMessageInfo + +func (m *GetRangeHashRequest) GetBody() *GetRangeHashRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetRangeHashRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetRangeHashRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetRangeHashRequest_Body struct { + // Carries address of the object that contains the requested payload range. + Address *v21.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Carries the list of object payload range to calculate homomorphic hash. + Ranges []*Range `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` + // Carries binary salt to XOR object payload ranges before hash calculation. + Salt []byte `protobuf:"bytes,3,opt,name=salt,proto3" json:"salt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeHashRequest_Body) Reset() { *m = GetRangeHashRequest_Body{} } +func (m *GetRangeHashRequest_Body) String() string { return proto.CompactTextString(m) } +func (*GetRangeHashRequest_Body) ProtoMessage() {} +func (*GetRangeHashRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{13, 0} +} +func (m *GetRangeHashRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeHashRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeHashRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeHashRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeHashRequest_Body.Merge(m, src) +} +func (m *GetRangeHashRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *GetRangeHashRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeHashRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeHashRequest_Body proto.InternalMessageInfo + +func (m *GetRangeHashRequest_Body) GetAddress() *v21.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *GetRangeHashRequest_Body) GetRanges() []*Range { + if m != nil { + return m.Ranges + } + return nil +} + +func (m *GetRangeHashRequest_Body) GetSalt() []byte { + if m != nil { + return m.Salt + } + return nil +} + +type GetRangeHashResponse struct { + // Body of get range hash object response message. + Body *GetRangeHashResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeHashResponse) Reset() { *m = GetRangeHashResponse{} } +func (m *GetRangeHashResponse) String() string { return proto.CompactTextString(m) } +func (*GetRangeHashResponse) ProtoMessage() {} +func (*GetRangeHashResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{14} +} +func (m *GetRangeHashResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeHashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeHashResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeHashResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeHashResponse.Merge(m, src) +} +func (m *GetRangeHashResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRangeHashResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeHashResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeHashResponse proto.InternalMessageInfo + +func (m *GetRangeHashResponse) GetBody() *GetRangeHashResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *GetRangeHashResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *GetRangeHashResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type GetRangeHashResponse_Body struct { + // Carries list of homomorphic hashes in a binary format. + HashList [][]byte `protobuf:"bytes,1,rep,name=hash_list,json=hashList,proto3" json:"hash_list,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRangeHashResponse_Body) Reset() { *m = GetRangeHashResponse_Body{} } +func (m *GetRangeHashResponse_Body) String() string { return proto.CompactTextString(m) } +func (*GetRangeHashResponse_Body) ProtoMessage() {} +func (*GetRangeHashResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_7c0929a7db2b025b, []int{14, 0} +} +func (m *GetRangeHashResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRangeHashResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRangeHashResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRangeHashResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRangeHashResponse_Body.Merge(m, src) +} +func (m *GetRangeHashResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *GetRangeHashResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_GetRangeHashResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRangeHashResponse_Body proto.InternalMessageInfo + +func (m *GetRangeHashResponse_Body) GetHashList() [][]byte { + if m != nil { + return m.HashList + } + return nil +} + +func init() { + proto.RegisterEnum("object.v2.SearchRequest_Body_Query_Filter_MatchType", SearchRequest_Body_Query_Filter_MatchType_name, SearchRequest_Body_Query_Filter_MatchType_value) + proto.RegisterType((*GetRequest)(nil), "object.v2.GetRequest") + proto.RegisterType((*GetRequest_Body)(nil), "object.v2.GetRequest.Body") + proto.RegisterType((*GetResponse)(nil), "object.v2.GetResponse") + proto.RegisterType((*GetResponse_Body)(nil), "object.v2.GetResponse.Body") + proto.RegisterType((*GetResponse_Body_Init)(nil), "object.v2.GetResponse.Body.Init") + proto.RegisterType((*PutRequest)(nil), "object.v2.PutRequest") + proto.RegisterType((*PutRequest_Body)(nil), "object.v2.PutRequest.Body") + proto.RegisterType((*PutRequest_Body_Init)(nil), "object.v2.PutRequest.Body.Init") + proto.RegisterType((*PutResponse)(nil), "object.v2.PutResponse") + proto.RegisterType((*PutResponse_Body)(nil), "object.v2.PutResponse.Body") + proto.RegisterType((*DeleteRequest)(nil), "object.v2.DeleteRequest") + proto.RegisterType((*DeleteRequest_Body)(nil), "object.v2.DeleteRequest.Body") + proto.RegisterType((*DeleteResponse)(nil), "object.v2.DeleteResponse") + proto.RegisterType((*DeleteResponse_Body)(nil), "object.v2.DeleteResponse.Body") + proto.RegisterType((*HeadRequest)(nil), "object.v2.HeadRequest") + proto.RegisterType((*HeadRequest_Body)(nil), "object.v2.HeadRequest.Body") + proto.RegisterType((*HeadResponse)(nil), "object.v2.HeadResponse") + proto.RegisterType((*HeadResponse_Body)(nil), "object.v2.HeadResponse.Body") + proto.RegisterType((*HeadResponse_Body_ShortHeader)(nil), "object.v2.HeadResponse.Body.ShortHeader") + proto.RegisterType((*SearchRequest)(nil), "object.v2.SearchRequest") + proto.RegisterType((*SearchRequest_Body)(nil), "object.v2.SearchRequest.Body") + proto.RegisterType((*SearchRequest_Body_Query)(nil), "object.v2.SearchRequest.Body.Query") + proto.RegisterType((*SearchRequest_Body_Query_Filter)(nil), "object.v2.SearchRequest.Body.Query.Filter") + proto.RegisterType((*SearchResponse)(nil), "object.v2.SearchResponse") + proto.RegisterType((*SearchResponse_Body)(nil), "object.v2.SearchResponse.Body") + proto.RegisterType((*Range)(nil), "object.v2.Range") + proto.RegisterType((*GetRangeRequest)(nil), "object.v2.GetRangeRequest") + proto.RegisterType((*GetRangeRequest_Body)(nil), "object.v2.GetRangeRequest.Body") + proto.RegisterType((*GetRangeResponse)(nil), "object.v2.GetRangeResponse") + proto.RegisterType((*GetRangeResponse_Body)(nil), "object.v2.GetRangeResponse.Body") + proto.RegisterType((*GetRangeHashRequest)(nil), "object.v2.GetRangeHashRequest") + proto.RegisterType((*GetRangeHashRequest_Body)(nil), "object.v2.GetRangeHashRequest.Body") + proto.RegisterType((*GetRangeHashResponse)(nil), "object.v2.GetRangeHashResponse") + proto.RegisterType((*GetRangeHashResponse_Body)(nil), "object.v2.GetRangeHashResponse.Body") +} + +func init() { proto.RegisterFile("object/v2/service.proto", fileDescriptor_7c0929a7db2b025b) } + +var fileDescriptor_7c0929a7db2b025b = []byte{ + // 1387 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x1b, 0xc5, + 0x1b, 0xce, 0xae, 0x3f, 0x12, 0xbf, 0xb6, 0xf3, 0x73, 0xa7, 0x49, 0xea, 0xdf, 0xa6, 0x75, 0xa3, + 0x0d, 0xad, 0x42, 0xab, 0x6c, 0x82, 0x5b, 0x52, 0x38, 0x40, 0x95, 0x34, 0x6d, 0x63, 0xda, 0x7c, + 0x74, 0xdd, 0x16, 0xa9, 0x17, 0x6b, 0xb3, 0x3b, 0x89, 0x17, 0xec, 0x5d, 0x77, 0x77, 0xed, 0xca, + 0x67, 0x10, 0x47, 0x8e, 0x88, 0x23, 0x82, 0x1b, 0x12, 0x70, 0x46, 0xfc, 0x03, 0x08, 0x81, 0xc4, + 0x99, 0x13, 0x0a, 0x67, 0x84, 0x90, 0x38, 0x22, 0x84, 0xe6, 0x63, 0xd7, 0x3b, 0xa9, 0x1d, 0x87, + 0x9c, 0xf6, 0xb6, 0xfb, 0xce, 0xf3, 0xce, 0xce, 0xf3, 0xcc, 0x33, 0xef, 0xcc, 0x2c, 0x5c, 0x70, + 0xf7, 0xdf, 0xc3, 0x66, 0xb0, 0xd2, 0xab, 0xae, 0xf8, 0xd8, 0xeb, 0xd9, 0x26, 0xd6, 0x3a, 0x9e, + 0x1b, 0xb8, 0x28, 0xc7, 0x1a, 0xb4, 0x5e, 0x55, 0x99, 0x1d, 0x60, 0x82, 0x7e, 0x07, 0xfb, 0x0c, + 0xa1, 0x9c, 0xf7, 0xf0, 0x81, 0x7f, 0x3c, 0x38, 0xcb, 0x7b, 0x21, 0xf1, 0x36, 0x0e, 0x0c, 0x1e, + 0xbe, 0x10, 0x0b, 0xf7, 0xb0, 0x67, 0x1f, 0xf4, 0x59, 0x83, 0xfa, 0xb1, 0x0c, 0x70, 0x1f, 0x07, + 0x3a, 0x7e, 0xde, 0xc5, 0x7e, 0x80, 0x34, 0x48, 0xef, 0xbb, 0x56, 0xbf, 0x2c, 0x2d, 0x48, 0x4b, + 0xf9, 0xaa, 0xa2, 0x45, 0x83, 0xd0, 0x06, 0x20, 0x6d, 0xc3, 0xb5, 0xfa, 0x3a, 0xc5, 0xa1, 0xb7, + 0x21, 0x4f, 0xbe, 0xd2, 0x68, 0x62, 0xc3, 0xc2, 0x5e, 0x59, 0xa6, 0x69, 0x97, 0xb4, 0x90, 0x4a, + 0xaf, 0xaa, 0xf1, 0xa4, 0x6d, 0x1c, 0x18, 0x5b, 0x14, 0xa4, 0x43, 0x3b, 0x7a, 0x46, 0xef, 0x40, + 0x91, 0x0d, 0x27, 0xec, 0x21, 0x45, 0x7b, 0xb8, 0x32, 0xa4, 0x87, 0xa7, 0x04, 0x67, 0x9b, 0x46, + 0x60, 0xbb, 0x0e, 0xef, 0xa9, 0xc0, 0x72, 0xd9, 0x9b, 0xb2, 0x09, 0x69, 0x32, 0x32, 0x74, 0x0d, + 0x26, 0x0d, 0xcb, 0xf2, 0xb0, 0xef, 0x73, 0x1a, 0x25, 0x8d, 0x28, 0x45, 0xba, 0x5a, 0x67, 0x71, + 0x3d, 0x04, 0xa0, 0x12, 0xa4, 0x3c, 0xe3, 0x05, 0x1d, 0xf7, 0x94, 0x4e, 0x1e, 0xd5, 0x9f, 0x52, + 0x90, 0xa7, 0x5c, 0xfd, 0x8e, 0xeb, 0xf8, 0x18, 0xad, 0x08, 0x8a, 0xcc, 0x1f, 0x57, 0x84, 0xa1, + 0xe2, 0x92, 0xdc, 0x1e, 0x26, 0x49, 0x45, 0x24, 0xc4, 0xb2, 0x46, 0x68, 0xf2, 0x60, 0xb8, 0x26, + 0x57, 0x87, 0x75, 0x31, 0x56, 0x94, 0x7f, 0x24, 0xae, 0xca, 0x1a, 0xa4, 0x6d, 0xc7, 0x0e, 0x38, + 0x8f, 0x85, 0x13, 0x78, 0x68, 0x35, 0xc7, 0x0e, 0xb6, 0x26, 0x74, 0x8a, 0x47, 0x73, 0x90, 0x31, + 0x9b, 0x5d, 0xe7, 0x7d, 0x4a, 0xa4, 0xb0, 0x35, 0xa1, 0xb3, 0x57, 0xe5, 0x13, 0x09, 0xd2, 0x04, + 0x88, 0x34, 0xe0, 0x56, 0x6d, 0xd8, 0x16, 0xef, 0xfd, 0x5c, 0x24, 0xf8, 0x2e, 0x6d, 0xa9, 0x6d, + 0xea, 0x53, 0x0c, 0x53, 0xb3, 0xd0, 0x0d, 0xc8, 0xf9, 0xf6, 0xa1, 0x63, 0x04, 0x5d, 0x0f, 0x73, + 0x75, 0x66, 0xe3, 0xd4, 0xea, 0x61, 0xa3, 0x3e, 0xc0, 0xa1, 0x57, 0x21, 0x2b, 0x88, 0x71, 0x2e, + 0x36, 0x7e, 0xce, 0x9b, 0x03, 0x36, 0x8a, 0x90, 0xe7, 0xe3, 0xe9, 0x18, 0x5e, 0xa0, 0xfe, 0x9e, + 0x02, 0xd8, 0xeb, 0x9e, 0xc2, 0xe0, 0x03, 0x50, 0x52, 0x0d, 0xfe, 0xb9, 0xcc, 0xe7, 0xf2, 0x75, + 0x61, 0x2e, 0x2f, 0x8f, 0x26, 0x71, 0xba, 0xa9, 0xfc, 0x2e, 0xa1, 0x53, 0x89, 0x16, 0xa1, 0x68, + 0xba, 0x1d, 0x1b, 0xfb, 0x0d, 0xa7, 0xdb, 0xde, 0xc7, 0x5e, 0x39, 0xbd, 0x20, 0x2d, 0x15, 0xf5, + 0x02, 0x0b, 0xee, 0xd0, 0xd8, 0xf1, 0xf9, 0xfe, 0x50, 0x86, 0x3c, 0x55, 0x61, 0xec, 0xfa, 0x8d, + 0xa1, 0x92, 0xbb, 0x7e, 0xd7, 0xf8, 0x94, 0xff, 0xc7, 0xa9, 0x51, 0xbf, 0x91, 0xa1, 0xb8, 0x89, + 0x5b, 0x38, 0xc0, 0xa1, 0xf3, 0x5f, 0x13, 0x84, 0xb8, 0x14, 0x13, 0x42, 0xc0, 0x25, 0xd5, 0xfc, + 0x8d, 0x33, 0x54, 0xf7, 0xeb, 0x30, 0xe5, 0xbe, 0x70, 0xb0, 0x47, 0x34, 0x93, 0x8f, 0x81, 0x77, + 0x49, 0x43, 0x6d, 0x53, 0x9f, 0xa4, 0x88, 0x9a, 0xa5, 0xfe, 0x22, 0xc1, 0x74, 0xa8, 0x04, 0xf7, + 0x4e, 0x55, 0x90, 0xac, 0x32, 0x44, 0xb2, 0xa4, 0xdb, 0x27, 0xcb, 0x54, 0x53, 0xbf, 0x92, 0x21, + 0x4f, 0x42, 0xa1, 0x19, 0x46, 0xaf, 0x8a, 0x18, 0x2a, 0xa9, 0x56, 0x30, 0xce, 0x60, 0x85, 0x79, + 0xc8, 0xb5, 0x0d, 0xdb, 0x69, 0xb8, 0x4e, 0xab, 0xcf, 0xb7, 0xfb, 0x29, 0x12, 0xd8, 0x75, 0x5a, + 0xfd, 0xf0, 0x14, 0x90, 0x8a, 0x9d, 0x02, 0xd2, 0x50, 0x60, 0x4a, 0x70, 0x2b, 0xac, 0x0a, 0x82, + 0x5d, 0x7c, 0x49, 0xb0, 0xa4, 0x1b, 0xe1, 0xef, 0x70, 0xef, 0xb8, 0x1e, 0x95, 0x5f, 0x69, 0x44, + 0xf9, 0xdd, 0x9a, 0x88, 0x0a, 0xf0, 0x36, 0x14, 0xfc, 0xa6, 0xeb, 0x05, 0x22, 0x89, 0xa5, 0x93, + 0xd8, 0x6b, 0x75, 0x92, 0x10, 0xf5, 0x94, 0xf7, 0x07, 0xaf, 0xca, 0x1f, 0x12, 0xe4, 0x63, 0xcd, + 0x68, 0x19, 0x26, 0x7b, 0xd8, 0xf3, 0x6d, 0xd7, 0xe1, 0x83, 0x39, 0x1f, 0xe7, 0xf6, 0x94, 0x35, + 0xe9, 0x21, 0x06, 0x5d, 0x81, 0x69, 0xd3, 0xc3, 0x94, 0x63, 0x03, 0x77, 0x5c, 0xb3, 0x49, 0xc7, + 0x93, 0xd6, 0x8b, 0x61, 0xf4, 0x2e, 0x09, 0x0a, 0xab, 0x3e, 0x35, 0x66, 0xd5, 0xa3, 0xb5, 0x68, + 0xf7, 0x20, 0xa7, 0x68, 0xba, 0xc1, 0x4c, 0x57, 0x67, 0x63, 0x04, 0x59, 0x6d, 0x7d, 0xdc, 0xef, + 0x60, 0x1d, 0xdc, 0xe8, 0x99, 0x8c, 0xa5, 0x63, 0xf4, 0x5b, 0xae, 0x61, 0x35, 0x5a, 0xd8, 0x39, + 0x0c, 0x9a, 0xe5, 0x0c, 0x1b, 0x0b, 0x8f, 0x3e, 0xa4, 0xc1, 0x8d, 0x2c, 0xa4, 0x89, 0x74, 0xea, + 0x9f, 0x69, 0x28, 0xd6, 0xb1, 0xe1, 0x99, 0xcd, 0xf1, 0xe5, 0x58, 0xc0, 0x25, 0x75, 0x0d, 0x7e, + 0x96, 0xe2, 0x7e, 0xba, 0x05, 0x05, 0xd3, 0x75, 0x02, 0xc3, 0xe6, 0x8a, 0x33, 0x3e, 0x33, 0x91, + 0xe2, 0x77, 0xc2, 0xc6, 0xda, 0xa6, 0x9e, 0x8f, 0x90, 0x35, 0x0b, 0xbd, 0x09, 0x99, 0xe7, 0x5d, + 0xec, 0xf5, 0x39, 0x8f, 0xc5, 0x13, 0x15, 0xd0, 0x1e, 0x11, 0xa8, 0xce, 0x32, 0x94, 0x2f, 0x64, + 0xc8, 0xd0, 0x00, 0x2a, 0x8b, 0x0e, 0x2a, 0x0e, 0xcc, 0xb2, 0x09, 0x93, 0x07, 0x76, 0x2b, 0xc0, + 0x9e, 0x5f, 0x96, 0x17, 0x52, 0x4b, 0xf9, 0xea, 0xb5, 0x53, 0x7c, 0x40, 0xbb, 0x47, 0x53, 0xf4, + 0x30, 0x55, 0xf9, 0x56, 0x82, 0x2c, 0x8b, 0xa1, 0x3a, 0x40, 0xdb, 0x08, 0xcc, 0x26, 0x33, 0x8a, + 0x44, 0x8d, 0x72, 0xf3, 0xf4, 0x7d, 0x6a, 0xdb, 0x24, 0x99, 0xfa, 0x28, 0xd7, 0x0e, 0x1f, 0x11, + 0x82, 0xb4, 0x63, 0xb4, 0xd9, 0xe1, 0x29, 0xa7, 0xd3, 0x67, 0x34, 0x03, 0x99, 0x9e, 0xd1, 0xea, + 0x62, 0x3a, 0x3d, 0x39, 0x9d, 0xbd, 0xa8, 0xab, 0x90, 0x8b, 0x7a, 0x40, 0xe7, 0xa0, 0xb8, 0xbd, + 0xfe, 0xf8, 0xce, 0x56, 0xe3, 0xc9, 0xce, 0x83, 0x9d, 0xdd, 0x77, 0x77, 0x4a, 0x13, 0xa8, 0x04, + 0x85, 0xfa, 0x63, 0xbd, 0xb6, 0x73, 0xbf, 0x71, 0xf7, 0xd1, 0x93, 0xf5, 0x87, 0x25, 0x49, 0xfd, + 0x48, 0x86, 0xe9, 0x70, 0x50, 0x63, 0x37, 0x34, 0x11, 0x98, 0xdc, 0x3a, 0x56, 0x1d, 0xd4, 0x7e, + 0xdb, 0x6a, 0xb4, 0x6c, 0x9f, 0x9c, 0x82, 0x53, 0xc3, 0x4f, 0x43, 0x59, 0xdb, 0x7a, 0x68, 0xfb, + 0x81, 0x7a, 0x0b, 0x32, 0xba, 0xe1, 0x1c, 0x62, 0x34, 0x07, 0x59, 0xf7, 0xe0, 0xc0, 0xc7, 0xec, + 0xe4, 0x9c, 0xd6, 0xf9, 0x1b, 0x89, 0xf3, 0x45, 0xcc, 0x0a, 0x0a, 0x7f, 0x53, 0xbf, 0x96, 0xe1, + 0x7f, 0xe4, 0x76, 0x44, 0x92, 0xc3, 0x75, 0x7b, 0x43, 0x90, 0xf0, 0xf2, 0xb1, 0x7b, 0x54, 0x0c, + 0x99, 0xd4, 0x95, 0xfb, 0xec, 0x0c, 0xbb, 0xe7, 0x55, 0xc8, 0x78, 0x84, 0x5a, 0x74, 0x8a, 0x1a, + 0xb0, 0x66, 0x94, 0x59, 0xb3, 0xfa, 0x97, 0x04, 0xa5, 0x81, 0x0c, 0xdc, 0x74, 0x37, 0x05, 0xc5, + 0x16, 0x86, 0x2a, 0x96, 0x74, 0xdb, 0x5d, 0xe4, 0xa2, 0xcd, 0x84, 0x57, 0x28, 0x42, 0xa6, 0xc0, + 0x2f, 0x50, 0xea, 0x8f, 0x32, 0x9c, 0x0f, 0xb9, 0x6c, 0x19, 0x7e, 0x54, 0xe3, 0x6f, 0x09, 0xcc, + 0x17, 0x87, 0x30, 0x8f, 0xa1, 0x93, 0xea, 0x97, 0xce, 0x19, 0xfc, 0xb2, 0x04, 0x59, 0x6a, 0x88, + 0xb0, 0xf6, 0xbe, 0x6c, 0x18, 0xde, 0x4e, 0x0a, 0xa0, 0x6f, 0xb4, 0x02, 0x3a, 0xc0, 0x82, 0x4e, + 0x9f, 0xd5, 0x0f, 0x64, 0x98, 0x11, 0x05, 0xe2, 0x4e, 0x7a, 0x43, 0xd0, 0xf3, 0x95, 0x91, 0x7a, + 0x26, 0xdd, 0x4d, 0x8b, 0x5c, 0xd2, 0x79, 0xc8, 0x35, 0x0d, 0xbf, 0x39, 0x28, 0x63, 0x05, 0x7d, + 0x8a, 0x04, 0x48, 0xd5, 0xaa, 0xfe, 0x90, 0x82, 0xc9, 0x3a, 0xeb, 0x1c, 0xad, 0x41, 0xea, 0x3e, + 0x0e, 0xd0, 0xec, 0xd0, 0xff, 0x71, 0xca, 0xdc, 0xf0, 0x9f, 0x39, 0xab, 0x12, 0xc9, 0xdb, 0xeb, + 0x8a, 0x79, 0x83, 0x3f, 0x04, 0x42, 0x5e, 0xec, 0x32, 0xbc, 0x24, 0xa1, 0xb7, 0x20, 0xcb, 0x6e, + 0x38, 0xa8, 0x3c, 0xea, 0x9e, 0xa8, 0xfc, 0x7f, 0xe4, 0x75, 0x88, 0xf8, 0x9e, 0x30, 0x45, 0x73, + 0xc3, 0xef, 0x15, 0xca, 0x85, 0x11, 0x07, 0x48, 0x74, 0x1b, 0xb2, 0x6c, 0x23, 0x12, 0xbe, 0x2b, + 0xec, 0xac, 0xc2, 0x77, 0xc5, 0x5d, 0x6b, 0x55, 0x42, 0x77, 0x61, 0x2a, 0xb4, 0x02, 0x52, 0x46, + 0xd7, 0x66, 0x65, 0xfe, 0x84, 0x2a, 0xb4, 0x2a, 0xa1, 0x5d, 0x28, 0xc4, 0x1d, 0x85, 0x2a, 0x27, + 0x2f, 0x5d, 0xe5, 0xf2, 0x18, 0x2b, 0x6e, 0xec, 0x7d, 0x7f, 0x54, 0x91, 0x7e, 0x3e, 0xaa, 0x48, + 0xbf, 0x1e, 0x55, 0xa4, 0x4f, 0x7f, 0xab, 0x4c, 0x3c, 0xbb, 0x7e, 0x68, 0x07, 0xcd, 0xee, 0xbe, + 0x66, 0xba, 0xed, 0x15, 0xc7, 0xef, 0x98, 0xe6, 0xb2, 0x85, 0x7b, 0x2b, 0x0e, 0x76, 0x0f, 0xfc, + 0x65, 0xa3, 0x63, 0x2f, 0x1f, 0xba, 0x2b, 0xd1, 0x6f, 0xdf, 0x2f, 0xe5, 0xd2, 0x0e, 0x76, 0xef, + 0xd5, 0xb5, 0xf5, 0xbd, 0x1a, 0xdf, 0xde, 0xf6, 0xb3, 0xf4, 0xff, 0xed, 0x8d, 0x7f, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x6e, 0xcf, 0x5c, 0x4e, 0x41, 0x16, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ServiceClient is the client API for Service service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ServiceClient interface { + // Get the object from container.v2. Response uses gRPC stream. First response + // message carry object of requested address. Chunk messages are parts of + // the object's payload if it is needed. All messages except first carry + // chunks. Requested object can be restored by concatenation of object + // message payload and all chunks keeping receiving order. + Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (Service_GetClient, error) + // Put the object into container.v2. Request uses gRPC stream. First message + // SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD + // BE set. Session token SHOULD BE obtained before put operation (see + // session package). Chunk messages considered by server as part of object + // payload. All messages except first SHOULD BE chunks. Chunk messages + // SHOULD BE sent in direct order of fragmentation. + Put(ctx context.Context, opts ...grpc.CallOption) (Service_PutClient, error) + // Delete the object from a container + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) + // Head returns the object without data payload. Object in the + // response has system header only. If full headers flag is set, extended + // headers are also present. + Head(ctx context.Context, in *HeadRequest, opts ...grpc.CallOption) (*HeadResponse, error) + // Search objects in container.v2. Version of query language format SHOULD BE + // set to 1. Search query represented in serialized format (see query + // package). + Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (Service_SearchClient, error) + // GetRange of data payload. Range is a pair (offset, length). + // Requested range can be restored by concatenation of all chunks + // keeping receiving order. + GetRange(ctx context.Context, in *GetRangeRequest, opts ...grpc.CallOption) (Service_GetRangeClient, error) + // GetRangeHash returns homomorphic hash of object payload range after XOR + // operation. Ranges are set of pairs (offset, length). Hashes order in + // response corresponds to ranges order in request. Homomorphic hash is + // calculated for XORed data. + GetRangeHash(ctx context.Context, in *GetRangeHashRequest, opts ...grpc.CallOption) (*GetRangeHashResponse, error) +} + +type serviceClient struct { + cc *grpc.ClientConn +} + +func NewServiceClient(cc *grpc.ClientConn) ServiceClient { + return &serviceClient{cc} +} + +func (c *serviceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (Service_GetClient, error) { + stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[0], "/object.v2.Service/Get", opts...) + if err != nil { + return nil, err + } + x := &serviceGetClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Service_GetClient interface { + Recv() (*GetResponse, error) + grpc.ClientStream +} + +type serviceGetClient struct { + grpc.ClientStream +} + +func (x *serviceGetClient) Recv() (*GetResponse, error) { + m := new(GetResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *serviceClient) Put(ctx context.Context, opts ...grpc.CallOption) (Service_PutClient, error) { + stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[1], "/object.v2.Service/Put", opts...) + if err != nil { + return nil, err + } + x := &servicePutClient{stream} + return x, nil +} + +type Service_PutClient interface { + Send(*PutRequest) error + CloseAndRecv() (*PutResponse, error) + grpc.ClientStream +} + +type servicePutClient struct { + grpc.ClientStream +} + +func (x *servicePutClient) Send(m *PutRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *servicePutClient) CloseAndRecv() (*PutResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(PutResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *serviceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, "/object.v2.Service/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Head(ctx context.Context, in *HeadRequest, opts ...grpc.CallOption) (*HeadResponse, error) { + out := new(HeadResponse) + err := c.cc.Invoke(ctx, "/object.v2.Service/Head", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (Service_SearchClient, error) { + stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[2], "/object.v2.Service/Search", opts...) + if err != nil { + return nil, err + } + x := &serviceSearchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Service_SearchClient interface { + Recv() (*SearchResponse, error) + grpc.ClientStream +} + +type serviceSearchClient struct { + grpc.ClientStream +} + +func (x *serviceSearchClient) Recv() (*SearchResponse, error) { + m := new(SearchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *serviceClient) GetRange(ctx context.Context, in *GetRangeRequest, opts ...grpc.CallOption) (Service_GetRangeClient, error) { + stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[3], "/object.v2.Service/GetRange", opts...) + if err != nil { + return nil, err + } + x := &serviceGetRangeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Service_GetRangeClient interface { + Recv() (*GetRangeResponse, error) + grpc.ClientStream +} + +type serviceGetRangeClient struct { + grpc.ClientStream +} + +func (x *serviceGetRangeClient) Recv() (*GetRangeResponse, error) { + m := new(GetRangeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *serviceClient) GetRangeHash(ctx context.Context, in *GetRangeHashRequest, opts ...grpc.CallOption) (*GetRangeHashResponse, error) { + out := new(GetRangeHashResponse) + err := c.cc.Invoke(ctx, "/object.v2.Service/GetRangeHash", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceServer is the server API for Service service. +type ServiceServer interface { + // Get the object from container.v2. Response uses gRPC stream. First response + // message carry object of requested address. Chunk messages are parts of + // the object's payload if it is needed. All messages except first carry + // chunks. Requested object can be restored by concatenation of object + // message payload and all chunks keeping receiving order. + Get(*GetRequest, Service_GetServer) error + // Put the object into container.v2. Request uses gRPC stream. First message + // SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD + // BE set. Session token SHOULD BE obtained before put operation (see + // session package). Chunk messages considered by server as part of object + // payload. All messages except first SHOULD BE chunks. Chunk messages + // SHOULD BE sent in direct order of fragmentation. + Put(Service_PutServer) error + // Delete the object from a container + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + // Head returns the object without data payload. Object in the + // response has system header only. If full headers flag is set, extended + // headers are also present. + Head(context.Context, *HeadRequest) (*HeadResponse, error) + // Search objects in container.v2. Version of query language format SHOULD BE + // set to 1. Search query represented in serialized format (see query + // package). + Search(*SearchRequest, Service_SearchServer) error + // GetRange of data payload. Range is a pair (offset, length). + // Requested range can be restored by concatenation of all chunks + // keeping receiving order. + GetRange(*GetRangeRequest, Service_GetRangeServer) error + // GetRangeHash returns homomorphic hash of object payload range after XOR + // operation. Ranges are set of pairs (offset, length). Hashes order in + // response corresponds to ranges order in request. Homomorphic hash is + // calculated for XORed data. + GetRangeHash(context.Context, *GetRangeHashRequest) (*GetRangeHashResponse, error) +} + +// UnimplementedServiceServer can be embedded to have forward compatible implementations. +type UnimplementedServiceServer struct { +} + +func (*UnimplementedServiceServer) Get(req *GetRequest, srv Service_GetServer) error { + return status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedServiceServer) Put(srv Service_PutServer) error { + return status.Errorf(codes.Unimplemented, "method Put not implemented") +} +func (*UnimplementedServiceServer) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedServiceServer) Head(ctx context.Context, req *HeadRequest) (*HeadResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Head not implemented") +} +func (*UnimplementedServiceServer) Search(req *SearchRequest, srv Service_SearchServer) error { + return status.Errorf(codes.Unimplemented, "method Search not implemented") +} +func (*UnimplementedServiceServer) GetRange(req *GetRangeRequest, srv Service_GetRangeServer) error { + return status.Errorf(codes.Unimplemented, "method GetRange not implemented") +} +func (*UnimplementedServiceServer) GetRangeHash(ctx context.Context, req *GetRangeHashRequest) (*GetRangeHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRangeHash not implemented") +} + +func RegisterServiceServer(s *grpc.Server, srv ServiceServer) { + s.RegisterService(&_Service_serviceDesc, srv) +} + +func _Service_Get_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ServiceServer).Get(m, &serviceGetServer{stream}) +} + +type Service_GetServer interface { + Send(*GetResponse) error + grpc.ServerStream +} + +type serviceGetServer struct { + grpc.ServerStream +} + +func (x *serviceGetServer) Send(m *GetResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Service_Put_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ServiceServer).Put(&servicePutServer{stream}) +} + +type Service_PutServer interface { + SendAndClose(*PutResponse) error + Recv() (*PutRequest, error) + grpc.ServerStream +} + +type servicePutServer struct { + grpc.ServerStream +} + +func (x *servicePutServer) SendAndClose(m *PutResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *servicePutServer) Recv() (*PutRequest, error) { + m := new(PutRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Service_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/object.v2.Service/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_Head_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HeadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).Head(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/object.v2.Service/Head", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).Head(ctx, req.(*HeadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_Search_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SearchRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ServiceServer).Search(m, &serviceSearchServer{stream}) +} + +type Service_SearchServer interface { + Send(*SearchResponse) error + grpc.ServerStream +} + +type serviceSearchServer struct { + grpc.ServerStream +} + +func (x *serviceSearchServer) Send(m *SearchResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Service_GetRange_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetRangeRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ServiceServer).GetRange(m, &serviceGetRangeServer{stream}) +} + +type Service_GetRangeServer interface { + Send(*GetRangeResponse) error + grpc.ServerStream +} + +type serviceGetRangeServer struct { + grpc.ServerStream +} + +func (x *serviceGetRangeServer) Send(m *GetRangeResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Service_GetRangeHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRangeHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetRangeHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/object.v2.Service/GetRangeHash", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetRangeHash(ctx, req.(*GetRangeHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Service_serviceDesc = grpc.ServiceDesc{ + ServiceName: "object.v2.Service", + HandlerType: (*ServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Delete", + Handler: _Service_Delete_Handler, + }, + { + MethodName: "Head", + Handler: _Service_Head_Handler, + }, + { + MethodName: "GetRangeHash", + Handler: _Service_GetRangeHash_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Get", + Handler: _Service_Get_Handler, + ServerStreams: true, + }, + { + StreamName: "Put", + Handler: _Service_Put_Handler, + ClientStreams: true, + }, + { + StreamName: "Search", + Handler: _Service_Search_Handler, + ServerStreams: true, + }, + { + StreamName: "GetRange", + Handler: _Service_GetRange_Handler, + ServerStreams: true, + }, + }, + Metadata: "object/v2/service.proto", +} + +func (m *GetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Raw { + i-- + if m.Raw { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Address != nil { + { + size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ObjectPart != nil { + { + size := m.ObjectPart.Size() + i -= size + if _, err := m.ObjectPart.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *GetResponse_Body_Init_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse_Body_Init_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Init != nil { + { + size, err := m.Init.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *GetResponse_Body_Chunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse_Body_Chunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Chunk != nil { + i -= len(m.Chunk) + copy(dAtA[i:], m.Chunk) + i = encodeVarintService(dAtA, i, uint64(len(m.Chunk))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *GetResponse_Body_Init) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResponse_Body_Init) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse_Body_Init) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ObjectId != nil { + { + size, err := m.ObjectId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ObjectPart != nil { + { + size := m.ObjectPart.Size() + i -= size + if _, err := m.ObjectPart.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *PutRequest_Body_Init_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest_Body_Init_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Init != nil { + { + size, err := m.Init.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *PutRequest_Body_Chunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest_Body_Chunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Chunk != nil { + i -= len(m.Chunk) + copy(dAtA[i:], m.Chunk) + i = encodeVarintService(dAtA, i, uint64(len(m.Chunk))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *PutRequest_Body_Init) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutRequest_Body_Init) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutRequest_Body_Init) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CopiesNumber != 0 { + i = encodeVarintService(dAtA, i, uint64(m.CopiesNumber)) + i-- + dAtA[i] = 0x20 + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ObjectId != nil { + { + size, err := m.ObjectId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PutResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PutResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PutResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ObjectId != nil { + { + size, err := m.ObjectId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Address != nil { + { + size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *HeadRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Raw { + i-- + if m.Raw { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.MainOnly { + i-- + if m.MainOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Address != nil { + { + size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Head != nil { + { + size := m.Head.Size() + i -= size + if _, err := m.Head.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *HeadResponse_Body_Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadResponse_Body_Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *HeadResponse_Body_ShortHeader_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadResponse_Body_ShortHeader_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ShortHeader != nil { + { + size, err := m.ShortHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *HeadResponse_Body_ShortHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadResponse_Body_ShortHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeadResponse_Body_ShortHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.PayloadLength != 0 { + i = encodeVarintService(dAtA, i, uint64(m.PayloadLength)) + i-- + dAtA[i] = 0x28 + } + if m.ObjectType != 0 { + i = encodeVarintService(dAtA, i, uint64(m.ObjectType)) + i-- + dAtA[i] = 0x20 + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.CreationEpoch != 0 { + i = encodeVarintService(dAtA, i, uint64(m.CreationEpoch)) + i-- + dAtA[i] = 0x10 + } + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SearchRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SearchRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SearchRequest_Body_Query) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchRequest_Body_Query) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchRequest_Body_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Version != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SearchRequest_Body_Query_Filter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchRequest_Body_Query_Filter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchRequest_Body_Query_Filter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintService(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintService(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.MatchType != 0 { + i = encodeVarintService(dAtA, i, uint64(m.MatchType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SearchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SearchResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.IdList) > 0 { + for iNdEx := len(m.IdList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IdList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Range) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Range) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Length != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Length)) + i-- + dAtA[i] = 0x10 + } + if m.Offset != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetRangeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Range != nil { + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Address != nil { + { + size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Chunk) > 0 { + i -= len(m.Chunk) + copy(dAtA[i:], m.Chunk) + i = encodeVarintService(dAtA, i, uint64(len(m.Chunk))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeHashRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeHashRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeHashRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeHashRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeHashRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeHashRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Salt) > 0 { + i -= len(m.Salt) + copy(dAtA[i:], m.Salt) + i = encodeVarintService(dAtA, i, uint64(len(m.Salt))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ranges) > 0 { + for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ranges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Address != nil { + { + size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeHashResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeHashResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRangeHashResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRangeHashResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRangeHashResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.HashList) > 0 { + for iNdEx := len(m.HashList) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.HashList[iNdEx]) + copy(dAtA[i:], m.HashList[iNdEx]) + i = encodeVarintService(dAtA, i, uint64(len(m.HashList[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Address != nil { + l = m.Address.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Raw { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectPart != nil { + n += m.ObjectPart.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetResponse_Body_Init_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Init != nil { + l = m.Init.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} +func (m *GetResponse_Body_Chunk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Chunk != nil { + l = len(m.Chunk) + n += 1 + l + sovService(uint64(l)) + } + return n +} +func (m *GetResponse_Body_Init) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectId != nil { + l = m.ObjectId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectPart != nil { + n += m.ObjectPart.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutRequest_Body_Init_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Init != nil { + l = m.Init.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} +func (m *PutRequest_Body_Chunk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Chunk != nil { + l = len(m.Chunk) + n += 1 + l + sovService(uint64(l)) + } + return n +} +func (m *PutRequest_Body_Init) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectId != nil { + l = m.ObjectId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.CopiesNumber != 0 { + n += 1 + sovService(uint64(m.CopiesNumber)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PutResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectId != nil { + l = m.ObjectId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Address != nil { + l = m.Address.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeleteResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HeadRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HeadRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Address != nil { + l = m.Address.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MainOnly { + n += 2 + } + if m.Raw { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HeadResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HeadResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Head != nil { + n += m.Head.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HeadResponse_Body_Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} +func (m *HeadResponse_Body_ShortHeader_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ShortHeader != nil { + l = m.ShortHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} +func (m *HeadResponse_Body_ShortHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != nil { + l = m.Version.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.CreationEpoch != 0 { + n += 1 + sovService(uint64(m.CreationEpoch)) + } + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.ObjectType != 0 { + n += 1 + sovService(uint64(m.ObjectType)) + } + if m.PayloadLength != 0 { + n += 1 + sovService(uint64(m.PayloadLength)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SearchRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SearchRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SearchRequest_Body_Query) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovService(uint64(m.Version)) + } + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SearchRequest_Body_Query_Filter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MatchType != 0 { + n += 1 + sovService(uint64(m.MatchType)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SearchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SearchResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.IdList) > 0 { + for _, e := range m.IdList { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Range) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Offset != 0 { + n += 1 + sovService(uint64(m.Offset)) + } + if m.Length != 0 { + n += 1 + sovService(uint64(m.Length)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Address != nil { + l = m.Address.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Range != nil { + l = m.Range.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Chunk) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeHashRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeHashRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Address != nil { + l = m.Address.Size() + n += 1 + l + sovService(uint64(l)) + } + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + l = len(m.Salt) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeHashResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetRangeHashResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.HashList) > 0 { + for _, b := range m.HashList { + l = len(b) + n += 1 + l + sovService(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Address == nil { + m.Address = &v21.Address{} + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Raw = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GetResponse_Body_Init{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ObjectPart = &GetResponse_Body_Init_{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.ObjectPart = &GetResponse_Body_Chunk{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResponse_Body_Init) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Init: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Init: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectId == nil { + m.ObjectId = &v21.ObjectID{} + } + if err := m.ObjectId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &v2.Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PutRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PutRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &PutRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &PutRequest_Body_Init{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ObjectPart = &PutRequest_Body_Init_{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.ObjectPart = &PutRequest_Body_Chunk{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutRequest_Body_Init) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Init: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Init: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectId == nil { + m.ObjectId = &v21.ObjectID{} + } + if err := m.ObjectId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &v2.Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CopiesNumber", wireType) + } + m.CopiesNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CopiesNumber |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &PutResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PutResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectId == nil { + m.ObjectId = &v21.ObjectID{} + } + if err := m.ObjectId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &DeleteRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Address == nil { + m.Address = &v21.Address{} + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v21.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &DeleteResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &HeadRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Address == nil { + m.Address = &v21.Address{} + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MainOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MainOnly = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Raw = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &HeadResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Header{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Head = &HeadResponse_Body_Header{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &HeadResponse_Body_ShortHeader{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Head = &HeadResponse_Body_ShortHeader_{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadResponse_Body_ShortHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShortHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShortHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Version == nil { + m.Version = &v2.Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationEpoch", wireType) + } + m.CreationEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v21.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType) + } + m.ObjectType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObjectType |= ObjectType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PayloadLength", wireType) + } + m.PayloadLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PayloadLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &SearchRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v21.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchRequest_Body_Query{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest_Body_Query) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Query: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, &SearchRequest_Body_Query_Filter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest_Body_Query_Filter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Filter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Filter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchType", wireType) + } + m.MatchType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MatchType |= SearchRequest_Body_Query_Filter_MatchType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &SearchResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdList = append(m.IdList, &v21.ObjectID{}) + if err := m.IdList[len(m.IdList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Range) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Range: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + m.Length = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Length |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRangeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetRangeRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Address == nil { + m.Address = &v21.Address{} + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Range == nil { + m.Range = &Range{} + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRangeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetRangeResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...) + if m.Chunk == nil { + m.Chunk = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeHashRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRangeHashRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRangeHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetRangeHashRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeHashRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Address == nil { + m.Address = &v21.Address{} + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ranges = append(m.Ranges, &Range{}) + if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Salt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Salt = append(m.Salt[:0], dAtA[iNdEx:postIndex]...) + if m.Salt == nil { + m.Salt = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeHashResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRangeHashResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRangeHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &GetRangeHashResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRangeHashResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HashList", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HashList = append(m.HashList, make([]byte, postIndex-iNdEx)) + copy(m.HashList[len(m.HashList)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/object/v2/service.proto b/object/v2/service.proto new file mode 100644 index 0000000..85e6d3e --- /dev/null +++ b/object/v2/service.proto @@ -0,0 +1,407 @@ +syntax = "proto3"; + +package object.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/object/v2"; +option csharp_namespace = "NeoFS.API.Object"; + +import "object/v2/types.proto"; +import "refs/v2/types.proto"; +import "service/v2/meta.proto"; +import "service/v2/verify.proto"; + +// Object service provides API for manipulating with the object.v2. +service Service { + // Get the object from container.v2. Response uses gRPC stream. First response + // message carry object of requested address. Chunk messages are parts of + // the object's payload if it is needed. All messages except first carry + // chunks. Requested object can be restored by concatenation of object + // message payload and all chunks keeping receiving order. + rpc Get(GetRequest) returns (stream GetResponse); + + // Put the object into container.v2. Request uses gRPC stream. First message + // SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD + // BE set. Session token SHOULD BE obtained before put operation (see + // session package). Chunk messages considered by server as part of object + // payload. All messages except first SHOULD BE chunks. Chunk messages + // SHOULD BE sent in direct order of fragmentation. + rpc Put(stream PutRequest) returns (PutResponse); + + // Delete the object from a container + rpc Delete(DeleteRequest) returns (DeleteResponse); + + // Head returns the object without data payload. Object in the + // response has system header only. If full headers flag is set, extended + // headers are also present. + rpc Head(HeadRequest) returns (HeadResponse); + + // Search objects in container.v2. Version of query language format SHOULD BE + // set to 1. Search query represented in serialized format (see query + // package). + rpc Search(SearchRequest) returns (stream SearchResponse); + + // GetRange of data payload. Range is a pair (offset, length). + // Requested range can be restored by concatenation of all chunks + // keeping receiving order. + rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); + + // GetRangeHash returns homomorphic hash of object payload range after XOR + // operation. Ranges are set of pairs (offset, length). Hashes order in + // response corresponds to ranges order in request. Homomorphic hash is + // calculated for XORed data. + rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); +} + +message GetRequest { + message Body { + // Address of the requested object.v2. + refs.v2.Address address = 1; + + // Carries the raw option flag of the request. + // Raw request is sent to receive only the objects + // that are physically stored on the server. + bool raw = 2; + } + // Body of get object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message GetResponse { + message Body { + // Initialization parameters of the object got from NeoFS. + message Init { + // Object ID + refs.v2.ObjectID object_id = 1; + // Object signature + service.v2.Signature signature =2; + // Object header. + Header header = 3; + } + // Carries the single message of the response stream. + oneof object_part { + // Initialization parameters of the object stream. + Init init =1; + // Part of the object payload. + bytes chunk = 2; + } + } + // Body of get object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message PutRequest { + message Body { + // Groups initialization parameters of object placement in NeoFS. + message Init { + // Object ID, where available + refs.v2.ObjectID object_id = 1; + // Object signature, were available + service.v2.Signature signature =2; + // Header of the object to save in the system. + Header header = 3; + // Number of the object copies to store within the RPC call. + // Default zero value is processed according to the + // container placement rules. + uint32 copies_number = 4; + } + + // Carries the single part of the query stream. + oneof object_part { + // Carries the initialization parameters of the object stream. + Init init = 1; + // Carries part of the object payload. + bytes chunk = 2; + } + } + // Body of put object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message PutResponse { + message Body { + // Carries identifier of the saved object.v2. + // It is used to access an object in the container.v2. + refs.v2.ObjectID object_id = 1; + } + // Body of put object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message DeleteRequest { + message Body { + // Carries the address of the object to be deleted. + refs.v2.Address address = 1; + // Carries identifier the object owner. + refs.v2.OwnerID owner_id = 2; + } + // Body of delete object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +// DeleteResponse is empty because we cannot guarantee permanent object removal +// in distributed system. +message DeleteResponse { + message Body { } + + // Body of delete object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message HeadRequest { + message Body { + // Address of the object with the requested header. + refs.v2.Address address = 1; + // Return only minimal header subset + bool main_only = 2; + // Carries the raw option flag of the request. + // Raw request is sent to receive only the headers of the objects + // that are physically stored on the server. + bool raw = 3; + } + // Body of head object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message HeadResponse { + message Body { + message ShortHeader { + // Object format version. + service.v2.Version version = 1; + // Epoch when the object was created + uint64 creation_epoch = 2; + // Object's owner + refs.v2.OwnerID owner_id = 3; + // Type of the object payload content + ObjectType object_type = 4; + // Size of payload in bytes. + // 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown + uint64 payload_length = 5; + } + // Carries the requested object header or it's part + oneof head{ + Header header = 1; + ShortHeader short_header = 2; + } + } + // Body of head object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message SearchRequest { + message Body { + // Carries search container identifier. + refs.v2.ContainerID container_id = 1; + + message Query { + uint32 version = 1; + + message Filter { + enum MatchType { + MATCH_UNKNOWN = 0; + STRING_EQUAL = 1; + } + + MatchType match_type = 1; + + string name = 2; + + string value = 3; + } + + repeated Filter filters = 2; + } + + Query query = 2; + } + + // Body of search object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message SearchResponse { + message Body { + // Carries list of object identifiers that match the search query. + repeated refs.v2.ObjectID id_list = 1; + } + + // Body of search object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +// Range groups the parameters of object payload range. +message Range { + // Carries the offset of the range from the object payload start. + uint64 offset = 1; + + // Carries the length of the object payload range. + uint64 length = 2; +} + +message GetRangeRequest { + message Body { + // Address carries address of the object that contains the requested payload range. + refs.v2.Address address = 1; + + // Range carries the parameters of the requested payload range. + Range range = 2; + } + + // Body of get range object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message GetRangeResponse { + message Body { + // Carries part of the object payload. + bytes chunk = 1; + } + + // Body of get range object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + +message GetRangeHashRequest { + message Body { + // Carries address of the object that contains the requested payload range. + refs.v2.Address address = 1; + + // Carries the list of object payload range to calculate homomorphic hash. + repeated Range ranges = 2; + + // Carries binary salt to XOR object payload ranges before hash calculation. + bytes salt = 3; + } + + // Body of get range hash object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +message GetRangeHashResponse { + message Body { + // Carries list of homomorphic hashes in a binary format. + repeated bytes hash_list = 1; + } + + // Body of get range hash object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} + diff --git a/object/v2/types.pb.go b/object/v2/types.pb.go new file mode 100644 index 0000000..bae2d04 --- /dev/null +++ b/object/v2/types.pb.go @@ -0,0 +1,1986 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: object/v2/types.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v2 "github.com/nspcc-dev/neofs-api-go/refs/v2" + v21 "github.com/nspcc-dev/neofs-api-go/service/v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Type of the object payload content +type ObjectType int32 + +const ( + // Just a normal object + ObjectType_REGULAR ObjectType = 0 + // Used internally to identify deleted objects + ObjectType_TOMBSTONE ObjectType = 1 + // Identifies that the object holds StorageGroup information + ObjectType_STORAGE_GROUP ObjectType = 2 +) + +var ObjectType_name = map[int32]string{ + 0: "REGULAR", + 1: "TOMBSTONE", + 2: "STORAGE_GROUP", +} + +var ObjectType_value = map[string]int32{ + "REGULAR": 0, + "TOMBSTONE": 1, + "STORAGE_GROUP": 2, +} + +func (x ObjectType) String() string { + return proto.EnumName(ObjectType_name, int32(x)) +} + +func (ObjectType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_666bf7c1dc0e676f, []int{0} +} + +type Header struct { + // Object's container + ContainerId *v2.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Object's owner + OwnerId *v2.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // Epoch when the object was created + CreationEpoch uint64 `protobuf:"varint,3,opt,name=creation_epoch,json=creationEpoch,proto3" json:"creation_epoch,omitempty"` + // Object format version. + // Effectively the version of API library used to create particular object + Version *v21.Version `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + // Size of payload in bytes. + // 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown + PayloadLength uint64 `protobuf:"varint,5,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"` + // Hash of payload bytes + PayloadHash []byte `protobuf:"bytes,6,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"` + ObjectType ObjectType `protobuf:"varint,7,opt,name=object_type,json=objectType,proto3,enum=object.v2.ObjectType" json:"object_type,omitempty"` + // Homomorphic hash of the object payload. + HomomorphicHash []byte `protobuf:"bytes,8,opt,name=homomorphic_hash,json=homomorphicHash,proto3" json:"homomorphic_hash,omitempty"` + // Session token, if it was used during Object creation. + // Need it to verify integrity and authenticity out of Request scope. + SessionToken *v21.SessionToken `protobuf:"bytes,9,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"` + Attributes []*Header_Attribute `protobuf:"bytes,10,rep,name=attributes,proto3" json:"attributes,omitempty"` + // Position of the object in the split hierarchy. + Split *Header_Split `protobuf:"bytes,11,opt,name=split,proto3" json:"split,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { + return fileDescriptor_666bf7c1dc0e676f, []int{0} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(m, src) +} +func (m *Header) XXX_Size() int { + return m.Size() +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_Header proto.InternalMessageInfo + +func (m *Header) GetContainerId() *v2.ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +func (m *Header) GetOwnerId() *v2.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +func (m *Header) GetCreationEpoch() uint64 { + if m != nil { + return m.CreationEpoch + } + return 0 +} + +func (m *Header) GetVersion() *v21.Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *Header) GetPayloadLength() uint64 { + if m != nil { + return m.PayloadLength + } + return 0 +} + +func (m *Header) GetPayloadHash() []byte { + if m != nil { + return m.PayloadHash + } + return nil +} + +func (m *Header) GetObjectType() ObjectType { + if m != nil { + return m.ObjectType + } + return ObjectType_REGULAR +} + +func (m *Header) GetHomomorphicHash() []byte { + if m != nil { + return m.HomomorphicHash + } + return nil +} + +func (m *Header) GetSessionToken() *v21.SessionToken { + if m != nil { + return m.SessionToken + } + return nil +} + +func (m *Header) GetAttributes() []*Header_Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Header) GetSplit() *Header_Split { + if m != nil { + return m.Split + } + return nil +} + +// Attribute groups the user-defined Key-Value pairs attached to the object +type Header_Attribute struct { + // string key to the object attribute + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // string value of the object attribute + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Header_Attribute) Reset() { *m = Header_Attribute{} } +func (m *Header_Attribute) String() string { return proto.CompactTextString(m) } +func (*Header_Attribute) ProtoMessage() {} +func (*Header_Attribute) Descriptor() ([]byte, []int) { + return fileDescriptor_666bf7c1dc0e676f, []int{0, 0} +} +func (m *Header_Attribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header_Attribute.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Header_Attribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header_Attribute.Merge(m, src) +} +func (m *Header_Attribute) XXX_Size() int { + return m.Size() +} +func (m *Header_Attribute) XXX_DiscardUnknown() { + xxx_messageInfo_Header_Attribute.DiscardUnknown(m) +} + +var xxx_messageInfo_Header_Attribute proto.InternalMessageInfo + +func (m *Header_Attribute) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Header_Attribute) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// Information about spawning the objects through a payload splitting. +type Header_Split struct { + // Identifier of the origin object.v2. + // Parent and children objects must be within the same container.v2. + // Parent object_id is known only to the minor child. + Parent *v2.ObjectID `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Previous carries identifier of the left split neighbor. + Previous *v2.ObjectID `protobuf:"bytes,2,opt,name=previous,proto3" json:"previous,omitempty"` + // `signature` field of the parent object.v2. Used to reconstruct parent. + ParentSignature *v21.Signature `protobuf:"bytes,3,opt,name=parent_signature,json=parentSignature,proto3" json:"parent_signature,omitempty"` + // `header` field of the parent object.v2. Used to reconstruct parent. + ParentHeader *Header `protobuf:"bytes,4,opt,name=parent_header,json=parentHeader,proto3" json:"parent_header,omitempty"` + // Children carries list of identifiers of the objects generated by splitting the current. + Children []*v2.ObjectID `protobuf:"bytes,5,rep,name=children,proto3" json:"children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Header_Split) Reset() { *m = Header_Split{} } +func (m *Header_Split) String() string { return proto.CompactTextString(m) } +func (*Header_Split) ProtoMessage() {} +func (*Header_Split) Descriptor() ([]byte, []int) { + return fileDescriptor_666bf7c1dc0e676f, []int{0, 1} +} +func (m *Header_Split) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header_Split) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header_Split.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Header_Split) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header_Split.Merge(m, src) +} +func (m *Header_Split) XXX_Size() int { + return m.Size() +} +func (m *Header_Split) XXX_DiscardUnknown() { + xxx_messageInfo_Header_Split.DiscardUnknown(m) +} + +var xxx_messageInfo_Header_Split proto.InternalMessageInfo + +func (m *Header_Split) GetParent() *v2.ObjectID { + if m != nil { + return m.Parent + } + return nil +} + +func (m *Header_Split) GetPrevious() *v2.ObjectID { + if m != nil { + return m.Previous + } + return nil +} + +func (m *Header_Split) GetParentSignature() *v21.Signature { + if m != nil { + return m.ParentSignature + } + return nil +} + +func (m *Header_Split) GetParentHeader() *Header { + if m != nil { + return m.ParentHeader + } + return nil +} + +func (m *Header_Split) GetChildren() []*v2.ObjectID { + if m != nil { + return m.Children + } + return nil +} + +// Object structure. +type Object struct { + // Object's unique identifier. + // Object is content-addressed. It means id will change if header or payload + // changes. It's calculated as a hash of header field, which contains hash of + // object's payload + ObjectId *v2.ObjectID `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + // Signed object_id + Signature *v21.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // Object metadata headers + Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` + // Payload bytes. + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_666bf7c1dc0e676f, []int{1} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(m, src) +} +func (m *Object) XXX_Size() int { + return m.Size() +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetObjectId() *v2.ObjectID { + if m != nil { + return m.ObjectId + } + return nil +} + +func (m *Object) GetSignature() *v21.Signature { + if m != nil { + return m.Signature + } + return nil +} + +func (m *Object) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *Object) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func init() { + proto.RegisterEnum("object.v2.ObjectType", ObjectType_name, ObjectType_value) + proto.RegisterType((*Header)(nil), "object.v2.Header") + proto.RegisterType((*Header_Attribute)(nil), "object.v2.Header.Attribute") + proto.RegisterType((*Header_Split)(nil), "object.v2.Header.Split") + proto.RegisterType((*Object)(nil), "object.v2.Object") +} + +func init() { proto.RegisterFile("object/v2/types.proto", fileDescriptor_666bf7c1dc0e676f) } + +var fileDescriptor_666bf7c1dc0e676f = []byte{ + // 704 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x5f, 0x4e, 0xdb, 0x4a, + 0x14, 0xc6, 0x71, 0x42, 0xfe, 0x1d, 0x27, 0x60, 0x06, 0x22, 0xac, 0x5c, 0x29, 0xca, 0x45, 0xba, + 0x52, 0xb8, 0x28, 0x8e, 0x14, 0x24, 0xee, 0x03, 0xba, 0x52, 0x43, 0x49, 0x21, 0x12, 0x25, 0x68, + 0x12, 0xfa, 0xd0, 0x97, 0xc8, 0xb1, 0x87, 0xd8, 0x25, 0xf1, 0x58, 0xf6, 0xc4, 0x28, 0x5b, 0xe8, + 0x0a, 0xba, 0x86, 0x3e, 0x76, 0x15, 0x7d, 0xec, 0x0a, 0xaa, 0x8a, 0x6e, 0xa4, 0xf2, 0xcc, 0xd8, + 0x49, 0x0b, 0xed, 0xdb, 0xcc, 0x77, 0x7e, 0xe7, 0xcc, 0x7c, 0xc7, 0x67, 0x0c, 0x55, 0x3a, 0x79, + 0x47, 0x2c, 0xd6, 0x8e, 0x3a, 0x6d, 0xb6, 0xf4, 0x49, 0x68, 0xf8, 0x01, 0x65, 0x14, 0x95, 0x84, + 0x6c, 0x44, 0x9d, 0xda, 0x6e, 0x40, 0xee, 0xc2, 0x5f, 0xe2, 0xb5, 0x6a, 0x48, 0x82, 0xc8, 0xb5, + 0x48, 0xac, 0xcf, 0x09, 0x33, 0xa5, 0xbc, 0xbf, 0x26, 0x47, 0x24, 0x70, 0xef, 0x96, 0x22, 0x70, + 0xf0, 0x35, 0x0f, 0xf9, 0x4b, 0x62, 0xda, 0x24, 0x40, 0xff, 0x41, 0xd9, 0xa2, 0x1e, 0x33, 0x5d, + 0x8f, 0x04, 0x63, 0xd7, 0xd6, 0x95, 0x86, 0xd2, 0x54, 0x3b, 0x7b, 0x46, 0x7c, 0x8c, 0x11, 0x75, + 0x8c, 0x97, 0x49, 0xb0, 0x7f, 0x8e, 0xd5, 0x94, 0xec, 0xdb, 0xe8, 0x08, 0x8a, 0xf4, 0x41, 0x26, + 0x65, 0x78, 0x92, 0x96, 0x26, 0x0d, 0x1e, 0x44, 0x42, 0x81, 0x13, 0x7d, 0x1b, 0xfd, 0x03, 0x5b, + 0x56, 0x40, 0x4c, 0xe6, 0x52, 0x6f, 0x4c, 0x7c, 0x6a, 0x39, 0x7a, 0xb6, 0xa1, 0x34, 0x37, 0x71, + 0x25, 0x51, 0x7b, 0xb1, 0x88, 0x5a, 0x50, 0x88, 0x48, 0x10, 0xba, 0xd4, 0xd3, 0x37, 0x79, 0xc9, + 0x5d, 0x43, 0x5a, 0x88, 0xab, 0xbe, 0x11, 0x21, 0x9c, 0x30, 0x71, 0x55, 0xdf, 0x5c, 0xce, 0xa8, + 0x69, 0x8f, 0x67, 0xc4, 0x9b, 0x32, 0x47, 0xcf, 0x89, 0xaa, 0x52, 0xbd, 0xe2, 0x22, 0xfa, 0x1b, + 0xca, 0x09, 0xe6, 0x98, 0xa1, 0xa3, 0xe7, 0x1b, 0x4a, 0xb3, 0x8c, 0x55, 0xa9, 0x5d, 0x9a, 0xa1, + 0x83, 0x4e, 0x40, 0x15, 0x2d, 0x1e, 0xc7, 0x6d, 0xd5, 0x0b, 0x0d, 0xa5, 0xb9, 0xd5, 0xa9, 0x1a, + 0x69, 0xdb, 0x8d, 0x01, 0x5f, 0x8d, 0x96, 0x3e, 0xc1, 0x40, 0xd3, 0x35, 0x3a, 0x04, 0xcd, 0xa1, + 0x73, 0x3a, 0xa7, 0x81, 0xef, 0xb8, 0x96, 0x28, 0x5f, 0xe4, 0xe5, 0xb7, 0xd7, 0x74, 0x7e, 0xc4, + 0xff, 0x50, 0x09, 0x49, 0x18, 0xdf, 0x7b, 0xcc, 0xe8, 0x3d, 0xf1, 0xf4, 0x12, 0x77, 0xa8, 0xaf, + 0x3b, 0x1c, 0x0a, 0x60, 0x14, 0xc7, 0x71, 0x39, 0x5c, 0xdb, 0xa1, 0x53, 0x00, 0x93, 0xb1, 0xc0, + 0x9d, 0x2c, 0x18, 0x09, 0x75, 0x68, 0x64, 0x9b, 0x6a, 0xe7, 0xaf, 0xb5, 0x0b, 0x8a, 0xcf, 0x69, + 0x74, 0x13, 0x06, 0xaf, 0xe1, 0xa8, 0x05, 0xb9, 0xd0, 0x9f, 0xb9, 0x4c, 0x57, 0xf9, 0x99, 0xfb, + 0x4f, 0xf3, 0x86, 0x71, 0x18, 0x0b, 0xaa, 0x76, 0x0c, 0xa5, 0xb4, 0x0e, 0xd2, 0x20, 0x7b, 0x4f, + 0x96, 0x7c, 0x2e, 0x4a, 0x38, 0x5e, 0xa2, 0x3d, 0xc8, 0x45, 0xe6, 0x6c, 0x41, 0xf8, 0x67, 0x2f, + 0x61, 0xb1, 0xa9, 0xbd, 0xcf, 0x40, 0x8e, 0x57, 0x41, 0x87, 0x90, 0xf7, 0xcd, 0x80, 0x78, 0x4c, + 0x0e, 0xd3, 0xce, 0x6a, 0x2e, 0xf8, 0xb1, 0xfd, 0x73, 0x2c, 0x01, 0xd4, 0x82, 0xa2, 0x1f, 0x90, + 0xc8, 0xa5, 0x8b, 0x50, 0x0e, 0xd1, 0x33, 0x70, 0x8a, 0xa0, 0x17, 0xa0, 0x89, 0xc4, 0x71, 0xe8, + 0x4e, 0x3d, 0x93, 0x2d, 0x02, 0xc2, 0x07, 0x49, 0xed, 0x54, 0x7f, 0x6a, 0x63, 0x12, 0xc4, 0xdb, + 0x02, 0x4f, 0x05, 0x74, 0x02, 0x15, 0x59, 0xc1, 0xe1, 0xc6, 0xe5, 0x9c, 0xed, 0x3c, 0xe9, 0x08, + 0x2e, 0x0b, 0x4e, 0x3e, 0x93, 0x16, 0x14, 0x2d, 0xc7, 0x9d, 0xd9, 0x01, 0xf1, 0xf4, 0x1c, 0x6f, + 0xfe, 0x73, 0x17, 0x4d, 0x90, 0x83, 0x4f, 0x0a, 0xe4, 0x85, 0x8c, 0x0c, 0x90, 0xaf, 0x77, 0xf5, + 0xba, 0x9e, 0x4b, 0x15, 0x4c, 0xdf, 0x46, 0xc7, 0x50, 0x5a, 0x99, 0xcb, 0xfc, 0xc9, 0xdc, 0x8a, + 0x8b, 0x5b, 0x2e, 0xfd, 0x64, 0x7f, 0xe7, 0x47, 0x02, 0x48, 0x87, 0x82, 0x9c, 0x7c, 0xee, 0xbd, + 0x8c, 0x93, 0xed, 0xbf, 0xa7, 0x00, 0xab, 0x31, 0x47, 0x2a, 0x14, 0x70, 0xef, 0xe2, 0xf6, 0xaa, + 0x8b, 0xb5, 0x0d, 0x54, 0x81, 0xd2, 0x68, 0xf0, 0xfa, 0x6c, 0x38, 0x1a, 0x5c, 0xf7, 0x34, 0x05, + 0xed, 0x40, 0x65, 0x38, 0x1a, 0xe0, 0xee, 0x45, 0x6f, 0x7c, 0x81, 0x07, 0xb7, 0x37, 0x5a, 0xe6, + 0xec, 0xe6, 0xf3, 0x63, 0x5d, 0xf9, 0xf2, 0x58, 0x57, 0xbe, 0x3d, 0xd6, 0x95, 0x0f, 0xdf, 0xeb, + 0x1b, 0x6f, 0x8f, 0xa6, 0x2e, 0x73, 0x16, 0x13, 0xc3, 0xa2, 0xf3, 0xb6, 0x17, 0xfa, 0x96, 0xd5, + 0xb2, 0x49, 0xd4, 0xf6, 0x08, 0xbd, 0x0b, 0x5b, 0xa6, 0xef, 0xb6, 0xa6, 0xb4, 0x9d, 0xfe, 0xed, + 0x3e, 0x66, 0xb4, 0x6b, 0x42, 0x5f, 0x0d, 0x8d, 0xee, 0x4d, 0x5f, 0x36, 0x65, 0x92, 0xe7, 0xff, + 0xaa, 0xe3, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x34, 0x17, 0x81, 0x14, 0x05, 0x00, 0x00, +} + +func (m *Header) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Split != nil { + { + size, err := m.Split.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if m.SessionToken != nil { + { + size, err := m.SessionToken.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if len(m.HomomorphicHash) > 0 { + i -= len(m.HomomorphicHash) + copy(dAtA[i:], m.HomomorphicHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.HomomorphicHash))) + i-- + dAtA[i] = 0x42 + } + if m.ObjectType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ObjectType)) + i-- + dAtA[i] = 0x38 + } + if len(m.PayloadHash) > 0 { + i -= len(m.PayloadHash) + copy(dAtA[i:], m.PayloadHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PayloadHash))) + i-- + dAtA[i] = 0x32 + } + if m.PayloadLength != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.PayloadLength)) + i-- + dAtA[i] = 0x28 + } + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.CreationEpoch != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.CreationEpoch)) + i-- + dAtA[i] = 0x18 + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Header_Attribute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header_Attribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header_Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Header_Split) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header_Split) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header_Split) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Children) > 0 { + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Children[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.ParentHeader != nil { + { + size, err := m.ParentHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.ParentSignature != nil { + { + size, err := m.ParentSignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Previous != nil { + { + size, err := m.Previous.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Parent != nil { + { + size, err := m.Parent.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Object) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Object) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Object) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x22 + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ObjectId != nil { + { + size, err := m.ObjectId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.CreationEpoch != 0 { + n += 1 + sovTypes(uint64(m.CreationEpoch)) + } + if m.Version != nil { + l = m.Version.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.PayloadLength != 0 { + n += 1 + sovTypes(uint64(m.PayloadLength)) + } + l = len(m.PayloadHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ObjectType != 0 { + n += 1 + sovTypes(uint64(m.ObjectType)) + } + l = len(m.HomomorphicHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SessionToken != nil { + l = m.SessionToken.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Split != nil { + l = m.Split.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Header_Attribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Header_Split) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Parent != nil { + l = m.Parent.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Previous != nil { + l = m.Previous.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.ParentSignature != nil { + l = m.ParentSignature.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.ParentHeader != nil { + l = m.ParentHeader.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Object) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectId != nil { + l = m.ObjectId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Header) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &v2.ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v2.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationEpoch", wireType) + } + m.CreationEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Version == nil { + m.Version = &v21.Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PayloadLength", wireType) + } + m.PayloadLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PayloadLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PayloadHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PayloadHash = append(m.PayloadHash[:0], dAtA[iNdEx:postIndex]...) + if m.PayloadHash == nil { + m.PayloadHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType) + } + m.ObjectType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObjectType |= ObjectType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HomomorphicHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HomomorphicHash = append(m.HomomorphicHash[:0], dAtA[iNdEx:postIndex]...) + if m.HomomorphicHash == nil { + m.HomomorphicHash = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionToken", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionToken == nil { + m.SessionToken = &v21.SessionToken{} + } + if err := m.SessionToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Header_Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Split", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Split == nil { + m.Split = &Header_Split{} + } + if err := m.Split.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header_Attribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header_Split) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Split: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Split: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Parent == nil { + m.Parent = &v2.ObjectID{} + } + if err := m.Parent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Previous", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Previous == nil { + m.Previous = &v2.ObjectID{} + } + if err := m.Previous.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentSignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParentSignature == nil { + m.ParentSignature = &v21.Signature{} + } + if err := m.ParentSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParentHeader == nil { + m.ParentHeader = &Header{} + } + if err := m.ParentHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &v2.ObjectID{}) + if err := m.Children[len(m.Children)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Object) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Object: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectId == nil { + m.ObjectId = &v2.ObjectID{} + } + if err := m.ObjectId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &v21.Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/object/v2/types.proto b/object/v2/types.proto new file mode 100644 index 0000000..9462bc0 --- /dev/null +++ b/object/v2/types.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; + +package object.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/object/v2"; +option csharp_namespace = "NeoFS.API.Object"; + +import "refs/v2/types.proto"; +import "service/v2/meta.proto"; +import "service/v2/verify.proto"; + +// Type of the object payload content +enum ObjectType { + // Just a normal object + REGULAR = 0; + // Used internally to identify deleted objects + TOMBSTONE = 1; + // Identifies that the object holds StorageGroup information + STORAGE_GROUP = 2; +} + +message Header { + // Object's container + refs.v2.ContainerID container_id = 1; + // Object's owner + refs.v2.OwnerID owner_id = 2; + // Epoch when the object was created + uint64 creation_epoch = 3; + // Object format version. + // Effectively the version of API library used to create particular object + service.v2.Version version = 4; + // Size of payload in bytes. + // 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown + uint64 payload_length = 5; + // Hash of payload bytes + bytes payload_hash = 6; + ObjectType object_type = 7; + // Homomorphic hash of the object payload. + bytes homomorphic_hash = 8; + // Session token, if it was used during Object creation. + // Need it to verify integrity and authenticity out of Request scope. + service.v2.SessionToken session_token = 9; + + // Attribute groups the user-defined Key-Value pairs attached to the object + message Attribute { + // string key to the object attribute + string key = 1; + // string value of the object attribute + string value = 2; + } + repeated Attribute attributes = 10; + + // Information about spawning the objects through a payload splitting. + message Split { + // Identifier of the origin object.v2. + // Parent and children objects must be within the same container.v2. + // Parent object_id is known only to the minor child. + refs.v2.ObjectID parent = 1; + // Previous carries identifier of the left split neighbor. + refs.v2.ObjectID previous = 2; + // `signature` field of the parent object.v2. Used to reconstruct parent. + service.v2.Signature parent_signature = 3; + // `header` field of the parent object.v2. Used to reconstruct parent. + Header parent_header = 4; + // Children carries list of identifiers of the objects generated by splitting the current. + repeated refs.v2.ObjectID children = 5; + } + // Position of the object in the split hierarchy. + Split split = 11; +} + +// Object structure. +message Object { + // Object's unique identifier. + // Object is content-addressed. It means id will change if header or payload + // changes. It's calculated as a hash of header field, which contains hash of + // object's payload + refs.v2.ObjectID object_id = 1; + // Signed object_id + service.v2.Signature signature = 2; + // Object metadata headers + Header header = 3; + // Payload bytes. + bytes payload = 4; +} diff --git a/refs/v2/types.pb.go b/refs/v2/types.pb.go new file mode 100644 index 0000000..c76f97c --- /dev/null +++ b/refs/v2/types.pb.go @@ -0,0 +1,970 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: refs/v2/types.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Address of object (container id + object id) +type Address struct { + // container_id carries container identifier. + ContainerId *ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // object_id carries object identifier. + ObjectId *ObjectID `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Address) Reset() { *m = Address{} } +func (m *Address) String() string { return proto.CompactTextString(m) } +func (*Address) ProtoMessage() {} +func (*Address) Descriptor() ([]byte, []int) { + return fileDescriptor_e9faa6bee2355acc, []int{0} +} +func (m *Address) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Address.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Address) XXX_Merge(src proto.Message) { + xxx_messageInfo_Address.Merge(m, src) +} +func (m *Address) XXX_Size() int { + return m.Size() +} +func (m *Address) XXX_DiscardUnknown() { + xxx_messageInfo_Address.DiscardUnknown(m) +} + +var xxx_messageInfo_Address proto.InternalMessageInfo + +func (m *Address) GetContainerId() *ContainerID { + if m != nil { + return m.ContainerId + } + return nil +} + +func (m *Address) GetObjectId() *ObjectID { + if m != nil { + return m.ObjectId + } + return nil +} + +// NeoFS object identifier. +type ObjectID struct { + // value carries the object identifier in a binary format. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ObjectID) Reset() { *m = ObjectID{} } +func (m *ObjectID) String() string { return proto.CompactTextString(m) } +func (*ObjectID) ProtoMessage() {} +func (*ObjectID) Descriptor() ([]byte, []int) { + return fileDescriptor_e9faa6bee2355acc, []int{1} +} +func (m *ObjectID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ObjectID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ObjectID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ObjectID) XXX_Merge(src proto.Message) { + xxx_messageInfo_ObjectID.Merge(m, src) +} +func (m *ObjectID) XXX_Size() int { + return m.Size() +} +func (m *ObjectID) XXX_DiscardUnknown() { + xxx_messageInfo_ObjectID.DiscardUnknown(m) +} + +var xxx_messageInfo_ObjectID proto.InternalMessageInfo + +func (m *ObjectID) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// NeoFS container identifier. +type ContainerID struct { + // value carries the container identifier in a binary format. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainerID) Reset() { *m = ContainerID{} } +func (m *ContainerID) String() string { return proto.CompactTextString(m) } +func (*ContainerID) ProtoMessage() {} +func (*ContainerID) Descriptor() ([]byte, []int) { + return fileDescriptor_e9faa6bee2355acc, []int{2} +} +func (m *ContainerID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainerID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContainerID) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainerID.Merge(m, src) +} +func (m *ContainerID) XXX_Size() int { + return m.Size() +} +func (m *ContainerID) XXX_DiscardUnknown() { + xxx_messageInfo_ContainerID.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainerID proto.InternalMessageInfo + +func (m *ContainerID) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// OwnerID group information about the owner of the NeoFS container.v2. +type OwnerID struct { + // value carries the identifier of the container owner in a binary format. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OwnerID) Reset() { *m = OwnerID{} } +func (m *OwnerID) String() string { return proto.CompactTextString(m) } +func (*OwnerID) ProtoMessage() {} +func (*OwnerID) Descriptor() ([]byte, []int) { + return fileDescriptor_e9faa6bee2355acc, []int{3} +} +func (m *OwnerID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OwnerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OwnerID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OwnerID) XXX_Merge(src proto.Message) { + xxx_messageInfo_OwnerID.Merge(m, src) +} +func (m *OwnerID) XXX_Size() int { + return m.Size() +} +func (m *OwnerID) XXX_DiscardUnknown() { + xxx_messageInfo_OwnerID.DiscardUnknown(m) +} + +var xxx_messageInfo_OwnerID proto.InternalMessageInfo + +func (m *OwnerID) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*Address)(nil), "refs.v2.Address") + proto.RegisterType((*ObjectID)(nil), "refs.v2.ObjectID") + proto.RegisterType((*ContainerID)(nil), "refs.v2.ContainerID") + proto.RegisterType((*OwnerID)(nil), "refs.v2.OwnerID") +} + +func init() { proto.RegisterFile("refs/v2/types.proto", fileDescriptor_e9faa6bee2355acc) } + +var fileDescriptor_e9faa6bee2355acc = []byte{ + // 247 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x4a, 0x4d, 0x2b, + 0xd6, 0x2f, 0x33, 0xd2, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x62, 0x07, 0x09, 0xea, 0x95, 0x19, 0x29, 0x15, 0x71, 0xb1, 0x3b, 0xa6, 0xa4, 0x14, 0xa5, 0x16, + 0x17, 0x0b, 0x99, 0x73, 0xf1, 0x24, 0xe7, 0xe7, 0x95, 0x24, 0x66, 0xe6, 0xa5, 0x16, 0xc5, 0x67, + 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0xe8, 0x41, 0x95, 0xea, 0x39, 0xc3, 0x24, + 0x3d, 0x5d, 0x82, 0xb8, 0xe1, 0x2a, 0x3d, 0x53, 0x84, 0xf4, 0xb8, 0x38, 0xf3, 0x93, 0xb2, 0x52, + 0x93, 0x4b, 0x40, 0xba, 0x98, 0xc0, 0xba, 0x04, 0xe1, 0xba, 0xfc, 0xc1, 0x32, 0x9e, 0x2e, 0x41, + 0x1c, 0x10, 0x35, 0x9e, 0x29, 0x4a, 0x0a, 0x5c, 0x1c, 0x30, 0x51, 0x21, 0x11, 0x2e, 0xd6, 0xb2, + 0xc4, 0x9c, 0xd2, 0x54, 0xb0, 0x6d, 0x3c, 0x41, 0x10, 0x8e, 0x92, 0x32, 0x17, 0x37, 0x92, 0x6d, + 0x38, 0x14, 0xc9, 0x73, 0xb1, 0xfb, 0x97, 0xe3, 0x51, 0xe0, 0xe4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, + 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x99, 0x9e, + 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x57, 0x5c, 0x90, 0x9c, 0xac, 0x9b, + 0x92, 0x5a, 0xa6, 0x9f, 0x97, 0x9a, 0x9f, 0x56, 0xac, 0x9b, 0x58, 0x90, 0xa9, 0x9b, 0x9e, 0xaf, + 0x0f, 0x0d, 0xad, 0x55, 0x4c, 0x7c, 0x7e, 0xa9, 0xf9, 0x6e, 0xc1, 0x7a, 0x8e, 0x01, 0x9e, 0x7a, + 0x41, 0xa9, 0x69, 0xc5, 0x49, 0x6c, 0xe0, 0x90, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd2, + 0xd4, 0x5b, 0x91, 0x50, 0x01, 0x00, 0x00, +} + +func (m *Address) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Address) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Address) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ObjectId != nil { + { + size, err := m.ObjectId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ContainerId != nil { + { + size, err := m.ContainerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ObjectID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ObjectID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ObjectID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContainerID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OwnerID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OwnerID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OwnerID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Address) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContainerId != nil { + l = m.ContainerId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.ObjectId != nil { + l = m.ObjectId.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ObjectID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainerID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OwnerID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Address) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Address: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Address: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerId == nil { + m.ContainerId = &ContainerID{} + } + if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectId == nil { + m.ObjectId = &ObjectID{} + } + if err := m.ObjectId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OwnerID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OwnerID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OwnerID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/refs/v2/types.proto b/refs/v2/types.proto new file mode 100644 index 0000000..82049b4 --- /dev/null +++ b/refs/v2/types.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +package refs.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/refs/v2"; +option csharp_namespace = "NeoFS.API.Refs"; + +// Address of object (container id + object id) +message Address { + // container_id carries container identifier. + ContainerID container_id = 1; + // object_id carries object identifier. + ObjectID object_id = 2; +} + +// NeoFS object identifier. +message ObjectID { + // value carries the object identifier in a binary format. + bytes value = 1; +} + +// NeoFS container identifier. +message ContainerID { + // value carries the container identifier in a binary format. + bytes value = 1; +} + +// OwnerID group information about the owner of the NeoFS container.v2. +message OwnerID { + // value carries the identifier of the container owner in a binary format. + bytes value = 1; +} \ No newline at end of file diff --git a/service/v2/meta.pb.go b/service/v2/meta.pb.go new file mode 100644 index 0000000..34d2eb7 --- /dev/null +++ b/service/v2/meta.pb.go @@ -0,0 +1,3168 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: service/v2/meta.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v21 "github.com/nspcc-dev/neofs-api-go/acl/v2" + v2 "github.com/nspcc-dev/neofs-api-go/refs/v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Verb is an enumeration of session request types +type SessionToken_Body_Verb int32 + +const ( + // Refers to object.Put RPC call + SessionToken_Body_OBJECT_PUT SessionToken_Body_Verb = 0 + // Refers to object.Get RPC call + SessionToken_Body_OBJECT_GET SessionToken_Body_Verb = 1 + // Refers to object.Head RPC call + SessionToken_Body_OBJECT_HEAD SessionToken_Body_Verb = 2 + // Refers to object.Search RPC call + SessionToken_Body_OBJECT_SEARCH SessionToken_Body_Verb = 3 + // Refers to object.Delete RPC call + SessionToken_Body_OBJECT_DELETE SessionToken_Body_Verb = 4 + // Refers to object.GetRange RPC call + SessionToken_Body_OBJECT_RANGE SessionToken_Body_Verb = 5 + // Refers to object.GetRangeHash RPC call + SessionToken_Body_OBJECT_RANGEHASH SessionToken_Body_Verb = 6 +) + +var SessionToken_Body_Verb_name = map[int32]string{ + 0: "OBJECT_PUT", + 1: "OBJECT_GET", + 2: "OBJECT_HEAD", + 3: "OBJECT_SEARCH", + 4: "OBJECT_DELETE", + 5: "OBJECT_RANGE", + 6: "OBJECT_RANGEHASH", +} + +var SessionToken_Body_Verb_value = map[string]int32{ + "OBJECT_PUT": 0, + "OBJECT_GET": 1, + "OBJECT_HEAD": 2, + "OBJECT_SEARCH": 3, + "OBJECT_DELETE": 4, + "OBJECT_RANGE": 5, + "OBJECT_RANGEHASH": 6, +} + +func (x SessionToken_Body_Verb) String() string { + return proto.EnumName(SessionToken_Body_Verb_name, int32(x)) +} + +func (SessionToken_Body_Verb) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{3, 0, 0} +} + +type XHeader struct { + // Key of the X-Header. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Value of the X-Header. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *XHeader) Reset() { *m = XHeader{} } +func (m *XHeader) String() string { return proto.CompactTextString(m) } +func (*XHeader) ProtoMessage() {} +func (*XHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{0} +} +func (m *XHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *XHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_XHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *XHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_XHeader.Merge(m, src) +} +func (m *XHeader) XXX_Size() int { + return m.Size() +} +func (m *XHeader) XXX_DiscardUnknown() { + xxx_messageInfo_XHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_XHeader proto.InternalMessageInfo + +func (m *XHeader) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *XHeader) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// Represents API version used by node. +type Version struct { + // Major API version. + Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` + // Minor API version. + Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{1} +} +func (m *Version) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(m, src) +} +func (m *Version) XXX_Size() int { + return m.Size() +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_Version proto.InternalMessageInfo + +func (m *Version) GetMajor() uint32 { + if m != nil { + return m.Major + } + return 0 +} + +func (m *Version) GetMinor() uint32 { + if m != nil { + return m.Minor + } + return 0 +} + +// Lifetime parameters of the token. Filed names taken from rfc7519. +type TokenLifetime struct { + // Expiration Epoch + Exp uint64 `protobuf:"varint,1,opt,name=exp,proto3" json:"exp,omitempty"` + // Not valid before Epoch + Nbf uint64 `protobuf:"varint,2,opt,name=nbf,proto3" json:"nbf,omitempty"` + // Issued at Epoch + Iat uint64 `protobuf:"varint,3,opt,name=iat,proto3" json:"iat,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TokenLifetime) Reset() { *m = TokenLifetime{} } +func (m *TokenLifetime) String() string { return proto.CompactTextString(m) } +func (*TokenLifetime) ProtoMessage() {} +func (*TokenLifetime) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{2} +} +func (m *TokenLifetime) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenLifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenLifetime.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TokenLifetime) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenLifetime.Merge(m, src) +} +func (m *TokenLifetime) XXX_Size() int { + return m.Size() +} +func (m *TokenLifetime) XXX_DiscardUnknown() { + xxx_messageInfo_TokenLifetime.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenLifetime proto.InternalMessageInfo + +func (m *TokenLifetime) GetExp() uint64 { + if m != nil { + return m.Exp + } + return 0 +} + +func (m *TokenLifetime) GetNbf() uint64 { + if m != nil { + return m.Nbf + } + return 0 +} + +func (m *TokenLifetime) GetIat() uint64 { + if m != nil { + return m.Iat + } + return 0 +} + +// NeoFS session token. +type SessionToken struct { + // Session Token body + Token *SessionToken_Body `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // Signature is a signature of session token information + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SessionToken) Reset() { *m = SessionToken{} } +func (m *SessionToken) String() string { return proto.CompactTextString(m) } +func (*SessionToken) ProtoMessage() {} +func (*SessionToken) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{3} +} +func (m *SessionToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SessionToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SessionToken.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SessionToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_SessionToken.Merge(m, src) +} +func (m *SessionToken) XXX_Size() int { + return m.Size() +} +func (m *SessionToken) XXX_DiscardUnknown() { + xxx_messageInfo_SessionToken.DiscardUnknown(m) +} + +var xxx_messageInfo_SessionToken proto.InternalMessageInfo + +func (m *SessionToken) GetToken() *SessionToken_Body { + if m != nil { + return m.Token + } + return nil +} + +func (m *SessionToken) GetSignature() *Signature { + if m != nil { + return m.Signature + } + return nil +} + +type SessionToken_Body struct { + // ID is a token identifier. valid UUIDv4 represented in bytes + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // OwnerID carries identifier of the session initiator. + OwnerId *v2.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // Verb is a type of request for which the token is issued + Verb SessionToken_Body_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=service.v2.SessionToken_Body_Verb" json:"verb,omitempty"` + // Lifetime is a lifetime of the session + Lifetime *TokenLifetime `protobuf:"bytes,4,opt,name=lifetime,proto3" json:"lifetime,omitempty"` + // SessionKey is a public key of session key + SessionKey []byte `protobuf:"bytes,5,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"` + // Carries context of the session. + // + // Types that are valid to be assigned to Context: + // *SessionToken_Body_ObjectAddress + Context isSessionToken_Body_Context `protobuf_oneof:"context"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SessionToken_Body) Reset() { *m = SessionToken_Body{} } +func (m *SessionToken_Body) String() string { return proto.CompactTextString(m) } +func (*SessionToken_Body) ProtoMessage() {} +func (*SessionToken_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{3, 0} +} +func (m *SessionToken_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SessionToken_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SessionToken_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SessionToken_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_SessionToken_Body.Merge(m, src) +} +func (m *SessionToken_Body) XXX_Size() int { + return m.Size() +} +func (m *SessionToken_Body) XXX_DiscardUnknown() { + xxx_messageInfo_SessionToken_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_SessionToken_Body proto.InternalMessageInfo + +type isSessionToken_Body_Context interface { + isSessionToken_Body_Context() + MarshalTo([]byte) (int, error) + Size() int +} + +type SessionToken_Body_ObjectAddress struct { + ObjectAddress *v2.Address `protobuf:"bytes,6,opt,name=object_address,json=objectAddress,proto3,oneof" json:"object_address,omitempty"` +} + +func (*SessionToken_Body_ObjectAddress) isSessionToken_Body_Context() {} + +func (m *SessionToken_Body) GetContext() isSessionToken_Body_Context { + if m != nil { + return m.Context + } + return nil +} + +func (m *SessionToken_Body) GetId() []byte { + if m != nil { + return m.Id + } + return nil +} + +func (m *SessionToken_Body) GetOwnerId() *v2.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +func (m *SessionToken_Body) GetVerb() SessionToken_Body_Verb { + if m != nil { + return m.Verb + } + return SessionToken_Body_OBJECT_PUT +} + +func (m *SessionToken_Body) GetLifetime() *TokenLifetime { + if m != nil { + return m.Lifetime + } + return nil +} + +func (m *SessionToken_Body) GetSessionKey() []byte { + if m != nil { + return m.SessionKey + } + return nil +} + +func (m *SessionToken_Body) GetObjectAddress() *v2.Address { + if x, ok := m.GetContext().(*SessionToken_Body_ObjectAddress); ok { + return x.ObjectAddress + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SessionToken_Body) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SessionToken_Body_ObjectAddress)(nil), + } +} + +// BearerToken has information about request ACL rules with limited lifetime +type BearerToken struct { + // Bearer Token body + Token *BearerToken_Body `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // Signature of BearerToken body + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BearerToken) Reset() { *m = BearerToken{} } +func (m *BearerToken) String() string { return proto.CompactTextString(m) } +func (*BearerToken) ProtoMessage() {} +func (*BearerToken) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{4} +} +func (m *BearerToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BearerToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BearerToken.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BearerToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_BearerToken.Merge(m, src) +} +func (m *BearerToken) XXX_Size() int { + return m.Size() +} +func (m *BearerToken) XXX_DiscardUnknown() { + xxx_messageInfo_BearerToken.DiscardUnknown(m) +} + +var xxx_messageInfo_BearerToken proto.InternalMessageInfo + +func (m *BearerToken) GetToken() *BearerToken_Body { + if m != nil { + return m.Token + } + return nil +} + +func (m *BearerToken) GetSignature() *Signature { + if m != nil { + return m.Signature + } + return nil +} + +type BearerToken_Body struct { + // EACLTable carries table of extended ACL rules + EaclTable *v21.EACLTable `protobuf:"bytes,1,opt,name=eacl_table,json=eaclTable,proto3" json:"eacl_table,omitempty"` + // OwnerID carries identifier of the token owner + OwnerId *v2.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // Token expiration and valid time period parameters + Lifetime *TokenLifetime `protobuf:"bytes,3,opt,name=lifetime,proto3" json:"lifetime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BearerToken_Body) Reset() { *m = BearerToken_Body{} } +func (m *BearerToken_Body) String() string { return proto.CompactTextString(m) } +func (*BearerToken_Body) ProtoMessage() {} +func (*BearerToken_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{4, 0} +} +func (m *BearerToken_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BearerToken_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BearerToken_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BearerToken_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_BearerToken_Body.Merge(m, src) +} +func (m *BearerToken_Body) XXX_Size() int { + return m.Size() +} +func (m *BearerToken_Body) XXX_DiscardUnknown() { + xxx_messageInfo_BearerToken_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_BearerToken_Body proto.InternalMessageInfo + +func (m *BearerToken_Body) GetEaclTable() *v21.EACLTable { + if m != nil { + return m.EaclTable + } + return nil +} + +func (m *BearerToken_Body) GetOwnerId() *v2.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +func (m *BearerToken_Body) GetLifetime() *TokenLifetime { + if m != nil { + return m.Lifetime + } + return nil +} + +// Information about the request +type RequestMetaHeader struct { + // Client API version. + Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Client local epoch number. Set to 0 if unknown. + Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` + // Maximum number of nodes in the request route. + Ttl uint32 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Request X-Headers. + XHeaders []*XHeader `protobuf:"bytes,4,rep,name=x_headers,json=xHeaders,proto3" json:"x_headers,omitempty"` + // Token is a token of the session within which the request is sent + Token *SessionToken `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + // Bearer is a Bearer token of the request + Bearer *BearerToken `protobuf:"bytes,6,opt,name=bearer,proto3" json:"bearer,omitempty"` + // RequestMetaHeader of the origin request. + Origin *RequestMetaHeader `protobuf:"bytes,7,opt,name=origin,proto3" json:"origin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestMetaHeader) Reset() { *m = RequestMetaHeader{} } +func (m *RequestMetaHeader) String() string { return proto.CompactTextString(m) } +func (*RequestMetaHeader) ProtoMessage() {} +func (*RequestMetaHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{5} +} +func (m *RequestMetaHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestMetaHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestMetaHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RequestMetaHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestMetaHeader.Merge(m, src) +} +func (m *RequestMetaHeader) XXX_Size() int { + return m.Size() +} +func (m *RequestMetaHeader) XXX_DiscardUnknown() { + xxx_messageInfo_RequestMetaHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestMetaHeader proto.InternalMessageInfo + +func (m *RequestMetaHeader) GetVersion() *Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *RequestMetaHeader) GetEpoch() uint64 { + if m != nil { + return m.Epoch + } + return 0 +} + +func (m *RequestMetaHeader) GetTtl() uint32 { + if m != nil { + return m.Ttl + } + return 0 +} + +func (m *RequestMetaHeader) GetXHeaders() []*XHeader { + if m != nil { + return m.XHeaders + } + return nil +} + +func (m *RequestMetaHeader) GetToken() *SessionToken { + if m != nil { + return m.Token + } + return nil +} + +func (m *RequestMetaHeader) GetBearer() *BearerToken { + if m != nil { + return m.Bearer + } + return nil +} + +func (m *RequestMetaHeader) GetOrigin() *RequestMetaHeader { + if m != nil { + return m.Origin + } + return nil +} + +// Information about the response +type ResponseMetaHeader struct { + // Server API version. + Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Server local epoch number. + Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` + // Maximum number of nodes in the response route. + Ttl uint32 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Response X-Headers. + XHeaders []*XHeader `protobuf:"bytes,4,rep,name=x_headers,json=xHeaders,proto3" json:"x_headers,omitempty"` + // Carries response meta header of the origin response. + Origin *ResponseMetaHeader `protobuf:"bytes,5,opt,name=origin,proto3" json:"origin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponseMetaHeader) Reset() { *m = ResponseMetaHeader{} } +func (m *ResponseMetaHeader) String() string { return proto.CompactTextString(m) } +func (*ResponseMetaHeader) ProtoMessage() {} +func (*ResponseMetaHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_44cb230373b42f12, []int{6} +} +func (m *ResponseMetaHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseMetaHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseMetaHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResponseMetaHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseMetaHeader.Merge(m, src) +} +func (m *ResponseMetaHeader) XXX_Size() int { + return m.Size() +} +func (m *ResponseMetaHeader) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseMetaHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseMetaHeader proto.InternalMessageInfo + +func (m *ResponseMetaHeader) GetVersion() *Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *ResponseMetaHeader) GetEpoch() uint64 { + if m != nil { + return m.Epoch + } + return 0 +} + +func (m *ResponseMetaHeader) GetTtl() uint32 { + if m != nil { + return m.Ttl + } + return 0 +} + +func (m *ResponseMetaHeader) GetXHeaders() []*XHeader { + if m != nil { + return m.XHeaders + } + return nil +} + +func (m *ResponseMetaHeader) GetOrigin() *ResponseMetaHeader { + if m != nil { + return m.Origin + } + return nil +} + +func init() { + proto.RegisterEnum("service.v2.SessionToken_Body_Verb", SessionToken_Body_Verb_name, SessionToken_Body_Verb_value) + proto.RegisterType((*XHeader)(nil), "service.v2.XHeader") + proto.RegisterType((*Version)(nil), "service.v2.Version") + proto.RegisterType((*TokenLifetime)(nil), "service.v2.TokenLifetime") + proto.RegisterType((*SessionToken)(nil), "service.v2.SessionToken") + proto.RegisterType((*SessionToken_Body)(nil), "service.v2.SessionToken.Body") + proto.RegisterType((*BearerToken)(nil), "service.v2.BearerToken") + proto.RegisterType((*BearerToken_Body)(nil), "service.v2.BearerToken.Body") + proto.RegisterType((*RequestMetaHeader)(nil), "service.v2.RequestMetaHeader") + proto.RegisterType((*ResponseMetaHeader)(nil), "service.v2.ResponseMetaHeader") +} + +func init() { proto.RegisterFile("service/v2/meta.proto", fileDescriptor_44cb230373b42f12) } + +var fileDescriptor_44cb230373b42f12 = []byte{ + // 778 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x6b, 0x3b, 0x7e, 0x8e, 0xc3, 0x66, 0xda, 0xaa, 0x26, 0x02, 0x53, 0xed, 0x09, + 0x09, 0xb2, 0x2e, 0x8e, 0x52, 0x89, 0xa3, 0x9d, 0x2c, 0x75, 0x20, 0xb4, 0xd5, 0xd8, 0x54, 0x88, + 0x8b, 0xb5, 0xde, 0x7d, 0x4e, 0xa6, 0x75, 0x76, 0xcc, 0xcc, 0x64, 0x89, 0x3f, 0x00, 0x1f, 0x01, + 0x89, 0x43, 0x2f, 0x5c, 0x39, 0xf3, 0x21, 0x38, 0x72, 0xe1, 0x8e, 0xc2, 0x17, 0x41, 0xf3, 0xc7, + 0xcd, 0x26, 0x55, 0x11, 0x88, 0x0b, 0xb7, 0x37, 0xbf, 0xf7, 0x7b, 0xff, 0xdf, 0xdb, 0x85, 0x7b, + 0x12, 0x45, 0xc1, 0x52, 0xec, 0x15, 0xfd, 0xde, 0x39, 0xaa, 0x24, 0x5a, 0x0a, 0xae, 0x38, 0x01, + 0x07, 0x47, 0x45, 0x7f, 0x97, 0x24, 0xe9, 0x42, 0xab, 0xd5, 0x6a, 0x89, 0xd2, 0xea, 0x77, 0xef, + 0x08, 0x9c, 0xcb, 0xdb, 0xe0, 0xfd, 0x92, 0xaf, 0x02, 0x05, 0x9b, 0xaf, 0xac, 0x22, 0xfc, 0x04, + 0x1a, 0x5f, 0x8f, 0x30, 0xc9, 0x50, 0x90, 0x00, 0xaa, 0x2f, 0x71, 0xd5, 0xf1, 0x1e, 0x78, 0x1f, + 0x36, 0xa9, 0x16, 0xc9, 0x5d, 0xa8, 0x15, 0xc9, 0xe2, 0x02, 0x3b, 0x15, 0x83, 0xd9, 0x47, 0x78, + 0x00, 0x8d, 0xe7, 0x28, 0x24, 0xe3, 0xb9, 0x26, 0x9c, 0x27, 0x2f, 0xb8, 0x30, 0x46, 0x6d, 0x6a, + 0x1f, 0x06, 0x65, 0x39, 0x17, 0xc6, 0x4c, 0xa3, 0xfa, 0x11, 0xc6, 0xd0, 0x9e, 0xf0, 0x97, 0x98, + 0x9f, 0xb0, 0x39, 0x2a, 0x76, 0x8e, 0x3a, 0x1e, 0x5e, 0x2e, 0x8d, 0xa9, 0x4f, 0xb5, 0xa8, 0x91, + 0x7c, 0x36, 0x37, 0x66, 0x3e, 0xd5, 0xa2, 0x46, 0x58, 0xa2, 0x3a, 0x55, 0x8b, 0xb0, 0x44, 0x85, + 0xaf, 0x7c, 0xd8, 0x1a, 0xa3, 0xd4, 0xe1, 0x8d, 0x3b, 0xb2, 0x0f, 0x35, 0xa5, 0x05, 0xe3, 0xa8, + 0xd5, 0x7f, 0x3f, 0xba, 0xee, 0x4f, 0x54, 0x26, 0x46, 0x43, 0x9e, 0xad, 0xa8, 0xe5, 0x92, 0x7d, + 0x68, 0x4a, 0x76, 0x9a, 0x27, 0xea, 0x42, 0xd8, 0xea, 0x5a, 0xfd, 0x7b, 0x37, 0x0c, 0xd7, 0x4a, + 0x7a, 0xcd, 0xdb, 0xfd, 0xa9, 0x0a, 0xbe, 0x76, 0x42, 0xb6, 0xa1, 0xc2, 0x32, 0x13, 0x6f, 0x8b, + 0x56, 0x58, 0x46, 0x3e, 0x82, 0x4d, 0xfe, 0x5d, 0x8e, 0x62, 0xca, 0x32, 0xe7, 0x2c, 0x88, 0xf4, + 0x14, 0xb4, 0xa7, 0xa7, 0x5a, 0x71, 0x7c, 0x44, 0x1b, 0x86, 0x71, 0x9c, 0x91, 0x47, 0xe0, 0x17, + 0x28, 0x66, 0xa6, 0xa6, 0xed, 0x7e, 0xf8, 0xb7, 0xe9, 0x46, 0xcf, 0x51, 0xcc, 0xa8, 0xe1, 0x93, + 0x03, 0xd8, 0x5c, 0xb8, 0xd6, 0x75, 0x7c, 0x13, 0xe4, 0xdd, 0xb2, 0xed, 0x8d, 0xde, 0xd2, 0xd7, + 0x54, 0xf2, 0x01, 0xb4, 0xa4, 0x75, 0x3b, 0xd5, 0xd3, 0xad, 0x99, 0xa4, 0xc1, 0x41, 0x5f, 0xe0, + 0x8a, 0x7c, 0x0a, 0xdb, 0x7c, 0xf6, 0x02, 0x53, 0x35, 0x4d, 0xb2, 0x4c, 0xa0, 0x94, 0x9d, 0xfa, + 0xad, 0x12, 0x06, 0x16, 0x1f, 0x6d, 0xd0, 0xb6, 0x65, 0x3a, 0x20, 0xfc, 0xde, 0x03, 0x5f, 0x67, + 0x48, 0xb6, 0x01, 0x9e, 0x0e, 0x3f, 0x8f, 0x0f, 0x27, 0xd3, 0x67, 0x5f, 0x4d, 0x82, 0x8d, 0xd2, + 0xfb, 0x71, 0x3c, 0x09, 0x3c, 0xf2, 0x0e, 0xb4, 0xdc, 0x7b, 0x14, 0x0f, 0x8e, 0x82, 0x0a, 0xd9, + 0x81, 0xb6, 0x03, 0xc6, 0xf1, 0x80, 0x1e, 0x8e, 0x82, 0x6a, 0x09, 0x3a, 0x8a, 0x4f, 0xe2, 0x49, + 0x1c, 0xf8, 0x24, 0x80, 0x2d, 0x07, 0xd1, 0xc1, 0x93, 0xc7, 0x71, 0x50, 0x23, 0x77, 0x21, 0x28, + 0x23, 0xa3, 0xc1, 0x78, 0x14, 0xd4, 0x87, 0x4d, 0x68, 0xa4, 0x3c, 0x57, 0x78, 0xa9, 0xc2, 0x1f, + 0x2a, 0xd0, 0x1a, 0x62, 0x22, 0x50, 0xd8, 0xed, 0xe8, 0xdf, 0xdc, 0x8e, 0xf7, 0xca, 0x2d, 0x2b, + 0xf1, 0xfe, 0xfb, 0x72, 0xbc, 0xf2, 0xdc, 0x72, 0x3c, 0x04, 0xc0, 0x24, 0x5d, 0x4c, 0x55, 0x32, + 0x5b, 0xa0, 0x0b, 0xbb, 0x13, 0x25, 0xe9, 0x42, 0x9b, 0xc6, 0x83, 0xc3, 0x93, 0x89, 0x56, 0xd0, + 0xa6, 0x26, 0x19, 0xf1, 0xdf, 0xad, 0x4f, 0x79, 0x0d, 0xaa, 0xff, 0x78, 0x0d, 0xc2, 0x5f, 0x2a, + 0xb0, 0x43, 0xf1, 0xdb, 0x0b, 0x94, 0xea, 0x4b, 0x54, 0x89, 0x3b, 0xf9, 0x3d, 0x68, 0x14, 0xf6, + 0x94, 0x5d, 0xa2, 0x77, 0xca, 0xbe, 0xdc, 0x95, 0xd3, 0x35, 0x47, 0x1f, 0x36, 0x2e, 0x79, 0x7a, + 0xe6, 0x2e, 0xd4, 0x3e, 0xf4, 0x8d, 0x2a, 0xb5, 0x30, 0xc9, 0xb4, 0xa9, 0x16, 0xc9, 0x43, 0x68, + 0x5e, 0x4e, 0xcf, 0x4c, 0x08, 0xd9, 0xf1, 0x1f, 0x54, 0x6f, 0x3b, 0x76, 0x5f, 0x1c, 0xba, 0x79, + 0x69, 0x05, 0x49, 0xa2, 0xf5, 0x98, 0x6a, 0x26, 0x8d, 0xce, 0xdb, 0xae, 0x62, 0x3d, 0xa2, 0x1e, + 0xd4, 0x67, 0x66, 0x7a, 0x6e, 0x59, 0xef, 0xbf, 0x65, 0xae, 0xd4, 0xd1, 0xc8, 0x01, 0xd4, 0xb9, + 0x60, 0xa7, 0x2c, 0xef, 0x34, 0xde, 0xfc, 0x4c, 0xbc, 0xd1, 0x18, 0xea, 0xc8, 0xe1, 0xef, 0x1e, + 0x10, 0x8a, 0x72, 0xc9, 0x73, 0x89, 0xff, 0xc7, 0xbe, 0x3d, 0x7a, 0x5d, 0x96, 0x6d, 0x5c, 0xf7, + 0x66, 0x59, 0xb7, 0x13, 0x5f, 0xd7, 0x35, 0xa4, 0xbf, 0x5e, 0x75, 0xbd, 0xdf, 0xae, 0xba, 0xde, + 0x1f, 0x57, 0x5d, 0xef, 0xc7, 0x3f, 0xbb, 0x1b, 0xdf, 0x7c, 0x7c, 0xca, 0xd4, 0xd9, 0xc5, 0x2c, + 0x4a, 0xf9, 0x79, 0x2f, 0x97, 0xcb, 0x34, 0xdd, 0xcb, 0xb0, 0xe8, 0xe5, 0xc8, 0xe7, 0x72, 0x2f, + 0x59, 0xb2, 0xbd, 0x53, 0xde, 0xbb, 0xfe, 0x87, 0xfc, 0x5c, 0xd9, 0x79, 0x82, 0xfc, 0xb3, 0x71, + 0x34, 0x78, 0x76, 0x1c, 0x8d, 0x2d, 0x3c, 0xab, 0x9b, 0x3f, 0xca, 0xfe, 0x5f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x35, 0x2b, 0x57, 0xef, 0xb8, 0x06, 0x00, 0x00, +} + +func (m *XHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *XHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *XHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintMeta(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintMeta(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Version) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Version) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Minor != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Minor)) + i-- + dAtA[i] = 0x10 + } + if m.Major != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Major)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TokenLifetime) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TokenLifetime) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenLifetime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Iat != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Iat)) + i-- + dAtA[i] = 0x18 + } + if m.Nbf != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Nbf)) + i-- + dAtA[i] = 0x10 + } + if m.Exp != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Exp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SessionToken) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SessionToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SessionToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SessionToken_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SessionToken_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SessionToken_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Context != nil { + { + size := m.Context.Size() + i -= size + if _, err := m.Context.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.SessionKey) > 0 { + i -= len(m.SessionKey) + copy(dAtA[i:], m.SessionKey) + i = encodeVarintMeta(dAtA, i, uint64(len(m.SessionKey))) + i-- + dAtA[i] = 0x2a + } + if m.Lifetime != nil { + { + size, err := m.Lifetime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Verb != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Verb)) + i-- + dAtA[i] = 0x18 + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMeta(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SessionToken_Body_ObjectAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SessionToken_Body_ObjectAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ObjectAddress != nil { + { + size, err := m.ObjectAddress.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *BearerToken) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BearerToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BearerToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BearerToken_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BearerToken_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BearerToken_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Lifetime != nil { + { + size, err := m.Lifetime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.EaclTable != nil { + { + size, err := m.EaclTable.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RequestMetaHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestMetaHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestMetaHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Origin != nil { + { + size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.Bearer != nil { + { + size, err := m.Bearer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.XHeaders) > 0 { + for iNdEx := len(m.XHeaders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.XHeaders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.Ttl != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Ttl)) + i-- + dAtA[i] = 0x18 + } + if m.Epoch != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Epoch)) + i-- + dAtA[i] = 0x10 + } + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponseMetaHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseMetaHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseMetaHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Origin != nil { + { + size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.XHeaders) > 0 { + for iNdEx := len(m.XHeaders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.XHeaders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.Ttl != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Ttl)) + i-- + dAtA[i] = 0x18 + } + if m.Epoch != 0 { + i = encodeVarintMeta(dAtA, i, uint64(m.Epoch)) + i-- + dAtA[i] = 0x10 + } + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMeta(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMeta(dAtA []byte, offset int, v uint64) int { + offset -= sovMeta(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *XHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMeta(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMeta(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Version) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Major != 0 { + n += 1 + sovMeta(uint64(m.Major)) + } + if m.Minor != 0 { + n += 1 + sovMeta(uint64(m.Minor)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TokenLifetime) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Exp != 0 { + n += 1 + sovMeta(uint64(m.Exp)) + } + if m.Nbf != 0 { + n += 1 + sovMeta(uint64(m.Nbf)) + } + if m.Iat != 0 { + n += 1 + sovMeta(uint64(m.Iat)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SessionToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SessionToken_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovMeta(uint64(l)) + } + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Verb != 0 { + n += 1 + sovMeta(uint64(m.Verb)) + } + if m.Lifetime != nil { + l = m.Lifetime.Size() + n += 1 + l + sovMeta(uint64(l)) + } + l = len(m.SessionKey) + if l > 0 { + n += 1 + l + sovMeta(uint64(l)) + } + if m.Context != nil { + n += m.Context.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SessionToken_Body_ObjectAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectAddress != nil { + l = m.ObjectAddress.Size() + n += 1 + l + sovMeta(uint64(l)) + } + return n +} +func (m *BearerToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BearerToken_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EaclTable != nil { + l = m.EaclTable.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Lifetime != nil { + l = m.Lifetime.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RequestMetaHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != nil { + l = m.Version.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Epoch != 0 { + n += 1 + sovMeta(uint64(m.Epoch)) + } + if m.Ttl != 0 { + n += 1 + sovMeta(uint64(m.Ttl)) + } + if len(m.XHeaders) > 0 { + for _, e := range m.XHeaders { + l = e.Size() + n += 1 + l + sovMeta(uint64(l)) + } + } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Bearer != nil { + l = m.Bearer.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Origin != nil { + l = m.Origin.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ResponseMetaHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != nil { + l = m.Version.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.Epoch != 0 { + n += 1 + sovMeta(uint64(m.Epoch)) + } + if m.Ttl != 0 { + n += 1 + sovMeta(uint64(m.Ttl)) + } + if len(m.XHeaders) > 0 { + for _, e := range m.XHeaders { + l = e.Size() + n += 1 + l + sovMeta(uint64(l)) + } + } + if m.Origin != nil { + l = m.Origin.Size() + n += 1 + l + sovMeta(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMeta(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMeta(x uint64) (n int) { + return sovMeta(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *XHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: XHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: XHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Version) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Version: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Major", wireType) + } + m.Major = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Major |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Minor", wireType) + } + m.Minor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Minor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TokenLifetime) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenLifetime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenLifetime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType) + } + m.Exp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nbf", wireType) + } + m.Nbf = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nbf |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Iat", wireType) + } + m.Iat = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Iat |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SessionToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SessionToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SessionToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &SessionToken_Body{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SessionToken_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) + if m.Id == nil { + m.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v2.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) + } + m.Verb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Verb |= SessionToken_Body_Verb(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lifetime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Lifetime == nil { + m.Lifetime = &TokenLifetime{} + } + if err := m.Lifetime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionKey = append(m.SessionKey[:0], dAtA[iNdEx:postIndex]...) + if m.SessionKey == nil { + m.SessionKey = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectAddress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &v2.Address{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Context = &SessionToken_Body_ObjectAddress{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BearerToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BearerToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BearerToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &BearerToken_Body{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BearerToken_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EaclTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EaclTable == nil { + m.EaclTable = &v21.EACLTable{} + } + if err := m.EaclTable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v2.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lifetime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Lifetime == nil { + m.Lifetime = &TokenLifetime{} + } + if err := m.Lifetime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestMetaHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestMetaHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestMetaHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Version == nil { + m.Version = &Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) + } + m.Epoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Epoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType) + } + m.Ttl = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Ttl |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field XHeaders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.XHeaders = append(m.XHeaders, &XHeader{}) + if err := m.XHeaders[len(m.XHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &SessionToken{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bearer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bearer == nil { + m.Bearer = &BearerToken{} + } + if err := m.Bearer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Origin == nil { + m.Origin = &RequestMetaHeader{} + } + if err := m.Origin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponseMetaHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseMetaHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseMetaHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Version == nil { + m.Version = &Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) + } + m.Epoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Epoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType) + } + m.Ttl = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Ttl |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field XHeaders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.XHeaders = append(m.XHeaders, &XHeader{}) + if err := m.XHeaders[len(m.XHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMeta + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMeta + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMeta + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Origin == nil { + m.Origin = &ResponseMetaHeader{} + } + if err := m.Origin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMeta(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMeta + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMeta(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMeta + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMeta + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMeta + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMeta + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMeta + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMeta + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMeta = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMeta = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMeta = fmt.Errorf("proto: unexpected end of group") +) diff --git a/service/v2/meta.proto b/service/v2/meta.proto new file mode 100644 index 0000000..c1a4ddf --- /dev/null +++ b/service/v2/meta.proto @@ -0,0 +1,129 @@ +syntax = "proto3"; + +package service.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/service/v2"; +option csharp_namespace = "NeoFS.API.Service"; + +import "acl/v2/types.proto"; +import "refs/v2/types.proto"; +import "service/v2/verify.proto"; + +message XHeader { + // Key of the X-Header. + string key = 1; + // Value of the X-Header. + string value = 2; +} + +// Represents API version used by node. +message Version { + // Major API version. + uint32 major = 1; + // Minor API version. + uint32 minor = 2; +} + +// Lifetime parameters of the token. Filed names taken from rfc7519. +message TokenLifetime { + // Expiration Epoch + uint64 exp = 1; + // Not valid before Epoch + uint64 nbf = 2; + // Issued at Epoch + uint64 iat = 3; +} + +// NeoFS session token. +message SessionToken { + message Body { + // ID is a token identifier. valid UUIDv4 represented in bytes + bytes id = 1; + // OwnerID carries identifier of the session initiator. + refs.v2.OwnerID owner_id = 2; + // Verb is an enumeration of session request types + enum Verb { + // Refers to object.Put RPC call + OBJECT_PUT = 0; + // Refers to object.Get RPC call + OBJECT_GET = 1; + // Refers to object.Head RPC call + OBJECT_HEAD = 2; + // Refers to object.Search RPC call + OBJECT_SEARCH = 3; + // Refers to object.Delete RPC call + OBJECT_DELETE = 4; + // Refers to object.GetRange RPC call + OBJECT_RANGE = 5; + // Refers to object.GetRangeHash RPC call + OBJECT_RANGEHASH = 6; + } + // Verb is a type of request for which the token is issued + Verb verb = 3; + // Lifetime is a lifetime of the session + TokenLifetime lifetime = 4; + // SessionKey is a public key of session key + bytes session_key = 5; + // Carries context of the session. + oneof context { + // object_address represents the object session context. + refs.v2.Address object_address = 6; + } + } + // Session Token body + Body token = 1; + + // Signature is a signature of session token information + Signature signature = 2; +} + +// BearerToken has information about request ACL rules with limited lifetime +message BearerToken { + message Body { + // EACLTable carries table of extended ACL rules + acl.v2.EACLTable eacl_table = 1; + // OwnerID carries identifier of the token owner + refs.v2.OwnerID owner_id = 2; + // Token expiration and valid time period parameters + TokenLifetime lifetime = 3; + } + // Bearer Token body + Body token = 1; + + // Signature of BearerToken body + Signature signature = 2; +} + +// Information about the request +message RequestMetaHeader { + // Client API version. + Version version = 1; + // Client local epoch number. Set to 0 if unknown. + uint64 epoch = 2; + // Maximum number of nodes in the request route. + uint32 ttl = 3; + // Request X-Headers. + repeated XHeader x_headers = 4; + // Token is a token of the session within which the request is sent + SessionToken token = 5; + // Bearer is a Bearer token of the request + BearerToken bearer = 6; + + // RequestMetaHeader of the origin request. + RequestMetaHeader origin = 7; +} + +// Information about the response +message ResponseMetaHeader { + // Server API version. + Version version = 1; + // Server local epoch number. + uint64 epoch = 2; + // Maximum number of nodes in the response route. + uint32 ttl = 3; + // Response X-Headers. + repeated XHeader x_headers = 4; + + // Carries response meta header of the origin response. + ResponseMetaHeader origin = 5; +} diff --git a/service/v2/verify.pb.go b/service/v2/verify.pb.go new file mode 100644 index 0000000..6f1cd42 --- /dev/null +++ b/service/v2/verify.pb.go @@ -0,0 +1,1156 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: service/v2/verify.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "github.com/nspcc-dev/neofs-api-go/acl/v2" + _ "github.com/nspcc-dev/neofs-api-go/refs/v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Signature of something in NeoFS +type Signature struct { + // Public key used for signing. + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Signature + Sign []byte `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Signature) Reset() { *m = Signature{} } +func (m *Signature) String() string { return proto.CompactTextString(m) } +func (*Signature) ProtoMessage() {} +func (*Signature) Descriptor() ([]byte, []int) { + return fileDescriptor_7ea2d606af3f2456, []int{0} +} +func (m *Signature) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Signature.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Signature) XXX_Merge(src proto.Message) { + xxx_messageInfo_Signature.Merge(m, src) +} +func (m *Signature) XXX_Size() int { + return m.Size() +} +func (m *Signature) XXX_DiscardUnknown() { + xxx_messageInfo_Signature.DiscardUnknown(m) +} + +var xxx_messageInfo_Signature proto.InternalMessageInfo + +func (m *Signature) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *Signature) GetSign() []byte { + if m != nil { + return m.Sign + } + return nil +} + +// Verification info for request signed by all intermediate nodes +type RequestVerificationHeader struct { + // Request Body signature. Should be generated once by request initiator. + BodySignature *Signature `protobuf:"bytes,1,opt,name=body_signature,json=bodySignature,proto3" json:"body_signature,omitempty"` + // Request Meta signature is added and signed by any intermediate node + MetaSignature *Signature `protobuf:"bytes,2,opt,name=meta_signature,json=metaSignature,proto3" json:"meta_signature,omitempty"` + // Sign previous hops + OriginSignature *Signature `protobuf:"bytes,3,opt,name=origin_signature,json=originSignature,proto3" json:"origin_signature,omitempty"` + // Chain of previous hops signatures + Origin *RequestVerificationHeader `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestVerificationHeader) Reset() { *m = RequestVerificationHeader{} } +func (m *RequestVerificationHeader) String() string { return proto.CompactTextString(m) } +func (*RequestVerificationHeader) ProtoMessage() {} +func (*RequestVerificationHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_7ea2d606af3f2456, []int{1} +} +func (m *RequestVerificationHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestVerificationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestVerificationHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RequestVerificationHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestVerificationHeader.Merge(m, src) +} +func (m *RequestVerificationHeader) XXX_Size() int { + return m.Size() +} +func (m *RequestVerificationHeader) XXX_DiscardUnknown() { + xxx_messageInfo_RequestVerificationHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestVerificationHeader proto.InternalMessageInfo + +func (m *RequestVerificationHeader) GetBodySignature() *Signature { + if m != nil { + return m.BodySignature + } + return nil +} + +func (m *RequestVerificationHeader) GetMetaSignature() *Signature { + if m != nil { + return m.MetaSignature + } + return nil +} + +func (m *RequestVerificationHeader) GetOriginSignature() *Signature { + if m != nil { + return m.OriginSignature + } + return nil +} + +func (m *RequestVerificationHeader) GetOrigin() *RequestVerificationHeader { + if m != nil { + return m.Origin + } + return nil +} + +// Verification info for response signed by all intermediate nodes +type ResponseVerificationHeader struct { + // Response Body signature. Should be generated once by answering node. + BodySignature *Signature `protobuf:"bytes,1,opt,name=body_signature,json=bodySignature,proto3" json:"body_signature,omitempty"` + // Response Meta signature is added and signed by any intermediate node + MetaSignature *Signature `protobuf:"bytes,2,opt,name=meta_signature,json=metaSignature,proto3" json:"meta_signature,omitempty"` + // Sign previous hops + OriginSignature *Signature `protobuf:"bytes,3,opt,name=origin_signature,json=originSignature,proto3" json:"origin_signature,omitempty"` + // Chain of previous hops signatures + Origin *ResponseVerificationHeader `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponseVerificationHeader) Reset() { *m = ResponseVerificationHeader{} } +func (m *ResponseVerificationHeader) String() string { return proto.CompactTextString(m) } +func (*ResponseVerificationHeader) ProtoMessage() {} +func (*ResponseVerificationHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_7ea2d606af3f2456, []int{2} +} +func (m *ResponseVerificationHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseVerificationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseVerificationHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResponseVerificationHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseVerificationHeader.Merge(m, src) +} +func (m *ResponseVerificationHeader) XXX_Size() int { + return m.Size() +} +func (m *ResponseVerificationHeader) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseVerificationHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseVerificationHeader proto.InternalMessageInfo + +func (m *ResponseVerificationHeader) GetBodySignature() *Signature { + if m != nil { + return m.BodySignature + } + return nil +} + +func (m *ResponseVerificationHeader) GetMetaSignature() *Signature { + if m != nil { + return m.MetaSignature + } + return nil +} + +func (m *ResponseVerificationHeader) GetOriginSignature() *Signature { + if m != nil { + return m.OriginSignature + } + return nil +} + +func (m *ResponseVerificationHeader) GetOrigin() *ResponseVerificationHeader { + if m != nil { + return m.Origin + } + return nil +} + +func init() { + proto.RegisterType((*Signature)(nil), "service.v2.Signature") + proto.RegisterType((*RequestVerificationHeader)(nil), "service.v2.RequestVerificationHeader") + proto.RegisterType((*ResponseVerificationHeader)(nil), "service.v2.ResponseVerificationHeader") +} + +func init() { proto.RegisterFile("service/v2/verify.proto", fileDescriptor_7ea2d606af3f2456) } + +var fileDescriptor_7ea2d606af3f2456 = []byte{ + // 339 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x4e, 0x2d, 0x2a, + 0xcb, 0x4c, 0x4e, 0xd5, 0x2f, 0x33, 0xd2, 0x2f, 0x4b, 0x2d, 0xca, 0x4c, 0xab, 0xd4, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x4a, 0xe8, 0x95, 0x19, 0x49, 0x09, 0x25, 0x26, 0xe7, 0x80, + 0x14, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x43, 0xe4, 0xa5, 0x84, 0x8b, 0x52, 0xd3, 0x8a, 0xd1, 0x04, + 0x95, 0x0c, 0xb9, 0x38, 0x83, 0x33, 0xd3, 0xf3, 0x12, 0x4b, 0x4a, 0x8b, 0x52, 0x85, 0x04, 0xb8, + 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, 0x40, 0x4c, 0x21, 0x21, 0x2e, + 0x96, 0xe2, 0xcc, 0xf4, 0x3c, 0x09, 0x26, 0xb0, 0x10, 0x98, 0xad, 0x34, 0x83, 0x89, 0x4b, 0x32, + 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x24, 0x0c, 0x64, 0x7f, 0x66, 0x72, 0x62, 0x49, 0x66, 0x7e, + 0x9e, 0x47, 0x6a, 0x62, 0x4a, 0x6a, 0x91, 0x90, 0x0d, 0x17, 0x5f, 0x52, 0x7e, 0x4a, 0x65, 0x7c, + 0x31, 0xcc, 0x54, 0xb0, 0x71, 0xdc, 0x46, 0xa2, 0x7a, 0x08, 0xe7, 0xe9, 0xc1, 0xad, 0x0c, 0xe2, + 0x05, 0x29, 0x46, 0xb8, 0xc0, 0x86, 0x8b, 0x2f, 0x37, 0xb5, 0x24, 0x11, 0x49, 0x37, 0x13, 0x5e, + 0xdd, 0x20, 0xc5, 0x08, 0xdd, 0x0e, 0x5c, 0x02, 0xf9, 0x45, 0x99, 0xe9, 0x99, 0x79, 0x48, 0xfa, + 0x99, 0xf1, 0xe9, 0xe7, 0x87, 0x28, 0x47, 0x98, 0x60, 0xcb, 0xc5, 0x06, 0x11, 0x92, 0x60, 0x01, + 0xeb, 0x53, 0x45, 0xd6, 0x87, 0xd3, 0xd3, 0x41, 0x50, 0x4d, 0x4a, 0xb3, 0x98, 0xb8, 0xa4, 0x82, + 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x87, 0x5d, 0xd8, 0xd8, 0xa1, 0x85, 0x8d, 0x1a, 0x6a, + 0xd8, 0xe0, 0xf2, 0x35, 0x2c, 0x70, 0x9c, 0x82, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, + 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0xa2, 0x74, 0xd2, 0x33, 0x4b, 0x32, 0x4a, + 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xf3, 0x8a, 0x0b, 0x92, 0x93, 0x75, 0x53, 0x52, 0xcb, 0xf4, + 0xf3, 0x52, 0xf3, 0xd3, 0x8a, 0x75, 0x13, 0x0b, 0x32, 0x75, 0xd3, 0xf3, 0xf5, 0x11, 0x89, 0x7d, + 0x15, 0x93, 0xa0, 0x5f, 0x6a, 0xbe, 0x5b, 0xb0, 0x9e, 0x63, 0x80, 0xa7, 0x5e, 0x30, 0x44, 0x38, + 0x89, 0x0d, 0x9c, 0x8a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xde, 0xf9, 0x4c, 0x15, + 0x03, 0x00, 0x00, +} + +func (m *Signature) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Signature) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Sign) > 0 { + i -= len(m.Sign) + copy(dAtA[i:], m.Sign) + i = encodeVarintVerify(dAtA, i, uint64(len(m.Sign))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintVerify(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RequestVerificationHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestVerificationHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestVerificationHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Origin != nil { + { + size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.OriginSignature != nil { + { + size, err := m.OriginSignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaSignature != nil { + { + size, err := m.MetaSignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.BodySignature != nil { + { + size, err := m.BodySignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponseVerificationHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseVerificationHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseVerificationHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Origin != nil { + { + size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.OriginSignature != nil { + { + size, err := m.OriginSignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaSignature != nil { + { + size, err := m.MetaSignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.BodySignature != nil { + { + size, err := m.BodySignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVerify(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintVerify(dAtA []byte, offset int, v uint64) int { + offset -= sovVerify(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Signature) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovVerify(uint64(l)) + } + l = len(m.Sign) + if l > 0 { + n += 1 + l + sovVerify(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RequestVerificationHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BodySignature != nil { + l = m.BodySignature.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.MetaSignature != nil { + l = m.MetaSignature.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.OriginSignature != nil { + l = m.OriginSignature.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.Origin != nil { + l = m.Origin.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ResponseVerificationHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BodySignature != nil { + l = m.BodySignature.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.MetaSignature != nil { + l = m.MetaSignature.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.OriginSignature != nil { + l = m.OriginSignature.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.Origin != nil { + l = m.Origin.Size() + n += 1 + l + sovVerify(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovVerify(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozVerify(x uint64) (n int) { + return sovVerify(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Signature) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Signature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sign", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sign = append(m.Sign[:0], dAtA[iNdEx:postIndex]...) + if m.Sign == nil { + m.Sign = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVerify(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVerify + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVerify + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestVerificationHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestVerificationHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestVerificationHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BodySignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BodySignature == nil { + m.BodySignature = &Signature{} + } + if err := m.BodySignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaSignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaSignature == nil { + m.MetaSignature = &Signature{} + } + if err := m.MetaSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginSignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OriginSignature == nil { + m.OriginSignature = &Signature{} + } + if err := m.OriginSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Origin == nil { + m.Origin = &RequestVerificationHeader{} + } + if err := m.Origin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVerify(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVerify + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVerify + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponseVerificationHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseVerificationHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseVerificationHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BodySignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BodySignature == nil { + m.BodySignature = &Signature{} + } + if err := m.BodySignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaSignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaSignature == nil { + m.MetaSignature = &Signature{} + } + if err := m.MetaSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginSignature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OriginSignature == nil { + m.OriginSignature = &Signature{} + } + if err := m.OriginSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVerify + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVerify + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVerify + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Origin == nil { + m.Origin = &ResponseVerificationHeader{} + } + if err := m.Origin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVerify(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVerify + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVerify + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVerify(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVerify + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVerify + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVerify + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthVerify + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupVerify + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthVerify + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthVerify = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVerify = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupVerify = fmt.Errorf("proto: unexpected end of group") +) diff --git a/service/v2/verify.proto b/service/v2/verify.proto new file mode 100644 index 0000000..2933896 --- /dev/null +++ b/service/v2/verify.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package service.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/service/v2"; +option csharp_namespace = "NeoFS.API.Service"; + +import "acl/v2/types.proto"; +import "refs/v2/types.proto"; + +// Signature of something in NeoFS +message Signature { + // Public key used for signing. + bytes key = 1; + // Signature + bytes sign = 2; +} + +// Verification info for request signed by all intermediate nodes +message RequestVerificationHeader { + // Request Body signature. Should be generated once by request initiator. + Signature body_signature = 1; + // Request Meta signature is added and signed by any intermediate node + Signature meta_signature = 2; + // Sign previous hops + Signature origin_signature = 3; + + // Chain of previous hops signatures + RequestVerificationHeader origin = 4; +} + +// Verification info for response signed by all intermediate nodes +message ResponseVerificationHeader { + // Response Body signature. Should be generated once by answering node. + Signature body_signature = 1; + // Response Meta signature is added and signed by any intermediate node + Signature meta_signature = 2; + // Sign previous hops + Signature origin_signature = 3; + + // Chain of previous hops signatures + ResponseVerificationHeader origin = 4; +} diff --git a/session/v2/service.pb.go b/session/v2/service.pb.go new file mode 100644 index 0000000..9d5d8af --- /dev/null +++ b/session/v2/service.pb.go @@ -0,0 +1,1385 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: session/v2/service.proto + +package v2 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v21 "github.com/nspcc-dev/neofs-api-go/refs/v2" + v2 "github.com/nspcc-dev/neofs-api-go/service/v2" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// CreateRequest carries an information necessary for opening a session.v2. +type CreateRequest struct { + // Body of create session token request message. + Body *CreateRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateRequest) Reset() { *m = CreateRequest{} } +func (m *CreateRequest) String() string { return proto.CompactTextString(m) } +func (*CreateRequest) ProtoMessage() {} +func (*CreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dc9d885cd3f2324e, []int{0} +} +func (m *CreateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateRequest.Merge(m, src) +} +func (m *CreateRequest) XXX_Size() int { + return m.Size() +} +func (m *CreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateRequest proto.InternalMessageInfo + +func (m *CreateRequest) GetBody() *CreateRequest_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *CreateRequest) GetMetaHeader() *v2.RequestMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *CreateRequest) GetVerifyHeader() *v2.RequestVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type CreateRequest_Body struct { + // Carries an identifier of a session initiator. + OwnerId *v21.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // Carries a lifetime of the session.v2. + Lifetime *v2.TokenLifetime `protobuf:"bytes,2,opt,name=lifetime,proto3" json:"lifetime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateRequest_Body) Reset() { *m = CreateRequest_Body{} } +func (m *CreateRequest_Body) String() string { return proto.CompactTextString(m) } +func (*CreateRequest_Body) ProtoMessage() {} +func (*CreateRequest_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_dc9d885cd3f2324e, []int{0, 0} +} +func (m *CreateRequest_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateRequest_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateRequest_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateRequest_Body.Merge(m, src) +} +func (m *CreateRequest_Body) XXX_Size() int { + return m.Size() +} +func (m *CreateRequest_Body) XXX_DiscardUnknown() { + xxx_messageInfo_CreateRequest_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateRequest_Body proto.InternalMessageInfo + +func (m *CreateRequest_Body) GetOwnerId() *v21.OwnerID { + if m != nil { + return m.OwnerId + } + return nil +} + +func (m *CreateRequest_Body) GetLifetime() *v2.TokenLifetime { + if m != nil { + return m.Lifetime + } + return nil +} + +// CreateResponse carries an information about the opened session.v2. +type CreateResponse struct { + // Body of create session token response message. + Body *CreateResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateResponse) Reset() { *m = CreateResponse{} } +func (m *CreateResponse) String() string { return proto.CompactTextString(m) } +func (*CreateResponse) ProtoMessage() {} +func (*CreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dc9d885cd3f2324e, []int{1} +} +func (m *CreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateResponse.Merge(m, src) +} +func (m *CreateResponse) XXX_Size() int { + return m.Size() +} +func (m *CreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateResponse proto.InternalMessageInfo + +func (m *CreateResponse) GetBody() *CreateResponse_Body { + if m != nil { + return m.Body + } + return nil +} + +func (m *CreateResponse) GetMetaHeader() *v2.ResponseMetaHeader { + if m != nil { + return m.MetaHeader + } + return nil +} + +func (m *CreateResponse) GetVerifyHeader() *v2.ResponseVerificationHeader { + if m != nil { + return m.VerifyHeader + } + return nil +} + +type CreateResponse_Body struct { + // id carries an identifier of session token. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // session_key carries a session public key. + SessionKey []byte `protobuf:"bytes,2,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateResponse_Body) Reset() { *m = CreateResponse_Body{} } +func (m *CreateResponse_Body) String() string { return proto.CompactTextString(m) } +func (*CreateResponse_Body) ProtoMessage() {} +func (*CreateResponse_Body) Descriptor() ([]byte, []int) { + return fileDescriptor_dc9d885cd3f2324e, []int{1, 0} +} +func (m *CreateResponse_Body) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateResponse_Body.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateResponse_Body) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateResponse_Body.Merge(m, src) +} +func (m *CreateResponse_Body) XXX_Size() int { + return m.Size() +} +func (m *CreateResponse_Body) XXX_DiscardUnknown() { + xxx_messageInfo_CreateResponse_Body.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateResponse_Body proto.InternalMessageInfo + +func (m *CreateResponse_Body) GetId() []byte { + if m != nil { + return m.Id + } + return nil +} + +func (m *CreateResponse_Body) GetSessionKey() []byte { + if m != nil { + return m.SessionKey + } + return nil +} + +func init() { + proto.RegisterType((*CreateRequest)(nil), "session.v2.CreateRequest") + proto.RegisterType((*CreateRequest_Body)(nil), "session.v2.CreateRequest.Body") + proto.RegisterType((*CreateResponse)(nil), "session.v2.CreateResponse") + proto.RegisterType((*CreateResponse_Body)(nil), "session.v2.CreateResponse.Body") +} + +func init() { proto.RegisterFile("session/v2/service.proto", fileDescriptor_dc9d885cd3f2324e) } + +var fileDescriptor_dc9d885cd3f2324e = []byte{ + // 448 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x8a, 0xd3, 0x40, + 0x14, 0xc6, 0x4d, 0x5c, 0x76, 0x97, 0x69, 0x77, 0xd1, 0x11, 0xb1, 0x1b, 0x30, 0x2b, 0x0b, 0x8a, + 0xa0, 0x9d, 0x40, 0x16, 0xf1, 0xce, 0x62, 0x15, 0xb1, 0xad, 0xff, 0x98, 0x8a, 0x17, 0xde, 0x94, + 0x34, 0x39, 0x69, 0xc7, 0x9a, 0x4c, 0xcc, 0x4c, 0x23, 0x79, 0x07, 0x1f, 0xc0, 0x67, 0xf0, 0x15, + 0x7c, 0x01, 0x2f, 0x7d, 0x04, 0xa9, 0x2f, 0x22, 0x93, 0x99, 0xf4, 0x0f, 0xa4, 0x78, 0x97, 0x99, + 0xf9, 0xce, 0x77, 0xbe, 0xf3, 0xe3, 0x04, 0x75, 0x04, 0x08, 0xc1, 0x78, 0xea, 0x15, 0xbe, 0x27, + 0x20, 0x2f, 0x58, 0x08, 0x24, 0xcb, 0xb9, 0xe4, 0x18, 0x99, 0x17, 0x52, 0xf8, 0xce, 0x8d, 0x1c, + 0x62, 0xa1, 0x24, 0xb2, 0xcc, 0x40, 0x68, 0x81, 0x73, 0xd3, 0xe8, 0xd5, 0x7d, 0x02, 0x32, 0x30, + 0xd7, 0xb7, 0xb6, 0xae, 0x0b, 0xc8, 0x59, 0x5c, 0xea, 0x87, 0x8b, 0x9f, 0x36, 0x3a, 0x79, 0x96, + 0x43, 0x20, 0x81, 0xc2, 0x97, 0x25, 0x08, 0x89, 0x7d, 0x74, 0x30, 0xe5, 0x51, 0xd9, 0xb1, 0xee, + 0x58, 0xf7, 0x5b, 0xbe, 0x4b, 0x36, 0x1d, 0xc9, 0x8e, 0x90, 0xf4, 0x79, 0x54, 0xd2, 0x4a, 0x8b, + 0x9f, 0xa0, 0x96, 0x6a, 0x36, 0x99, 0x43, 0x10, 0x41, 0xde, 0xb1, 0xab, 0xd2, 0xdb, 0xa4, 0xce, + 0x5e, 0xf8, 0xc4, 0x14, 0xbd, 0x06, 0x19, 0xbc, 0xac, 0x44, 0x14, 0x25, 0xeb, 0x6f, 0x3c, 0x44, + 0x27, 0x3a, 0x55, 0xed, 0x70, 0xb5, 0x72, 0xb8, 0xdb, 0xe0, 0xf0, 0x41, 0xe9, 0x58, 0x18, 0x48, + 0xc6, 0x53, 0xe3, 0xd4, 0xd6, 0xb5, 0xfa, 0xe4, 0x7c, 0x42, 0x07, 0x2a, 0x19, 0x7e, 0x80, 0x8e, + 0xf9, 0xd7, 0x14, 0xf2, 0x09, 0x8b, 0xcc, 0x2c, 0xd7, 0x88, 0x22, 0xa6, 0xbc, 0xde, 0xaa, 0x87, + 0xc1, 0x73, 0x7a, 0x54, 0x29, 0x06, 0x11, 0x7e, 0x84, 0x8e, 0x3f, 0xb3, 0x18, 0x24, 0x4b, 0xc0, + 0xa4, 0x3f, 0xdb, 0xee, 0xfd, 0x9e, 0x2f, 0x20, 0x7d, 0x65, 0x04, 0x74, 0x2d, 0xbd, 0xf8, 0x66, + 0xa3, 0xd3, 0x1a, 0x8a, 0xc8, 0x78, 0x2a, 0x00, 0x5f, 0xee, 0xe0, 0x3b, 0x6f, 0xc2, 0xa7, 0x95, + 0xdb, 0xfc, 0x7a, 0x4d, 0xfc, 0xdc, 0xdd, 0xe9, 0x75, 0xd5, 0x1e, 0x80, 0xa3, 0x66, 0x80, 0xf7, + 0x9a, 0x2c, 0xfe, 0x4b, 0xf0, 0xb1, 0x21, 0x78, 0x8a, 0x6c, 0xc3, 0xae, 0x4d, 0x6d, 0x16, 0xe1, + 0x73, 0xd4, 0x32, 0xd3, 0x4c, 0x16, 0x50, 0x56, 0x29, 0xdb, 0xb4, 0xde, 0xc8, 0x11, 0x94, 0xfe, + 0x10, 0x1d, 0x8d, 0xf5, 0x09, 0xf7, 0xd0, 0xa1, 0x1e, 0x17, 0x9f, 0xed, 0xdd, 0x20, 0xc7, 0xd9, + 0x4f, 0xa7, 0x4f, 0x7f, 0xad, 0x5c, 0xeb, 0xf7, 0xca, 0xb5, 0xfe, 0xac, 0x5c, 0xeb, 0xfb, 0x5f, + 0xf7, 0xca, 0xc7, 0x87, 0x33, 0x26, 0xe7, 0xcb, 0x29, 0x09, 0x79, 0xe2, 0xa5, 0x22, 0x0b, 0xc3, + 0x6e, 0x04, 0x85, 0x97, 0x02, 0x8f, 0x45, 0x37, 0xc8, 0x58, 0x77, 0xc6, 0xbd, 0xcd, 0x7f, 0xf3, + 0xc3, 0xbe, 0xfe, 0x06, 0xf8, 0x8b, 0x31, 0x79, 0xfa, 0x6e, 0x40, 0x4c, 0xa8, 0xe9, 0x61, 0xb5, + 0xf3, 0x97, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x41, 0x43, 0x09, 0xb3, 0x60, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// SessionClient is the client API for Session service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SessionClient interface { + // Create opens new session between the client and the server. + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) +} + +type sessionClient struct { + cc *grpc.ClientConn +} + +func NewSessionClient(cc *grpc.ClientConn) SessionClient { + return &sessionClient{cc} +} + +func (c *sessionClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + out := new(CreateResponse) + err := c.cc.Invoke(ctx, "/session.v2.Session/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SessionServer is the server API for Session service. +type SessionServer interface { + // Create opens new session between the client and the server. + Create(context.Context, *CreateRequest) (*CreateResponse, error) +} + +// UnimplementedSessionServer can be embedded to have forward compatible implementations. +type UnimplementedSessionServer struct { +} + +func (*UnimplementedSessionServer) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} + +func RegisterSessionServer(s *grpc.Server, srv SessionServer) { + s.RegisterService(&_Session_serviceDesc, srv) +} + +func _Session_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/session.v2.Session/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Session_serviceDesc = grpc.ServiceDesc{ + ServiceName: "session.v2.Session", + HandlerType: (*SessionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _Session_Create_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "session/v2/service.proto", +} + +func (m *CreateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateRequest_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateRequest_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateRequest_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Lifetime != nil { + { + size, err := m.Lifetime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.OwnerId != nil { + { + size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.VerifyHeader != nil { + { + size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaHeader != nil { + { + size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateResponse_Body) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateResponse_Body) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateResponse_Body) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SessionKey) > 0 { + i -= len(m.SessionKey) + copy(dAtA[i:], m.SessionKey) + i = encodeVarintService(dAtA, i, uint64(len(m.SessionKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintService(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CreateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CreateRequest_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OwnerId != nil { + l = m.OwnerId.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Lifetime != nil { + l = m.Lifetime.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CreateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.MetaHeader != nil { + l = m.MetaHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.VerifyHeader != nil { + l = m.VerifyHeader.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CreateResponse_Body) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + l = len(m.SessionKey) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CreateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &CreateRequest_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.RequestMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.RequestVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateRequest_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OwnerId == nil { + m.OwnerId = &v21.OwnerID{} + } + if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lifetime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Lifetime == nil { + m.Lifetime = &v2.TokenLifetime{} + } + if err := m.Lifetime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Body == nil { + m.Body = &CreateResponse_Body{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaHeader == nil { + m.MetaHeader = &v2.ResponseMetaHeader{} + } + if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VerifyHeader == nil { + m.VerifyHeader = &v2.ResponseVerificationHeader{} + } + if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateResponse_Body) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Body: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) + if m.Id == nil { + m.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionKey = append(m.SessionKey[:0], dAtA[iNdEx:postIndex]...) + if m.SessionKey == nil { + m.SessionKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/session/v2/service.proto b/session/v2/service.proto new file mode 100644 index 0000000..c980dcf --- /dev/null +++ b/session/v2/service.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package session.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/session/v2"; +option csharp_namespace = "NeoFS.API.Session"; + +import "refs/v2/types.proto"; +import "service/v2/meta.proto"; +import "service/v2/verify.proto"; + +service Session { + // Create opens new session between the client and the server. + rpc Create (CreateRequest) returns (CreateResponse); +} + +// CreateRequest carries an information necessary for opening a session.v2. +message CreateRequest { + message Body { + // Carries an identifier of a session initiator. + refs.v2.OwnerID owner_id = 1; + + // Carries a lifetime of the session.v2. + service.v2.TokenLifetime lifetime = 2; + } + + // Body of create session token request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate message + // transport and does not affect request execution. + service.v2.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + service.v2.RequestVerificationHeader verify_header = 3; +} + +// CreateResponse carries an information about the opened session.v2. +message CreateResponse { + message Body { + // id carries an identifier of session token. + bytes id = 1; + + // session_key carries a session public key. + bytes session_key = 2; + } + + // Body of create session token response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.v2.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.v2.ResponseVerificationHeader verify_header = 3; +} diff --git a/storagegroup/v2/types.pb.go b/storagegroup/v2/types.pb.go new file mode 100644 index 0000000..e099149 --- /dev/null +++ b/storagegroup/v2/types.pb.go @@ -0,0 +1,483 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: storagegroup/v2/types.proto + +package v2 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v2 "github.com/nspcc-dev/neofs-api-go/refs/v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// StorageGroup groups the information about the NeoFS storage group. +// The storage group consists of objects from single container. +type StorageGroup struct { + // validation_data_size carries the total size of the payloads of the storage + // group members. + ValidationDataSize uint64 `protobuf:"varint,1,opt,name=validation_data_size,json=validationDataSize,proto3" json:"validation_data_size,omitempty"` + // validation_hash carries homomorphic hash from the concatenation of the + // payloads of the storage group members + // The order of concatenation is the same as the order of the members in the + // Members field. + ValidationHash []byte `protobuf:"bytes,2,opt,name=validation_hash,json=validationHash,proto3" json:"validation_hash,omitempty"` + // expiration_epoch carries last NeoFS epoch number of the storage group + // lifetime. + ExpirationEpoch uint64 `protobuf:"varint,3,opt,name=expiration_epoch,json=expirationEpoch,proto3" json:"expiration_epoch,omitempty"` + // Members carries the list of identifiers of the object storage group members. + // The list is strictly ordered. + Members []*v2.ObjectID `protobuf:"bytes,4,rep,name=members,proto3" json:"members,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StorageGroup) Reset() { *m = StorageGroup{} } +func (m *StorageGroup) String() string { return proto.CompactTextString(m) } +func (*StorageGroup) ProtoMessage() {} +func (*StorageGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_e6cea1f26229f4f1, []int{0} +} +func (m *StorageGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageGroup.Merge(m, src) +} +func (m *StorageGroup) XXX_Size() int { + return m.Size() +} +func (m *StorageGroup) XXX_DiscardUnknown() { + xxx_messageInfo_StorageGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageGroup proto.InternalMessageInfo + +func (m *StorageGroup) GetValidationDataSize() uint64 { + if m != nil { + return m.ValidationDataSize + } + return 0 +} + +func (m *StorageGroup) GetValidationHash() []byte { + if m != nil { + return m.ValidationHash + } + return nil +} + +func (m *StorageGroup) GetExpirationEpoch() uint64 { + if m != nil { + return m.ExpirationEpoch + } + return 0 +} + +func (m *StorageGroup) GetMembers() []*v2.ObjectID { + if m != nil { + return m.Members + } + return nil +} + +func init() { + proto.RegisterType((*StorageGroup)(nil), "storagegroup.v2.StorageGroup") +} + +func init() { proto.RegisterFile("storagegroup/v2/types.proto", fileDescriptor_e6cea1f26229f4f1) } + +var fileDescriptor_e6cea1f26229f4f1 = []byte{ + // 287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x2e, 0xc9, 0x2f, + 0x4a, 0x4c, 0x4f, 0x4d, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0xd2, 0x2f, 0xa9, 0x2c, 0x48, + 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x47, 0x96, 0xd4, 0x2b, 0x33, 0x92, 0x12, + 0x2e, 0x4a, 0x4d, 0x2b, 0x46, 0x53, 0xa5, 0x74, 0x90, 0x91, 0x8b, 0x27, 0x18, 0xa2, 0xd0, 0x1d, + 0xa4, 0x50, 0xc8, 0x80, 0x4b, 0xa4, 0x2c, 0x31, 0x27, 0x33, 0x25, 0xb1, 0x24, 0x33, 0x3f, 0x2f, + 0x3e, 0x25, 0xb1, 0x24, 0x31, 0xbe, 0x38, 0xb3, 0x2a, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x25, + 0x48, 0x08, 0x21, 0xe7, 0x92, 0x58, 0x92, 0x18, 0x9c, 0x59, 0x95, 0x2a, 0xa4, 0xce, 0xc5, 0x8f, + 0xa4, 0x23, 0x23, 0xb1, 0x38, 0x43, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x88, 0x0f, 0x21, 0xec, + 0x91, 0x58, 0x9c, 0x21, 0xa4, 0xc9, 0x25, 0x90, 0x5a, 0x51, 0x90, 0x59, 0x04, 0x51, 0x98, 0x5a, + 0x90, 0x9f, 0x9c, 0x21, 0xc1, 0x0c, 0x36, 0x96, 0x1f, 0x21, 0xee, 0x0a, 0x12, 0x16, 0xd2, 0xe6, + 0x62, 0xcf, 0x4d, 0xcd, 0x4d, 0x4a, 0x2d, 0x2a, 0x96, 0x60, 0x51, 0x60, 0xd6, 0xe0, 0x36, 0x12, + 0xd4, 0x03, 0xb9, 0x5e, 0xaf, 0xcc, 0x48, 0xcf, 0x3f, 0x29, 0x2b, 0x35, 0xb9, 0xc4, 0xd3, 0x25, + 0x08, 0xa6, 0xc2, 0x29, 0xe6, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, + 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x30, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, + 0x3f, 0x57, 0x3f, 0xaf, 0xb8, 0x20, 0x39, 0x59, 0x37, 0x25, 0xb5, 0x4c, 0x3f, 0x2f, 0x35, 0x3f, + 0xad, 0x58, 0x37, 0xb1, 0x20, 0x53, 0x37, 0x3d, 0x5f, 0x1f, 0x2d, 0xe8, 0x56, 0x31, 0x89, 0xf9, + 0xa5, 0xe6, 0xbb, 0x05, 0xeb, 0x39, 0x06, 0x78, 0xea, 0x21, 0x07, 0x48, 0x12, 0x1b, 0x38, 0xa0, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xae, 0xc0, 0x6d, 0x6d, 0x01, 0x00, 0x00, +} + +func (m *StorageGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.ExpirationEpoch != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExpirationEpoch)) + i-- + dAtA[i] = 0x18 + } + if len(m.ValidationHash) > 0 { + i -= len(m.ValidationHash) + copy(dAtA[i:], m.ValidationHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidationHash))) + i-- + dAtA[i] = 0x12 + } + if m.ValidationDataSize != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ValidationDataSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StorageGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ValidationDataSize != 0 { + n += 1 + sovTypes(uint64(m.ValidationDataSize)) + } + l = len(m.ValidationHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ExpirationEpoch != 0 { + n += 1 + sovTypes(uint64(m.ExpirationEpoch)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StorageGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidationDataSize", wireType) + } + m.ValidationDataSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidationDataSize |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidationHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidationHash = append(m.ValidationHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidationHash == nil { + m.ValidationHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationEpoch", wireType) + } + m.ExpirationEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &v2.ObjectID{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/storagegroup/v2/types.proto b/storagegroup/v2/types.proto new file mode 100644 index 0000000..3d89a67 --- /dev/null +++ b/storagegroup/v2/types.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package storagegroup.v2; + +option go_package = "github.com/nspcc-dev/neofs-api-go/storagegroup/v2"; +option csharp_namespace = "NeoFS.API.StorageGroup"; + +import "refs/v2/types.proto"; + +// StorageGroup groups the information about the NeoFS storage group. +// The storage group consists of objects from single container. +message StorageGroup { + // validation_data_size carries the total size of the payloads of the storage + // group members. + uint64 validation_data_size = 1; + + // validation_hash carries homomorphic hash from the concatenation of the + // payloads of the storage group members + // The order of concatenation is the same as the order of the members in the + // Members field. + bytes validation_hash = 2; + + // expiration_epoch carries last NeoFS epoch number of the storage group + // lifetime. + uint64 expiration_epoch = 3; + + // Members carries the list of identifiers of the object storage group members. + // The list is strictly ordered. + repeated refs.v2.ObjectID members = 4; +}