frostfs-api-go-pogpp/storagegroup/types.pb.go
2020-02-05 16:58:06 +03:00

664 lines
17 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: storagegroup/types.proto
package storagegroup
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
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 StorageGroup_Lifetime_Unit int32
const (
// Unlimited set if storage group always valid
StorageGroup_Lifetime_Unlimited StorageGroup_Lifetime_Unit = 0
// NeoFSEpoch set if storage group is valid until lifetime NeoFS epoch
StorageGroup_Lifetime_NeoFSEpoch StorageGroup_Lifetime_Unit = 1
// UnixTime set if storage group is valid until lifetime unix timestamp
StorageGroup_Lifetime_UnixTime StorageGroup_Lifetime_Unit = 2
)
var StorageGroup_Lifetime_Unit_name = map[int32]string{
0: "Unlimited",
1: "NeoFSEpoch",
2: "UnixTime",
}
var StorageGroup_Lifetime_Unit_value = map[string]int32{
"Unlimited": 0,
"NeoFSEpoch": 1,
"UnixTime": 2,
}
func (x StorageGroup_Lifetime_Unit) String() string {
return proto.EnumName(StorageGroup_Lifetime_Unit_name, int32(x))
}
func (StorageGroup_Lifetime_Unit) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_cfa54edc899249a8, []int{0, 0, 0}
}
type StorageGroup struct {
// ValidationDataSize is size of the all object's payloads included into storage group
ValidationDataSize uint64 `protobuf:"varint,1,opt,name=ValidationDataSize,proto3" json:"ValidationDataSize,omitempty"`
// ValidationHash is homomorphic hash of all object's payloads included into storage group
ValidationHash Hash `protobuf:"bytes,2,opt,name=ValidationHash,proto3,customtype=Hash" json:"ValidationHash"`
// Lifetime is time until storage group is valid
Lifetime *StorageGroup_Lifetime `protobuf:"bytes,3,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StorageGroup) Reset() { *m = StorageGroup{} }
func (*StorageGroup) ProtoMessage() {}
func (*StorageGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_cfa54edc899249a8, []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) {
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) GetLifetime() *StorageGroup_Lifetime {
if m != nil {
return m.Lifetime
}
return nil
}
type StorageGroup_Lifetime struct {
// Unit is lifetime type
Unit StorageGroup_Lifetime_Unit `protobuf:"varint,1,opt,name=unit,proto3,enum=storagegroup.StorageGroup_Lifetime_Unit" json:"unit,omitempty"`
// Value for lifetime
Value int64 `protobuf:"varint,2,opt,name=Value,proto3" json:"Value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StorageGroup_Lifetime) Reset() { *m = StorageGroup_Lifetime{} }
func (m *StorageGroup_Lifetime) String() string { return proto.CompactTextString(m) }
func (*StorageGroup_Lifetime) ProtoMessage() {}
func (*StorageGroup_Lifetime) Descriptor() ([]byte, []int) {
return fileDescriptor_cfa54edc899249a8, []int{0, 0}
}
func (m *StorageGroup_Lifetime) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *StorageGroup_Lifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *StorageGroup_Lifetime) XXX_Merge(src proto.Message) {
xxx_messageInfo_StorageGroup_Lifetime.Merge(m, src)
}
func (m *StorageGroup_Lifetime) XXX_Size() int {
return m.Size()
}
func (m *StorageGroup_Lifetime) XXX_DiscardUnknown() {
xxx_messageInfo_StorageGroup_Lifetime.DiscardUnknown(m)
}
var xxx_messageInfo_StorageGroup_Lifetime proto.InternalMessageInfo
func (m *StorageGroup_Lifetime) GetUnit() StorageGroup_Lifetime_Unit {
if m != nil {
return m.Unit
}
return StorageGroup_Lifetime_Unlimited
}
func (m *StorageGroup_Lifetime) GetValue() int64 {
if m != nil {
return m.Value
}
return 0
}
func init() {
proto.RegisterEnum("storagegroup.StorageGroup_Lifetime_Unit", StorageGroup_Lifetime_Unit_name, StorageGroup_Lifetime_Unit_value)
proto.RegisterType((*StorageGroup)(nil), "storagegroup.StorageGroup")
proto.RegisterType((*StorageGroup_Lifetime)(nil), "storagegroup.StorageGroup.Lifetime")
}
func init() { proto.RegisterFile("storagegroup/types.proto", fileDescriptor_cfa54edc899249a8) }
var fileDescriptor_cfa54edc899249a8 = []byte{
// 374 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0x41, 0x4b, 0xe3, 0x40,
0x18, 0xcd, 0xa4, 0xd9, 0x25, 0x3b, 0x9b, 0x2d, 0x65, 0x58, 0x96, 0xd0, 0x43, 0x52, 0xba, 0x97,
0xc0, 0xd2, 0x09, 0xb4, 0x7b, 0xda, 0xdb, 0x86, 0xdd, 0xaa, 0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34, 0xea, 0x43, 0x2d, 0x4f, 0x98, 0x90, 0x99, 0xeb, 0x5d, 0xe7, 0x03, 0x7b, 0xf1, 0x30,
0x61, 0xc2, 0xd3, 0xcb, 0xc2, 0xd6, 0xd6, 0x2f, 0x5f, 0xfa, 0xd1, 0x77, 0xf8, 0x69, 0x44, 0xa2,
0x9c, 0xca, 0x42, 0x35, 0x7f, 0x03, 0xda, 0x3d, 0x28, 0x35, 0xe8, 0x1b, 0xfc, 0x32, 0x4c, 0x22,
0x16, 0x33, 0x41, 0xa7, 0x0d, 0x05, 0xd5, 0x21, 0x3c, 0xa4, 0xbc, 0x3f, 0xf8, 0x9f, 0xf2, 0x60,
0xde, 0x00, 0xc8, 0x80, 0xfa, 0x30, 0x61, 0xa7, 0xc7, 0x2c, 0xa6, 0x0d, 0xf5, 0x8f, 0xb6, 0xbc,
0xb4, 0x15, 0x6f, 0xbc, 0x2a, 0x2d, 0x70, 0x5d, 0x5a, 0xe0, 0xa6, 0xb4, 0xc0, 0x5d, 0x69, 0x81,
0xe5, 0xbd, 0xa5, 0x8c, 0x7f, 0x55, 0x0e, 0x96, 0x64, 0x69, 0x10, 0x74, 0xa6, 0xf4, 0xc4, 0x4d,
0x28, 0x9f, 0x65, 0x1d, 0x92, 0x32, 0xb7, 0x1a, 0xff, 0x4a, 0xfd, 0x21, 0x7f, 0xc1, 0x7f, 0x8f,
0xf6, 0x5e, 0x55, 0x99, 0x7c, 0x96, 0xe7, 0xec, 0x3d, 0x06, 0x00, 0x00, 0xff, 0xff, 0x79, 0x0c,
0x52, 0x44, 0x27, 0x02, 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 m.Lifetime != nil {
{
size, err := m.Lifetime.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
{
size := m.ValidationHash.Size()
i -= size
if _, err := m.ValidationHash.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintTypes(dAtA, i, uint64(size))
}
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 (m *StorageGroup_Lifetime) 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_Lifetime) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *StorageGroup_Lifetime) 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.Value != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Value))
i--
dAtA[i] = 0x10
}
if m.Unit != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Unit))
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 = m.ValidationHash.Size()
n += 1 + l + sovTypes(uint64(l))
if m.Lifetime != nil {
l = m.Lifetime.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *StorageGroup_Lifetime) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Unit != 0 {
n += 1 + sovTypes(uint64(m.Unit))
}
if m.Value != 0 {
n += 1 + sovTypes(uint64(m.Value))
}
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
}
if err := m.ValidationHash.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 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.Lifetime == nil {
m.Lifetime = &StorageGroup_Lifetime{}
}
if err := m.Lifetime.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 *StorageGroup_Lifetime) 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: Lifetime: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Lifetime: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
}
m.Unit = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Unit |= StorageGroup_Lifetime_Unit(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
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 ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Value |= int64(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 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")
)