api.pb.go 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  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: api.proto
  15. /*
  16. Package v1alpha1 is a generated protocol buffer package.
  17. It is generated from these files:
  18. api.proto
  19. It has these top-level messages:
  20. ListPodResourcesRequest
  21. ListPodResourcesResponse
  22. PodResources
  23. ContainerResources
  24. ContainerDevices
  25. */
  26. package v1alpha1
  27. import proto "github.com/gogo/protobuf/proto"
  28. import fmt "fmt"
  29. import math "math"
  30. import _ "github.com/gogo/protobuf/gogoproto"
  31. import (
  32. context "golang.org/x/net/context"
  33. grpc "google.golang.org/grpc"
  34. )
  35. import strings "strings"
  36. import reflect "reflect"
  37. import io "io"
  38. // Reference imports to suppress errors if they are not otherwise used.
  39. var _ = proto.Marshal
  40. var _ = fmt.Errorf
  41. var _ = math.Inf
  42. // This is a compile-time assertion to ensure that this generated file
  43. // is compatible with the proto package it is being compiled against.
  44. // A compilation error at this line likely means your copy of the
  45. // proto package needs to be updated.
  46. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  47. // ListPodResourcesRequest is the request made to the PodResourcesLister service
  48. type ListPodResourcesRequest struct {
  49. }
  50. func (m *ListPodResourcesRequest) Reset() { *m = ListPodResourcesRequest{} }
  51. func (*ListPodResourcesRequest) ProtoMessage() {}
  52. func (*ListPodResourcesRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
  53. // ListPodResourcesResponse is the response returned by List function
  54. type ListPodResourcesResponse struct {
  55. PodResources []*PodResources `protobuf:"bytes,1,rep,name=pod_resources,json=podResources" json:"pod_resources,omitempty"`
  56. }
  57. func (m *ListPodResourcesResponse) Reset() { *m = ListPodResourcesResponse{} }
  58. func (*ListPodResourcesResponse) ProtoMessage() {}
  59. func (*ListPodResourcesResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
  60. func (m *ListPodResourcesResponse) GetPodResources() []*PodResources {
  61. if m != nil {
  62. return m.PodResources
  63. }
  64. return nil
  65. }
  66. // PodResources contains information about the node resources assigned to a pod
  67. type PodResources struct {
  68. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  69. Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
  70. Containers []*ContainerResources `protobuf:"bytes,3,rep,name=containers" json:"containers,omitempty"`
  71. }
  72. func (m *PodResources) Reset() { *m = PodResources{} }
  73. func (*PodResources) ProtoMessage() {}
  74. func (*PodResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
  75. func (m *PodResources) GetName() string {
  76. if m != nil {
  77. return m.Name
  78. }
  79. return ""
  80. }
  81. func (m *PodResources) GetNamespace() string {
  82. if m != nil {
  83. return m.Namespace
  84. }
  85. return ""
  86. }
  87. func (m *PodResources) GetContainers() []*ContainerResources {
  88. if m != nil {
  89. return m.Containers
  90. }
  91. return nil
  92. }
  93. // ContainerResources contains information about the resources assigned to a container
  94. type ContainerResources struct {
  95. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  96. Devices []*ContainerDevices `protobuf:"bytes,2,rep,name=devices" json:"devices,omitempty"`
  97. }
  98. func (m *ContainerResources) Reset() { *m = ContainerResources{} }
  99. func (*ContainerResources) ProtoMessage() {}
  100. func (*ContainerResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
  101. func (m *ContainerResources) GetName() string {
  102. if m != nil {
  103. return m.Name
  104. }
  105. return ""
  106. }
  107. func (m *ContainerResources) GetDevices() []*ContainerDevices {
  108. if m != nil {
  109. return m.Devices
  110. }
  111. return nil
  112. }
  113. // ContainerDevices contains information about the devices assigned to a container
  114. type ContainerDevices struct {
  115. ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
  116. DeviceIds []string `protobuf:"bytes,2,rep,name=device_ids,json=deviceIds" json:"device_ids,omitempty"`
  117. }
  118. func (m *ContainerDevices) Reset() { *m = ContainerDevices{} }
  119. func (*ContainerDevices) ProtoMessage() {}
  120. func (*ContainerDevices) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} }
  121. func (m *ContainerDevices) GetResourceName() string {
  122. if m != nil {
  123. return m.ResourceName
  124. }
  125. return ""
  126. }
  127. func (m *ContainerDevices) GetDeviceIds() []string {
  128. if m != nil {
  129. return m.DeviceIds
  130. }
  131. return nil
  132. }
  133. func init() {
  134. proto.RegisterType((*ListPodResourcesRequest)(nil), "v1alpha1.ListPodResourcesRequest")
  135. proto.RegisterType((*ListPodResourcesResponse)(nil), "v1alpha1.ListPodResourcesResponse")
  136. proto.RegisterType((*PodResources)(nil), "v1alpha1.PodResources")
  137. proto.RegisterType((*ContainerResources)(nil), "v1alpha1.ContainerResources")
  138. proto.RegisterType((*ContainerDevices)(nil), "v1alpha1.ContainerDevices")
  139. }
  140. // Reference imports to suppress errors if they are not otherwise used.
  141. var _ context.Context
  142. var _ grpc.ClientConn
  143. // This is a compile-time assertion to ensure that this generated file
  144. // is compatible with the grpc package it is being compiled against.
  145. const _ = grpc.SupportPackageIsVersion4
  146. // Client API for PodResourcesLister service
  147. type PodResourcesListerClient interface {
  148. List(ctx context.Context, in *ListPodResourcesRequest, opts ...grpc.CallOption) (*ListPodResourcesResponse, error)
  149. }
  150. type podResourcesListerClient struct {
  151. cc *grpc.ClientConn
  152. }
  153. func NewPodResourcesListerClient(cc *grpc.ClientConn) PodResourcesListerClient {
  154. return &podResourcesListerClient{cc}
  155. }
  156. func (c *podResourcesListerClient) List(ctx context.Context, in *ListPodResourcesRequest, opts ...grpc.CallOption) (*ListPodResourcesResponse, error) {
  157. out := new(ListPodResourcesResponse)
  158. err := grpc.Invoke(ctx, "/v1alpha1.PodResourcesLister/List", in, out, c.cc, opts...)
  159. if err != nil {
  160. return nil, err
  161. }
  162. return out, nil
  163. }
  164. // Server API for PodResourcesLister service
  165. type PodResourcesListerServer interface {
  166. List(context.Context, *ListPodResourcesRequest) (*ListPodResourcesResponse, error)
  167. }
  168. func RegisterPodResourcesListerServer(s *grpc.Server, srv PodResourcesListerServer) {
  169. s.RegisterService(&_PodResourcesLister_serviceDesc, srv)
  170. }
  171. func _PodResourcesLister_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  172. in := new(ListPodResourcesRequest)
  173. if err := dec(in); err != nil {
  174. return nil, err
  175. }
  176. if interceptor == nil {
  177. return srv.(PodResourcesListerServer).List(ctx, in)
  178. }
  179. info := &grpc.UnaryServerInfo{
  180. Server: srv,
  181. FullMethod: "/v1alpha1.PodResourcesLister/List",
  182. }
  183. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  184. return srv.(PodResourcesListerServer).List(ctx, req.(*ListPodResourcesRequest))
  185. }
  186. return interceptor(ctx, in, info, handler)
  187. }
  188. var _PodResourcesLister_serviceDesc = grpc.ServiceDesc{
  189. ServiceName: "v1alpha1.PodResourcesLister",
  190. HandlerType: (*PodResourcesListerServer)(nil),
  191. Methods: []grpc.MethodDesc{
  192. {
  193. MethodName: "List",
  194. Handler: _PodResourcesLister_List_Handler,
  195. },
  196. },
  197. Streams: []grpc.StreamDesc{},
  198. Metadata: "api.proto",
  199. }
  200. func (m *ListPodResourcesRequest) Marshal() (dAtA []byte, err error) {
  201. size := m.Size()
  202. dAtA = make([]byte, size)
  203. n, err := m.MarshalTo(dAtA)
  204. if err != nil {
  205. return nil, err
  206. }
  207. return dAtA[:n], nil
  208. }
  209. func (m *ListPodResourcesRequest) MarshalTo(dAtA []byte) (int, error) {
  210. var i int
  211. _ = i
  212. var l int
  213. _ = l
  214. return i, nil
  215. }
  216. func (m *ListPodResourcesResponse) Marshal() (dAtA []byte, err error) {
  217. size := m.Size()
  218. dAtA = make([]byte, size)
  219. n, err := m.MarshalTo(dAtA)
  220. if err != nil {
  221. return nil, err
  222. }
  223. return dAtA[:n], nil
  224. }
  225. func (m *ListPodResourcesResponse) MarshalTo(dAtA []byte) (int, error) {
  226. var i int
  227. _ = i
  228. var l int
  229. _ = l
  230. if len(m.PodResources) > 0 {
  231. for _, msg := range m.PodResources {
  232. dAtA[i] = 0xa
  233. i++
  234. i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
  235. n, err := msg.MarshalTo(dAtA[i:])
  236. if err != nil {
  237. return 0, err
  238. }
  239. i += n
  240. }
  241. }
  242. return i, nil
  243. }
  244. func (m *PodResources) Marshal() (dAtA []byte, err error) {
  245. size := m.Size()
  246. dAtA = make([]byte, size)
  247. n, err := m.MarshalTo(dAtA)
  248. if err != nil {
  249. return nil, err
  250. }
  251. return dAtA[:n], nil
  252. }
  253. func (m *PodResources) MarshalTo(dAtA []byte) (int, error) {
  254. var i int
  255. _ = i
  256. var l int
  257. _ = l
  258. if len(m.Name) > 0 {
  259. dAtA[i] = 0xa
  260. i++
  261. i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
  262. i += copy(dAtA[i:], m.Name)
  263. }
  264. if len(m.Namespace) > 0 {
  265. dAtA[i] = 0x12
  266. i++
  267. i = encodeVarintApi(dAtA, i, uint64(len(m.Namespace)))
  268. i += copy(dAtA[i:], m.Namespace)
  269. }
  270. if len(m.Containers) > 0 {
  271. for _, msg := range m.Containers {
  272. dAtA[i] = 0x1a
  273. i++
  274. i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
  275. n, err := msg.MarshalTo(dAtA[i:])
  276. if err != nil {
  277. return 0, err
  278. }
  279. i += n
  280. }
  281. }
  282. return i, nil
  283. }
  284. func (m *ContainerResources) Marshal() (dAtA []byte, err error) {
  285. size := m.Size()
  286. dAtA = make([]byte, size)
  287. n, err := m.MarshalTo(dAtA)
  288. if err != nil {
  289. return nil, err
  290. }
  291. return dAtA[:n], nil
  292. }
  293. func (m *ContainerResources) MarshalTo(dAtA []byte) (int, error) {
  294. var i int
  295. _ = i
  296. var l int
  297. _ = l
  298. if len(m.Name) > 0 {
  299. dAtA[i] = 0xa
  300. i++
  301. i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
  302. i += copy(dAtA[i:], m.Name)
  303. }
  304. if len(m.Devices) > 0 {
  305. for _, msg := range m.Devices {
  306. dAtA[i] = 0x12
  307. i++
  308. i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
  309. n, err := msg.MarshalTo(dAtA[i:])
  310. if err != nil {
  311. return 0, err
  312. }
  313. i += n
  314. }
  315. }
  316. return i, nil
  317. }
  318. func (m *ContainerDevices) Marshal() (dAtA []byte, err error) {
  319. size := m.Size()
  320. dAtA = make([]byte, size)
  321. n, err := m.MarshalTo(dAtA)
  322. if err != nil {
  323. return nil, err
  324. }
  325. return dAtA[:n], nil
  326. }
  327. func (m *ContainerDevices) MarshalTo(dAtA []byte) (int, error) {
  328. var i int
  329. _ = i
  330. var l int
  331. _ = l
  332. if len(m.ResourceName) > 0 {
  333. dAtA[i] = 0xa
  334. i++
  335. i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName)))
  336. i += copy(dAtA[i:], m.ResourceName)
  337. }
  338. if len(m.DeviceIds) > 0 {
  339. for _, s := range m.DeviceIds {
  340. dAtA[i] = 0x12
  341. i++
  342. l = len(s)
  343. for l >= 1<<7 {
  344. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  345. l >>= 7
  346. i++
  347. }
  348. dAtA[i] = uint8(l)
  349. i++
  350. i += copy(dAtA[i:], s)
  351. }
  352. }
  353. return i, nil
  354. }
  355. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  356. for v >= 1<<7 {
  357. dAtA[offset] = uint8(v&0x7f | 0x80)
  358. v >>= 7
  359. offset++
  360. }
  361. dAtA[offset] = uint8(v)
  362. return offset + 1
  363. }
  364. func (m *ListPodResourcesRequest) Size() (n int) {
  365. var l int
  366. _ = l
  367. return n
  368. }
  369. func (m *ListPodResourcesResponse) Size() (n int) {
  370. var l int
  371. _ = l
  372. if len(m.PodResources) > 0 {
  373. for _, e := range m.PodResources {
  374. l = e.Size()
  375. n += 1 + l + sovApi(uint64(l))
  376. }
  377. }
  378. return n
  379. }
  380. func (m *PodResources) Size() (n int) {
  381. var l int
  382. _ = l
  383. l = len(m.Name)
  384. if l > 0 {
  385. n += 1 + l + sovApi(uint64(l))
  386. }
  387. l = len(m.Namespace)
  388. if l > 0 {
  389. n += 1 + l + sovApi(uint64(l))
  390. }
  391. if len(m.Containers) > 0 {
  392. for _, e := range m.Containers {
  393. l = e.Size()
  394. n += 1 + l + sovApi(uint64(l))
  395. }
  396. }
  397. return n
  398. }
  399. func (m *ContainerResources) Size() (n int) {
  400. var l int
  401. _ = l
  402. l = len(m.Name)
  403. if l > 0 {
  404. n += 1 + l + sovApi(uint64(l))
  405. }
  406. if len(m.Devices) > 0 {
  407. for _, e := range m.Devices {
  408. l = e.Size()
  409. n += 1 + l + sovApi(uint64(l))
  410. }
  411. }
  412. return n
  413. }
  414. func (m *ContainerDevices) Size() (n int) {
  415. var l int
  416. _ = l
  417. l = len(m.ResourceName)
  418. if l > 0 {
  419. n += 1 + l + sovApi(uint64(l))
  420. }
  421. if len(m.DeviceIds) > 0 {
  422. for _, s := range m.DeviceIds {
  423. l = len(s)
  424. n += 1 + l + sovApi(uint64(l))
  425. }
  426. }
  427. return n
  428. }
  429. func sovApi(x uint64) (n int) {
  430. for {
  431. n++
  432. x >>= 7
  433. if x == 0 {
  434. break
  435. }
  436. }
  437. return n
  438. }
  439. func sozApi(x uint64) (n int) {
  440. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  441. }
  442. func (this *ListPodResourcesRequest) String() string {
  443. if this == nil {
  444. return "nil"
  445. }
  446. s := strings.Join([]string{`&ListPodResourcesRequest{`,
  447. `}`,
  448. }, "")
  449. return s
  450. }
  451. func (this *ListPodResourcesResponse) String() string {
  452. if this == nil {
  453. return "nil"
  454. }
  455. s := strings.Join([]string{`&ListPodResourcesResponse{`,
  456. `PodResources:` + strings.Replace(fmt.Sprintf("%v", this.PodResources), "PodResources", "PodResources", 1) + `,`,
  457. `}`,
  458. }, "")
  459. return s
  460. }
  461. func (this *PodResources) String() string {
  462. if this == nil {
  463. return "nil"
  464. }
  465. s := strings.Join([]string{`&PodResources{`,
  466. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  467. `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
  468. `Containers:` + strings.Replace(fmt.Sprintf("%v", this.Containers), "ContainerResources", "ContainerResources", 1) + `,`,
  469. `}`,
  470. }, "")
  471. return s
  472. }
  473. func (this *ContainerResources) String() string {
  474. if this == nil {
  475. return "nil"
  476. }
  477. s := strings.Join([]string{`&ContainerResources{`,
  478. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  479. `Devices:` + strings.Replace(fmt.Sprintf("%v", this.Devices), "ContainerDevices", "ContainerDevices", 1) + `,`,
  480. `}`,
  481. }, "")
  482. return s
  483. }
  484. func (this *ContainerDevices) String() string {
  485. if this == nil {
  486. return "nil"
  487. }
  488. s := strings.Join([]string{`&ContainerDevices{`,
  489. `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`,
  490. `DeviceIds:` + fmt.Sprintf("%v", this.DeviceIds) + `,`,
  491. `}`,
  492. }, "")
  493. return s
  494. }
  495. func valueToStringApi(v interface{}) string {
  496. rv := reflect.ValueOf(v)
  497. if rv.IsNil() {
  498. return "nil"
  499. }
  500. pv := reflect.Indirect(rv).Interface()
  501. return fmt.Sprintf("*%v", pv)
  502. }
  503. func (m *ListPodResourcesRequest) Unmarshal(dAtA []byte) error {
  504. l := len(dAtA)
  505. iNdEx := 0
  506. for iNdEx < l {
  507. preIndex := iNdEx
  508. var wire uint64
  509. for shift := uint(0); ; shift += 7 {
  510. if shift >= 64 {
  511. return ErrIntOverflowApi
  512. }
  513. if iNdEx >= l {
  514. return io.ErrUnexpectedEOF
  515. }
  516. b := dAtA[iNdEx]
  517. iNdEx++
  518. wire |= (uint64(b) & 0x7F) << shift
  519. if b < 0x80 {
  520. break
  521. }
  522. }
  523. fieldNum := int32(wire >> 3)
  524. wireType := int(wire & 0x7)
  525. if wireType == 4 {
  526. return fmt.Errorf("proto: ListPodResourcesRequest: wiretype end group for non-group")
  527. }
  528. if fieldNum <= 0 {
  529. return fmt.Errorf("proto: ListPodResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  530. }
  531. switch fieldNum {
  532. default:
  533. iNdEx = preIndex
  534. skippy, err := skipApi(dAtA[iNdEx:])
  535. if err != nil {
  536. return err
  537. }
  538. if skippy < 0 {
  539. return ErrInvalidLengthApi
  540. }
  541. if (iNdEx + skippy) > l {
  542. return io.ErrUnexpectedEOF
  543. }
  544. iNdEx += skippy
  545. }
  546. }
  547. if iNdEx > l {
  548. return io.ErrUnexpectedEOF
  549. }
  550. return nil
  551. }
  552. func (m *ListPodResourcesResponse) Unmarshal(dAtA []byte) error {
  553. l := len(dAtA)
  554. iNdEx := 0
  555. for iNdEx < l {
  556. preIndex := iNdEx
  557. var wire uint64
  558. for shift := uint(0); ; shift += 7 {
  559. if shift >= 64 {
  560. return ErrIntOverflowApi
  561. }
  562. if iNdEx >= l {
  563. return io.ErrUnexpectedEOF
  564. }
  565. b := dAtA[iNdEx]
  566. iNdEx++
  567. wire |= (uint64(b) & 0x7F) << shift
  568. if b < 0x80 {
  569. break
  570. }
  571. }
  572. fieldNum := int32(wire >> 3)
  573. wireType := int(wire & 0x7)
  574. if wireType == 4 {
  575. return fmt.Errorf("proto: ListPodResourcesResponse: wiretype end group for non-group")
  576. }
  577. if fieldNum <= 0 {
  578. return fmt.Errorf("proto: ListPodResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  579. }
  580. switch fieldNum {
  581. case 1:
  582. if wireType != 2 {
  583. return fmt.Errorf("proto: wrong wireType = %d for field PodResources", wireType)
  584. }
  585. var msglen int
  586. for shift := uint(0); ; shift += 7 {
  587. if shift >= 64 {
  588. return ErrIntOverflowApi
  589. }
  590. if iNdEx >= l {
  591. return io.ErrUnexpectedEOF
  592. }
  593. b := dAtA[iNdEx]
  594. iNdEx++
  595. msglen |= (int(b) & 0x7F) << shift
  596. if b < 0x80 {
  597. break
  598. }
  599. }
  600. if msglen < 0 {
  601. return ErrInvalidLengthApi
  602. }
  603. postIndex := iNdEx + msglen
  604. if postIndex > l {
  605. return io.ErrUnexpectedEOF
  606. }
  607. m.PodResources = append(m.PodResources, &PodResources{})
  608. if err := m.PodResources[len(m.PodResources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  609. return err
  610. }
  611. iNdEx = postIndex
  612. default:
  613. iNdEx = preIndex
  614. skippy, err := skipApi(dAtA[iNdEx:])
  615. if err != nil {
  616. return err
  617. }
  618. if skippy < 0 {
  619. return ErrInvalidLengthApi
  620. }
  621. if (iNdEx + skippy) > l {
  622. return io.ErrUnexpectedEOF
  623. }
  624. iNdEx += skippy
  625. }
  626. }
  627. if iNdEx > l {
  628. return io.ErrUnexpectedEOF
  629. }
  630. return nil
  631. }
  632. func (m *PodResources) Unmarshal(dAtA []byte) error {
  633. l := len(dAtA)
  634. iNdEx := 0
  635. for iNdEx < l {
  636. preIndex := iNdEx
  637. var wire uint64
  638. for shift := uint(0); ; shift += 7 {
  639. if shift >= 64 {
  640. return ErrIntOverflowApi
  641. }
  642. if iNdEx >= l {
  643. return io.ErrUnexpectedEOF
  644. }
  645. b := dAtA[iNdEx]
  646. iNdEx++
  647. wire |= (uint64(b) & 0x7F) << shift
  648. if b < 0x80 {
  649. break
  650. }
  651. }
  652. fieldNum := int32(wire >> 3)
  653. wireType := int(wire & 0x7)
  654. if wireType == 4 {
  655. return fmt.Errorf("proto: PodResources: wiretype end group for non-group")
  656. }
  657. if fieldNum <= 0 {
  658. return fmt.Errorf("proto: PodResources: illegal tag %d (wire type %d)", fieldNum, wire)
  659. }
  660. switch fieldNum {
  661. case 1:
  662. if wireType != 2 {
  663. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  664. }
  665. var stringLen uint64
  666. for shift := uint(0); ; shift += 7 {
  667. if shift >= 64 {
  668. return ErrIntOverflowApi
  669. }
  670. if iNdEx >= l {
  671. return io.ErrUnexpectedEOF
  672. }
  673. b := dAtA[iNdEx]
  674. iNdEx++
  675. stringLen |= (uint64(b) & 0x7F) << shift
  676. if b < 0x80 {
  677. break
  678. }
  679. }
  680. intStringLen := int(stringLen)
  681. if intStringLen < 0 {
  682. return ErrInvalidLengthApi
  683. }
  684. postIndex := iNdEx + intStringLen
  685. if postIndex > l {
  686. return io.ErrUnexpectedEOF
  687. }
  688. m.Name = string(dAtA[iNdEx:postIndex])
  689. iNdEx = postIndex
  690. case 2:
  691. if wireType != 2 {
  692. return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
  693. }
  694. var stringLen uint64
  695. for shift := uint(0); ; shift += 7 {
  696. if shift >= 64 {
  697. return ErrIntOverflowApi
  698. }
  699. if iNdEx >= l {
  700. return io.ErrUnexpectedEOF
  701. }
  702. b := dAtA[iNdEx]
  703. iNdEx++
  704. stringLen |= (uint64(b) & 0x7F) << shift
  705. if b < 0x80 {
  706. break
  707. }
  708. }
  709. intStringLen := int(stringLen)
  710. if intStringLen < 0 {
  711. return ErrInvalidLengthApi
  712. }
  713. postIndex := iNdEx + intStringLen
  714. if postIndex > l {
  715. return io.ErrUnexpectedEOF
  716. }
  717. m.Namespace = string(dAtA[iNdEx:postIndex])
  718. iNdEx = postIndex
  719. case 3:
  720. if wireType != 2 {
  721. return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType)
  722. }
  723. var msglen int
  724. for shift := uint(0); ; shift += 7 {
  725. if shift >= 64 {
  726. return ErrIntOverflowApi
  727. }
  728. if iNdEx >= l {
  729. return io.ErrUnexpectedEOF
  730. }
  731. b := dAtA[iNdEx]
  732. iNdEx++
  733. msglen |= (int(b) & 0x7F) << shift
  734. if b < 0x80 {
  735. break
  736. }
  737. }
  738. if msglen < 0 {
  739. return ErrInvalidLengthApi
  740. }
  741. postIndex := iNdEx + msglen
  742. if postIndex > l {
  743. return io.ErrUnexpectedEOF
  744. }
  745. m.Containers = append(m.Containers, &ContainerResources{})
  746. if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  747. return err
  748. }
  749. iNdEx = postIndex
  750. default:
  751. iNdEx = preIndex
  752. skippy, err := skipApi(dAtA[iNdEx:])
  753. if err != nil {
  754. return err
  755. }
  756. if skippy < 0 {
  757. return ErrInvalidLengthApi
  758. }
  759. if (iNdEx + skippy) > l {
  760. return io.ErrUnexpectedEOF
  761. }
  762. iNdEx += skippy
  763. }
  764. }
  765. if iNdEx > l {
  766. return io.ErrUnexpectedEOF
  767. }
  768. return nil
  769. }
  770. func (m *ContainerResources) Unmarshal(dAtA []byte) error {
  771. l := len(dAtA)
  772. iNdEx := 0
  773. for iNdEx < l {
  774. preIndex := iNdEx
  775. var wire uint64
  776. for shift := uint(0); ; shift += 7 {
  777. if shift >= 64 {
  778. return ErrIntOverflowApi
  779. }
  780. if iNdEx >= l {
  781. return io.ErrUnexpectedEOF
  782. }
  783. b := dAtA[iNdEx]
  784. iNdEx++
  785. wire |= (uint64(b) & 0x7F) << shift
  786. if b < 0x80 {
  787. break
  788. }
  789. }
  790. fieldNum := int32(wire >> 3)
  791. wireType := int(wire & 0x7)
  792. if wireType == 4 {
  793. return fmt.Errorf("proto: ContainerResources: wiretype end group for non-group")
  794. }
  795. if fieldNum <= 0 {
  796. return fmt.Errorf("proto: ContainerResources: illegal tag %d (wire type %d)", fieldNum, wire)
  797. }
  798. switch fieldNum {
  799. case 1:
  800. if wireType != 2 {
  801. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  802. }
  803. var stringLen uint64
  804. for shift := uint(0); ; shift += 7 {
  805. if shift >= 64 {
  806. return ErrIntOverflowApi
  807. }
  808. if iNdEx >= l {
  809. return io.ErrUnexpectedEOF
  810. }
  811. b := dAtA[iNdEx]
  812. iNdEx++
  813. stringLen |= (uint64(b) & 0x7F) << shift
  814. if b < 0x80 {
  815. break
  816. }
  817. }
  818. intStringLen := int(stringLen)
  819. if intStringLen < 0 {
  820. return ErrInvalidLengthApi
  821. }
  822. postIndex := iNdEx + intStringLen
  823. if postIndex > l {
  824. return io.ErrUnexpectedEOF
  825. }
  826. m.Name = string(dAtA[iNdEx:postIndex])
  827. iNdEx = postIndex
  828. case 2:
  829. if wireType != 2 {
  830. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  831. }
  832. var msglen int
  833. for shift := uint(0); ; shift += 7 {
  834. if shift >= 64 {
  835. return ErrIntOverflowApi
  836. }
  837. if iNdEx >= l {
  838. return io.ErrUnexpectedEOF
  839. }
  840. b := dAtA[iNdEx]
  841. iNdEx++
  842. msglen |= (int(b) & 0x7F) << shift
  843. if b < 0x80 {
  844. break
  845. }
  846. }
  847. if msglen < 0 {
  848. return ErrInvalidLengthApi
  849. }
  850. postIndex := iNdEx + msglen
  851. if postIndex > l {
  852. return io.ErrUnexpectedEOF
  853. }
  854. m.Devices = append(m.Devices, &ContainerDevices{})
  855. if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  856. return err
  857. }
  858. iNdEx = postIndex
  859. default:
  860. iNdEx = preIndex
  861. skippy, err := skipApi(dAtA[iNdEx:])
  862. if err != nil {
  863. return err
  864. }
  865. if skippy < 0 {
  866. return ErrInvalidLengthApi
  867. }
  868. if (iNdEx + skippy) > l {
  869. return io.ErrUnexpectedEOF
  870. }
  871. iNdEx += skippy
  872. }
  873. }
  874. if iNdEx > l {
  875. return io.ErrUnexpectedEOF
  876. }
  877. return nil
  878. }
  879. func (m *ContainerDevices) Unmarshal(dAtA []byte) error {
  880. l := len(dAtA)
  881. iNdEx := 0
  882. for iNdEx < l {
  883. preIndex := iNdEx
  884. var wire uint64
  885. for shift := uint(0); ; shift += 7 {
  886. if shift >= 64 {
  887. return ErrIntOverflowApi
  888. }
  889. if iNdEx >= l {
  890. return io.ErrUnexpectedEOF
  891. }
  892. b := dAtA[iNdEx]
  893. iNdEx++
  894. wire |= (uint64(b) & 0x7F) << shift
  895. if b < 0x80 {
  896. break
  897. }
  898. }
  899. fieldNum := int32(wire >> 3)
  900. wireType := int(wire & 0x7)
  901. if wireType == 4 {
  902. return fmt.Errorf("proto: ContainerDevices: wiretype end group for non-group")
  903. }
  904. if fieldNum <= 0 {
  905. return fmt.Errorf("proto: ContainerDevices: illegal tag %d (wire type %d)", fieldNum, wire)
  906. }
  907. switch fieldNum {
  908. case 1:
  909. if wireType != 2 {
  910. return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType)
  911. }
  912. var stringLen uint64
  913. for shift := uint(0); ; shift += 7 {
  914. if shift >= 64 {
  915. return ErrIntOverflowApi
  916. }
  917. if iNdEx >= l {
  918. return io.ErrUnexpectedEOF
  919. }
  920. b := dAtA[iNdEx]
  921. iNdEx++
  922. stringLen |= (uint64(b) & 0x7F) << shift
  923. if b < 0x80 {
  924. break
  925. }
  926. }
  927. intStringLen := int(stringLen)
  928. if intStringLen < 0 {
  929. return ErrInvalidLengthApi
  930. }
  931. postIndex := iNdEx + intStringLen
  932. if postIndex > l {
  933. return io.ErrUnexpectedEOF
  934. }
  935. m.ResourceName = string(dAtA[iNdEx:postIndex])
  936. iNdEx = postIndex
  937. case 2:
  938. if wireType != 2 {
  939. return fmt.Errorf("proto: wrong wireType = %d for field DeviceIds", wireType)
  940. }
  941. var stringLen uint64
  942. for shift := uint(0); ; shift += 7 {
  943. if shift >= 64 {
  944. return ErrIntOverflowApi
  945. }
  946. if iNdEx >= l {
  947. return io.ErrUnexpectedEOF
  948. }
  949. b := dAtA[iNdEx]
  950. iNdEx++
  951. stringLen |= (uint64(b) & 0x7F) << shift
  952. if b < 0x80 {
  953. break
  954. }
  955. }
  956. intStringLen := int(stringLen)
  957. if intStringLen < 0 {
  958. return ErrInvalidLengthApi
  959. }
  960. postIndex := iNdEx + intStringLen
  961. if postIndex > l {
  962. return io.ErrUnexpectedEOF
  963. }
  964. m.DeviceIds = append(m.DeviceIds, string(dAtA[iNdEx:postIndex]))
  965. iNdEx = postIndex
  966. default:
  967. iNdEx = preIndex
  968. skippy, err := skipApi(dAtA[iNdEx:])
  969. if err != nil {
  970. return err
  971. }
  972. if skippy < 0 {
  973. return ErrInvalidLengthApi
  974. }
  975. if (iNdEx + skippy) > l {
  976. return io.ErrUnexpectedEOF
  977. }
  978. iNdEx += skippy
  979. }
  980. }
  981. if iNdEx > l {
  982. return io.ErrUnexpectedEOF
  983. }
  984. return nil
  985. }
  986. func skipApi(dAtA []byte) (n int, err error) {
  987. l := len(dAtA)
  988. iNdEx := 0
  989. for iNdEx < l {
  990. var wire uint64
  991. for shift := uint(0); ; shift += 7 {
  992. if shift >= 64 {
  993. return 0, ErrIntOverflowApi
  994. }
  995. if iNdEx >= l {
  996. return 0, io.ErrUnexpectedEOF
  997. }
  998. b := dAtA[iNdEx]
  999. iNdEx++
  1000. wire |= (uint64(b) & 0x7F) << shift
  1001. if b < 0x80 {
  1002. break
  1003. }
  1004. }
  1005. wireType := int(wire & 0x7)
  1006. switch wireType {
  1007. case 0:
  1008. for shift := uint(0); ; shift += 7 {
  1009. if shift >= 64 {
  1010. return 0, ErrIntOverflowApi
  1011. }
  1012. if iNdEx >= l {
  1013. return 0, io.ErrUnexpectedEOF
  1014. }
  1015. iNdEx++
  1016. if dAtA[iNdEx-1] < 0x80 {
  1017. break
  1018. }
  1019. }
  1020. return iNdEx, nil
  1021. case 1:
  1022. iNdEx += 8
  1023. return iNdEx, nil
  1024. case 2:
  1025. var length int
  1026. for shift := uint(0); ; shift += 7 {
  1027. if shift >= 64 {
  1028. return 0, ErrIntOverflowApi
  1029. }
  1030. if iNdEx >= l {
  1031. return 0, io.ErrUnexpectedEOF
  1032. }
  1033. b := dAtA[iNdEx]
  1034. iNdEx++
  1035. length |= (int(b) & 0x7F) << shift
  1036. if b < 0x80 {
  1037. break
  1038. }
  1039. }
  1040. iNdEx += length
  1041. if length < 0 {
  1042. return 0, ErrInvalidLengthApi
  1043. }
  1044. return iNdEx, nil
  1045. case 3:
  1046. for {
  1047. var innerWire uint64
  1048. var start int = iNdEx
  1049. for shift := uint(0); ; shift += 7 {
  1050. if shift >= 64 {
  1051. return 0, ErrIntOverflowApi
  1052. }
  1053. if iNdEx >= l {
  1054. return 0, io.ErrUnexpectedEOF
  1055. }
  1056. b := dAtA[iNdEx]
  1057. iNdEx++
  1058. innerWire |= (uint64(b) & 0x7F) << shift
  1059. if b < 0x80 {
  1060. break
  1061. }
  1062. }
  1063. innerWireType := int(innerWire & 0x7)
  1064. if innerWireType == 4 {
  1065. break
  1066. }
  1067. next, err := skipApi(dAtA[start:])
  1068. if err != nil {
  1069. return 0, err
  1070. }
  1071. iNdEx = start + next
  1072. }
  1073. return iNdEx, nil
  1074. case 4:
  1075. return iNdEx, nil
  1076. case 5:
  1077. iNdEx += 4
  1078. return iNdEx, nil
  1079. default:
  1080. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1081. }
  1082. }
  1083. panic("unreachable")
  1084. }
  1085. var (
  1086. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  1087. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  1088. )
  1089. func init() { proto.RegisterFile("api.proto", fileDescriptorApi) }
  1090. var fileDescriptorApi = []byte{
  1091. // 343 bytes of a gzipped FileDescriptorProto
  1092. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xb1, 0x4e, 0xc3, 0x30,
  1093. 0x10, 0xad, 0xdb, 0x0a, 0xc8, 0xd1, 0x4a, 0xc8, 0x03, 0x84, 0xaa, 0x58, 0xc5, 0x2c, 0x5d, 0x48,
  1094. 0xd5, 0xc2, 0x06, 0x13, 0xb0, 0x20, 0x21, 0x40, 0x19, 0x60, 0xa3, 0x4a, 0x13, 0xd3, 0x46, 0xa2,
  1095. 0xb1, 0x89, 0x93, 0x8e, 0x88, 0x4f, 0xe0, 0xb3, 0x3a, 0x32, 0x32, 0xd2, 0xf0, 0x23, 0x28, 0xb6,
  1096. 0xac, 0x04, 0x5a, 0x98, 0x7c, 0x77, 0xef, 0x9d, 0xdf, 0xf3, 0x9d, 0xc1, 0xf2, 0x44, 0xe8, 0x88,
  1097. 0x98, 0x27, 0x1c, 0x6f, 0xcc, 0xfa, 0xde, 0x93, 0x98, 0x78, 0xfd, 0xd6, 0xe1, 0x38, 0x4c, 0x26,
  1098. 0xe9, 0xc8, 0xf1, 0xf9, 0xb4, 0x37, 0xe6, 0x63, 0xde, 0x53, 0x84, 0x51, 0xfa, 0xa8, 0x32, 0x95,
  1099. 0xa8, 0x48, 0x37, 0xd2, 0x5d, 0xd8, 0xb9, 0x0a, 0x65, 0x72, 0xcb, 0x03, 0x97, 0x49, 0x9e, 0xc6,
  1100. 0x3e, 0x93, 0x2e, 0x7b, 0x4e, 0x99, 0x4c, 0xe8, 0x3d, 0xd8, 0xcb, 0x90, 0x14, 0x3c, 0x92, 0x0c,
  1101. 0x9f, 0x40, 0x53, 0xf0, 0x60, 0x18, 0x1b, 0xc0, 0x46, 0x9d, 0x5a, 0x77, 0x73, 0xb0, 0xed, 0x18,
  1102. 0x1f, 0xce, 0x8f, 0xb6, 0x86, 0x28, 0x65, 0xf4, 0x05, 0x1a, 0x65, 0x14, 0x63, 0xa8, 0x47, 0xde,
  1103. 0x94, 0xd9, 0xa8, 0x83, 0xba, 0x96, 0xab, 0x62, 0xdc, 0x06, 0x2b, 0x3f, 0xa5, 0xf0, 0x7c, 0x66,
  1104. 0x57, 0x15, 0x50, 0x14, 0xf0, 0x29, 0x80, 0xcf, 0xa3, 0xc4, 0x0b, 0x23, 0x16, 0x4b, 0xbb, 0xa6,
  1105. 0xb4, 0xdb, 0x85, 0xf6, 0xb9, 0xc1, 0x0a, 0x07, 0x25, 0x3e, 0x7d, 0x00, 0xbc, 0xcc, 0x58, 0xe9,
  1106. 0xe2, 0x18, 0xd6, 0x03, 0x36, 0x0b, 0xf3, 0x07, 0x56, 0x95, 0x48, 0x6b, 0x85, 0xc8, 0x85, 0x66,
  1107. 0xb8, 0x86, 0x4a, 0xef, 0x60, 0xeb, 0x37, 0x88, 0x0f, 0xa0, 0x69, 0x86, 0x35, 0x2c, 0xc9, 0x34,
  1108. 0x4c, 0xf1, 0x3a, 0x97, 0xdb, 0x03, 0xd0, 0x77, 0x0c, 0xc3, 0x40, 0x2b, 0x5a, 0xae, 0xa5, 0x2b,
  1109. 0x97, 0x81, 0x1c, 0x30, 0xc0, 0xe5, 0xb9, 0xe5, 0xcb, 0x61, 0x31, 0xbe, 0x81, 0x7a, 0x1e, 0xe1,
  1110. 0xfd, 0xc2, 0xda, 0x1f, 0x1b, 0x6d, 0xd1, 0xff, 0x28, 0x7a, 0xb3, 0xb4, 0x72, 0xd6, 0x9e, 0x2f,
  1111. 0x08, 0xfa, 0x58, 0x90, 0xca, 0x6b, 0x46, 0xd0, 0x3c, 0x23, 0xe8, 0x3d, 0x23, 0xe8, 0x33, 0x23,
  1112. 0xe8, 0xed, 0x8b, 0x54, 0x46, 0x6b, 0xea, 0xdf, 0x1c, 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0xc0,
  1113. 0xce, 0xf2, 0x80, 0x7d, 0x02, 0x00, 0x00,
  1114. }