// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: v2/netmap/grpc/types.proto package netmap 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 // Filtering operation type PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation int32 const ( // No Operation defined PlacementPolicy_FilterGroup_Filter_SimpleFilter_OPERATION_UNSPECIFIED PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 0 // Equal PlacementPolicy_FilterGroup_Filter_SimpleFilter_EQ PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 1 // Not Equal PlacementPolicy_FilterGroup_Filter_SimpleFilter_NE PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 2 // Greater then PlacementPolicy_FilterGroup_Filter_SimpleFilter_GT PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 3 // Greater or equal PlacementPolicy_FilterGroup_Filter_SimpleFilter_GE PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 4 // Less then PlacementPolicy_FilterGroup_Filter_SimpleFilter_LT PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 5 // Less or equal PlacementPolicy_FilterGroup_Filter_SimpleFilter_LE PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 6 // Logical OR PlacementPolicy_FilterGroup_Filter_SimpleFilter_OR PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 7 // Logical AND PlacementPolicy_FilterGroup_Filter_SimpleFilter_AND PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation = 8 ) var PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_name = map[int32]string{ 0: "OPERATION_UNSPECIFIED", 1: "EQ", 2: "NE", 3: "GT", 4: "GE", 5: "LT", 6: "LE", 7: "OR", 8: "AND", } var PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_value = map[string]int32{ "OPERATION_UNSPECIFIED": 0, "EQ": 1, "NE": 2, "GT": 3, "GE": 4, "LT": 5, "LE": 6, "OR": 7, "AND": 8, } func (x PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation) String() string { return proto.EnumName(PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_name, int32(x)) } func (PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation) EnumDescriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0, 0, 0, 0, 0} } // Represents the enumeration of various states of the NeoFS node. type NodeInfo_State int32 const ( // Unknown state. NodeInfo_UNSPECIFIED 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: "UNSPECIFIED", 1: "ONLINE", 2: "OFFLINE", } var NodeInfo_State_value = map[string]int32{ "UNSPECIFIED": 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_91a1332b2376641a, []int{1, 0} } // Set of rules to select a subset of nodes able to store container's objects type PlacementPolicy struct { // Replication factor ReplFactor uint32 `protobuf:"varint,1,opt,name=repl_factor,json=replFactor,proto3" json:"repl_factor,omitempty"` // List of filter groups FilterGroups []*PlacementPolicy_FilterGroup `protobuf:"bytes,2,rep,name=filter_groups,json=filterGroups,proto3" json:"filter_groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PlacementPolicy) Reset() { *m = PlacementPolicy{} } func (m *PlacementPolicy) String() string { return proto.CompactTextString(m) } func (*PlacementPolicy) ProtoMessage() {} func (*PlacementPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0} } func (m *PlacementPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PlacementPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PlacementPolicy.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 *PlacementPolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_PlacementPolicy.Merge(m, src) } func (m *PlacementPolicy) XXX_Size() int { return m.Size() } func (m *PlacementPolicy) XXX_DiscardUnknown() { xxx_messageInfo_PlacementPolicy.DiscardUnknown(m) } var xxx_messageInfo_PlacementPolicy proto.InternalMessageInfo func (m *PlacementPolicy) GetReplFactor() uint32 { if m != nil { return m.ReplFactor } return 0 } func (m *PlacementPolicy) GetFilterGroups() []*PlacementPolicy_FilterGroup { if m != nil { return m.FilterGroups } return nil } // Filters to apply to Network Map type PlacementPolicy_FilterGroup struct { // Resulting filter list Filters []*PlacementPolicy_FilterGroup_Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` // List of selectors Selectors []*PlacementPolicy_FilterGroup_Selector `protobuf:"bytes,2,rep,name=selectors,proto3" json:"selectors,omitempty"` // Parts of graph to exclude. Internal use. 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 *PlacementPolicy_FilterGroup) Reset() { *m = PlacementPolicy_FilterGroup{} } func (m *PlacementPolicy_FilterGroup) String() string { return proto.CompactTextString(m) } func (*PlacementPolicy_FilterGroup) ProtoMessage() {} func (*PlacementPolicy_FilterGroup) Descriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0, 0} } func (m *PlacementPolicy_FilterGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PlacementPolicy_FilterGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PlacementPolicy_FilterGroup.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 *PlacementPolicy_FilterGroup) XXX_Merge(src proto.Message) { xxx_messageInfo_PlacementPolicy_FilterGroup.Merge(m, src) } func (m *PlacementPolicy_FilterGroup) XXX_Size() int { return m.Size() } func (m *PlacementPolicy_FilterGroup) XXX_DiscardUnknown() { xxx_messageInfo_PlacementPolicy_FilterGroup.DiscardUnknown(m) } var xxx_messageInfo_PlacementPolicy_FilterGroup proto.InternalMessageInfo func (m *PlacementPolicy_FilterGroup) GetFilters() []*PlacementPolicy_FilterGroup_Filter { if m != nil { return m.Filters } return nil } func (m *PlacementPolicy_FilterGroup) GetSelectors() []*PlacementPolicy_FilterGroup_Selector { if m != nil { return m.Selectors } return nil } func (m *PlacementPolicy_FilterGroup) GetExclude() []uint32 { if m != nil { return m.Exclude } return nil } // Filter definition type PlacementPolicy_FilterGroup_Filter struct { // Filter identifier Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The rest of filter F *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter) Reset() { *m = PlacementPolicy_FilterGroup_Filter{} } func (m *PlacementPolicy_FilterGroup_Filter) String() string { return proto.CompactTextString(m) } func (*PlacementPolicy_FilterGroup_Filter) ProtoMessage() {} func (*PlacementPolicy_FilterGroup_Filter) Descriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0, 0, 0} } func (m *PlacementPolicy_FilterGroup_Filter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PlacementPolicy_FilterGroup_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter) XXX_Merge(src proto.Message) { xxx_messageInfo_PlacementPolicy_FilterGroup_Filter.Merge(m, src) } func (m *PlacementPolicy_FilterGroup_Filter) XXX_Size() int { return m.Size() } func (m *PlacementPolicy_FilterGroup_Filter) XXX_DiscardUnknown() { xxx_messageInfo_PlacementPolicy_FilterGroup_Filter.DiscardUnknown(m) } var xxx_messageInfo_PlacementPolicy_FilterGroup_Filter proto.InternalMessageInfo func (m *PlacementPolicy_FilterGroup_Filter) GetKey() string { if m != nil { return m.Key } return "" } func (m *PlacementPolicy_FilterGroup_Filter) GetF() *PlacementPolicy_FilterGroup_Filter_SimpleFilter { if m != nil { return m.F } return nil } // Minimal simple filter type PlacementPolicy_FilterGroup_Filter_SimpleFilter struct { // Filtering operation Op PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation `protobuf:"varint,1,opt,name=op,proto3,enum=neo.fs.v2.netmap.PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation" json:"op,omitempty"` // Filtering operation argument // // Types that are valid to be assigned to Args: // *PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value // *PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs Args isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args `protobuf_oneof:"args"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) Reset() { *m = PlacementPolicy_FilterGroup_Filter_SimpleFilter{} } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) String() string { return proto.CompactTextString(m) } func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter) ProtoMessage() {} func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter) Descriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0, 0, 0, 0} } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter.Merge(m, src) } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Size() int { return m.Size() } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_DiscardUnknown() { xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter.DiscardUnknown(m) } var xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter proto.InternalMessageInfo type isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args interface { isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args() MarshalTo([]byte) (int, error) Size() int } type PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value struct { Value string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` } type PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs struct { FArgs *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters `protobuf:"bytes,3,opt,name=f_args,json=fArgs,proto3,oneof" json:"f_args,omitempty"` } func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value) isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args() { } func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs) isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args() { } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetArgs() isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args { if m != nil { return m.Args } return nil } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetOp() PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation { if m != nil { return m.Op } return PlacementPolicy_FilterGroup_Filter_SimpleFilter_OPERATION_UNSPECIFIED } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetValue() string { if x, ok := m.GetArgs().(*PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value); ok { return x.Value } return "" } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetFArgs() *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters { if x, ok := m.GetArgs().(*PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs); ok { return x.FArgs } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_OneofWrappers() []interface{} { return []interface{}{ (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value)(nil), (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs)(nil), } } // List of filters type PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters struct { // List of filters Filters []*PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) Reset() { *m = PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters{} } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) String() string { return proto.CompactTextString(m) } func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) ProtoMessage() {} func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) Descriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0, 0, 0, 0, 0} } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) XXX_Merge(src proto.Message) { xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters.Merge(m, src) } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) XXX_Size() int { return m.Size() } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) XXX_DiscardUnknown() { xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters.DiscardUnknown(m) } var xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters proto.InternalMessageInfo func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) GetFilters() []*PlacementPolicy_FilterGroup_Filter_SimpleFilter { if m != nil { return m.Filters } return nil } // Selector type PlacementPolicy_FilterGroup_Selector struct { // How many to select Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // Key to select 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 *PlacementPolicy_FilterGroup_Selector) Reset() { *m = PlacementPolicy_FilterGroup_Selector{} } func (m *PlacementPolicy_FilterGroup_Selector) String() string { return proto.CompactTextString(m) } func (*PlacementPolicy_FilterGroup_Selector) ProtoMessage() {} func (*PlacementPolicy_FilterGroup_Selector) Descriptor() ([]byte, []int) { return fileDescriptor_91a1332b2376641a, []int{0, 0, 1} } func (m *PlacementPolicy_FilterGroup_Selector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PlacementPolicy_FilterGroup_Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Selector) XXX_Merge(src proto.Message) { xxx_messageInfo_PlacementPolicy_FilterGroup_Selector.Merge(m, src) } func (m *PlacementPolicy_FilterGroup_Selector) XXX_Size() int { return m.Size() } func (m *PlacementPolicy_FilterGroup_Selector) XXX_DiscardUnknown() { xxx_messageInfo_PlacementPolicy_FilterGroup_Selector.DiscardUnknown(m) } var xxx_messageInfo_PlacementPolicy_FilterGroup_Selector proto.InternalMessageInfo func (m *PlacementPolicy_FilterGroup_Selector) GetCount() uint32 { if m != nil { return m.Count } return 0 } func (m *PlacementPolicy_FilterGroup_Selector) GetKey() string { if m != nil { return m.Key } return "" } // NeoFS node description type NodeInfo struct { // Public key of the NeoFS node in a binary format. PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Ways to connect to a node Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,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=neo.fs.v2.netmap.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_91a1332b2376641a, []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) GetPublicKey() []byte { if m != nil { return m.PublicKey } return nil } func (m *NodeInfo) GetAddress() string { if m != nil { return m.Address } return "" } 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_UNSPECIFIED } // Attributes of the NeoFS node. type NodeInfo_Attribute struct { // Key of the node attribute. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // 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_91a1332b2376641a, []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("neo.fs.v2.netmap.PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation", PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_name, PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_value) proto.RegisterEnum("neo.fs.v2.netmap.NodeInfo_State", NodeInfo_State_name, NodeInfo_State_value) proto.RegisterType((*PlacementPolicy)(nil), "neo.fs.v2.netmap.PlacementPolicy") proto.RegisterType((*PlacementPolicy_FilterGroup)(nil), "neo.fs.v2.netmap.PlacementPolicy.FilterGroup") proto.RegisterType((*PlacementPolicy_FilterGroup_Filter)(nil), "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter") proto.RegisterType((*PlacementPolicy_FilterGroup_Filter_SimpleFilter)(nil), "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter") proto.RegisterType((*PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters)(nil), "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters") proto.RegisterType((*PlacementPolicy_FilterGroup_Selector)(nil), "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Selector") proto.RegisterType((*NodeInfo)(nil), "neo.fs.v2.netmap.NodeInfo") proto.RegisterType((*NodeInfo_Attribute)(nil), "neo.fs.v2.netmap.NodeInfo.Attribute") } func init() { proto.RegisterFile("v2/netmap/grpc/types.proto", fileDescriptor_91a1332b2376641a) } var fileDescriptor_91a1332b2376641a = []byte{ // 663 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40, 0x10, 0xae, 0xed, 0xc4, 0x69, 0x26, 0x0d, 0xb5, 0x96, 0x82, 0x4c, 0x24, 0x42, 0x14, 0x71, 0xc8, 0x25, 0x8e, 0x48, 0x51, 0x39, 0x70, 0x4a, 0xa9, 0x53, 0xa2, 0x56, 0x76, 0xd8, 0x84, 0x0b, 0x3d, 0x44, 0x8e, 0xb3, 0x4e, 0x2d, 0x1c, 0xaf, 0xe5, 0xdd, 0x44, 0xe4, 0x4d, 0x78, 0x05, 0x78, 0x04, 0x0e, 0x5c, 0xe1, 0xc0, 0x81, 0x47, 0x40, 0xe5, 0x45, 0x90, 0xd7, 0x71, 0x9b, 0x14, 0x84, 0x54, 0xca, 0x69, 0xf6, 0x9b, 0x9f, 0x6f, 0x3c, 0xe3, 0x6f, 0x17, 0x2a, 0x8b, 0x76, 0x2b, 0x24, 0x7c, 0xe6, 0x44, 0xad, 0x69, 0x1c, 0xb9, 0x2d, 0xbe, 0x8c, 0x08, 0x33, 0xa2, 0x98, 0x72, 0x8a, 0xb4, 0x90, 0x50, 0xc3, 0x63, 0xc6, 0xa2, 0x6d, 0xa4, 0x29, 0xf5, 0x2f, 0x05, 0xd8, 0xed, 0x07, 0x8e, 0x4b, 0x66, 0x24, 0xe4, 0x7d, 0x1a, 0xf8, 0xee, 0x12, 0x3d, 0x82, 0x52, 0x4c, 0xa2, 0x60, 0xe4, 0x39, 0x2e, 0xa7, 0xb1, 0x2e, 0xd5, 0xa4, 0x46, 0x19, 0x43, 0xe2, 0xea, 0x0a, 0x0f, 0xc2, 0x50, 0xf6, 0xfc, 0x80, 0x93, 0x78, 0x34, 0x8d, 0xe9, 0x3c, 0x62, 0xba, 0x5c, 0x53, 0x1a, 0xa5, 0x76, 0xd3, 0xb8, 0x4e, 0x6f, 0x5c, 0xa3, 0x36, 0xba, 0xa2, 0xec, 0x38, 0xa9, 0xc2, 0x3b, 0xde, 0x15, 0x60, 0x95, 0xcf, 0x2a, 0x94, 0xd6, 0xa2, 0xc8, 0x82, 0x42, 0x1a, 0x67, 0xba, 0x24, 0xd8, 0x9f, 0xde, 0x88, 0x7d, 0x75, 0xc6, 0x19, 0x09, 0x1a, 0x42, 0x91, 0x91, 0x80, 0x24, 0xdf, 0x9f, 0x7d, 0xef, 0xc1, 0xcd, 0x18, 0x07, 0xab, 0x72, 0x7c, 0x45, 0x84, 0x74, 0x28, 0x90, 0x77, 0x6e, 0x30, 0x9f, 0x10, 0x5d, 0xa9, 0x29, 0x8d, 0x32, 0xce, 0x60, 0xe5, 0x53, 0x0e, 0xd4, 0xb4, 0x1a, 0x69, 0xa0, 0xbc, 0x25, 0x4b, 0xb1, 0xc7, 0x22, 0x4e, 0x8e, 0xc8, 0x06, 0xc9, 0xd3, 0xe5, 0x9a, 0xd4, 0x28, 0xb5, 0x3b, 0xff, 0x32, 0x96, 0x31, 0xf0, 0x67, 0x51, 0x40, 0x56, 0x33, 0x4a, 0x5e, 0xe5, 0x9b, 0x02, 0x3b, 0xeb, 0x3e, 0x74, 0x06, 0x32, 0x8d, 0x44, 0xcb, 0x3b, 0xed, 0x93, 0x5b, 0xb7, 0x30, 0xec, 0x88, 0xc4, 0x0e, 0xf7, 0x69, 0x88, 0x65, 0x1a, 0xa1, 0xfb, 0x90, 0x5f, 0x38, 0xc1, 0x9c, 0x88, 0x11, 0x8a, 0x2f, 0xb7, 0x70, 0x0a, 0xd1, 0x39, 0xa8, 0xde, 0xc8, 0x89, 0xa7, 0x4c, 0x57, 0xc4, 0x6c, 0xf6, 0xed, 0x1b, 0xaf, 0x03, 0x96, 0x74, 0xf2, 0x3a, 0xf1, 0x94, 0x55, 0x02, 0x28, 0x6f, 0x44, 0xd0, 0xd9, 0x75, 0xb9, 0xfc, 0x87, 0xbd, 0x66, 0x8c, 0xf5, 0x29, 0x14, 0x2f, 0x17, 0x80, 0x1e, 0xc0, 0x3d, 0xbb, 0x6f, 0xe2, 0xce, 0xb0, 0x67, 0x5b, 0xa3, 0xd7, 0xd6, 0xa0, 0x6f, 0xbe, 0xe8, 0x75, 0x7b, 0xe6, 0x91, 0xb6, 0x85, 0x54, 0x90, 0xcd, 0x57, 0x9a, 0x94, 0x58, 0xcb, 0xd4, 0xe4, 0xc4, 0x1e, 0x0f, 0x35, 0x45, 0x58, 0x53, 0xcb, 0x25, 0xf6, 0x74, 0xa8, 0xe5, 0x85, 0x35, 0x35, 0x35, 0xb1, 0x36, 0xd6, 0x0a, 0xa8, 0x00, 0x4a, 0xc7, 0x3a, 0xd2, 0xb6, 0x0f, 0x55, 0xc8, 0x25, 0xeb, 0xab, 0xb4, 0x61, 0x3b, 0x53, 0x1b, 0xda, 0x83, 0xbc, 0x4b, 0xe7, 0x21, 0x5f, 0xdd, 0xc3, 0x14, 0x64, 0x9a, 0x92, 0x2f, 0x35, 0x55, 0xff, 0x20, 0xc3, 0xb6, 0x45, 0x27, 0xa4, 0x17, 0x7a, 0x14, 0x3d, 0x04, 0x88, 0xe6, 0xe3, 0xc0, 0x77, 0x47, 0x99, 0xf2, 0x76, 0x70, 0x31, 0xf5, 0x9c, 0x90, 0x65, 0x22, 0x5b, 0x67, 0x32, 0x89, 0x09, 0x63, 0x2b, 0x86, 0x0c, 0xa2, 0x23, 0x00, 0x87, 0xf3, 0xd8, 0x1f, 0xcf, 0x39, 0x61, 0x42, 0xd3, 0xa5, 0xf6, 0xe3, 0xdf, 0x57, 0x99, 0x35, 0x32, 0x3a, 0x59, 0x32, 0x5e, 0xab, 0x43, 0x07, 0x90, 0x67, 0xdc, 0xe1, 0x44, 0xcf, 0x09, 0x01, 0xd6, 0xfe, 0x42, 0x30, 0x48, 0xf2, 0x70, 0x9a, 0x5e, 0xd9, 0x87, 0xe2, 0x25, 0xe1, 0x1f, 0xae, 0xcd, 0xde, 0x86, 0xee, 0x56, 0xaa, 0xab, 0x3f, 0x81, 0xbc, 0x20, 0x41, 0xbb, 0x50, 0xda, 0xfc, 0x1f, 0x00, 0xaa, 0x6d, 0x9d, 0xf6, 0x2c, 0x53, 0x93, 0x50, 0x09, 0x0a, 0x76, 0xb7, 0x2b, 0x80, 0x7c, 0x38, 0xfa, 0x7a, 0x51, 0x95, 0xbe, 0x5f, 0x54, 0xa5, 0x1f, 0x17, 0x55, 0xe9, 0xfd, 0xcf, 0xea, 0xd6, 0x9b, 0x67, 0x53, 0x9f, 0x9f, 0xcf, 0xc7, 0x86, 0x4b, 0x67, 0xad, 0x90, 0x45, 0xae, 0xdb, 0x9c, 0x90, 0x45, 0x2b, 0x24, 0xd4, 0x63, 0x4d, 0x27, 0xf2, 0x9b, 0x53, 0xda, 0xda, 0x7c, 0x57, 0x9f, 0xa7, 0xe7, 0x8f, 0xf2, 0x5d, 0x8b, 0xd0, 0xee, 0xc0, 0xe8, 0xf4, 0x7b, 0xc9, 0x78, 0x96, 0xf0, 0x8e, 0x55, 0xf1, 0xde, 0xee, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xeb, 0x5f, 0x7e, 0x8d, 0x05, 0x00, 0x00, } func (m *PlacementPolicy) 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 *PlacementPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy) 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.FilterGroups) > 0 { for iNdEx := len(m.FilterGroups) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.FilterGroups[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 *PlacementPolicy_FilterGroup) 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 *PlacementPolicy_FilterGroup) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup) 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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Selector) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PlacementPolicy_FilterGroup_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.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0x12 } 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] = 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 *PlacementPolicy) 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.FilterGroups) > 0 { for _, e := range m.FilterGroups { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *PlacementPolicy_FilterGroup) 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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_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 *PlacementPolicy_FilterGroup_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.PublicKey) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.Address) 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 *PlacementPolicy) 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: PlacementPolicy: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PlacementPolicy: 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 FilterGroups", 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.FilterGroups = append(m.FilterGroups, &PlacementPolicy_FilterGroup{}) if err := m.FilterGroups[len(m.FilterGroups)-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 *PlacementPolicy_FilterGroup) 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: FilterGroup: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FilterGroup: 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, &PlacementPolicy_FilterGroup_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, &PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 = &PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 |= PlacementPolicy_FilterGroup_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 = &PlacementPolicy_FilterGroup_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 := &PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Args = &PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_Filter_SimpleFilter_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, &PlacementPolicy_FilterGroup_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 *PlacementPolicy_FilterGroup_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 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 2: 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 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") )