generated.pb.go 36 KB

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