2020-08-12 09:57:28 +00:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2020-08-14 16:00:16 +00:00
|
|
|
// source: v2/container/grpc/types.proto
|
2020-08-12 09:57:28 +00:00
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
package container
|
2020-08-12 09:57:28 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
2020-08-17 11:29:50 +00:00
|
|
|
grpc2 "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc"
|
|
|
|
grpc1 "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
|
|
|
|
grpc "github.com/nspcc-dev/neofs-api-go/v2/service/grpc"
|
2020-08-12 09:57:28 +00:00
|
|
|
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 {
|
2020-08-17 11:29:50 +00:00
|
|
|
// Container format version.
|
|
|
|
// Effectively the version of API library used to create container
|
|
|
|
Version *grpc.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// OwnerID carries identifier of the container owner.
|
2020-08-17 11:29:50 +00:00
|
|
|
OwnerId *grpc1.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Nonce is a 16 byte UUID, used to avoid collisions of container id.
|
2020-08-17 11:29:50 +00:00
|
|
|
Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// BasicACL contains access control rules for owner, system, others groups and
|
|
|
|
// permission bits for bearer token and Extended ACL.
|
2020-08-17 11:29:50 +00:00
|
|
|
BasicAcl uint32 `protobuf:"varint,4,opt,name=basic_acl,json=basicAcl,proto3" json:"basic_acl,omitempty"`
|
2020-08-13 12:43:47 +00:00
|
|
|
// Attributes define any immutable characteristics of container.
|
2020-08-17 11:29:50 +00:00
|
|
|
Attributes []*Container_Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"`
|
2020-08-14 06:49:05 +00:00
|
|
|
// Placement policy for the object inside the container.
|
2020-08-17 11:29:50 +00:00
|
|
|
PlacementPolicy *grpc2.PlacementPolicy `protobuf:"bytes,6,opt,name=placement_policy,json=placementPolicy,proto3" json:"placement_policy,omitempty"`
|
2020-08-14 16:00:16 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Container) Reset() { *m = Container{} }
|
|
|
|
func (m *Container) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Container) ProtoMessage() {}
|
|
|
|
func (*Container) Descriptor() ([]byte, []int) {
|
2020-08-14 16:00:16 +00:00
|
|
|
return fileDescriptor_3bfd95a81c72c35c, []int{0}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
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
|
|
|
|
|
2020-08-17 11:29:50 +00:00
|
|
|
func (m *Container) GetVersion() *grpc.Version {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Container) GetOwnerId() *grpc1.OwnerID {
|
2020-08-12 09:57:28 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-08-17 11:29:50 +00:00
|
|
|
func (m *Container) GetPlacementPolicy() *grpc2.PlacementPolicy {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
2020-08-14 06:49:05 +00:00
|
|
|
return m.PlacementPolicy
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
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) {
|
2020-08-14 16:00:16 +00:00
|
|
|
return fileDescriptor_3bfd95a81c72c35c, []int{0, 0}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
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() {
|
2020-08-13 12:43:47 +00:00
|
|
|
proto.RegisterType((*Container)(nil), "neo.fs.v2.container.Container")
|
|
|
|
proto.RegisterType((*Container_Attribute)(nil), "neo.fs.v2.container.Container.Attribute")
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
|
2020-08-14 16:00:16 +00:00
|
|
|
func init() { proto.RegisterFile("v2/container/grpc/types.proto", fileDescriptor_3bfd95a81c72c35c) }
|
2020-08-12 09:57:28 +00:00
|
|
|
|
2020-08-14 16:00:16 +00:00
|
|
|
var fileDescriptor_3bfd95a81c72c35c = []byte{
|
2020-08-18 12:48:39 +00:00
|
|
|
// 398 bytes of a gzipped FileDescriptorProto
|
2020-08-17 11:29:50 +00:00
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcd, 0xaa, 0x13, 0x31,
|
2020-08-18 12:48:39 +00:00
|
|
|
0x14, 0x76, 0x5a, 0xef, 0xcf, 0xe4, 0x2a, 0x5e, 0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, 0x7e, 0xed, 0xdc, 0x7f,
|
|
|
|
0x0b, 0xe6, 0xd5, 0x7b, 0x32, 0x1c, 0x8f, 0x1a, 0xf3, 0x6d, 0x04, 0xd3, 0xd3, 0xf4, 0xa3, 0xaf,
|
|
|
|
0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x17, 0x73, 0x67, 0xd0, 0x71, 0x02, 0x00, 0x00,
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
2020-08-14 06:49:05 +00:00
|
|
|
if m.PlacementPolicy != nil {
|
2020-08-12 09:57:28 +00:00
|
|
|
{
|
2020-08-14 06:49:05 +00:00
|
|
|
size, err := m.PlacementPolicy.MarshalToSizedBuffer(dAtA[:i])
|
2020-08-12 09:57:28 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
2020-08-17 11:29:50 +00:00
|
|
|
dAtA[i] = 0x32
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
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--
|
2020-08-17 11:29:50 +00:00
|
|
|
dAtA[i] = 0x2a
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.BasicAcl != 0 {
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.BasicAcl))
|
|
|
|
i--
|
2020-08-17 11:29:50 +00:00
|
|
|
dAtA[i] = 0x20
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if len(m.Nonce) > 0 {
|
|
|
|
i -= len(m.Nonce)
|
|
|
|
copy(dAtA[i:], m.Nonce)
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Nonce)))
|
|
|
|
i--
|
2020-08-17 11:29:50 +00:00
|
|
|
dAtA[i] = 0x1a
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
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--
|
2020-08-17 11:29:50 +00:00
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
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--
|
2020-08-12 09:57:28 +00:00
|
|
|
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
|
2020-08-17 11:29:50 +00:00
|
|
|
if m.Version != nil {
|
|
|
|
l = m.Version.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
2020-08-12 09:57:28 +00:00
|
|
|
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))
|
|
|
|
}
|
|
|
|
}
|
2020-08-14 06:49:05 +00:00
|
|
|
if m.PlacementPolicy != nil {
|
|
|
|
l = m.PlacementPolicy.Size()
|
2020-08-12 09:57:28 +00:00
|
|
|
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:
|
2020-08-17 11:29:50 +00:00
|
|
|
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 = &grpc.Version{}
|
|
|
|
}
|
|
|
|
if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
2020-08-12 09:57:28 +00:00
|
|
|
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 {
|
2020-08-17 11:29:50 +00:00
|
|
|
m.OwnerId = &grpc1.OwnerID{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-08-17 11:29:50 +00:00
|
|
|
case 3:
|
2020-08-12 09:57:28 +00:00
|
|
|
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
|
2020-08-17 11:29:50 +00:00
|
|
|
case 4:
|
2020-08-12 09:57:28 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2020-08-17 11:29:50 +00:00
|
|
|
case 5:
|
2020-08-12 09:57:28 +00:00
|
|
|
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
|
2020-08-17 11:29:50 +00:00
|
|
|
case 6:
|
2020-08-12 09:57:28 +00:00
|
|
|
if wireType != 2 {
|
2020-08-14 06:49:05 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PlacementPolicy", wireType)
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
2020-08-14 06:49:05 +00:00
|
|
|
if m.PlacementPolicy == nil {
|
2020-08-17 11:29:50 +00:00
|
|
|
m.PlacementPolicy = &grpc2.PlacementPolicy{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
2020-08-14 06:49:05 +00:00
|
|
|
if err := m.PlacementPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2020-08-12 09:57:28 +00:00
|
|
|
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")
|
|
|
|
)
|