From 281b1ba161d153586546f531e45d01db44093ab8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 07:20:42 +0000 Subject: [PATCH] Bump sigs.k8s.io/node-feature-discovery/api/nfd from 0.16.6 to 0.17.0 Bumps [sigs.k8s.io/node-feature-discovery/api/nfd](https://github.com/kubernetes-sigs/node-feature-discovery) from 0.16.6 to 0.17.0. - [Release notes](https://github.com/kubernetes-sigs/node-feature-discovery/releases) - [Commits](https://github.com/kubernetes-sigs/node-feature-discovery/compare/v0.16.6...v0.17.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/node-feature-discovery/api/nfd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- vendor/modules.txt | 2 +- .../api/nfd/v1alpha1/doc.go | 2 - .../api/nfd/v1alpha1/generate.sh | 12 - .../api/nfd/v1alpha1/generated.pb.go | 2037 ----------------- .../api/nfd/v1alpha1/generated.proto | 77 - .../api/nfd/v1alpha1/types.go | 29 +- .../api/nfd/v1alpha1/utils.go | 29 + 9 files changed, 42 insertions(+), 2152 deletions(-) delete mode 100644 vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generate.sh delete mode 100644 vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.pb.go delete mode 100644 vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.proto create mode 100644 vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/utils.go diff --git a/go.mod b/go.mod index 8f827bb5e..6b24a2d7e 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( k8s.io/kubelet v0.31.3 k8s.io/mount-utils v0.31.3 sigs.k8s.io/node-feature-discovery v0.16.6 - sigs.k8s.io/node-feature-discovery/api/nfd v0.16.6 + sigs.k8s.io/node-feature-discovery/api/nfd v0.17.0 sigs.k8s.io/yaml v1.4.0 tags.cncf.io/container-device-interface v0.8.0 tags.cncf.io/container-device-interface/specs-go v0.8.0 diff --git a/go.sum b/go.sum index e613bf864..04e254f63 100644 --- a/go.sum +++ b/go.sum @@ -220,8 +220,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/node-feature-discovery v0.16.6 h1:G+n0gStHnLojsLVLgP/ArsC2gwP1fkw7TrHr0MJ4x8k= sigs.k8s.io/node-feature-discovery v0.16.6/go.mod h1:7qS1l8P6UdfLa/ec8VneMvINbdWbuhTuuQr1wZ7/Jbg= -sigs.k8s.io/node-feature-discovery/api/nfd v0.16.6 h1:07AwnEocbzPG98VIwkskfac6fVwzumZMGt9ePyAa60I= -sigs.k8s.io/node-feature-discovery/api/nfd v0.16.6/go.mod h1:p8V8+A+enKGj31HFeBSpuTjfe6WUdIG0nl0Yze/d/+Q= +sigs.k8s.io/node-feature-discovery/api/nfd v0.17.0 h1:Z9CMhJ+Kfz+m8InwzU/cbKYhE7WFWSAuUNSqIJGzkvY= +sigs.k8s.io/node-feature-discovery/api/nfd v0.17.0/go.mod h1:LxvqM3WtCMHxCFvJ6faI16O1BbW0eekHGg/jwxecF3M= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/vendor/modules.txt b/vendor/modules.txt index 8ce1cbc63..d89abb071 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -618,7 +618,7 @@ sigs.k8s.io/json/internal/golang/encoding/json sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/typed/nfd/v1alpha1 -# sigs.k8s.io/node-feature-discovery/api/nfd v0.16.6 +# sigs.k8s.io/node-feature-discovery/api/nfd v0.17.0 ## explicit; go 1.22.2 sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1 # sigs.k8s.io/structured-merge-diff/v4 v4.4.1 diff --git a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/doc.go b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/doc.go index 17b8fc585..32b425965 100644 --- a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/doc.go +++ b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/doc.go @@ -19,5 +19,3 @@ limitations under the License. // +kubebuilder:object:generate=true // +groupName=nfd.k8s-sigs.io package v1alpha1 - -//go:generate ./generate.sh diff --git a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generate.sh b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generate.sh deleted file mode 100644 index d4fe85392..000000000 --- a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generate.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -ex - -go-to-protobuf \ - --output-base=. \ - --go-header-file ../../../../hack/boilerplate.go.txt \ - --proto-import ../../../../vendor/ \ - --packages +sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1=v1alpha1 \ - --keep-gogoproto=false \ - --apimachinery-packages "-k8s.io/apimachinery/pkg/util/intstr" - -mv sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/* . -rm -rf sigs.k8s.io diff --git a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.pb.go b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.pb.go deleted file mode 100644 index 4231691e4..000000000 --- a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.pb.go +++ /dev/null @@ -1,2037 +0,0 @@ -/* -Copyright 2024 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: sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/generated.proto - -package v1alpha1 - -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 *AttributeFeatureSet) Reset() { *m = AttributeFeatureSet{} } -func (*AttributeFeatureSet) ProtoMessage() {} -func (*AttributeFeatureSet) Descriptor() ([]byte, []int) { - return fileDescriptor_6f67d44e41cfe439, []int{0} -} -func (m *AttributeFeatureSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttributeFeatureSet) 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 *AttributeFeatureSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttributeFeatureSet.Merge(m, src) -} -func (m *AttributeFeatureSet) XXX_Size() int { - return m.Size() -} -func (m *AttributeFeatureSet) XXX_DiscardUnknown() { - xxx_messageInfo_AttributeFeatureSet.DiscardUnknown(m) -} - -var xxx_messageInfo_AttributeFeatureSet proto.InternalMessageInfo - -func (m *Features) Reset() { *m = Features{} } -func (*Features) ProtoMessage() {} -func (*Features) Descriptor() ([]byte, []int) { - return fileDescriptor_6f67d44e41cfe439, []int{1} -} -func (m *Features) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Features) 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 *Features) XXX_Merge(src proto.Message) { - xxx_messageInfo_Features.Merge(m, src) -} -func (m *Features) XXX_Size() int { - return m.Size() -} -func (m *Features) XXX_DiscardUnknown() { - xxx_messageInfo_Features.DiscardUnknown(m) -} - -var xxx_messageInfo_Features proto.InternalMessageInfo - -func (m *FlagFeatureSet) Reset() { *m = FlagFeatureSet{} } -func (*FlagFeatureSet) ProtoMessage() {} -func (*FlagFeatureSet) Descriptor() ([]byte, []int) { - return fileDescriptor_6f67d44e41cfe439, []int{2} -} -func (m *FlagFeatureSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlagFeatureSet) 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 *FlagFeatureSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlagFeatureSet.Merge(m, src) -} -func (m *FlagFeatureSet) XXX_Size() int { - return m.Size() -} -func (m *FlagFeatureSet) XXX_DiscardUnknown() { - xxx_messageInfo_FlagFeatureSet.DiscardUnknown(m) -} - -var xxx_messageInfo_FlagFeatureSet proto.InternalMessageInfo - -func (m *InstanceFeature) Reset() { *m = InstanceFeature{} } -func (*InstanceFeature) ProtoMessage() {} -func (*InstanceFeature) Descriptor() ([]byte, []int) { - return fileDescriptor_6f67d44e41cfe439, []int{3} -} -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_6f67d44e41cfe439, []int{4} -} -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 *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} -func (*Nil) Descriptor() ([]byte, []int) { - return fileDescriptor_6f67d44e41cfe439, []int{5} -} -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 init() { - proto.RegisterType((*AttributeFeatureSet)(nil), "v1alpha1.AttributeFeatureSet") - proto.RegisterMapType((map[string]string)(nil), "v1alpha1.AttributeFeatureSet.ElementsEntry") - proto.RegisterType((*Features)(nil), "v1alpha1.Features") - proto.RegisterMapType((map[string]FlagFeatureSet)(nil), "v1alpha1.Features.FlagsEntry") - proto.RegisterMapType((map[string]InstanceFeatureSet)(nil), "v1alpha1.Features.InstancesEntry") - proto.RegisterMapType((map[string]AttributeFeatureSet)(nil), "v1alpha1.Features.VattributesEntry") - proto.RegisterType((*FlagFeatureSet)(nil), "v1alpha1.FlagFeatureSet") - proto.RegisterMapType((map[string]Nil)(nil), "v1alpha1.FlagFeatureSet.ElementsEntry") - proto.RegisterType((*InstanceFeature)(nil), "v1alpha1.InstanceFeature") - proto.RegisterMapType((map[string]string)(nil), "v1alpha1.InstanceFeature.AttributesEntry") - proto.RegisterType((*InstanceFeatureSet)(nil), "v1alpha1.InstanceFeatureSet") - proto.RegisterType((*Nil)(nil), "v1alpha1.Nil") -} - -func init() { - proto.RegisterFile("sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/generated.proto", fileDescriptor_6f67d44e41cfe439) -} - -var fileDescriptor_6f67d44e41cfe439 = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcd, 0x6e, 0xda, 0x40, - 0x10, 0xc7, 0xbd, 0x50, 0x24, 0x18, 0x44, 0x42, 0xb7, 0x3d, 0xb8, 0x56, 0xe3, 0xa4, 0x44, 0xaa, - 0x52, 0x55, 0xd8, 0x0a, 0xbd, 0xa0, 0x56, 0x3d, 0x04, 0x29, 0xe9, 0xc7, 0x21, 0x07, 0xb7, 0xaa, - 0x94, 0x48, 0x54, 0x5a, 0x60, 0x71, 0x56, 0x38, 0x36, 0xf2, 0xae, 0x91, 0xb8, 0xf5, 0x01, 0x7a, - 0xe8, 0x8b, 0x54, 0x95, 0xfa, 0x14, 0x1c, 0x73, 0xcc, 0x29, 0x2a, 0xee, 0x8b, 0x54, 0xf1, 0x07, - 0xb6, 0x83, 0x01, 0x35, 0x37, 0xef, 0xec, 0xcc, 0x6f, 0xe6, 0xff, 0xdf, 0x01, 0x78, 0xcf, 0x99, - 0xc9, 0xb5, 0x51, 0x9b, 0x6b, 0xcc, 0xd1, 0x6d, 0x67, 0x40, 0x9b, 0x43, 0x4a, 0x84, 0xe7, 0xd2, - 0xe6, 0x80, 0xf1, 0xbe, 0x33, 0xa1, 0xee, 0x54, 0x1f, 0x8f, 0x4c, 0x9d, 0x8c, 0x19, 0xd7, 0xed, - 0xe1, 0x40, 0x9f, 0x1c, 0x12, 0x6b, 0x7c, 0x41, 0x0e, 0x75, 0x93, 0xda, 0xd4, 0x25, 0x82, 0x0e, - 0xb4, 0xb1, 0xeb, 0x08, 0x07, 0x97, 0xe3, 0x1b, 0xa5, 0x69, 0x32, 0x71, 0xe1, 0xf5, 0xb4, 0xbe, - 0x73, 0xa9, 0x9b, 0x8e, 0xe9, 0xe8, 0x41, 0x42, 0xcf, 0x1b, 0x06, 0xa7, 0xe0, 0x10, 0x7c, 0x85, - 0x85, 0x8d, 0x9f, 0x08, 0x1e, 0x1d, 0x09, 0xe1, 0xb2, 0x9e, 0x27, 0xe8, 0x49, 0xd8, 0xfd, 0x13, - 0x15, 0xf8, 0x0c, 0xca, 0xd4, 0xa2, 0x97, 0xd4, 0x16, 0x5c, 0x46, 0x7b, 0xc5, 0x83, 0x6a, 0xeb, - 0xa5, 0x16, 0xf7, 0xd0, 0x72, 0x0a, 0xb4, 0xe3, 0x28, 0xfb, 0xd8, 0x16, 0xee, 0xb4, 0x53, 0x9f, - 0xdd, 0xec, 0x4a, 0xfe, 0xcd, 0x6e, 0x39, 0x0e, 0x1b, 0x0b, 0x9c, 0xf2, 0x06, 0x6a, 0x99, 0x64, - 0x5c, 0x87, 0xe2, 0x88, 0x4e, 0x65, 0xb4, 0x87, 0x0e, 0x2a, 0xc6, 0xed, 0x27, 0x7e, 0x0c, 0xa5, - 0x09, 0xb1, 0x3c, 0x2a, 0x17, 0x82, 0x58, 0x78, 0x78, 0x5d, 0x68, 0xa3, 0xc6, 0xf7, 0x07, 0x50, - 0x8e, 0xba, 0x72, 0xdc, 0x81, 0xd2, 0xd0, 0x22, 0x66, 0x3c, 0xe1, 0x4e, 0x32, 0x61, 0x9c, 0xa2, - 0x9d, 0xdc, 0xde, 0x87, 0x33, 0xd5, 0xa2, 0x99, 0x4a, 0x41, 0xcc, 0x08, 0x4b, 0xf1, 0x19, 0x54, - 0x27, 0x24, 0xd6, 0xc3, 0xe5, 0x42, 0x40, 0xda, 0xcf, 0x21, 0x7d, 0x49, 0xb2, 0x42, 0x1e, 0x8e, - 0x78, 0xb0, 0xb0, 0x83, 0x1b, 0x69, 0x16, 0x36, 0xa0, 0xc2, 0x6c, 0x2e, 0x88, 0xdd, 0xa7, 0x5c, - 0x2e, 0x06, 0xe0, 0x67, 0x39, 0xe0, 0x0f, 0x71, 0x4e, 0x88, 0x7d, 0x18, 0x61, 0x2b, 0x8b, 0xb8, - 0x91, 0x60, 0x14, 0x03, 0x20, 0x91, 0x94, 0xe3, 0x9c, 0x96, 0x76, 0xae, 0xda, 0x92, 0x53, 0xfd, - 0x2c, 0x62, 0x26, 0xef, 0x95, 0xf2, 0x54, 0xe9, 0x42, 0xfd, 0xae, 0xb8, 0x1c, 0xf2, 0xab, 0x2c, - 0x79, 0x67, 0xed, 0x3a, 0xa4, 0xf1, 0xe7, 0xb0, 0x95, 0x95, 0x98, 0x03, 0x6f, 0x65, 0xe1, 0x4f, - 0x13, 0x78, 0x5c, 0x9a, 0xcb, 0x6e, 0xfc, 0x46, 0xb0, 0x95, 0x15, 0x86, 0x3f, 0x2f, 0x6d, 0xee, - 0xf3, 0x55, 0x26, 0xfc, 0xc7, 0xd2, 0x7e, 0xdc, 0xbc, 0xb4, 0xfb, 0x59, 0x0d, 0xb5, 0xa4, 0xeb, - 0x29, 0xb3, 0xd2, 0x43, 0xff, 0x42, 0xb0, 0x7d, 0x47, 0x16, 0xee, 0x02, 0xa4, 0xb6, 0x30, 0x9c, - 0xfb, 0xc5, 0x4a, 0x17, 0x12, 0xcb, 0xd7, 0xec, 0x62, 0x0a, 0xa8, 0xbc, 0x85, 0xed, 0xa3, 0x8d, - 0x2f, 0xbc, 0xfa, 0x57, 0xd7, 0x05, 0xbc, 0xfc, 0x0e, 0xf8, 0xdd, 0x92, 0xd3, 0x4f, 0x56, 0x4e, - 0xbc, 0xce, 0xdc, 0x46, 0x09, 0x8a, 0xa7, 0xcc, 0xea, 0x7c, 0x9d, 0xcd, 0x55, 0xe9, 0x6a, 0xae, - 0x4a, 0xd7, 0x73, 0x55, 0xfa, 0xe6, 0xab, 0x68, 0xe6, 0xab, 0xe8, 0xca, 0x57, 0xd1, 0xb5, 0xaf, - 0xa2, 0x3f, 0xbe, 0x8a, 0x7e, 0xfc, 0x55, 0xa5, 0xf3, 0xf6, 0x7d, 0xff, 0x34, 0xff, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xa9, 0x81, 0xcf, 0x6d, 0x6f, 0x05, 0x00, 0x00, -} - -func (m *AttributeFeatureSet) 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 *AttributeFeatureSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttributeFeatureSet) 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 (m *Features) 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 *Features) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Features) 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.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 - { - 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(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] = 0x12 - } - } - if len(m.Flags) > 0 { - keysForFlags := make([]string, 0, len(m.Flags)) - for k := range m.Flags { - keysForFlags = append(keysForFlags, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForFlags) - for iNdEx := len(keysForFlags) - 1; iNdEx >= 0; iNdEx-- { - v := m.Flags[string(keysForFlags[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(keysForFlags[iNdEx]) - copy(dAtA[i:], keysForFlags[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForFlags[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *FlagFeatureSet) 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 *FlagFeatureSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FlagFeatureSet) 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 *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 *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 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 *AttributeFeatureSet) 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 (m *Features) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Flags) > 0 { - for k, v := range m.Flags { - _ = 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.Attributes) > 0 { - for k, v := range m.Attributes { - _ = 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 *FlagFeatureSet) 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 *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 *Nil) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - 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 *AttributeFeatureSet) 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{`&AttributeFeatureSet{`, - `Elements:` + mapStringForElements + `,`, - `}`, - }, "") - return s -} -func (this *Features) String() string { - if this == nil { - return "nil" - } - keysForFlags := make([]string, 0, len(this.Flags)) - for k := range this.Flags { - keysForFlags = append(keysForFlags, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForFlags) - mapStringForFlags := "map[string]FlagFeatureSet{" - for _, k := range keysForFlags { - mapStringForFlags += fmt.Sprintf("%v: %v,", k, this.Flags[k]) - } - mapStringForFlags += "}" - 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]AttributeFeatureSet{" - for _, k := range keysForAttributes { - mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[k]) - } - mapStringForAttributes += "}" - 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{`&Features{`, - `Flags:` + mapStringForFlags + `,`, - `Attributes:` + mapStringForAttributes + `,`, - `Instances:` + mapStringForInstances + `,`, - `}`, - }, "") - return s -} -func (this *FlagFeatureSet) 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{`&FlagFeatureSet{`, - `Elements:` + mapStringForElements + `,`, - `}`, - }, "") - 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 *Nil) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nil{`, - `}`, - }, "") - 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 *AttributeFeatureSet) 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: AttributeFeatureSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeFeatureSet: 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 (m *Features) 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: Features: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Features: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", 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.Flags == nil { - m.Flags = make(map[string]FlagFeatureSet) - } - var mapkey string - mapvalue := &FlagFeatureSet{} - 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 = &FlagFeatureSet{} - 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.Flags[mapkey] = *mapvalue - iNdEx = postIndex - case 2: - 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]AttributeFeatureSet) - } - var mapkey string - mapvalue := &AttributeFeatureSet{} - 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 = &AttributeFeatureSet{} - 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.Attributes[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 *FlagFeatureSet) 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: FlagFeatureSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FlagFeatureSet: 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 *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 *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 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") -) diff --git a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.proto b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.proto deleted file mode 100644 index dab35a16a..000000000 --- a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/generated.proto +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2024 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package v1alpha1; - -// Package-wide variables from generator "generated". -option go_package = "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1"; - -// AttributeFeatureSet is a set of features having string value. -// -// +protobuf=true -message AttributeFeatureSet { - map elements = 1; -} - -// Features is the collection of all discovered features. -// -// +protobuf=true -message Features { - // Flags contains all the flag-type features of the node. - // +optional - map flags = 1; - - // Attributes contains all the attribute-type features of the node. - // +optional - map vattributes = 2; - - // Instances contains all the instance-type features of the node. - // +optional - map instances = 3; -} - -// FlagFeatureSet is a set of simple features only containing names without values. -// -// +protobuf=true -message FlagFeatureSet { - map elements = 1; -} - -// InstanceFeature represents one instance of a complex features, e.g. a device. -// -// +protobuf=true -message InstanceFeature { - map attributes = 1; -} - -// InstanceFeatureSet is a set of features each of which is an instance having multiple attributes. -// -// +protobuf=true -message InstanceFeatureSet { - repeated InstanceFeature elements = 1; -} - -// Nil is a dummy empty struct for protobuf compatibility -// -// +protobuf=true -message Nil { -} - diff --git a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/types.go b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/types.go index c89efd818..67dfc1b06 100644 --- a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/types.go +++ b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/types.go @@ -56,55 +56,44 @@ type NodeFeatureSpec struct { } // Features is the collection of all discovered features. -// -// +protobuf=true type Features struct { // Flags contains all the flag-type features of the node. // +optional - Flags map[string]FlagFeatureSet `json:"flags" protobuf:"bytes,1,rep,name=flags"` + Flags map[string]FlagFeatureSet `json:"flags"` // Attributes contains all the attribute-type features of the node. // +optional - Attributes map[string]AttributeFeatureSet `json:"attributes" protobuf:"bytes,2,rep,name=vattributes"` + Attributes map[string]AttributeFeatureSet `json:"attributes"` // Instances contains all the instance-type features of the node. // +optional - Instances map[string]InstanceFeatureSet `json:"instances" protobuf:"bytes,3,rep,name=instances"` + Instances map[string]InstanceFeatureSet `json:"instances"` } // FlagFeatureSet is a set of simple features only containing names without values. -// -// +protobuf=true type FlagFeatureSet struct { // Individual features of the feature set. - Elements map[string]Nil `json:"elements" protobuf:"bytes,1,rep,name=elements"` + Elements map[string]Nil `json:"elements"` } // AttributeFeatureSet is a set of features having string value. -// -// +protobuf=true type AttributeFeatureSet struct { // Individual features of the feature set. - Elements map[string]string `json:"elements" protobuf:"bytes,1,rep,name=elements"` + Elements map[string]string `json:"elements"` } // InstanceFeatureSet is a set of features each of which is an instance having multiple attributes. -// -// +protobuf=true type InstanceFeatureSet struct { // Individual features of the feature set. - Elements []InstanceFeature `json:"elements" protobuf:"bytes,1,rep,name=elements"` + Elements []InstanceFeature `json:"elements"` } // InstanceFeature represents one instance of a complex features, e.g. a device. -// -// +protobuf=true type InstanceFeature struct { // Attributes of the instance feature. - Attributes map[string]string `json:"attributes" protobuf:"bytes,1,rep,name=attributes"` + Attributes map[string]string `json:"attributes"` } -// Nil is a dummy empty struct for protobuf compatibility -// -// +protobuf=true +// Nil is a dummy empty struct for protobuf compatibility. +// NOTE: protobuf definitions have been removed but this is kept for API compatibility. type Nil struct{} // NodeFeatureRuleList contains a list of NodeFeatureRule objects. diff --git a/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/utils.go b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/utils.go new file mode 100644 index 000000000..49c34a426 --- /dev/null +++ b/vendor/sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1/utils.go @@ -0,0 +1,29 @@ +/* +Copyright 2024 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. +*/ + +package v1alpha1 + +import ( + "fmt" +) + +// String represents the match expression as a string type. +func (m MatchExpression) String() string { + if len(m.Value) < 1 { + return fmt.Sprintf("{op: %q}", m.Op) + } + return fmt.Sprintf("{op: %q, value: %q}", m.Op, m.Value) +}