1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-06 16:57:10 +00:00
node-feature-discovery/pkg/api/feature/generated.pb.go
Markus Lehtonen d4d9a03732 grpc: extend the API to send raw features
Enable transmitting the discovered "raw" features over the gRPC API.

Extend pkg/api/feature with protobuf and gRPC code. In this, utilize
go-to-protobuf from k8s code-generator for auto-generating the gRPC
interface from golang code. The tool can be Installed with:

  go install k8s.io/code-generator/cmd/go-to-protobuf@v0.20.7

The auto-generated code is (re-)generated/updated with "make apigen".
2021-11-16 17:32:28 +02:00

2033 lines
51 KiB
Go

/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: feature/generated.proto
package feature
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
)
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *DomainFeatures) Reset() { *m = DomainFeatures{} }
func (*DomainFeatures) ProtoMessage() {}
func (*DomainFeatures) Descriptor() ([]byte, []int) {
return fileDescriptor_870e6eafce4d2482, []int{0}
}
func (m *DomainFeatures) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DomainFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *DomainFeatures) XXX_Merge(src proto.Message) {
xxx_messageInfo_DomainFeatures.Merge(m, src)
}
func (m *DomainFeatures) XXX_Size() int {
return m.Size()
}
func (m *DomainFeatures) XXX_DiscardUnknown() {
xxx_messageInfo_DomainFeatures.DiscardUnknown(m)
}
var xxx_messageInfo_DomainFeatures proto.InternalMessageInfo
func (m *InstanceFeature) Reset() { *m = InstanceFeature{} }
func (*InstanceFeature) ProtoMessage() {}
func (*InstanceFeature) Descriptor() ([]byte, []int) {
return fileDescriptor_870e6eafce4d2482, []int{1}
}
func (m *InstanceFeature) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *InstanceFeature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *InstanceFeature) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstanceFeature.Merge(m, src)
}
func (m *InstanceFeature) XXX_Size() int {
return m.Size()
}
func (m *InstanceFeature) XXX_DiscardUnknown() {
xxx_messageInfo_InstanceFeature.DiscardUnknown(m)
}
var xxx_messageInfo_InstanceFeature proto.InternalMessageInfo
func (m *InstanceFeatureSet) Reset() { *m = InstanceFeatureSet{} }
func (*InstanceFeatureSet) ProtoMessage() {}
func (*InstanceFeatureSet) Descriptor() ([]byte, []int) {
return fileDescriptor_870e6eafce4d2482, []int{2}
}
func (m *InstanceFeatureSet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *InstanceFeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *InstanceFeatureSet) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstanceFeatureSet.Merge(m, src)
}
func (m *InstanceFeatureSet) XXX_Size() int {
return m.Size()
}
func (m *InstanceFeatureSet) XXX_DiscardUnknown() {
xxx_messageInfo_InstanceFeatureSet.DiscardUnknown(m)
}
var xxx_messageInfo_InstanceFeatureSet proto.InternalMessageInfo
func (m *KeyFeatureSet) Reset() { *m = KeyFeatureSet{} }
func (*KeyFeatureSet) ProtoMessage() {}
func (*KeyFeatureSet) Descriptor() ([]byte, []int) {
return fileDescriptor_870e6eafce4d2482, []int{3}
}
func (m *KeyFeatureSet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *KeyFeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *KeyFeatureSet) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyFeatureSet.Merge(m, src)
}
func (m *KeyFeatureSet) XXX_Size() int {
return m.Size()
}
func (m *KeyFeatureSet) XXX_DiscardUnknown() {
xxx_messageInfo_KeyFeatureSet.DiscardUnknown(m)
}
var xxx_messageInfo_KeyFeatureSet proto.InternalMessageInfo
func (m *Nil) Reset() { *m = Nil{} }
func (*Nil) ProtoMessage() {}
func (*Nil) Descriptor() ([]byte, []int) {
return fileDescriptor_870e6eafce4d2482, []int{4}
}
func (m *Nil) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *Nil) XXX_Merge(src proto.Message) {
xxx_messageInfo_Nil.Merge(m, src)
}
func (m *Nil) XXX_Size() int {
return m.Size()
}
func (m *Nil) XXX_DiscardUnknown() {
xxx_messageInfo_Nil.DiscardUnknown(m)
}
var xxx_messageInfo_Nil proto.InternalMessageInfo
func (m *ValueFeatureSet) Reset() { *m = ValueFeatureSet{} }
func (*ValueFeatureSet) ProtoMessage() {}
func (*ValueFeatureSet) Descriptor() ([]byte, []int) {
return fileDescriptor_870e6eafce4d2482, []int{5}
}
func (m *ValueFeatureSet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ValueFeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *ValueFeatureSet) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValueFeatureSet.Merge(m, src)
}
func (m *ValueFeatureSet) XXX_Size() int {
return m.Size()
}
func (m *ValueFeatureSet) XXX_DiscardUnknown() {
xxx_messageInfo_ValueFeatureSet.DiscardUnknown(m)
}
var xxx_messageInfo_ValueFeatureSet proto.InternalMessageInfo
func init() {
proto.RegisterType((*DomainFeatures)(nil), "feature.DomainFeatures")
proto.RegisterMapType((map[string]InstanceFeatureSet)(nil), "feature.DomainFeatures.InstancesEntry")
proto.RegisterMapType((map[string]KeyFeatureSet)(nil), "feature.DomainFeatures.KeysEntry")
proto.RegisterMapType((map[string]ValueFeatureSet)(nil), "feature.DomainFeatures.ValuesEntry")
proto.RegisterType((*InstanceFeature)(nil), "feature.InstanceFeature")
proto.RegisterMapType((map[string]string)(nil), "feature.InstanceFeature.AttributesEntry")
proto.RegisterType((*InstanceFeatureSet)(nil), "feature.InstanceFeatureSet")
proto.RegisterType((*KeyFeatureSet)(nil), "feature.KeyFeatureSet")
proto.RegisterMapType((map[string]Nil)(nil), "feature.KeyFeatureSet.ElementsEntry")
proto.RegisterType((*Nil)(nil), "feature.Nil")
proto.RegisterType((*ValueFeatureSet)(nil), "feature.ValueFeatureSet")
proto.RegisterMapType((map[string]string)(nil), "feature.ValueFeatureSet.ElementsEntry")
}
func init() { proto.RegisterFile("feature/generated.proto", fileDescriptor_870e6eafce4d2482) }
var fileDescriptor_870e6eafce4d2482 = []byte{
// 503 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0x86, 0xbd, 0x71, 0x5b, 0xea, 0x49, 0x9b, 0x94, 0x15, 0x02, 0xcb, 0x48, 0xdb, 0x10, 0x50,
0x95, 0x03, 0x75, 0x44, 0x4f, 0x08, 0xc4, 0x81, 0x40, 0x2b, 0x55, 0x91, 0x8a, 0xe4, 0x22, 0x10,
0xa8, 0x17, 0xa7, 0x4c, 0x83, 0x55, 0xc7, 0x46, 0xf6, 0x1a, 0xc9, 0x37, 0x1e, 0x81, 0x87, 0xe0,
0xcc, 0x73, 0xe4, 0xd8, 0x63, 0x4f, 0x15, 0x31, 0xaf, 0xc1, 0x01, 0x65, 0xbd, 0x76, 0xed, 0xc4,
0x06, 0xf5, 0xe6, 0xdd, 0xfd, 0xff, 0x6f, 0xff, 0x99, 0x1d, 0x19, 0xee, 0x9d, 0xa1, 0xcd, 0xa3,
0x00, 0xfb, 0x63, 0xf4, 0x30, 0xb0, 0x39, 0x7e, 0x32, 0xbf, 0x04, 0x3e, 0xf7, 0xe9, 0x2d, 0x79,
0x60, 0xec, 0x8e, 0x1d, 0xfe, 0x39, 0x1a, 0x99, 0xa7, 0xfe, 0xa4, 0x3f, 0xf6, 0xc7, 0x7e, 0x5f,
0x9c, 0x8f, 0xa2, 0x33, 0xb1, 0x12, 0x0b, 0xf1, 0x95, 0xfa, 0xba, 0x7f, 0x54, 0x68, 0xbd, 0xf6,
0x27, 0xb6, 0xe3, 0x1d, 0xa4, 0x80, 0x90, 0xbe, 0x82, 0x95, 0x73, 0x8c, 0x43, 0x9d, 0x74, 0xd4,
0x5e, 0x73, 0xef, 0x81, 0x29, 0xc9, 0x66, 0x59, 0x66, 0x0e, 0x31, 0x0e, 0xf7, 0x3d, 0x1e, 0xc4,
0x83, 0x8d, 0xe9, 0xd5, 0xb6, 0x92, 0x5c, 0x6d, 0xaf, 0xcc, 0xb7, 0x2c, 0x61, 0xa6, 0x43, 0x58,
0xfb, 0x6a, 0xbb, 0x11, 0x86, 0x7a, 0x43, 0x60, 0x1e, 0xd6, 0x61, 0xde, 0x09, 0x55, 0x0a, 0x6a,
0x49, 0xd0, 0x5a, 0xba, 0x69, 0x49, 0x04, 0x7d, 0x0f, 0x9a, 0xe3, 0x85, 0xdc, 0xf6, 0x4e, 0x31,
0xd4, 0x55, 0xc1, 0xdb, 0xa9, 0xe3, 0x1d, 0x66, 0xc2, 0x14, 0x79, 0x5b, 0x22, 0xb5, 0x7c, 0xdf,
0xba, 0x66, 0x19, 0x6f, 0x40, 0xcb, 0xcb, 0xa0, 0x5b, 0xa0, 0x9e, 0x63, 0xac, 0x93, 0x0e, 0xe9,
0x69, 0xd6, 0xfc, 0x93, 0x3e, 0x86, 0x55, 0x91, 0x40, 0x6f, 0x74, 0x48, 0xaf, 0xb9, 0x77, 0x37,
0xbf, 0x73, 0x88, 0xb1, 0xbc, 0xf0, 0x18, 0xb9, 0x95, 0x8a, 0x9e, 0x35, 0x9e, 0x12, 0xe3, 0x18,
0x9a, 0x85, 0x82, 0x2a, 0x90, 0x66, 0x19, 0xa9, 0xe7, 0x48, 0x61, 0xab, 0x86, 0x7e, 0x80, 0x56,
0xb9, 0xaa, 0x0a, 0xee, 0x93, 0x32, 0xf7, 0x7e, 0xce, 0xcd, 0x9c, 0x95, 0xe8, 0xee, 0x4f, 0x02,
0xed, 0x05, 0x05, 0x3d, 0x01, 0xb0, 0x39, 0x0f, 0x9c, 0x51, 0xc4, 0x31, 0x9b, 0x82, 0x5e, 0x1d,
0xcf, 0x7c, 0x99, 0x4b, 0xd3, 0x86, 0x53, 0xd9, 0x70, 0xb8, 0x3e, 0xb0, 0x0a, 0x3c, 0xe3, 0x05,
0xb4, 0x17, 0x2c, 0x15, 0xd5, 0xdc, 0x29, 0x56, 0xa3, 0x15, 0x03, 0x9f, 0x00, 0x5d, 0xae, 0x88,
0x1e, 0xc0, 0x3a, 0xba, 0x38, 0x41, 0x8f, 0x67, 0x81, 0xf5, 0xba, 0xc0, 0x83, 0x2d, 0x19, 0x70,
0x7d, 0x5f, 0x3a, 0xac, 0xdc, 0x3b, 0x6f, 0xc7, 0x66, 0xe9, 0x6d, 0xa9, 0xb5, 0x44, 0x7e, 0x54,
0x3d, 0x05, 0x66, 0x86, 0x4b, 0xdb, 0xf0, 0x8f, 0x5b, 0x8c, 0x43, 0xd8, 0x2c, 0x89, 0x2b, 0x1a,
0xd0, 0x2d, 0x3f, 0xe7, 0x46, 0x7e, 0xe7, 0x91, 0xe3, 0x16, 0xdb, 0xb1, 0x0a, 0xea, 0x91, 0xe3,
0x76, 0x7f, 0x10, 0x68, 0x2f, 0x0c, 0x10, 0x7d, 0xbb, 0x94, 0x7c, 0xa7, 0x6e, 0xd8, 0x6e, 0x90,
0xfd, 0xf9, 0xff, 0xb3, 0xd7, 0x3e, 0xde, 0x60, 0x77, 0x3a, 0x63, 0xca, 0xc5, 0x8c, 0x29, 0x97,
0x33, 0xa6, 0x7c, 0x4b, 0x18, 0x99, 0x26, 0x8c, 0x5c, 0x24, 0x8c, 0x5c, 0x26, 0x8c, 0xfc, 0x4a,
0x18, 0xf9, 0xfe, 0x9b, 0x29, 0x1f, 0xb3, 0x5f, 0xd9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,
0x6e, 0x71, 0x14, 0xed, 0x04, 0x00, 0x00,
}
func (m *DomainFeatures) 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 *DomainFeatures) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DomainFeatures) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Instances) > 0 {
keysForInstances := make([]string, 0, len(m.Instances))
for k := range m.Instances {
keysForInstances = append(keysForInstances, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForInstances)
for iNdEx := len(keysForInstances) - 1; iNdEx >= 0; iNdEx-- {
v := m.Instances[string(keysForInstances[iNdEx])]
baseI := i
{
size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
i -= len(keysForInstances[iNdEx])
copy(dAtA[i:], keysForInstances[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(keysForInstances[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x1a
}
}
if len(m.Values) > 0 {
keysForValues := make([]string, 0, len(m.Values))
for k := range m.Values {
keysForValues = append(keysForValues, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForValues)
for iNdEx := len(keysForValues) - 1; iNdEx >= 0; iNdEx-- {
v := m.Values[string(keysForValues[iNdEx])]
baseI := i
{
size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
i -= len(keysForValues[iNdEx])
copy(dAtA[i:], keysForValues[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(keysForValues[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x12
}
}
if len(m.Keys) > 0 {
keysForKeys := make([]string, 0, len(m.Keys))
for k := range m.Keys {
keysForKeys = append(keysForKeys, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForKeys)
for iNdEx := len(keysForKeys) - 1; iNdEx >= 0; iNdEx-- {
v := m.Keys[string(keysForKeys[iNdEx])]
baseI := i
{
size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
i -= len(keysForKeys[iNdEx])
copy(dAtA[i:], keysForKeys[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(keysForKeys[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *InstanceFeature) 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 *InstanceFeature) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *InstanceFeature) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Attributes) > 0 {
keysForAttributes := make([]string, 0, len(m.Attributes))
for k := range m.Attributes {
keysForAttributes = append(keysForAttributes, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes)
for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- {
v := m.Attributes[string(keysForAttributes[iNdEx])]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(keysForAttributes[iNdEx])
copy(dAtA[i:], keysForAttributes[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAttributes[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *InstanceFeatureSet) 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 *InstanceFeatureSet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *InstanceFeatureSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Elements) > 0 {
for iNdEx := len(m.Elements) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Elements[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *KeyFeatureSet) 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 *KeyFeatureSet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *KeyFeatureSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Elements) > 0 {
keysForElements := make([]string, 0, len(m.Elements))
for k := range m.Elements {
keysForElements = append(keysForElements, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForElements)
for iNdEx := len(keysForElements) - 1; iNdEx >= 0; iNdEx-- {
v := m.Elements[string(keysForElements[iNdEx])]
baseI := i
{
size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
i -= len(keysForElements[iNdEx])
copy(dAtA[i:], keysForElements[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(keysForElements[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *Nil) 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 *Nil) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Nil) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *ValueFeatureSet) 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 *ValueFeatureSet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ValueFeatureSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Elements) > 0 {
keysForElements := make([]string, 0, len(m.Elements))
for k := range m.Elements {
keysForElements = append(keysForElements, string(k))
}
github_com_gogo_protobuf_sortkeys.Strings(keysForElements)
for iNdEx := len(keysForElements) - 1; iNdEx >= 0; iNdEx-- {
v := m.Elements[string(keysForElements[iNdEx])]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(keysForElements[iNdEx])
copy(dAtA[i:], keysForElements[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(keysForElements[iNdEx])))
i--
dAtA[i] = 0xa
i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
offset -= sovGenerated(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *DomainFeatures) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Keys) > 0 {
for k, v := range m.Keys {
_ = k
_ = v
l = v.Size()
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
}
}
if len(m.Values) > 0 {
for k, v := range m.Values {
_ = k
_ = v
l = v.Size()
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
}
}
if len(m.Instances) > 0 {
for k, v := range m.Instances {
_ = k
_ = v
l = v.Size()
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
}
}
return n
}
func (m *InstanceFeature) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Attributes) > 0 {
for k, v := range m.Attributes {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
}
}
return n
}
func (m *InstanceFeatureSet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Elements) > 0 {
for _, e := range m.Elements {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
}
return n
}
func (m *KeyFeatureSet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Elements) > 0 {
for k, v := range m.Elements {
_ = k
_ = v
l = v.Size()
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
}
}
return n
}
func (m *Nil) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *ValueFeatureSet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Elements) > 0 {
for k, v := range m.Elements {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
}
}
return n
}
func sovGenerated(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGenerated(x uint64) (n int) {
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *DomainFeatures) String() string {
if this == nil {
return "nil"
}
keysForKeys := make([]string, 0, len(this.Keys))
for k := range this.Keys {
keysForKeys = append(keysForKeys, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForKeys)
mapStringForKeys := "map[string]KeyFeatureSet{"
for _, k := range keysForKeys {
mapStringForKeys += fmt.Sprintf("%v: %v,", k, this.Keys[k])
}
mapStringForKeys += "}"
keysForValues := make([]string, 0, len(this.Values))
for k := range this.Values {
keysForValues = append(keysForValues, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForValues)
mapStringForValues := "map[string]ValueFeatureSet{"
for _, k := range keysForValues {
mapStringForValues += fmt.Sprintf("%v: %v,", k, this.Values[k])
}
mapStringForValues += "}"
keysForInstances := make([]string, 0, len(this.Instances))
for k := range this.Instances {
keysForInstances = append(keysForInstances, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForInstances)
mapStringForInstances := "map[string]InstanceFeatureSet{"
for _, k := range keysForInstances {
mapStringForInstances += fmt.Sprintf("%v: %v,", k, this.Instances[k])
}
mapStringForInstances += "}"
s := strings.Join([]string{`&DomainFeatures{`,
`Keys:` + mapStringForKeys + `,`,
`Values:` + mapStringForValues + `,`,
`Instances:` + mapStringForInstances + `,`,
`}`,
}, "")
return s
}
func (this *InstanceFeature) String() string {
if this == nil {
return "nil"
}
keysForAttributes := make([]string, 0, len(this.Attributes))
for k := range this.Attributes {
keysForAttributes = append(keysForAttributes, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes)
mapStringForAttributes := "map[string]string{"
for _, k := range keysForAttributes {
mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[k])
}
mapStringForAttributes += "}"
s := strings.Join([]string{`&InstanceFeature{`,
`Attributes:` + mapStringForAttributes + `,`,
`}`,
}, "")
return s
}
func (this *InstanceFeatureSet) String() string {
if this == nil {
return "nil"
}
repeatedStringForElements := "[]InstanceFeature{"
for _, f := range this.Elements {
repeatedStringForElements += strings.Replace(strings.Replace(f.String(), "InstanceFeature", "InstanceFeature", 1), `&`, ``, 1) + ","
}
repeatedStringForElements += "}"
s := strings.Join([]string{`&InstanceFeatureSet{`,
`Elements:` + repeatedStringForElements + `,`,
`}`,
}, "")
return s
}
func (this *KeyFeatureSet) String() string {
if this == nil {
return "nil"
}
keysForElements := make([]string, 0, len(this.Elements))
for k := range this.Elements {
keysForElements = append(keysForElements, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForElements)
mapStringForElements := "map[string]Nil{"
for _, k := range keysForElements {
mapStringForElements += fmt.Sprintf("%v: %v,", k, this.Elements[k])
}
mapStringForElements += "}"
s := strings.Join([]string{`&KeyFeatureSet{`,
`Elements:` + mapStringForElements + `,`,
`}`,
}, "")
return s
}
func (this *Nil) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Nil{`,
`}`,
}, "")
return s
}
func (this *ValueFeatureSet) String() string {
if this == nil {
return "nil"
}
keysForElements := make([]string, 0, len(this.Elements))
for k := range this.Elements {
keysForElements = append(keysForElements, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForElements)
mapStringForElements := "map[string]string{"
for _, k := range keysForElements {
mapStringForElements += fmt.Sprintf("%v: %v,", k, this.Elements[k])
}
mapStringForElements += "}"
s := strings.Join([]string{`&ValueFeatureSet{`,
`Elements:` + mapStringForElements + `,`,
`}`,
}, "")
return s
}
func valueToStringGenerated(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *DomainFeatures) 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 ErrIntOverflowGenerated
}
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: DomainFeatures: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DomainFeatures: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Keys == nil {
m.Keys = make(map[string]KeyFeatureSet)
}
var mapkey string
mapvalue := &KeyFeatureSet{}
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthGenerated
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthGenerated
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &KeyFeatureSet{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Keys[mapkey] = *mapvalue
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Values == nil {
m.Values = make(map[string]ValueFeatureSet)
}
var mapkey string
mapvalue := &ValueFeatureSet{}
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthGenerated
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthGenerated
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &ValueFeatureSet{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Values[mapkey] = *mapvalue
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Instances", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Instances == nil {
m.Instances = make(map[string]InstanceFeatureSet)
}
var mapkey string
mapvalue := &InstanceFeatureSet{}
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthGenerated
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthGenerated
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &InstanceFeatureSet{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Instances[mapkey] = *mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *InstanceFeature) 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 ErrIntOverflowGenerated
}
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: InstanceFeature: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: InstanceFeature: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
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 ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Attributes == nil {
m.Attributes = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Attributes[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *InstanceFeatureSet) 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 ErrIntOverflowGenerated
}
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: InstanceFeatureSet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: InstanceFeatureSet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Elements = append(m.Elements, InstanceFeature{})
if err := m.Elements[len(m.Elements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *KeyFeatureSet) 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 ErrIntOverflowGenerated
}
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: KeyFeatureSet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: KeyFeatureSet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Elements == nil {
m.Elements = make(map[string]Nil)
}
var mapkey string
mapvalue := &Nil{}
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthGenerated
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthGenerated
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &Nil{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Elements[mapkey] = *mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Nil) 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 ErrIntOverflowGenerated
}
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: Nil: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ValueFeatureSet) 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 ErrIntOverflowGenerated
}
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: ValueFeatureSet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ValueFeatureSet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Elements == nil {
m.Elements = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthGenerated
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthGenerated
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Elements[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGenerated(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, ErrIntOverflowGenerated
}
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, ErrIntOverflowGenerated
}
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, ErrIntOverflowGenerated
}
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, ErrInvalidLengthGenerated
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGenerated
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGenerated
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)