frostfs-api-go/v2/netmap/types.pb.go

2480 lines
65 KiB
Go
Raw Normal View History

2020-08-12 09:57:28 +00:00
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: v2/netmap/types.proto
2020-08-12 09:57:28 +00:00
package netmap
2020-08-12 09:57:28 +00:00
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
2020-08-14 06:49:05 +00:00
// Filtering operation
type PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation int32
2020-08-12 09:57:28 +00:00
const (
2020-08-14 06:49:05 +00:00
// 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
2020-08-12 09:57:28 +00:00
)
2020-08-14 06:49:05 +00:00
var PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_name = map[int32]string{
0: "OPERATION_UNSPECIFIED",
2020-08-12 09:57:28 +00:00
1: "EQ",
2: "NE",
3: "GT",
4: "GE",
5: "LT",
6: "LE",
7: "OR",
8: "AND",
}
2020-08-14 06:49:05 +00:00
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,
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (x PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation) String() string {
return proto.EnumName(PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation_name, int32(x))
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_1207dc80bd67ddec, []int{0, 0, 0, 0, 0}
2020-08-12 09:57:28 +00:00
}
// Represents the enumeration of various states of the NeoFS node.
type NodeInfo_State int32
const (
2020-08-14 06:49:05 +00:00
// Unknown state.
NodeInfo_UNSPECIFIED NodeInfo_State = 0
2020-08-12 09:57:28 +00:00
// 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{
2020-08-14 06:49:05 +00:00
0: "UNSPECIFIED",
2020-08-12 09:57:28 +00:00
1: "ONLINE",
2: "OFFLINE",
}
var NodeInfo_State_value = map[string]int32{
2020-08-14 06:49:05 +00:00
"UNSPECIFIED": 0,
"ONLINE": 1,
"OFFLINE": 2,
2020-08-12 09:57:28 +00:00
}
func (x NodeInfo_State) String() string {
return proto.EnumName(NodeInfo_State_name, int32(x))
}
func (NodeInfo_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_1207dc80bd67ddec, []int{1, 0}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
// 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:"-"`
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
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_1207dc80bd67ddec, []int{0}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) XXX_Unmarshal(b []byte) error {
2020-08-12 09:57:28 +00:00
return m.Unmarshal(b)
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2020-08-12 09:57:28 +00:00
if deterministic {
2020-08-14 06:49:05 +00:00
return xxx_messageInfo_PlacementPolicy.Marshal(b, m, deterministic)
2020-08-12 09:57:28 +00:00
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) XXX_Merge(src proto.Message) {
xxx_messageInfo_PlacementPolicy.Merge(m, src)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) XXX_Size() int {
2020-08-12 09:57:28 +00:00
return m.Size()
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) XXX_DiscardUnknown() {
xxx_messageInfo_PlacementPolicy.DiscardUnknown(m)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
var xxx_messageInfo_PlacementPolicy proto.InternalMessageInfo
2020-08-12 09:57:28 +00:00
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) GetReplFactor() uint32 {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.ReplFactor
}
return 0
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) GetFilterGroups() []*PlacementPolicy_FilterGroup {
2020-08-12 09:57:28 +00:00
if m != nil {
2020-08-14 06:49:05 +00:00
return m.FilterGroups
2020-08-12 09:57:28 +00:00
}
return nil
}
2020-08-14 06:49:05 +00:00
// 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:"-"`
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
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_1207dc80bd67ddec, []int{0, 0}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) XXX_Unmarshal(b []byte) error {
2020-08-12 09:57:28 +00:00
return m.Unmarshal(b)
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2020-08-12 09:57:28 +00:00
if deterministic {
2020-08-14 06:49:05 +00:00
return xxx_messageInfo_PlacementPolicy_FilterGroup.Marshal(b, m, deterministic)
2020-08-12 09:57:28 +00:00
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) XXX_Merge(src proto.Message) {
xxx_messageInfo_PlacementPolicy_FilterGroup.Merge(m, src)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) XXX_Size() int {
2020-08-12 09:57:28 +00:00
return m.Size()
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) XXX_DiscardUnknown() {
xxx_messageInfo_PlacementPolicy_FilterGroup.DiscardUnknown(m)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
var xxx_messageInfo_PlacementPolicy_FilterGroup proto.InternalMessageInfo
2020-08-12 09:57:28 +00:00
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) GetFilters() []*PlacementPolicy_FilterGroup_Filter {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Filters
}
return nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) GetSelectors() []*PlacementPolicy_FilterGroup_Selector {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Selectors
}
return nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) GetExclude() []uint32 {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Exclude
}
return nil
}
2020-08-14 06:49:05 +00:00
// 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:"-"`
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
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_1207dc80bd67ddec, []int{0, 0, 0}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) XXX_Unmarshal(b []byte) error {
2020-08-12 09:57:28 +00:00
return m.Unmarshal(b)
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2020-08-12 09:57:28 +00:00
if deterministic {
2020-08-14 06:49:05 +00:00
return xxx_messageInfo_PlacementPolicy_FilterGroup_Filter.Marshal(b, m, deterministic)
2020-08-12 09:57:28 +00:00
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) XXX_Merge(src proto.Message) {
xxx_messageInfo_PlacementPolicy_FilterGroup_Filter.Merge(m, src)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) XXX_Size() int {
2020-08-12 09:57:28 +00:00
return m.Size()
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) XXX_DiscardUnknown() {
xxx_messageInfo_PlacementPolicy_FilterGroup_Filter.DiscardUnknown(m)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
var xxx_messageInfo_PlacementPolicy_FilterGroup_Filter proto.InternalMessageInfo
2020-08-12 09:57:28 +00:00
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) GetKey() string {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Key
}
return ""
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) GetF() *PlacementPolicy_FilterGroup_Filter_SimpleFilter {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.F
}
return nil
}
2020-08-14 06:49:05 +00:00
// 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
//
2020-08-12 09:57:28 +00:00
// Types that are valid to be assigned to Args:
2020-08-14 06:49:05 +00:00
// *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:"-"`
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) Reset() {
*m = PlacementPolicy_FilterGroup_Filter_SimpleFilter{}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) String() string {
2020-08-12 09:57:28 +00:00
return proto.CompactTextString(m)
}
2020-08-14 06:49:05 +00:00
func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter) ProtoMessage() {}
func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_1207dc80bd67ddec, []int{0, 0, 0, 0}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Unmarshal(b []byte) error {
2020-08-12 09:57:28 +00:00
return m.Unmarshal(b)
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2020-08-12 09:57:28 +00:00
if deterministic {
2020-08-14 06:49:05 +00:00
return xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter.Marshal(b, m, deterministic)
2020-08-12 09:57:28 +00:00
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Merge(src proto.Message) {
xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter.Merge(m, src)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_Size() int {
2020-08-12 09:57:28 +00:00
return m.Size()
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_DiscardUnknown() {
xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter.DiscardUnknown(m)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
var xxx_messageInfo_PlacementPolicy_FilterGroup_Filter_SimpleFilter proto.InternalMessageInfo
2020-08-12 09:57:28 +00:00
2020-08-14 06:49:05 +00:00
type isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args interface {
isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args()
2020-08-12 09:57:28 +00:00
MarshalTo([]byte) (int, error)
Size() int
}
2020-08-14 06:49:05 +00:00
type PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value struct {
2020-08-12 09:57:28 +00:00
Value string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"`
}
2020-08-14 06:49:05 +00:00
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"`
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value) isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args() {
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs) isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args() {
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetArgs() isPlacementPolicy_FilterGroup_Filter_SimpleFilter_Args {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Args
}
return nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetOp() PlacementPolicy_FilterGroup_Filter_SimpleFilter_Operation {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Op
}
2020-08-14 06:49:05 +00:00
return PlacementPolicy_FilterGroup_Filter_SimpleFilter_OPERATION_UNSPECIFIED
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetValue() string {
if x, ok := m.GetArgs().(*PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value); ok {
2020-08-12 09:57:28 +00:00
return x.Value
}
return ""
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) GetFArgs() *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters {
if x, ok := m.GetArgs().(*PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs); ok {
2020-08-12 09:57:28 +00:00
return x.FArgs
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
2020-08-14 06:49:05 +00:00
func (*PlacementPolicy_FilterGroup_Filter_SimpleFilter) XXX_OneofWrappers() []interface{} {
2020-08-12 09:57:28 +00:00
return []interface{}{
2020-08-14 06:49:05 +00:00
(*PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value)(nil),
(*PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs)(nil),
2020-08-12 09:57:28 +00:00
}
}
2020-08-14 06:49:05 +00:00
// 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_1207dc80bd67ddec, []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
2020-08-12 09:57:28 +00:00
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
2020-08-14 06:49:05 +00:00
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_1207dc80bd67ddec, []int{0, 0, 1}
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) XXX_Unmarshal(b []byte) error {
2020-08-12 09:57:28 +00:00
return m.Unmarshal(b)
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2020-08-12 09:57:28 +00:00
if deterministic {
2020-08-14 06:49:05 +00:00
return xxx_messageInfo_PlacementPolicy_FilterGroup_Selector.Marshal(b, m, deterministic)
2020-08-12 09:57:28 +00:00
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) XXX_Merge(src proto.Message) {
xxx_messageInfo_PlacementPolicy_FilterGroup_Selector.Merge(m, src)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) XXX_Size() int {
2020-08-12 09:57:28 +00:00
return m.Size()
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) XXX_DiscardUnknown() {
xxx_messageInfo_PlacementPolicy_FilterGroup_Selector.DiscardUnknown(m)
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
var xxx_messageInfo_PlacementPolicy_FilterGroup_Selector proto.InternalMessageInfo
2020-08-12 09:57:28 +00:00
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) GetCount() uint32 {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Count
}
return 0
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) GetKey() string {
2020-08-12 09:57:28 +00:00
if m != nil {
return m.Key
}
return ""
}
2020-08-14 06:49:05 +00:00
// NeoFS node description
2020-08-12 09:57:28 +00:00
type NodeInfo struct {
2020-08-14 06:49:05 +00:00
// Ways to connect to a node
2020-08-12 09:57:28 +00:00
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
2020-08-14 06:49:05 +00:00
// Public key of the NeoFS node in a binary format.
2020-08-12 09:57:28 +00:00
PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// Carries list of the NeoFS node attributes in a string key-value format.
Attributes []*NodeInfo_Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
// Carries state of the NeoFS node.
State NodeInfo_State `protobuf:"varint,4,opt,name=state,proto3,enum=neo.fs.v2.netmap.NodeInfo_State" json:"state,omitempty"`
2020-08-12 09:57:28 +00:00
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_1207dc80bd67ddec, []int{1}
2020-08-12 09:57:28 +00:00
}
func (m *NodeInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *NodeInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeInfo.Merge(m, src)
}
func (m *NodeInfo) XXX_Size() int {
return m.Size()
}
func (m *NodeInfo) XXX_DiscardUnknown() {
xxx_messageInfo_NodeInfo.DiscardUnknown(m)
}
var xxx_messageInfo_NodeInfo proto.InternalMessageInfo
func (m *NodeInfo) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *NodeInfo) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *NodeInfo) GetAttributes() []*NodeInfo_Attribute {
if m != nil {
return m.Attributes
}
return nil
}
func (m *NodeInfo) GetState() NodeInfo_State {
if m != nil {
return m.State
}
2020-08-14 06:49:05 +00:00
return NodeInfo_UNSPECIFIED
2020-08-12 09:57:28 +00:00
}
2020-08-14 06:49:05 +00:00
// Attributes of the NeoFS node.
2020-08-12 09:57:28 +00:00
type NodeInfo_Attribute struct {
2020-08-14 06:49:05 +00:00
// Key of the node attribute.
2020-08-12 09:57:28 +00:00
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
2020-08-14 06:49:05 +00:00
// Value of the node attribute.
2020-08-12 09:57:28 +00:00
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_1207dc80bd67ddec, []int{1, 0}
2020-08-12 09:57:28 +00:00
}
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() {
2020-08-14 06:49:05 +00:00
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)
2020-08-14 06:49:05 +00:00
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/types.proto", fileDescriptor_1207dc80bd67ddec) }
var fileDescriptor_1207dc80bd67ddec = []byte{
2020-08-14 06:49:05 +00:00
// 660 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6e, 0xd3, 0x4c,
0x10, 0xae, 0xed, 0xc4, 0x69, 0x26, 0xcd, 0x5f, 0x6b, 0xff, 0x16, 0x99, 0x48, 0x84, 0x28, 0xe2,
0x90, 0x4b, 0x1c, 0xe1, 0xa2, 0x5e, 0x38, 0xa5, 0xd4, 0x29, 0x51, 0x2b, 0x3b, 0x38, 0xe1, 0xd2,
0x1e, 0x22, 0xc7, 0x59, 0xa7, 0x16, 0x8e, 0xd7, 0xf2, 0xae, 0x23, 0xf2, 0x26, 0xbc, 0x02, 0x3c,
0x02, 0x07, 0xae, 0x70, 0xe0, 0xc0, 0x23, 0xa0, 0xf2, 0x22, 0xc8, 0xeb, 0x38, 0x4d, 0x0b, 0x42,
0x2a, 0xe5, 0xf4, 0xf9, 0x9b, 0xd9, 0xf9, 0xc6, 0x33, 0xfe, 0xbc, 0xb0, 0xbf, 0xd0, 0x3b, 0x21,
0x66, 0x73, 0x27, 0xea, 0xb0, 0x65, 0x84, 0xa9, 0x16, 0xc5, 0x84, 0x11, 0xa4, 0x84, 0x98, 0x68,
0x1e, 0xd5, 0x16, 0xba, 0x96, 0x65, 0x9b, 0x9f, 0x4b, 0xb0, 0x3b, 0x08, 0x1c, 0x17, 0xcf, 0x71,
0xc8, 0x06, 0x24, 0xf0, 0xdd, 0x25, 0x7a, 0x0c, 0x95, 0x18, 0x47, 0xc1, 0xd8, 0x73, 0x5c, 0x46,
0x62, 0x55, 0x68, 0x08, 0xad, 0xaa, 0x0d, 0x69, 0xa8, 0xc7, 0x23, 0xc8, 0x86, 0xaa, 0xe7, 0x07,
0x0c, 0xc7, 0xe3, 0x59, 0x4c, 0x92, 0x88, 0xaa, 0x62, 0x43, 0x6a, 0x55, 0xf4, 0xb6, 0x76, 0x5b,
0x5e, 0xbb, 0x25, 0xad, 0xf5, 0x78, 0xd9, 0x49, 0x5a, 0x65, 0xef, 0x78, 0xd7, 0x84, 0xd6, 0x3e,
0xc9, 0x50, 0xd9, 0xc8, 0x22, 0x13, 0x4a, 0x59, 0x9e, 0xaa, 0x02, 0x57, 0x7f, 0x76, 0x27, 0xf5,
0xd5, 0xb3, 0x9d, 0x8b, 0xa0, 0x11, 0x94, 0x29, 0x0e, 0x70, 0xfa, 0xfe, 0xf9, 0xfb, 0x1e, 0xde,
0x4d, 0x71, 0xb8, 0x2a, 0xb7, 0xaf, 0x85, 0x90, 0x0a, 0x25, 0xfc, 0xd6, 0x0d, 0x92, 0x29, 0x56,
0xa5, 0x86, 0xd4, 0xaa, 0xda, 0x39, 0xad, 0x7d, 0x2c, 0x80, 0x9c, 0x55, 0x23, 0x05, 0xa4, 0x37,
0x78, 0xc9, 0xf7, 0x58, 0xb6, 0xd3, 0x47, 0x64, 0x81, 0xe0, 0xa9, 0x62, 0x43, 0x68, 0x55, 0xf4,
0xee, 0xdf, 0x8c, 0xa5, 0x0d, 0xfd, 0x79, 0x14, 0xe0, 0xd5, 0x8c, 0x82, 0x57, 0xfb, 0x2a, 0xc1,
0xce, 0x66, 0x0c, 0x5d, 0x80, 0x48, 0x22, 0xde, 0xf2, 0x3f, 0xfd, 0xf4, 0xde, 0x2d, 0x34, 0x2b,
0xc2, 0xb1, 0xc3, 0x7c, 0x12, 0xda, 0x22, 0x89, 0xd0, 0x03, 0x28, 0x2e, 0x9c, 0x20, 0xc1, 0x7c,
0x84, 0xf2, 0xcb, 0x2d, 0x3b, 0xa3, 0xe8, 0x12, 0x64, 0x6f, 0xec, 0xc4, 0x33, 0xaa, 0x4a, 0x7c,
0x36, 0xeb, 0xfe, 0x8d, 0x37, 0x09, 0x4d, 0x3b, 0x79, 0xdd, 0x78, 0x46, 0x6b, 0x01, 0x54, 0x6f,
0x64, 0xd0, 0xc5, 0x6d, 0xbb, 0xfc, 0x83, 0xbd, 0xe6, 0x8a, 0xcd, 0x19, 0x94, 0xd7, 0x0b, 0x40,
0x0f, 0x61, 0xdf, 0x1a, 0x18, 0x76, 0x77, 0xd4, 0xb7, 0xcc, 0xf1, 0x6b, 0x73, 0x38, 0x30, 0x5e,
0xf4, 0x7b, 0x7d, 0xe3, 0x58, 0xd9, 0x42, 0x32, 0x88, 0xc6, 0x2b, 0x45, 0x48, 0xd1, 0x34, 0x14,
0x31, 0xc5, 0x93, 0x91, 0x22, 0x71, 0x34, 0x94, 0x42, 0x8a, 0x67, 0x23, 0xa5, 0xc8, 0xd1, 0x50,
0xe4, 0x14, 0x2d, 0x5b, 0x29, 0xa1, 0x12, 0x48, 0x5d, 0xf3, 0x58, 0xd9, 0x3e, 0x92, 0xa1, 0x90,
0xae, 0xaf, 0xa6, 0xc3, 0x76, 0xee, 0x36, 0xb4, 0x07, 0x45, 0x97, 0x24, 0x21, 0x5b, 0xfd, 0x87,
0x19, 0xc9, 0x3d, 0x25, 0xae, 0x3d, 0xd5, 0x7c, 0x2f, 0xc2, 0xb6, 0x49, 0xa6, 0xb8, 0x1f, 0x7a,
0x24, 0xf5, 0xa5, 0x33, 0x9d, 0xc6, 0x98, 0xd2, 0x95, 0xed, 0x72, 0x8a, 0x1e, 0x01, 0x44, 0xc9,
0x24, 0xf0, 0xdd, 0x71, 0x5e, 0xbf, 0x63, 0x97, 0xb3, 0xc8, 0x29, 0x5e, 0xa2, 0x63, 0x00, 0x87,
0xb1, 0xd8, 0x9f, 0x24, 0x0c, 0x53, 0xee, 0xe9, 0x8a, 0xfe, 0xe4, 0xd7, 0x55, 0xe6, 0x8d, 0xb4,
0x6e, 0x7e, 0xd8, 0xde, 0xa8, 0x43, 0x87, 0x50, 0xa4, 0xcc, 0x61, 0x58, 0x2d, 0x70, 0x03, 0x36,
0xfe, 0x20, 0x30, 0x4c, 0xcf, 0xd9, 0xd9, 0xf1, 0xda, 0x01, 0x94, 0xd7, 0x82, 0xbf, 0xf9, 0x6d,
0xf6, 0x6e, 0xf8, 0x6e, 0xe5, 0xba, 0xe6, 0x53, 0x28, 0x72, 0x11, 0xb4, 0x0b, 0x95, 0x9b, 0xdf,
0x03, 0x40, 0xb6, 0xcc, 0xb3, 0xbe, 0x69, 0x28, 0x02, 0xaa, 0x40, 0xc9, 0xea, 0xf5, 0x38, 0x11,
0x8f, 0xce, 0xbf, 0x5c, 0xd5, 0x85, 0x6f, 0x57, 0x75, 0xe1, 0xfb, 0x55, 0x5d, 0x78, 0xf7, 0xa3,
0xbe, 0x75, 0xae, 0xcf, 0x7c, 0x76, 0x99, 0x4c, 0x34, 0x97, 0xcc, 0x3b, 0x21, 0x8d, 0x5c, 0xb7,
0x3d, 0xc5, 0x8b, 0x4e, 0x88, 0x89, 0x47, 0xdb, 0x4e, 0xe4, 0xb7, 0x67, 0xa4, 0xb3, 0xbe, 0x52,
0x9f, 0x67, 0xf0, 0x41, 0xfc, 0xdf, 0xc4, 0xa4, 0x37, 0xd4, 0xba, 0x83, 0x7e, 0x3a, 0x99, 0xc9,
0xa3, 0x13, 0x99, 0x5f, 0xb5, 0x07, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xc4, 0x82, 0xde,
0x83, 0x05, 0x00, 0x00,
}
func (m *PlacementPolicy) Marshal() (dAtA []byte, err error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
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 len(m.FilterGroups) > 0 {
for iNdEx := len(m.FilterGroups) - 1; iNdEx >= 0; iNdEx-- {
2020-08-12 09:57:28 +00:00
{
2020-08-14 06:49:05 +00:00
size, err := m.FilterGroups[iNdEx].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--
dAtA[i] = 0x12
}
}
if m.ReplFactor != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.ReplFactor))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) Marshal() (dAtA []byte, err error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) Marshal() (dAtA []byte, err error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) Marshal() (dAtA []byte, err error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
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) {
2020-08-12 09:57:28 +00:00
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) MarshalTo(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
2020-08-12 09:57:28 +00:00
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0x12
}
if m.Count != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Count))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *NodeInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NodeInfo) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.State != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.State))
i--
dAtA[i] = 0x20
}
if len(m.Attributes) > 0 {
for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if len(m.PublicKey) > 0 {
i -= len(m.PublicKey)
copy(dAtA[i:], m.PublicKey)
i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKey)))
i--
dAtA[i] = 0x12
}
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *NodeInfo_Attribute) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NodeInfo_Attribute) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NodeInfo_Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Value) > 0 {
i -= len(m.Value)
copy(dAtA[i:], m.Value)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
i--
dAtA[i] = 0x12
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
offset -= sovTypes(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) Size() (n int) {
2020-08-12 09:57:28 +00:00
if m == nil {
return 0
}
var l int
_ = l
if m.ReplFactor != 0 {
n += 1 + sovTypes(uint64(m.ReplFactor))
}
2020-08-14 06:49:05 +00:00
if len(m.FilterGroups) > 0 {
for _, e := range m.FilterGroups {
2020-08-12 09:57:28 +00:00
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) Size() (n int) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) Size() (n int) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) Size() (n int) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_Value) Size() (n int) {
2020-08-12 09:57:28 +00:00
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Value)
n += 1 + l + sovTypes(uint64(l))
return n
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs) Size() (n int) {
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
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) {
2020-08-12 09:57:28 +00:00
if m == nil {
return 0
}
var l int
_ = l
if m.Count != 0 {
n += 1 + sovTypes(uint64(m.Count))
}
l = len(m.Key)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NodeInfo) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Address)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.PublicKey)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Attributes) > 0 {
for _, e := range m.Attributes {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
if m.State != 0 {
n += 1 + sovTypes(uint64(m.State))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NodeInfo_Attribute) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Value)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovTypes(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTypes(x uint64) (n int) {
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy) Unmarshal(dAtA []byte) error {
2020-08-12 09:57:28 +00:00
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 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: PlacementPolicy: wiretype end group for non-group")
2020-08-12 09:57:28 +00:00
}
if fieldNum <= 0 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: PlacementPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
2020-08-12 09:57:28 +00:00
}
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 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field FilterGroups", 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
m.FilterGroups = append(m.FilterGroups, &PlacementPolicy_FilterGroup{})
if err := m.FilterGroups[len(m.FilterGroups)-1].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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup) Unmarshal(dAtA []byte) error {
2020-08-12 09:57:28 +00:00
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 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: FilterGroup: wiretype end group for non-group")
2020-08-12 09:57:28 +00:00
}
if fieldNum <= 0 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: FilterGroup: illegal tag %d (wire type %d)", fieldNum, wire)
2020-08-12 09:57:28 +00:00
}
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
}
2020-08-14 06:49:05 +00:00
m.Filters = append(m.Filters, &PlacementPolicy_FilterGroup_Filter{})
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
m.Selectors = append(m.Selectors, &PlacementPolicy_FilterGroup_Selector{})
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter) Unmarshal(dAtA []byte) error {
2020-08-12 09:57:28 +00:00
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 {
2020-08-14 06:49:05 +00:00
m.F = &PlacementPolicy_FilterGroup_Filter_SimpleFilter{}
2020-08-12 09:57:28 +00:00
}
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter) Unmarshal(dAtA []byte) error {
2020-08-12 09:57:28 +00:00
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 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: SimpleFilter: wiretype end group for non-group")
2020-08-12 09:57:28 +00:00
}
if fieldNum <= 0 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: SimpleFilter: illegal tag %d (wire type %d)", fieldNum, wire)
2020-08-12 09:57:28 +00:00
}
switch fieldNum {
case 1:
2020-08-14 06:49:05 +00:00
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:
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 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)
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
v := &PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2020-08-12 09:57:28 +00:00
return err
}
2020-08-14 06:49:05 +00:00
m.Args = &PlacementPolicy_FilterGroup_Filter_SimpleFilter_FArgs{v}
2020-08-12 09:57:28 +00:00
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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Filter_SimpleFilter_SimpleFilters) Unmarshal(dAtA []byte) error {
2020-08-12 09:57:28 +00:00
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 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: SimpleFilters: wiretype end group for non-group")
2020-08-12 09:57:28 +00:00
}
if fieldNum <= 0 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: SimpleFilters: illegal tag %d (wire type %d)", fieldNum, wire)
2020-08-12 09:57:28 +00:00
}
switch fieldNum {
case 1:
if wireType != 2 {
2020-08-14 06:49:05 +00:00
return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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
m.Filters = append(m.Filters, &PlacementPolicy_FilterGroup_Filter_SimpleFilter{})
if err := m.Filters[len(m.Filters)-1].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
}
2020-08-14 06:49:05 +00:00
func (m *PlacementPolicy_FilterGroup_Selector) Unmarshal(dAtA []byte) error {
2020-08-12 09:57:28 +00:00
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Selector: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Selector: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
}
m.Count = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Count |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NodeInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NodeInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
if m.PublicKey == nil {
m.PublicKey = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Attributes = append(m.Attributes, &NodeInfo_Attribute{})
if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= NodeInfo_State(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NodeInfo_Attribute) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Attribute: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Value = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTypes(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthTypes
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupTypes
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthTypes
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)