generated.pb.go 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  14. // source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1/generated.proto
  15. package v1
  16. import (
  17. fmt "fmt"
  18. io "io"
  19. proto "github.com/gogo/protobuf/proto"
  20. github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
  21. k8s_io_api_core_v1 "k8s.io/api/core/v1"
  22. v11 "k8s.io/api/core/v1"
  23. k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
  24. resource "k8s.io/apimachinery/pkg/api/resource"
  25. math "math"
  26. math_bits "math/bits"
  27. reflect "reflect"
  28. strings "strings"
  29. )
  30. // Reference imports to suppress errors if they are not otherwise used.
  31. var _ = proto.Marshal
  32. var _ = fmt.Errorf
  33. var _ = math.Inf
  34. // This is a compile-time assertion to ensure that this generated file
  35. // is compatible with the proto package it is being compiled against.
  36. // A compilation error at this line likely means your copy of the
  37. // proto package needs to be updated.
  38. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  39. func (m *Overhead) Reset() { *m = Overhead{} }
  40. func (*Overhead) ProtoMessage() {}
  41. func (*Overhead) Descriptor() ([]byte, []int) {
  42. return fileDescriptor_6ac9be560e26ae98, []int{0}
  43. }
  44. func (m *Overhead) XXX_Unmarshal(b []byte) error {
  45. return m.Unmarshal(b)
  46. }
  47. func (m *Overhead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  48. b = b[:cap(b)]
  49. n, err := m.MarshalToSizedBuffer(b)
  50. if err != nil {
  51. return nil, err
  52. }
  53. return b[:n], nil
  54. }
  55. func (m *Overhead) XXX_Merge(src proto.Message) {
  56. xxx_messageInfo_Overhead.Merge(m, src)
  57. }
  58. func (m *Overhead) XXX_Size() int {
  59. return m.Size()
  60. }
  61. func (m *Overhead) XXX_DiscardUnknown() {
  62. xxx_messageInfo_Overhead.DiscardUnknown(m)
  63. }
  64. var xxx_messageInfo_Overhead proto.InternalMessageInfo
  65. func (m *RuntimeClass) Reset() { *m = RuntimeClass{} }
  66. func (*RuntimeClass) ProtoMessage() {}
  67. func (*RuntimeClass) Descriptor() ([]byte, []int) {
  68. return fileDescriptor_6ac9be560e26ae98, []int{1}
  69. }
  70. func (m *RuntimeClass) XXX_Unmarshal(b []byte) error {
  71. return m.Unmarshal(b)
  72. }
  73. func (m *RuntimeClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  74. b = b[:cap(b)]
  75. n, err := m.MarshalToSizedBuffer(b)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return b[:n], nil
  80. }
  81. func (m *RuntimeClass) XXX_Merge(src proto.Message) {
  82. xxx_messageInfo_RuntimeClass.Merge(m, src)
  83. }
  84. func (m *RuntimeClass) XXX_Size() int {
  85. return m.Size()
  86. }
  87. func (m *RuntimeClass) XXX_DiscardUnknown() {
  88. xxx_messageInfo_RuntimeClass.DiscardUnknown(m)
  89. }
  90. var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo
  91. func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} }
  92. func (*RuntimeClassList) ProtoMessage() {}
  93. func (*RuntimeClassList) Descriptor() ([]byte, []int) {
  94. return fileDescriptor_6ac9be560e26ae98, []int{2}
  95. }
  96. func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error {
  97. return m.Unmarshal(b)
  98. }
  99. func (m *RuntimeClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  100. b = b[:cap(b)]
  101. n, err := m.MarshalToSizedBuffer(b)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return b[:n], nil
  106. }
  107. func (m *RuntimeClassList) XXX_Merge(src proto.Message) {
  108. xxx_messageInfo_RuntimeClassList.Merge(m, src)
  109. }
  110. func (m *RuntimeClassList) XXX_Size() int {
  111. return m.Size()
  112. }
  113. func (m *RuntimeClassList) XXX_DiscardUnknown() {
  114. xxx_messageInfo_RuntimeClassList.DiscardUnknown(m)
  115. }
  116. var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo
  117. func (m *Scheduling) Reset() { *m = Scheduling{} }
  118. func (*Scheduling) ProtoMessage() {}
  119. func (*Scheduling) Descriptor() ([]byte, []int) {
  120. return fileDescriptor_6ac9be560e26ae98, []int{3}
  121. }
  122. func (m *Scheduling) XXX_Unmarshal(b []byte) error {
  123. return m.Unmarshal(b)
  124. }
  125. func (m *Scheduling) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  126. b = b[:cap(b)]
  127. n, err := m.MarshalToSizedBuffer(b)
  128. if err != nil {
  129. return nil, err
  130. }
  131. return b[:n], nil
  132. }
  133. func (m *Scheduling) XXX_Merge(src proto.Message) {
  134. xxx_messageInfo_Scheduling.Merge(m, src)
  135. }
  136. func (m *Scheduling) XXX_Size() int {
  137. return m.Size()
  138. }
  139. func (m *Scheduling) XXX_DiscardUnknown() {
  140. xxx_messageInfo_Scheduling.DiscardUnknown(m)
  141. }
  142. var xxx_messageInfo_Scheduling proto.InternalMessageInfo
  143. func init() {
  144. proto.RegisterType((*Overhead)(nil), "k8s.io.api.node.v1.Overhead")
  145. proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "k8s.io.api.node.v1.Overhead.PodFixedEntry")
  146. proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1.RuntimeClass")
  147. proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1.RuntimeClassList")
  148. proto.RegisterType((*Scheduling)(nil), "k8s.io.api.node.v1.Scheduling")
  149. proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.node.v1.Scheduling.NodeSelectorEntry")
  150. }
  151. func init() {
  152. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1/generated.proto", fileDescriptor_6ac9be560e26ae98)
  153. }
  154. var fileDescriptor_6ac9be560e26ae98 = []byte{
  155. // 656 bytes of a gzipped FileDescriptorProto
  156. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x31, 0x6f, 0xd3, 0x40,
  157. 0x14, 0xce, 0xa5, 0x54, 0x4d, 0x2f, 0x29, 0x94, 0xa3, 0x43, 0x14, 0x21, 0x27, 0xca, 0x14, 0x90,
  158. 0x7a, 0x6e, 0x2b, 0x84, 0x2a, 0x18, 0x90, 0x0c, 0xad, 0x40, 0x82, 0x02, 0x2e, 0x2c, 0x88, 0x81,
  159. 0x8b, 0xfd, 0x70, 0xdc, 0xc4, 0xbe, 0xe8, 0x7c, 0x8e, 0xc8, 0x86, 0x58, 0x90, 0x98, 0xfa, 0x5f,
  160. 0x18, 0xf8, 0x0b, 0x15, 0x53, 0xc7, 0x4e, 0x2d, 0x0d, 0xff, 0x82, 0x09, 0xdd, 0xd9, 0x4e, 0x5c,
  161. 0x12, 0x42, 0xd9, 0xee, 0xde, 0x7d, 0xdf, 0xf7, 0xde, 0xfb, 0xde, 0x3d, 0x7c, 0xbf, 0xbb, 0x1d,
  162. 0x51, 0x9f, 0x9b, 0xdd, 0xb8, 0x0d, 0x22, 0x04, 0x09, 0x91, 0x39, 0x80, 0xd0, 0xe5, 0xc2, 0x4c,
  163. 0x1f, 0x58, 0xdf, 0x37, 0x43, 0xee, 0x82, 0x39, 0xd8, 0x34, 0x3d, 0x08, 0x41, 0x30, 0x09, 0x2e,
  164. 0xed, 0x0b, 0x2e, 0x39, 0x21, 0x09, 0x86, 0xb2, 0xbe, 0x4f, 0x15, 0x86, 0x0e, 0x36, 0x6b, 0xeb,
  165. 0x9e, 0x2f, 0x3b, 0x71, 0x9b, 0x3a, 0x3c, 0x30, 0x3d, 0xee, 0x71, 0x53, 0x43, 0xdb, 0xf1, 0x7b,
  166. 0x7d, 0xd3, 0x17, 0x7d, 0x4a, 0x24, 0x6a, 0xcd, 0x5c, 0x1a, 0x87, 0x8b, 0x59, 0x69, 0x6a, 0x77,
  167. 0x26, 0x98, 0x80, 0x39, 0x1d, 0x3f, 0x04, 0x31, 0x34, 0xfb, 0x5d, 0x4f, 0x93, 0x04, 0x44, 0x3c,
  168. 0x16, 0x0e, 0xfc, 0x17, 0x2b, 0x32, 0x03, 0x90, 0x6c, 0x56, 0x2e, 0xf3, 0x6f, 0x2c, 0x11, 0x87,
  169. 0xd2, 0x0f, 0xa6, 0xd3, 0xdc, 0xfd, 0x17, 0x21, 0x72, 0x3a, 0x10, 0xb0, 0x3f, 0x79, 0xcd, 0xef,
  170. 0x45, 0x5c, 0x7a, 0x3e, 0x00, 0xd1, 0x01, 0xe6, 0x92, 0x63, 0x84, 0x4b, 0x7d, 0xee, 0xee, 0xfa,
  171. 0x1f, 0xc0, 0xad, 0xa2, 0xc6, 0x42, 0xab, 0xbc, 0x75, 0x9b, 0x4e, 0x9b, 0x4b, 0x33, 0x02, 0x7d,
  172. 0x91, 0x82, 0x77, 0x42, 0x29, 0x86, 0xd6, 0x67, 0x74, 0x74, 0x5a, 0x2f, 0x8c, 0x4e, 0xeb, 0xa5,
  173. 0x2c, 0xfe, 0xeb, 0xb4, 0x5e, 0x9f, 0x76, 0x96, 0xda, 0xa9, 0x59, 0x4f, 0xfd, 0x48, 0x7e, 0x3a,
  174. 0x9b, 0x0b, 0xd9, 0x63, 0x01, 0x7c, 0x39, 0xab, 0xaf, 0x5f, 0xc6, 0x7b, 0xfa, 0x32, 0x66, 0xa1,
  175. 0xf4, 0xe5, 0xd0, 0x1e, 0x77, 0x51, 0xeb, 0xe2, 0x95, 0x0b, 0x45, 0x92, 0x55, 0xbc, 0xd0, 0x85,
  176. 0x61, 0x15, 0x35, 0x50, 0x6b, 0xd9, 0x56, 0x47, 0xf2, 0x08, 0x2f, 0x0e, 0x58, 0x2f, 0x86, 0x6a,
  177. 0xb1, 0x81, 0x5a, 0xe5, 0x2d, 0x9a, 0xeb, 0x78, 0x9c, 0x8b, 0xf6, 0xbb, 0x9e, 0xb6, 0x60, 0x3a,
  178. 0x57, 0x42, 0xbe, 0x57, 0xdc, 0x46, 0xcd, 0xaf, 0x45, 0x5c, 0xb1, 0x13, 0xbf, 0x1f, 0xf6, 0x58,
  179. 0x14, 0x91, 0x77, 0xb8, 0xa4, 0x26, 0xec, 0x32, 0xc9, 0x74, 0xc6, 0xf2, 0xd6, 0xc6, 0x3c, 0xf5,
  180. 0x88, 0x2a, 0xb4, 0x76, 0xb8, 0x7d, 0x00, 0x8e, 0x7c, 0x06, 0x92, 0x59, 0x24, 0x35, 0x15, 0x4f,
  181. 0x62, 0xf6, 0x58, 0x95, 0xdc, 0xc2, 0x4b, 0x1d, 0x16, 0xba, 0x3d, 0x10, 0xba, 0xfc, 0x65, 0xeb,
  182. 0x5a, 0x0a, 0x5f, 0x7a, 0x9c, 0x84, 0xed, 0xec, 0x9d, 0xec, 0xe2, 0x12, 0x4f, 0x07, 0x57, 0x5d,
  183. 0xd0, 0xc5, 0xdc, 0x9c, 0x37, 0x5c, 0xab, 0xa2, 0x26, 0x99, 0xdd, 0xec, 0x31, 0x97, 0xec, 0x61,
  184. 0xac, 0x3e, 0x93, 0x1b, 0xf7, 0xfc, 0xd0, 0xab, 0x5e, 0xd1, 0x4a, 0xc6, 0x2c, 0xa5, 0xfd, 0x31,
  185. 0xca, 0xba, 0xaa, 0x1a, 0x98, 0xdc, 0xed, 0x9c, 0x42, 0xf3, 0x1b, 0xc2, 0xab, 0x79, 0xd7, 0xd4,
  186. 0xaf, 0x20, 0x6f, 0xa7, 0x9c, 0xa3, 0x97, 0x73, 0x4e, 0xb1, 0xb5, 0x6f, 0xab, 0xd9, 0x67, 0xcc,
  187. 0x22, 0x39, 0xd7, 0x76, 0xf0, 0xa2, 0x2f, 0x21, 0x88, 0xaa, 0x45, 0xfd, 0xc9, 0x1b, 0xb3, 0xaa,
  188. 0xcf, 0x97, 0x64, 0xad, 0xa4, 0x62, 0x8b, 0x4f, 0x14, 0xcd, 0x4e, 0xd8, 0xcd, 0xc3, 0x22, 0xce,
  189. 0x35, 0x45, 0x0e, 0x70, 0x45, 0x91, 0xf7, 0xa1, 0x07, 0x8e, 0xe4, 0x22, 0xdd, 0xa0, 0x8d, 0xf9,
  190. 0xd6, 0xd0, 0xbd, 0x1c, 0x25, 0xd9, 0xa3, 0xb5, 0x34, 0x59, 0x25, 0xff, 0x64, 0x5f, 0xd0, 0x26,
  191. 0xaf, 0x71, 0x59, 0xf2, 0x9e, 0x5a, 0x65, 0x9f, 0x87, 0x59, 0x1f, 0x17, 0xa6, 0xa0, 0x36, 0x49,
  192. 0xa5, 0x7a, 0x35, 0x86, 0x59, 0x37, 0x52, 0xe1, 0xf2, 0x24, 0x16, 0xd9, 0x79, 0x9d, 0xda, 0x03,
  193. 0x7c, 0x7d, 0xaa, 0x9e, 0x19, 0x2b, 0xb3, 0x96, 0x5f, 0x99, 0xe5, 0xdc, 0x0a, 0x58, 0xad, 0xa3,
  194. 0x73, 0xa3, 0x70, 0x7c, 0x6e, 0x14, 0x4e, 0xce, 0x8d, 0xc2, 0xc7, 0x91, 0x81, 0x8e, 0x46, 0x06,
  195. 0x3a, 0x1e, 0x19, 0xe8, 0x64, 0x64, 0xa0, 0x1f, 0x23, 0x03, 0x1d, 0xfe, 0x34, 0x0a, 0x6f, 0x8a,
  196. 0x83, 0xcd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x40, 0xe0, 0x08, 0xf3, 0x05, 0x00, 0x00,
  197. }
  198. func (m *Overhead) Marshal() (dAtA []byte, err error) {
  199. size := m.Size()
  200. dAtA = make([]byte, size)
  201. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  202. if err != nil {
  203. return nil, err
  204. }
  205. return dAtA[:n], nil
  206. }
  207. func (m *Overhead) MarshalTo(dAtA []byte) (int, error) {
  208. size := m.Size()
  209. return m.MarshalToSizedBuffer(dAtA[:size])
  210. }
  211. func (m *Overhead) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  212. i := len(dAtA)
  213. _ = i
  214. var l int
  215. _ = l
  216. if len(m.PodFixed) > 0 {
  217. keysForPodFixed := make([]string, 0, len(m.PodFixed))
  218. for k := range m.PodFixed {
  219. keysForPodFixed = append(keysForPodFixed, string(k))
  220. }
  221. github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed)
  222. for iNdEx := len(keysForPodFixed) - 1; iNdEx >= 0; iNdEx-- {
  223. v := m.PodFixed[k8s_io_api_core_v1.ResourceName(keysForPodFixed[iNdEx])]
  224. baseI := i
  225. {
  226. size, err := ((*resource.Quantity)(&v)).MarshalToSizedBuffer(dAtA[:i])
  227. if err != nil {
  228. return 0, err
  229. }
  230. i -= size
  231. i = encodeVarintGenerated(dAtA, i, uint64(size))
  232. }
  233. i--
  234. dAtA[i] = 0x12
  235. i -= len(keysForPodFixed[iNdEx])
  236. copy(dAtA[i:], keysForPodFixed[iNdEx])
  237. i = encodeVarintGenerated(dAtA, i, uint64(len(keysForPodFixed[iNdEx])))
  238. i--
  239. dAtA[i] = 0xa
  240. i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
  241. i--
  242. dAtA[i] = 0xa
  243. }
  244. }
  245. return len(dAtA) - i, nil
  246. }
  247. func (m *RuntimeClass) Marshal() (dAtA []byte, err error) {
  248. size := m.Size()
  249. dAtA = make([]byte, size)
  250. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  251. if err != nil {
  252. return nil, err
  253. }
  254. return dAtA[:n], nil
  255. }
  256. func (m *RuntimeClass) MarshalTo(dAtA []byte) (int, error) {
  257. size := m.Size()
  258. return m.MarshalToSizedBuffer(dAtA[:size])
  259. }
  260. func (m *RuntimeClass) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  261. i := len(dAtA)
  262. _ = i
  263. var l int
  264. _ = l
  265. if m.Scheduling != nil {
  266. {
  267. size, err := m.Scheduling.MarshalToSizedBuffer(dAtA[:i])
  268. if err != nil {
  269. return 0, err
  270. }
  271. i -= size
  272. i = encodeVarintGenerated(dAtA, i, uint64(size))
  273. }
  274. i--
  275. dAtA[i] = 0x22
  276. }
  277. if m.Overhead != nil {
  278. {
  279. size, err := m.Overhead.MarshalToSizedBuffer(dAtA[:i])
  280. if err != nil {
  281. return 0, err
  282. }
  283. i -= size
  284. i = encodeVarintGenerated(dAtA, i, uint64(size))
  285. }
  286. i--
  287. dAtA[i] = 0x1a
  288. }
  289. i -= len(m.Handler)
  290. copy(dAtA[i:], m.Handler)
  291. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Handler)))
  292. i--
  293. dAtA[i] = 0x12
  294. {
  295. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  296. if err != nil {
  297. return 0, err
  298. }
  299. i -= size
  300. i = encodeVarintGenerated(dAtA, i, uint64(size))
  301. }
  302. i--
  303. dAtA[i] = 0xa
  304. return len(dAtA) - i, nil
  305. }
  306. func (m *RuntimeClassList) Marshal() (dAtA []byte, err error) {
  307. size := m.Size()
  308. dAtA = make([]byte, size)
  309. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  310. if err != nil {
  311. return nil, err
  312. }
  313. return dAtA[:n], nil
  314. }
  315. func (m *RuntimeClassList) MarshalTo(dAtA []byte) (int, error) {
  316. size := m.Size()
  317. return m.MarshalToSizedBuffer(dAtA[:size])
  318. }
  319. func (m *RuntimeClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  320. i := len(dAtA)
  321. _ = i
  322. var l int
  323. _ = l
  324. if len(m.Items) > 0 {
  325. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  326. {
  327. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  328. if err != nil {
  329. return 0, err
  330. }
  331. i -= size
  332. i = encodeVarintGenerated(dAtA, i, uint64(size))
  333. }
  334. i--
  335. dAtA[i] = 0x12
  336. }
  337. }
  338. {
  339. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  340. if err != nil {
  341. return 0, err
  342. }
  343. i -= size
  344. i = encodeVarintGenerated(dAtA, i, uint64(size))
  345. }
  346. i--
  347. dAtA[i] = 0xa
  348. return len(dAtA) - i, nil
  349. }
  350. func (m *Scheduling) Marshal() (dAtA []byte, err error) {
  351. size := m.Size()
  352. dAtA = make([]byte, size)
  353. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  354. if err != nil {
  355. return nil, err
  356. }
  357. return dAtA[:n], nil
  358. }
  359. func (m *Scheduling) MarshalTo(dAtA []byte) (int, error) {
  360. size := m.Size()
  361. return m.MarshalToSizedBuffer(dAtA[:size])
  362. }
  363. func (m *Scheduling) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  364. i := len(dAtA)
  365. _ = i
  366. var l int
  367. _ = l
  368. if len(m.Tolerations) > 0 {
  369. for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
  370. {
  371. size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  372. if err != nil {
  373. return 0, err
  374. }
  375. i -= size
  376. i = encodeVarintGenerated(dAtA, i, uint64(size))
  377. }
  378. i--
  379. dAtA[i] = 0x12
  380. }
  381. }
  382. if len(m.NodeSelector) > 0 {
  383. keysForNodeSelector := make([]string, 0, len(m.NodeSelector))
  384. for k := range m.NodeSelector {
  385. keysForNodeSelector = append(keysForNodeSelector, string(k))
  386. }
  387. github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector)
  388. for iNdEx := len(keysForNodeSelector) - 1; iNdEx >= 0; iNdEx-- {
  389. v := m.NodeSelector[string(keysForNodeSelector[iNdEx])]
  390. baseI := i
  391. i -= len(v)
  392. copy(dAtA[i:], v)
  393. i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
  394. i--
  395. dAtA[i] = 0x12
  396. i -= len(keysForNodeSelector[iNdEx])
  397. copy(dAtA[i:], keysForNodeSelector[iNdEx])
  398. i = encodeVarintGenerated(dAtA, i, uint64(len(keysForNodeSelector[iNdEx])))
  399. i--
  400. dAtA[i] = 0xa
  401. i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
  402. i--
  403. dAtA[i] = 0xa
  404. }
  405. }
  406. return len(dAtA) - i, nil
  407. }
  408. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  409. offset -= sovGenerated(v)
  410. base := offset
  411. for v >= 1<<7 {
  412. dAtA[offset] = uint8(v&0x7f | 0x80)
  413. v >>= 7
  414. offset++
  415. }
  416. dAtA[offset] = uint8(v)
  417. return base
  418. }
  419. func (m *Overhead) Size() (n int) {
  420. if m == nil {
  421. return 0
  422. }
  423. var l int
  424. _ = l
  425. if len(m.PodFixed) > 0 {
  426. for k, v := range m.PodFixed {
  427. _ = k
  428. _ = v
  429. l = ((*resource.Quantity)(&v)).Size()
  430. mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
  431. n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
  432. }
  433. }
  434. return n
  435. }
  436. func (m *RuntimeClass) Size() (n int) {
  437. if m == nil {
  438. return 0
  439. }
  440. var l int
  441. _ = l
  442. l = m.ObjectMeta.Size()
  443. n += 1 + l + sovGenerated(uint64(l))
  444. l = len(m.Handler)
  445. n += 1 + l + sovGenerated(uint64(l))
  446. if m.Overhead != nil {
  447. l = m.Overhead.Size()
  448. n += 1 + l + sovGenerated(uint64(l))
  449. }
  450. if m.Scheduling != nil {
  451. l = m.Scheduling.Size()
  452. n += 1 + l + sovGenerated(uint64(l))
  453. }
  454. return n
  455. }
  456. func (m *RuntimeClassList) Size() (n int) {
  457. if m == nil {
  458. return 0
  459. }
  460. var l int
  461. _ = l
  462. l = m.ListMeta.Size()
  463. n += 1 + l + sovGenerated(uint64(l))
  464. if len(m.Items) > 0 {
  465. for _, e := range m.Items {
  466. l = e.Size()
  467. n += 1 + l + sovGenerated(uint64(l))
  468. }
  469. }
  470. return n
  471. }
  472. func (m *Scheduling) Size() (n int) {
  473. if m == nil {
  474. return 0
  475. }
  476. var l int
  477. _ = l
  478. if len(m.NodeSelector) > 0 {
  479. for k, v := range m.NodeSelector {
  480. _ = k
  481. _ = v
  482. mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
  483. n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
  484. }
  485. }
  486. if len(m.Tolerations) > 0 {
  487. for _, e := range m.Tolerations {
  488. l = e.Size()
  489. n += 1 + l + sovGenerated(uint64(l))
  490. }
  491. }
  492. return n
  493. }
  494. func sovGenerated(x uint64) (n int) {
  495. return (math_bits.Len64(x|1) + 6) / 7
  496. }
  497. func sozGenerated(x uint64) (n int) {
  498. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  499. }
  500. func (this *Overhead) String() string {
  501. if this == nil {
  502. return "nil"
  503. }
  504. keysForPodFixed := make([]string, 0, len(this.PodFixed))
  505. for k := range this.PodFixed {
  506. keysForPodFixed = append(keysForPodFixed, string(k))
  507. }
  508. github_com_gogo_protobuf_sortkeys.Strings(keysForPodFixed)
  509. mapStringForPodFixed := "k8s_io_api_core_v1.ResourceList{"
  510. for _, k := range keysForPodFixed {
  511. mapStringForPodFixed += fmt.Sprintf("%v: %v,", k, this.PodFixed[k8s_io_api_core_v1.ResourceName(k)])
  512. }
  513. mapStringForPodFixed += "}"
  514. s := strings.Join([]string{`&Overhead{`,
  515. `PodFixed:` + mapStringForPodFixed + `,`,
  516. `}`,
  517. }, "")
  518. return s
  519. }
  520. func (this *RuntimeClass) String() string {
  521. if this == nil {
  522. return "nil"
  523. }
  524. s := strings.Join([]string{`&RuntimeClass{`,
  525. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  526. `Handler:` + fmt.Sprintf("%v", this.Handler) + `,`,
  527. `Overhead:` + strings.Replace(this.Overhead.String(), "Overhead", "Overhead", 1) + `,`,
  528. `Scheduling:` + strings.Replace(this.Scheduling.String(), "Scheduling", "Scheduling", 1) + `,`,
  529. `}`,
  530. }, "")
  531. return s
  532. }
  533. func (this *RuntimeClassList) String() string {
  534. if this == nil {
  535. return "nil"
  536. }
  537. repeatedStringForItems := "[]RuntimeClass{"
  538. for _, f := range this.Items {
  539. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RuntimeClass", "RuntimeClass", 1), `&`, ``, 1) + ","
  540. }
  541. repeatedStringForItems += "}"
  542. s := strings.Join([]string{`&RuntimeClassList{`,
  543. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  544. `Items:` + repeatedStringForItems + `,`,
  545. `}`,
  546. }, "")
  547. return s
  548. }
  549. func (this *Scheduling) String() string {
  550. if this == nil {
  551. return "nil"
  552. }
  553. repeatedStringForTolerations := "[]Toleration{"
  554. for _, f := range this.Tolerations {
  555. repeatedStringForTolerations += fmt.Sprintf("%v", f) + ","
  556. }
  557. repeatedStringForTolerations += "}"
  558. keysForNodeSelector := make([]string, 0, len(this.NodeSelector))
  559. for k := range this.NodeSelector {
  560. keysForNodeSelector = append(keysForNodeSelector, k)
  561. }
  562. github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector)
  563. mapStringForNodeSelector := "map[string]string{"
  564. for _, k := range keysForNodeSelector {
  565. mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k])
  566. }
  567. mapStringForNodeSelector += "}"
  568. s := strings.Join([]string{`&Scheduling{`,
  569. `NodeSelector:` + mapStringForNodeSelector + `,`,
  570. `Tolerations:` + repeatedStringForTolerations + `,`,
  571. `}`,
  572. }, "")
  573. return s
  574. }
  575. func valueToStringGenerated(v interface{}) string {
  576. rv := reflect.ValueOf(v)
  577. if rv.IsNil() {
  578. return "nil"
  579. }
  580. pv := reflect.Indirect(rv).Interface()
  581. return fmt.Sprintf("*%v", pv)
  582. }
  583. func (m *Overhead) Unmarshal(dAtA []byte) error {
  584. l := len(dAtA)
  585. iNdEx := 0
  586. for iNdEx < l {
  587. preIndex := iNdEx
  588. var wire uint64
  589. for shift := uint(0); ; shift += 7 {
  590. if shift >= 64 {
  591. return ErrIntOverflowGenerated
  592. }
  593. if iNdEx >= l {
  594. return io.ErrUnexpectedEOF
  595. }
  596. b := dAtA[iNdEx]
  597. iNdEx++
  598. wire |= uint64(b&0x7F) << shift
  599. if b < 0x80 {
  600. break
  601. }
  602. }
  603. fieldNum := int32(wire >> 3)
  604. wireType := int(wire & 0x7)
  605. if wireType == 4 {
  606. return fmt.Errorf("proto: Overhead: wiretype end group for non-group")
  607. }
  608. if fieldNum <= 0 {
  609. return fmt.Errorf("proto: Overhead: illegal tag %d (wire type %d)", fieldNum, wire)
  610. }
  611. switch fieldNum {
  612. case 1:
  613. if wireType != 2 {
  614. return fmt.Errorf("proto: wrong wireType = %d for field PodFixed", wireType)
  615. }
  616. var msglen int
  617. for shift := uint(0); ; shift += 7 {
  618. if shift >= 64 {
  619. return ErrIntOverflowGenerated
  620. }
  621. if iNdEx >= l {
  622. return io.ErrUnexpectedEOF
  623. }
  624. b := dAtA[iNdEx]
  625. iNdEx++
  626. msglen |= int(b&0x7F) << shift
  627. if b < 0x80 {
  628. break
  629. }
  630. }
  631. if msglen < 0 {
  632. return ErrInvalidLengthGenerated
  633. }
  634. postIndex := iNdEx + msglen
  635. if postIndex < 0 {
  636. return ErrInvalidLengthGenerated
  637. }
  638. if postIndex > l {
  639. return io.ErrUnexpectedEOF
  640. }
  641. if m.PodFixed == nil {
  642. m.PodFixed = make(k8s_io_api_core_v1.ResourceList)
  643. }
  644. var mapkey k8s_io_api_core_v1.ResourceName
  645. mapvalue := &resource.Quantity{}
  646. for iNdEx < postIndex {
  647. entryPreIndex := iNdEx
  648. var wire uint64
  649. for shift := uint(0); ; shift += 7 {
  650. if shift >= 64 {
  651. return ErrIntOverflowGenerated
  652. }
  653. if iNdEx >= l {
  654. return io.ErrUnexpectedEOF
  655. }
  656. b := dAtA[iNdEx]
  657. iNdEx++
  658. wire |= uint64(b&0x7F) << shift
  659. if b < 0x80 {
  660. break
  661. }
  662. }
  663. fieldNum := int32(wire >> 3)
  664. if fieldNum == 1 {
  665. var stringLenmapkey uint64
  666. for shift := uint(0); ; shift += 7 {
  667. if shift >= 64 {
  668. return ErrIntOverflowGenerated
  669. }
  670. if iNdEx >= l {
  671. return io.ErrUnexpectedEOF
  672. }
  673. b := dAtA[iNdEx]
  674. iNdEx++
  675. stringLenmapkey |= uint64(b&0x7F) << shift
  676. if b < 0x80 {
  677. break
  678. }
  679. }
  680. intStringLenmapkey := int(stringLenmapkey)
  681. if intStringLenmapkey < 0 {
  682. return ErrInvalidLengthGenerated
  683. }
  684. postStringIndexmapkey := iNdEx + intStringLenmapkey
  685. if postStringIndexmapkey < 0 {
  686. return ErrInvalidLengthGenerated
  687. }
  688. if postStringIndexmapkey > l {
  689. return io.ErrUnexpectedEOF
  690. }
  691. mapkey = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postStringIndexmapkey])
  692. iNdEx = postStringIndexmapkey
  693. } else if fieldNum == 2 {
  694. var mapmsglen int
  695. for shift := uint(0); ; shift += 7 {
  696. if shift >= 64 {
  697. return ErrIntOverflowGenerated
  698. }
  699. if iNdEx >= l {
  700. return io.ErrUnexpectedEOF
  701. }
  702. b := dAtA[iNdEx]
  703. iNdEx++
  704. mapmsglen |= int(b&0x7F) << shift
  705. if b < 0x80 {
  706. break
  707. }
  708. }
  709. if mapmsglen < 0 {
  710. return ErrInvalidLengthGenerated
  711. }
  712. postmsgIndex := iNdEx + mapmsglen
  713. if postmsgIndex < 0 {
  714. return ErrInvalidLengthGenerated
  715. }
  716. if postmsgIndex > l {
  717. return io.ErrUnexpectedEOF
  718. }
  719. mapvalue = &resource.Quantity{}
  720. if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
  721. return err
  722. }
  723. iNdEx = postmsgIndex
  724. } else {
  725. iNdEx = entryPreIndex
  726. skippy, err := skipGenerated(dAtA[iNdEx:])
  727. if err != nil {
  728. return err
  729. }
  730. if (skippy < 0) || (iNdEx+skippy) < 0 {
  731. return ErrInvalidLengthGenerated
  732. }
  733. if (iNdEx + skippy) > postIndex {
  734. return io.ErrUnexpectedEOF
  735. }
  736. iNdEx += skippy
  737. }
  738. }
  739. m.PodFixed[k8s_io_api_core_v1.ResourceName(mapkey)] = ((k8s_io_apimachinery_pkg_api_resource.Quantity)(*mapvalue))
  740. iNdEx = postIndex
  741. default:
  742. iNdEx = preIndex
  743. skippy, err := skipGenerated(dAtA[iNdEx:])
  744. if err != nil {
  745. return err
  746. }
  747. if (skippy < 0) || (iNdEx+skippy) < 0 {
  748. return ErrInvalidLengthGenerated
  749. }
  750. if (iNdEx + skippy) > l {
  751. return io.ErrUnexpectedEOF
  752. }
  753. iNdEx += skippy
  754. }
  755. }
  756. if iNdEx > l {
  757. return io.ErrUnexpectedEOF
  758. }
  759. return nil
  760. }
  761. func (m *RuntimeClass) Unmarshal(dAtA []byte) error {
  762. l := len(dAtA)
  763. iNdEx := 0
  764. for iNdEx < l {
  765. preIndex := iNdEx
  766. var wire uint64
  767. for shift := uint(0); ; shift += 7 {
  768. if shift >= 64 {
  769. return ErrIntOverflowGenerated
  770. }
  771. if iNdEx >= l {
  772. return io.ErrUnexpectedEOF
  773. }
  774. b := dAtA[iNdEx]
  775. iNdEx++
  776. wire |= uint64(b&0x7F) << shift
  777. if b < 0x80 {
  778. break
  779. }
  780. }
  781. fieldNum := int32(wire >> 3)
  782. wireType := int(wire & 0x7)
  783. if wireType == 4 {
  784. return fmt.Errorf("proto: RuntimeClass: wiretype end group for non-group")
  785. }
  786. if fieldNum <= 0 {
  787. return fmt.Errorf("proto: RuntimeClass: illegal tag %d (wire type %d)", fieldNum, wire)
  788. }
  789. switch fieldNum {
  790. case 1:
  791. if wireType != 2 {
  792. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  793. }
  794. var msglen int
  795. for shift := uint(0); ; shift += 7 {
  796. if shift >= 64 {
  797. return ErrIntOverflowGenerated
  798. }
  799. if iNdEx >= l {
  800. return io.ErrUnexpectedEOF
  801. }
  802. b := dAtA[iNdEx]
  803. iNdEx++
  804. msglen |= int(b&0x7F) << shift
  805. if b < 0x80 {
  806. break
  807. }
  808. }
  809. if msglen < 0 {
  810. return ErrInvalidLengthGenerated
  811. }
  812. postIndex := iNdEx + msglen
  813. if postIndex < 0 {
  814. return ErrInvalidLengthGenerated
  815. }
  816. if postIndex > l {
  817. return io.ErrUnexpectedEOF
  818. }
  819. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  820. return err
  821. }
  822. iNdEx = postIndex
  823. case 2:
  824. if wireType != 2 {
  825. return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType)
  826. }
  827. var stringLen uint64
  828. for shift := uint(0); ; shift += 7 {
  829. if shift >= 64 {
  830. return ErrIntOverflowGenerated
  831. }
  832. if iNdEx >= l {
  833. return io.ErrUnexpectedEOF
  834. }
  835. b := dAtA[iNdEx]
  836. iNdEx++
  837. stringLen |= uint64(b&0x7F) << shift
  838. if b < 0x80 {
  839. break
  840. }
  841. }
  842. intStringLen := int(stringLen)
  843. if intStringLen < 0 {
  844. return ErrInvalidLengthGenerated
  845. }
  846. postIndex := iNdEx + intStringLen
  847. if postIndex < 0 {
  848. return ErrInvalidLengthGenerated
  849. }
  850. if postIndex > l {
  851. return io.ErrUnexpectedEOF
  852. }
  853. m.Handler = string(dAtA[iNdEx:postIndex])
  854. iNdEx = postIndex
  855. case 3:
  856. if wireType != 2 {
  857. return fmt.Errorf("proto: wrong wireType = %d for field Overhead", wireType)
  858. }
  859. var msglen int
  860. for shift := uint(0); ; shift += 7 {
  861. if shift >= 64 {
  862. return ErrIntOverflowGenerated
  863. }
  864. if iNdEx >= l {
  865. return io.ErrUnexpectedEOF
  866. }
  867. b := dAtA[iNdEx]
  868. iNdEx++
  869. msglen |= int(b&0x7F) << shift
  870. if b < 0x80 {
  871. break
  872. }
  873. }
  874. if msglen < 0 {
  875. return ErrInvalidLengthGenerated
  876. }
  877. postIndex := iNdEx + msglen
  878. if postIndex < 0 {
  879. return ErrInvalidLengthGenerated
  880. }
  881. if postIndex > l {
  882. return io.ErrUnexpectedEOF
  883. }
  884. if m.Overhead == nil {
  885. m.Overhead = &Overhead{}
  886. }
  887. if err := m.Overhead.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  888. return err
  889. }
  890. iNdEx = postIndex
  891. case 4:
  892. if wireType != 2 {
  893. return fmt.Errorf("proto: wrong wireType = %d for field Scheduling", wireType)
  894. }
  895. var msglen int
  896. for shift := uint(0); ; shift += 7 {
  897. if shift >= 64 {
  898. return ErrIntOverflowGenerated
  899. }
  900. if iNdEx >= l {
  901. return io.ErrUnexpectedEOF
  902. }
  903. b := dAtA[iNdEx]
  904. iNdEx++
  905. msglen |= int(b&0x7F) << shift
  906. if b < 0x80 {
  907. break
  908. }
  909. }
  910. if msglen < 0 {
  911. return ErrInvalidLengthGenerated
  912. }
  913. postIndex := iNdEx + msglen
  914. if postIndex < 0 {
  915. return ErrInvalidLengthGenerated
  916. }
  917. if postIndex > l {
  918. return io.ErrUnexpectedEOF
  919. }
  920. if m.Scheduling == nil {
  921. m.Scheduling = &Scheduling{}
  922. }
  923. if err := m.Scheduling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  924. return err
  925. }
  926. iNdEx = postIndex
  927. default:
  928. iNdEx = preIndex
  929. skippy, err := skipGenerated(dAtA[iNdEx:])
  930. if err != nil {
  931. return err
  932. }
  933. if (skippy < 0) || (iNdEx+skippy) < 0 {
  934. return ErrInvalidLengthGenerated
  935. }
  936. if (iNdEx + skippy) > l {
  937. return io.ErrUnexpectedEOF
  938. }
  939. iNdEx += skippy
  940. }
  941. }
  942. if iNdEx > l {
  943. return io.ErrUnexpectedEOF
  944. }
  945. return nil
  946. }
  947. func (m *RuntimeClassList) Unmarshal(dAtA []byte) error {
  948. l := len(dAtA)
  949. iNdEx := 0
  950. for iNdEx < l {
  951. preIndex := iNdEx
  952. var wire uint64
  953. for shift := uint(0); ; shift += 7 {
  954. if shift >= 64 {
  955. return ErrIntOverflowGenerated
  956. }
  957. if iNdEx >= l {
  958. return io.ErrUnexpectedEOF
  959. }
  960. b := dAtA[iNdEx]
  961. iNdEx++
  962. wire |= uint64(b&0x7F) << shift
  963. if b < 0x80 {
  964. break
  965. }
  966. }
  967. fieldNum := int32(wire >> 3)
  968. wireType := int(wire & 0x7)
  969. if wireType == 4 {
  970. return fmt.Errorf("proto: RuntimeClassList: wiretype end group for non-group")
  971. }
  972. if fieldNum <= 0 {
  973. return fmt.Errorf("proto: RuntimeClassList: illegal tag %d (wire type %d)", fieldNum, wire)
  974. }
  975. switch fieldNum {
  976. case 1:
  977. if wireType != 2 {
  978. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  979. }
  980. var msglen int
  981. for shift := uint(0); ; shift += 7 {
  982. if shift >= 64 {
  983. return ErrIntOverflowGenerated
  984. }
  985. if iNdEx >= l {
  986. return io.ErrUnexpectedEOF
  987. }
  988. b := dAtA[iNdEx]
  989. iNdEx++
  990. msglen |= int(b&0x7F) << shift
  991. if b < 0x80 {
  992. break
  993. }
  994. }
  995. if msglen < 0 {
  996. return ErrInvalidLengthGenerated
  997. }
  998. postIndex := iNdEx + msglen
  999. if postIndex < 0 {
  1000. return ErrInvalidLengthGenerated
  1001. }
  1002. if postIndex > l {
  1003. return io.ErrUnexpectedEOF
  1004. }
  1005. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1006. return err
  1007. }
  1008. iNdEx = postIndex
  1009. case 2:
  1010. if wireType != 2 {
  1011. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  1012. }
  1013. var msglen int
  1014. for shift := uint(0); ; shift += 7 {
  1015. if shift >= 64 {
  1016. return ErrIntOverflowGenerated
  1017. }
  1018. if iNdEx >= l {
  1019. return io.ErrUnexpectedEOF
  1020. }
  1021. b := dAtA[iNdEx]
  1022. iNdEx++
  1023. msglen |= int(b&0x7F) << shift
  1024. if b < 0x80 {
  1025. break
  1026. }
  1027. }
  1028. if msglen < 0 {
  1029. return ErrInvalidLengthGenerated
  1030. }
  1031. postIndex := iNdEx + msglen
  1032. if postIndex < 0 {
  1033. return ErrInvalidLengthGenerated
  1034. }
  1035. if postIndex > l {
  1036. return io.ErrUnexpectedEOF
  1037. }
  1038. m.Items = append(m.Items, RuntimeClass{})
  1039. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1040. return err
  1041. }
  1042. iNdEx = postIndex
  1043. default:
  1044. iNdEx = preIndex
  1045. skippy, err := skipGenerated(dAtA[iNdEx:])
  1046. if err != nil {
  1047. return err
  1048. }
  1049. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1050. return ErrInvalidLengthGenerated
  1051. }
  1052. if (iNdEx + skippy) > l {
  1053. return io.ErrUnexpectedEOF
  1054. }
  1055. iNdEx += skippy
  1056. }
  1057. }
  1058. if iNdEx > l {
  1059. return io.ErrUnexpectedEOF
  1060. }
  1061. return nil
  1062. }
  1063. func (m *Scheduling) Unmarshal(dAtA []byte) error {
  1064. l := len(dAtA)
  1065. iNdEx := 0
  1066. for iNdEx < l {
  1067. preIndex := iNdEx
  1068. var wire uint64
  1069. for shift := uint(0); ; shift += 7 {
  1070. if shift >= 64 {
  1071. return ErrIntOverflowGenerated
  1072. }
  1073. if iNdEx >= l {
  1074. return io.ErrUnexpectedEOF
  1075. }
  1076. b := dAtA[iNdEx]
  1077. iNdEx++
  1078. wire |= uint64(b&0x7F) << shift
  1079. if b < 0x80 {
  1080. break
  1081. }
  1082. }
  1083. fieldNum := int32(wire >> 3)
  1084. wireType := int(wire & 0x7)
  1085. if wireType == 4 {
  1086. return fmt.Errorf("proto: Scheduling: wiretype end group for non-group")
  1087. }
  1088. if fieldNum <= 0 {
  1089. return fmt.Errorf("proto: Scheduling: illegal tag %d (wire type %d)", fieldNum, wire)
  1090. }
  1091. switch fieldNum {
  1092. case 1:
  1093. if wireType != 2 {
  1094. return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
  1095. }
  1096. var msglen int
  1097. for shift := uint(0); ; shift += 7 {
  1098. if shift >= 64 {
  1099. return ErrIntOverflowGenerated
  1100. }
  1101. if iNdEx >= l {
  1102. return io.ErrUnexpectedEOF
  1103. }
  1104. b := dAtA[iNdEx]
  1105. iNdEx++
  1106. msglen |= int(b&0x7F) << shift
  1107. if b < 0x80 {
  1108. break
  1109. }
  1110. }
  1111. if msglen < 0 {
  1112. return ErrInvalidLengthGenerated
  1113. }
  1114. postIndex := iNdEx + msglen
  1115. if postIndex < 0 {
  1116. return ErrInvalidLengthGenerated
  1117. }
  1118. if postIndex > l {
  1119. return io.ErrUnexpectedEOF
  1120. }
  1121. if m.NodeSelector == nil {
  1122. m.NodeSelector = make(map[string]string)
  1123. }
  1124. var mapkey string
  1125. var mapvalue string
  1126. for iNdEx < postIndex {
  1127. entryPreIndex := iNdEx
  1128. var wire uint64
  1129. for shift := uint(0); ; shift += 7 {
  1130. if shift >= 64 {
  1131. return ErrIntOverflowGenerated
  1132. }
  1133. if iNdEx >= l {
  1134. return io.ErrUnexpectedEOF
  1135. }
  1136. b := dAtA[iNdEx]
  1137. iNdEx++
  1138. wire |= uint64(b&0x7F) << shift
  1139. if b < 0x80 {
  1140. break
  1141. }
  1142. }
  1143. fieldNum := int32(wire >> 3)
  1144. if fieldNum == 1 {
  1145. var stringLenmapkey uint64
  1146. for shift := uint(0); ; shift += 7 {
  1147. if shift >= 64 {
  1148. return ErrIntOverflowGenerated
  1149. }
  1150. if iNdEx >= l {
  1151. return io.ErrUnexpectedEOF
  1152. }
  1153. b := dAtA[iNdEx]
  1154. iNdEx++
  1155. stringLenmapkey |= uint64(b&0x7F) << shift
  1156. if b < 0x80 {
  1157. break
  1158. }
  1159. }
  1160. intStringLenmapkey := int(stringLenmapkey)
  1161. if intStringLenmapkey < 0 {
  1162. return ErrInvalidLengthGenerated
  1163. }
  1164. postStringIndexmapkey := iNdEx + intStringLenmapkey
  1165. if postStringIndexmapkey < 0 {
  1166. return ErrInvalidLengthGenerated
  1167. }
  1168. if postStringIndexmapkey > l {
  1169. return io.ErrUnexpectedEOF
  1170. }
  1171. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1172. iNdEx = postStringIndexmapkey
  1173. } else if fieldNum == 2 {
  1174. var stringLenmapvalue uint64
  1175. for shift := uint(0); ; shift += 7 {
  1176. if shift >= 64 {
  1177. return ErrIntOverflowGenerated
  1178. }
  1179. if iNdEx >= l {
  1180. return io.ErrUnexpectedEOF
  1181. }
  1182. b := dAtA[iNdEx]
  1183. iNdEx++
  1184. stringLenmapvalue |= uint64(b&0x7F) << shift
  1185. if b < 0x80 {
  1186. break
  1187. }
  1188. }
  1189. intStringLenmapvalue := int(stringLenmapvalue)
  1190. if intStringLenmapvalue < 0 {
  1191. return ErrInvalidLengthGenerated
  1192. }
  1193. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  1194. if postStringIndexmapvalue < 0 {
  1195. return ErrInvalidLengthGenerated
  1196. }
  1197. if postStringIndexmapvalue > l {
  1198. return io.ErrUnexpectedEOF
  1199. }
  1200. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  1201. iNdEx = postStringIndexmapvalue
  1202. } else {
  1203. iNdEx = entryPreIndex
  1204. skippy, err := skipGenerated(dAtA[iNdEx:])
  1205. if err != nil {
  1206. return err
  1207. }
  1208. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1209. return ErrInvalidLengthGenerated
  1210. }
  1211. if (iNdEx + skippy) > postIndex {
  1212. return io.ErrUnexpectedEOF
  1213. }
  1214. iNdEx += skippy
  1215. }
  1216. }
  1217. m.NodeSelector[mapkey] = mapvalue
  1218. iNdEx = postIndex
  1219. case 2:
  1220. if wireType != 2 {
  1221. return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
  1222. }
  1223. var msglen int
  1224. for shift := uint(0); ; shift += 7 {
  1225. if shift >= 64 {
  1226. return ErrIntOverflowGenerated
  1227. }
  1228. if iNdEx >= l {
  1229. return io.ErrUnexpectedEOF
  1230. }
  1231. b := dAtA[iNdEx]
  1232. iNdEx++
  1233. msglen |= int(b&0x7F) << shift
  1234. if b < 0x80 {
  1235. break
  1236. }
  1237. }
  1238. if msglen < 0 {
  1239. return ErrInvalidLengthGenerated
  1240. }
  1241. postIndex := iNdEx + msglen
  1242. if postIndex < 0 {
  1243. return ErrInvalidLengthGenerated
  1244. }
  1245. if postIndex > l {
  1246. return io.ErrUnexpectedEOF
  1247. }
  1248. m.Tolerations = append(m.Tolerations, v11.Toleration{})
  1249. if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1250. return err
  1251. }
  1252. iNdEx = postIndex
  1253. default:
  1254. iNdEx = preIndex
  1255. skippy, err := skipGenerated(dAtA[iNdEx:])
  1256. if err != nil {
  1257. return err
  1258. }
  1259. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1260. return ErrInvalidLengthGenerated
  1261. }
  1262. if (iNdEx + skippy) > l {
  1263. return io.ErrUnexpectedEOF
  1264. }
  1265. iNdEx += skippy
  1266. }
  1267. }
  1268. if iNdEx > l {
  1269. return io.ErrUnexpectedEOF
  1270. }
  1271. return nil
  1272. }
  1273. func skipGenerated(dAtA []byte) (n int, err error) {
  1274. l := len(dAtA)
  1275. iNdEx := 0
  1276. depth := 0
  1277. for iNdEx < l {
  1278. var wire uint64
  1279. for shift := uint(0); ; shift += 7 {
  1280. if shift >= 64 {
  1281. return 0, ErrIntOverflowGenerated
  1282. }
  1283. if iNdEx >= l {
  1284. return 0, io.ErrUnexpectedEOF
  1285. }
  1286. b := dAtA[iNdEx]
  1287. iNdEx++
  1288. wire |= (uint64(b) & 0x7F) << shift
  1289. if b < 0x80 {
  1290. break
  1291. }
  1292. }
  1293. wireType := int(wire & 0x7)
  1294. switch wireType {
  1295. case 0:
  1296. for shift := uint(0); ; shift += 7 {
  1297. if shift >= 64 {
  1298. return 0, ErrIntOverflowGenerated
  1299. }
  1300. if iNdEx >= l {
  1301. return 0, io.ErrUnexpectedEOF
  1302. }
  1303. iNdEx++
  1304. if dAtA[iNdEx-1] < 0x80 {
  1305. break
  1306. }
  1307. }
  1308. case 1:
  1309. iNdEx += 8
  1310. case 2:
  1311. var length int
  1312. for shift := uint(0); ; shift += 7 {
  1313. if shift >= 64 {
  1314. return 0, ErrIntOverflowGenerated
  1315. }
  1316. if iNdEx >= l {
  1317. return 0, io.ErrUnexpectedEOF
  1318. }
  1319. b := dAtA[iNdEx]
  1320. iNdEx++
  1321. length |= (int(b) & 0x7F) << shift
  1322. if b < 0x80 {
  1323. break
  1324. }
  1325. }
  1326. if length < 0 {
  1327. return 0, ErrInvalidLengthGenerated
  1328. }
  1329. iNdEx += length
  1330. case 3:
  1331. depth++
  1332. case 4:
  1333. if depth == 0 {
  1334. return 0, ErrUnexpectedEndOfGroupGenerated
  1335. }
  1336. depth--
  1337. case 5:
  1338. iNdEx += 4
  1339. default:
  1340. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1341. }
  1342. if iNdEx < 0 {
  1343. return 0, ErrInvalidLengthGenerated
  1344. }
  1345. if depth == 0 {
  1346. return iNdEx, nil
  1347. }
  1348. }
  1349. return 0, io.ErrUnexpectedEOF
  1350. }
  1351. var (
  1352. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  1353. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  1354. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  1355. )