generated.pb.go 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. /*
  2. Copyright 2016 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.
  14. // source: k8s.io/kubernetes/pkg/util/intstr/generated.proto
  15. // DO NOT EDIT!
  16. /*
  17. Package intstr is a generated protocol buffer package.
  18. It is generated from these files:
  19. k8s.io/kubernetes/pkg/util/intstr/generated.proto
  20. It has these top-level messages:
  21. IntOrString
  22. */
  23. package intstr
  24. import proto "github.com/gogo/protobuf/proto"
  25. import fmt "fmt"
  26. import math "math"
  27. import io "io"
  28. // Reference imports to suppress errors if they are not otherwise used.
  29. var _ = proto.Marshal
  30. var _ = fmt.Errorf
  31. var _ = math.Inf
  32. // This is a compile-time assertion to ensure that this generated file
  33. // is compatible with the proto package it is being compiled against.
  34. const _ = proto.GoGoProtoPackageIsVersion1
  35. func (m *IntOrString) Reset() { *m = IntOrString{} }
  36. func (*IntOrString) ProtoMessage() {}
  37. func (*IntOrString) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
  38. func init() {
  39. proto.RegisterType((*IntOrString)(nil), "k8s.io.kubernetes.pkg.util.intstr.IntOrString")
  40. }
  41. func (m *IntOrString) Marshal() (data []byte, err error) {
  42. size := m.Size()
  43. data = make([]byte, size)
  44. n, err := m.MarshalTo(data)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return data[:n], nil
  49. }
  50. func (m *IntOrString) MarshalTo(data []byte) (int, error) {
  51. var i int
  52. _ = i
  53. var l int
  54. _ = l
  55. data[i] = 0x8
  56. i++
  57. i = encodeVarintGenerated(data, i, uint64(m.Type))
  58. data[i] = 0x10
  59. i++
  60. i = encodeVarintGenerated(data, i, uint64(m.IntVal))
  61. data[i] = 0x1a
  62. i++
  63. i = encodeVarintGenerated(data, i, uint64(len(m.StrVal)))
  64. i += copy(data[i:], m.StrVal)
  65. return i, nil
  66. }
  67. func encodeFixed64Generated(data []byte, offset int, v uint64) int {
  68. data[offset] = uint8(v)
  69. data[offset+1] = uint8(v >> 8)
  70. data[offset+2] = uint8(v >> 16)
  71. data[offset+3] = uint8(v >> 24)
  72. data[offset+4] = uint8(v >> 32)
  73. data[offset+5] = uint8(v >> 40)
  74. data[offset+6] = uint8(v >> 48)
  75. data[offset+7] = uint8(v >> 56)
  76. return offset + 8
  77. }
  78. func encodeFixed32Generated(data []byte, offset int, v uint32) int {
  79. data[offset] = uint8(v)
  80. data[offset+1] = uint8(v >> 8)
  81. data[offset+2] = uint8(v >> 16)
  82. data[offset+3] = uint8(v >> 24)
  83. return offset + 4
  84. }
  85. func encodeVarintGenerated(data []byte, offset int, v uint64) int {
  86. for v >= 1<<7 {
  87. data[offset] = uint8(v&0x7f | 0x80)
  88. v >>= 7
  89. offset++
  90. }
  91. data[offset] = uint8(v)
  92. return offset + 1
  93. }
  94. func (m *IntOrString) Size() (n int) {
  95. var l int
  96. _ = l
  97. n += 1 + sovGenerated(uint64(m.Type))
  98. n += 1 + sovGenerated(uint64(m.IntVal))
  99. l = len(m.StrVal)
  100. n += 1 + l + sovGenerated(uint64(l))
  101. return n
  102. }
  103. func sovGenerated(x uint64) (n int) {
  104. for {
  105. n++
  106. x >>= 7
  107. if x == 0 {
  108. break
  109. }
  110. }
  111. return n
  112. }
  113. func sozGenerated(x uint64) (n int) {
  114. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  115. }
  116. func (m *IntOrString) Unmarshal(data []byte) error {
  117. l := len(data)
  118. iNdEx := 0
  119. for iNdEx < l {
  120. preIndex := iNdEx
  121. var wire uint64
  122. for shift := uint(0); ; shift += 7 {
  123. if shift >= 64 {
  124. return ErrIntOverflowGenerated
  125. }
  126. if iNdEx >= l {
  127. return io.ErrUnexpectedEOF
  128. }
  129. b := data[iNdEx]
  130. iNdEx++
  131. wire |= (uint64(b) & 0x7F) << shift
  132. if b < 0x80 {
  133. break
  134. }
  135. }
  136. fieldNum := int32(wire >> 3)
  137. wireType := int(wire & 0x7)
  138. if wireType == 4 {
  139. return fmt.Errorf("proto: IntOrString: wiretype end group for non-group")
  140. }
  141. if fieldNum <= 0 {
  142. return fmt.Errorf("proto: IntOrString: illegal tag %d (wire type %d)", fieldNum, wire)
  143. }
  144. switch fieldNum {
  145. case 1:
  146. if wireType != 0 {
  147. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  148. }
  149. m.Type = 0
  150. for shift := uint(0); ; shift += 7 {
  151. if shift >= 64 {
  152. return ErrIntOverflowGenerated
  153. }
  154. if iNdEx >= l {
  155. return io.ErrUnexpectedEOF
  156. }
  157. b := data[iNdEx]
  158. iNdEx++
  159. m.Type |= (Type(b) & 0x7F) << shift
  160. if b < 0x80 {
  161. break
  162. }
  163. }
  164. case 2:
  165. if wireType != 0 {
  166. return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType)
  167. }
  168. m.IntVal = 0
  169. for shift := uint(0); ; shift += 7 {
  170. if shift >= 64 {
  171. return ErrIntOverflowGenerated
  172. }
  173. if iNdEx >= l {
  174. return io.ErrUnexpectedEOF
  175. }
  176. b := data[iNdEx]
  177. iNdEx++
  178. m.IntVal |= (int32(b) & 0x7F) << shift
  179. if b < 0x80 {
  180. break
  181. }
  182. }
  183. case 3:
  184. if wireType != 2 {
  185. return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType)
  186. }
  187. var stringLen uint64
  188. for shift := uint(0); ; shift += 7 {
  189. if shift >= 64 {
  190. return ErrIntOverflowGenerated
  191. }
  192. if iNdEx >= l {
  193. return io.ErrUnexpectedEOF
  194. }
  195. b := data[iNdEx]
  196. iNdEx++
  197. stringLen |= (uint64(b) & 0x7F) << shift
  198. if b < 0x80 {
  199. break
  200. }
  201. }
  202. intStringLen := int(stringLen)
  203. if intStringLen < 0 {
  204. return ErrInvalidLengthGenerated
  205. }
  206. postIndex := iNdEx + intStringLen
  207. if postIndex > l {
  208. return io.ErrUnexpectedEOF
  209. }
  210. m.StrVal = string(data[iNdEx:postIndex])
  211. iNdEx = postIndex
  212. default:
  213. iNdEx = preIndex
  214. skippy, err := skipGenerated(data[iNdEx:])
  215. if err != nil {
  216. return err
  217. }
  218. if skippy < 0 {
  219. return ErrInvalidLengthGenerated
  220. }
  221. if (iNdEx + skippy) > l {
  222. return io.ErrUnexpectedEOF
  223. }
  224. iNdEx += skippy
  225. }
  226. }
  227. if iNdEx > l {
  228. return io.ErrUnexpectedEOF
  229. }
  230. return nil
  231. }
  232. func skipGenerated(data []byte) (n int, err error) {
  233. l := len(data)
  234. iNdEx := 0
  235. for iNdEx < l {
  236. var wire uint64
  237. for shift := uint(0); ; shift += 7 {
  238. if shift >= 64 {
  239. return 0, ErrIntOverflowGenerated
  240. }
  241. if iNdEx >= l {
  242. return 0, io.ErrUnexpectedEOF
  243. }
  244. b := data[iNdEx]
  245. iNdEx++
  246. wire |= (uint64(b) & 0x7F) << shift
  247. if b < 0x80 {
  248. break
  249. }
  250. }
  251. wireType := int(wire & 0x7)
  252. switch wireType {
  253. case 0:
  254. for shift := uint(0); ; shift += 7 {
  255. if shift >= 64 {
  256. return 0, ErrIntOverflowGenerated
  257. }
  258. if iNdEx >= l {
  259. return 0, io.ErrUnexpectedEOF
  260. }
  261. iNdEx++
  262. if data[iNdEx-1] < 0x80 {
  263. break
  264. }
  265. }
  266. return iNdEx, nil
  267. case 1:
  268. iNdEx += 8
  269. return iNdEx, nil
  270. case 2:
  271. var length int
  272. for shift := uint(0); ; shift += 7 {
  273. if shift >= 64 {
  274. return 0, ErrIntOverflowGenerated
  275. }
  276. if iNdEx >= l {
  277. return 0, io.ErrUnexpectedEOF
  278. }
  279. b := data[iNdEx]
  280. iNdEx++
  281. length |= (int(b) & 0x7F) << shift
  282. if b < 0x80 {
  283. break
  284. }
  285. }
  286. iNdEx += length
  287. if length < 0 {
  288. return 0, ErrInvalidLengthGenerated
  289. }
  290. return iNdEx, nil
  291. case 3:
  292. for {
  293. var innerWire uint64
  294. var start int = iNdEx
  295. for shift := uint(0); ; shift += 7 {
  296. if shift >= 64 {
  297. return 0, ErrIntOverflowGenerated
  298. }
  299. if iNdEx >= l {
  300. return 0, io.ErrUnexpectedEOF
  301. }
  302. b := data[iNdEx]
  303. iNdEx++
  304. innerWire |= (uint64(b) & 0x7F) << shift
  305. if b < 0x80 {
  306. break
  307. }
  308. }
  309. innerWireType := int(innerWire & 0x7)
  310. if innerWireType == 4 {
  311. break
  312. }
  313. next, err := skipGenerated(data[start:])
  314. if err != nil {
  315. return 0, err
  316. }
  317. iNdEx = start + next
  318. }
  319. return iNdEx, nil
  320. case 4:
  321. return iNdEx, nil
  322. case 5:
  323. iNdEx += 4
  324. return iNdEx, nil
  325. default:
  326. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  327. }
  328. }
  329. panic("unreachable")
  330. }
  331. var (
  332. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  333. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  334. )
  335. var fileDescriptorGenerated = []byte{
  336. // 256 bytes of a gzipped FileDescriptorProto
  337. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xcc, 0xb6, 0x28, 0xd6,
  338. 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8,
  339. 0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, 0x4f, 0x4f,
  340. 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x84,
  341. 0x68, 0xd1, 0x43, 0x68, 0xd1, 0x03, 0x6a, 0xd1, 0x03, 0x69, 0xd1, 0x83, 0x68, 0x91, 0xd2, 0x4d,
  342. 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07,
  343. 0xeb, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xa2, 0xd2, 0x44, 0x46, 0x2e,
  344. 0x6e, 0xcf, 0xbc, 0x12, 0xff, 0xa2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x21, 0x0d, 0x2e, 0x96,
  345. 0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x66, 0x27, 0x91, 0x13, 0xf7, 0xe4, 0x19,
  346. 0x1e, 0xdd, 0x93, 0x67, 0x09, 0x01, 0x8a, 0xfd, 0x82, 0xd2, 0x41, 0x60, 0x15, 0x42, 0x6a, 0x5c,
  347. 0x6c, 0x40, 0x2b, 0xc3, 0x12, 0x73, 0x24, 0x98, 0x80, 0x6a, 0x59, 0x9d, 0xf8, 0xa0, 0x6a, 0xd9,
  348. 0x3c, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x90, 0x3a, 0xa0, 0xbb, 0x40, 0xea, 0x98, 0x81, 0xea, 0x38,
  349. 0x11, 0xea, 0x82, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x2b, 0x8e, 0x19, 0x0b, 0xe4, 0x19, 0x1a, 0xee,
  350. 0x28, 0x30, 0x38, 0x69, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0x01, 0x88, 0x6f, 0x00, 0x71, 0xc3, 0x23,
  351. 0x39, 0xc6, 0x13, 0x40, 0x7c, 0x01, 0x88, 0x1f, 0x00, 0xf1, 0x84, 0xc7, 0x72, 0x0c, 0x51, 0x6c,
  352. 0x10, 0xcf, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x68, 0x57, 0xfb, 0xfa, 0x43, 0x01, 0x00, 0x00,
  353. }