generated.pb.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  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/apimachinery/pkg/runtime/generated.proto
  15. package runtime
  16. import (
  17. fmt "fmt"
  18. io "io"
  19. math "math"
  20. math_bits "math/bits"
  21. reflect "reflect"
  22. strings "strings"
  23. proto "github.com/gogo/protobuf/proto"
  24. )
  25. // Reference imports to suppress errors if they are not otherwise used.
  26. var _ = proto.Marshal
  27. var _ = fmt.Errorf
  28. var _ = math.Inf
  29. // This is a compile-time assertion to ensure that this generated file
  30. // is compatible with the proto package it is being compiled against.
  31. // A compilation error at this line likely means your copy of the
  32. // proto package needs to be updated.
  33. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  34. func (m *RawExtension) Reset() { *m = RawExtension{} }
  35. func (*RawExtension) ProtoMessage() {}
  36. func (*RawExtension) Descriptor() ([]byte, []int) {
  37. return fileDescriptor_9d3c45d7f546725c, []int{0}
  38. }
  39. func (m *RawExtension) XXX_Unmarshal(b []byte) error {
  40. return m.Unmarshal(b)
  41. }
  42. func (m *RawExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  43. b = b[:cap(b)]
  44. n, err := m.MarshalToSizedBuffer(b)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return b[:n], nil
  49. }
  50. func (m *RawExtension) XXX_Merge(src proto.Message) {
  51. xxx_messageInfo_RawExtension.Merge(m, src)
  52. }
  53. func (m *RawExtension) XXX_Size() int {
  54. return m.Size()
  55. }
  56. func (m *RawExtension) XXX_DiscardUnknown() {
  57. xxx_messageInfo_RawExtension.DiscardUnknown(m)
  58. }
  59. var xxx_messageInfo_RawExtension proto.InternalMessageInfo
  60. func (m *TypeMeta) Reset() { *m = TypeMeta{} }
  61. func (*TypeMeta) ProtoMessage() {}
  62. func (*TypeMeta) Descriptor() ([]byte, []int) {
  63. return fileDescriptor_9d3c45d7f546725c, []int{1}
  64. }
  65. func (m *TypeMeta) XXX_Unmarshal(b []byte) error {
  66. return m.Unmarshal(b)
  67. }
  68. func (m *TypeMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  69. b = b[:cap(b)]
  70. n, err := m.MarshalToSizedBuffer(b)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return b[:n], nil
  75. }
  76. func (m *TypeMeta) XXX_Merge(src proto.Message) {
  77. xxx_messageInfo_TypeMeta.Merge(m, src)
  78. }
  79. func (m *TypeMeta) XXX_Size() int {
  80. return m.Size()
  81. }
  82. func (m *TypeMeta) XXX_DiscardUnknown() {
  83. xxx_messageInfo_TypeMeta.DiscardUnknown(m)
  84. }
  85. var xxx_messageInfo_TypeMeta proto.InternalMessageInfo
  86. func (m *Unknown) Reset() { *m = Unknown{} }
  87. func (*Unknown) ProtoMessage() {}
  88. func (*Unknown) Descriptor() ([]byte, []int) {
  89. return fileDescriptor_9d3c45d7f546725c, []int{2}
  90. }
  91. func (m *Unknown) XXX_Unmarshal(b []byte) error {
  92. return m.Unmarshal(b)
  93. }
  94. func (m *Unknown) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  95. b = b[:cap(b)]
  96. n, err := m.MarshalToSizedBuffer(b)
  97. if err != nil {
  98. return nil, err
  99. }
  100. return b[:n], nil
  101. }
  102. func (m *Unknown) XXX_Merge(src proto.Message) {
  103. xxx_messageInfo_Unknown.Merge(m, src)
  104. }
  105. func (m *Unknown) XXX_Size() int {
  106. return m.Size()
  107. }
  108. func (m *Unknown) XXX_DiscardUnknown() {
  109. xxx_messageInfo_Unknown.DiscardUnknown(m)
  110. }
  111. var xxx_messageInfo_Unknown proto.InternalMessageInfo
  112. func init() {
  113. proto.RegisterType((*RawExtension)(nil), "k8s.io.apimachinery.pkg.runtime.RawExtension")
  114. proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.runtime.TypeMeta")
  115. proto.RegisterType((*Unknown)(nil), "k8s.io.apimachinery.pkg.runtime.Unknown")
  116. }
  117. func init() {
  118. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_9d3c45d7f546725c)
  119. }
  120. var fileDescriptor_9d3c45d7f546725c = []byte{
  121. // 380 bytes of a gzipped FileDescriptorProto
  122. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0xaa, 0x13, 0x31,
  123. 0x14, 0xc6, 0x27, 0xb7, 0x85, 0x7b, 0x4d, 0x0b, 0x57, 0xe2, 0xc2, 0xd1, 0x45, 0xe6, 0xd2, 0x95,
  124. 0x77, 0x61, 0x02, 0x17, 0x04, 0xb7, 0x9d, 0x52, 0x50, 0x44, 0x90, 0xe0, 0x1f, 0x70, 0x65, 0x3a,
  125. 0x13, 0xa7, 0x61, 0xe8, 0xc9, 0x90, 0x66, 0x1c, 0xbb, 0xf3, 0x11, 0x7c, 0xac, 0x2e, 0xbb, 0xec,
  126. 0xaa, 0xd8, 0xf1, 0x21, 0xdc, 0x4a, 0xd3, 0xb4, 0x56, 0x5d, 0x74, 0x97, 0x73, 0xbe, 0xef, 0xf7,
  127. 0x9d, 0x73, 0x20, 0xf8, 0x45, 0xf9, 0x7c, 0xce, 0xb4, 0xe1, 0x65, 0x3d, 0x51, 0x16, 0x94, 0x53,
  128. 0x73, 0xfe, 0x45, 0x41, 0x6e, 0x2c, 0x0f, 0x82, 0xac, 0xf4, 0x4c, 0x66, 0x53, 0x0d, 0xca, 0x2e,
  129. 0x78, 0x55, 0x16, 0xdc, 0xd6, 0xe0, 0xf4, 0x4c, 0xf1, 0x42, 0x81, 0xb2, 0xd2, 0xa9, 0x9c, 0x55,
  130. 0xd6, 0x38, 0x43, 0x92, 0x3d, 0xc0, 0x4e, 0x01, 0x56, 0x95, 0x05, 0x0b, 0xc0, 0xe3, 0xa7, 0x85,
  131. 0x76, 0xd3, 0x7a, 0xc2, 0x32, 0x33, 0xe3, 0x85, 0x29, 0x0c, 0xf7, 0xdc, 0xa4, 0xfe, 0xec, 0x2b,
  132. 0x5f, 0xf8, 0xd7, 0x3e, 0x6f, 0x70, 0x8b, 0xfb, 0x42, 0x36, 0xe3, 0xaf, 0x4e, 0xc1, 0x5c, 0x1b,
  133. 0x20, 0x8f, 0x70, 0xc7, 0xca, 0x26, 0x46, 0x37, 0xe8, 0x49, 0x3f, 0xbd, 0x6c, 0x37, 0x49, 0x47,
  134. 0xc8, 0x46, 0xec, 0x7a, 0x83, 0x4f, 0xf8, 0xea, 0xed, 0xa2, 0x52, 0xaf, 0x95, 0x93, 0xe4, 0x0e,
  135. 0x63, 0x59, 0xe9, 0xf7, 0xca, 0xee, 0x20, 0xef, 0xbe, 0x97, 0x92, 0xe5, 0x26, 0x89, 0xda, 0x4d,
  136. 0x82, 0x87, 0x6f, 0x5e, 0x06, 0x45, 0x9c, 0xb8, 0xc8, 0x0d, 0xee, 0x96, 0x1a, 0xf2, 0xf8, 0xc2,
  137. 0xbb, 0xfb, 0xc1, 0xdd, 0x7d, 0xa5, 0x21, 0x17, 0x5e, 0x19, 0xfc, 0x42, 0xf8, 0xf2, 0x1d, 0x94,
  138. 0x60, 0x1a, 0x20, 0x1f, 0xf0, 0x95, 0x0b, 0xd3, 0x7c, 0x7e, 0xef, 0xee, 0x96, 0x9d, 0xb9, 0x9d,
  139. 0x1d, 0xd6, 0x4b, 0xef, 0x87, 0xf0, 0xe3, 0xc2, 0xe2, 0x18, 0x76, 0xb8, 0xf0, 0xe2, 0xff, 0x0b,
  140. 0xc9, 0x10, 0x5f, 0x67, 0x06, 0x9c, 0x02, 0x37, 0x86, 0xcc, 0xe4, 0x1a, 0x8a, 0xb8, 0xe3, 0x97,
  141. 0x7d, 0x18, 0xf2, 0xae, 0x47, 0x7f, 0xcb, 0xe2, 0x5f, 0x3f, 0x79, 0x86, 0x7b, 0xa1, 0xb5, 0x1b,
  142. 0x1d, 0x77, 0x3d, 0xfe, 0x20, 0xe0, 0xbd, 0xd1, 0x1f, 0x49, 0x9c, 0xfa, 0xd2, 0xf1, 0x72, 0x4b,
  143. 0xa3, 0xd5, 0x96, 0x46, 0xeb, 0x2d, 0x8d, 0xbe, 0xb5, 0x14, 0x2d, 0x5b, 0x8a, 0x56, 0x2d, 0x45,
  144. 0xeb, 0x96, 0xa2, 0x1f, 0x2d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0x63, 0x72, 0xe6, 0xb7, 0xfc, 0x0e,
  145. 0x00, 0x00, 0xff, 0xff, 0x1f, 0x32, 0xd5, 0x68, 0x68, 0x02, 0x00, 0x00,
  146. }
  147. func (m *RawExtension) Marshal() (dAtA []byte, err error) {
  148. size := m.Size()
  149. dAtA = make([]byte, size)
  150. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  151. if err != nil {
  152. return nil, err
  153. }
  154. return dAtA[:n], nil
  155. }
  156. func (m *RawExtension) MarshalTo(dAtA []byte) (int, error) {
  157. size := m.Size()
  158. return m.MarshalToSizedBuffer(dAtA[:size])
  159. }
  160. func (m *RawExtension) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  161. i := len(dAtA)
  162. _ = i
  163. var l int
  164. _ = l
  165. if m.Raw != nil {
  166. i -= len(m.Raw)
  167. copy(dAtA[i:], m.Raw)
  168. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw)))
  169. i--
  170. dAtA[i] = 0xa
  171. }
  172. return len(dAtA) - i, nil
  173. }
  174. func (m *TypeMeta) Marshal() (dAtA []byte, err error) {
  175. size := m.Size()
  176. dAtA = make([]byte, size)
  177. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  178. if err != nil {
  179. return nil, err
  180. }
  181. return dAtA[:n], nil
  182. }
  183. func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) {
  184. size := m.Size()
  185. return m.MarshalToSizedBuffer(dAtA[:size])
  186. }
  187. func (m *TypeMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  188. i := len(dAtA)
  189. _ = i
  190. var l int
  191. _ = l
  192. i -= len(m.Kind)
  193. copy(dAtA[i:], m.Kind)
  194. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
  195. i--
  196. dAtA[i] = 0x12
  197. i -= len(m.APIVersion)
  198. copy(dAtA[i:], m.APIVersion)
  199. i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
  200. i--
  201. dAtA[i] = 0xa
  202. return len(dAtA) - i, nil
  203. }
  204. func (m *Unknown) Marshal() (dAtA []byte, err error) {
  205. size := m.Size()
  206. dAtA = make([]byte, size)
  207. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  208. if err != nil {
  209. return nil, err
  210. }
  211. return dAtA[:n], nil
  212. }
  213. func (m *Unknown) MarshalTo(dAtA []byte) (int, error) {
  214. size := m.Size()
  215. return m.MarshalToSizedBuffer(dAtA[:size])
  216. }
  217. func (m *Unknown) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  218. i := len(dAtA)
  219. _ = i
  220. var l int
  221. _ = l
  222. i -= len(m.ContentType)
  223. copy(dAtA[i:], m.ContentType)
  224. i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentType)))
  225. i--
  226. dAtA[i] = 0x22
  227. i -= len(m.ContentEncoding)
  228. copy(dAtA[i:], m.ContentEncoding)
  229. i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentEncoding)))
  230. i--
  231. dAtA[i] = 0x1a
  232. if m.Raw != nil {
  233. i -= len(m.Raw)
  234. copy(dAtA[i:], m.Raw)
  235. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw)))
  236. i--
  237. dAtA[i] = 0x12
  238. }
  239. {
  240. size, err := m.TypeMeta.MarshalToSizedBuffer(dAtA[:i])
  241. if err != nil {
  242. return 0, err
  243. }
  244. i -= size
  245. i = encodeVarintGenerated(dAtA, i, uint64(size))
  246. }
  247. i--
  248. dAtA[i] = 0xa
  249. return len(dAtA) - i, nil
  250. }
  251. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  252. offset -= sovGenerated(v)
  253. base := offset
  254. for v >= 1<<7 {
  255. dAtA[offset] = uint8(v&0x7f | 0x80)
  256. v >>= 7
  257. offset++
  258. }
  259. dAtA[offset] = uint8(v)
  260. return base
  261. }
  262. func (m *RawExtension) Size() (n int) {
  263. if m == nil {
  264. return 0
  265. }
  266. var l int
  267. _ = l
  268. if m.Raw != nil {
  269. l = len(m.Raw)
  270. n += 1 + l + sovGenerated(uint64(l))
  271. }
  272. return n
  273. }
  274. func (m *TypeMeta) Size() (n int) {
  275. if m == nil {
  276. return 0
  277. }
  278. var l int
  279. _ = l
  280. l = len(m.APIVersion)
  281. n += 1 + l + sovGenerated(uint64(l))
  282. l = len(m.Kind)
  283. n += 1 + l + sovGenerated(uint64(l))
  284. return n
  285. }
  286. func (m *Unknown) Size() (n int) {
  287. if m == nil {
  288. return 0
  289. }
  290. var l int
  291. _ = l
  292. l = m.TypeMeta.Size()
  293. n += 1 + l + sovGenerated(uint64(l))
  294. if m.Raw != nil {
  295. l = len(m.Raw)
  296. n += 1 + l + sovGenerated(uint64(l))
  297. }
  298. l = len(m.ContentEncoding)
  299. n += 1 + l + sovGenerated(uint64(l))
  300. l = len(m.ContentType)
  301. n += 1 + l + sovGenerated(uint64(l))
  302. return n
  303. }
  304. func sovGenerated(x uint64) (n int) {
  305. return (math_bits.Len64(x|1) + 6) / 7
  306. }
  307. func sozGenerated(x uint64) (n int) {
  308. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  309. }
  310. func (this *RawExtension) String() string {
  311. if this == nil {
  312. return "nil"
  313. }
  314. s := strings.Join([]string{`&RawExtension{`,
  315. `Raw:` + valueToStringGenerated(this.Raw) + `,`,
  316. `}`,
  317. }, "")
  318. return s
  319. }
  320. func (this *TypeMeta) String() string {
  321. if this == nil {
  322. return "nil"
  323. }
  324. s := strings.Join([]string{`&TypeMeta{`,
  325. `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
  326. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  327. `}`,
  328. }, "")
  329. return s
  330. }
  331. func (this *Unknown) String() string {
  332. if this == nil {
  333. return "nil"
  334. }
  335. s := strings.Join([]string{`&Unknown{`,
  336. `TypeMeta:` + strings.Replace(strings.Replace(this.TypeMeta.String(), "TypeMeta", "TypeMeta", 1), `&`, ``, 1) + `,`,
  337. `Raw:` + valueToStringGenerated(this.Raw) + `,`,
  338. `ContentEncoding:` + fmt.Sprintf("%v", this.ContentEncoding) + `,`,
  339. `ContentType:` + fmt.Sprintf("%v", this.ContentType) + `,`,
  340. `}`,
  341. }, "")
  342. return s
  343. }
  344. func valueToStringGenerated(v interface{}) string {
  345. rv := reflect.ValueOf(v)
  346. if rv.IsNil() {
  347. return "nil"
  348. }
  349. pv := reflect.Indirect(rv).Interface()
  350. return fmt.Sprintf("*%v", pv)
  351. }
  352. func (m *RawExtension) Unmarshal(dAtA []byte) error {
  353. l := len(dAtA)
  354. iNdEx := 0
  355. for iNdEx < l {
  356. preIndex := iNdEx
  357. var wire uint64
  358. for shift := uint(0); ; shift += 7 {
  359. if shift >= 64 {
  360. return ErrIntOverflowGenerated
  361. }
  362. if iNdEx >= l {
  363. return io.ErrUnexpectedEOF
  364. }
  365. b := dAtA[iNdEx]
  366. iNdEx++
  367. wire |= uint64(b&0x7F) << shift
  368. if b < 0x80 {
  369. break
  370. }
  371. }
  372. fieldNum := int32(wire >> 3)
  373. wireType := int(wire & 0x7)
  374. if wireType == 4 {
  375. return fmt.Errorf("proto: RawExtension: wiretype end group for non-group")
  376. }
  377. if fieldNum <= 0 {
  378. return fmt.Errorf("proto: RawExtension: illegal tag %d (wire type %d)", fieldNum, wire)
  379. }
  380. switch fieldNum {
  381. case 1:
  382. if wireType != 2 {
  383. return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType)
  384. }
  385. var byteLen int
  386. for shift := uint(0); ; shift += 7 {
  387. if shift >= 64 {
  388. return ErrIntOverflowGenerated
  389. }
  390. if iNdEx >= l {
  391. return io.ErrUnexpectedEOF
  392. }
  393. b := dAtA[iNdEx]
  394. iNdEx++
  395. byteLen |= int(b&0x7F) << shift
  396. if b < 0x80 {
  397. break
  398. }
  399. }
  400. if byteLen < 0 {
  401. return ErrInvalidLengthGenerated
  402. }
  403. postIndex := iNdEx + byteLen
  404. if postIndex < 0 {
  405. return ErrInvalidLengthGenerated
  406. }
  407. if postIndex > l {
  408. return io.ErrUnexpectedEOF
  409. }
  410. m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...)
  411. if m.Raw == nil {
  412. m.Raw = []byte{}
  413. }
  414. iNdEx = postIndex
  415. default:
  416. iNdEx = preIndex
  417. skippy, err := skipGenerated(dAtA[iNdEx:])
  418. if err != nil {
  419. return err
  420. }
  421. if (skippy < 0) || (iNdEx+skippy) < 0 {
  422. return ErrInvalidLengthGenerated
  423. }
  424. if (iNdEx + skippy) > l {
  425. return io.ErrUnexpectedEOF
  426. }
  427. iNdEx += skippy
  428. }
  429. }
  430. if iNdEx > l {
  431. return io.ErrUnexpectedEOF
  432. }
  433. return nil
  434. }
  435. func (m *TypeMeta) Unmarshal(dAtA []byte) error {
  436. l := len(dAtA)
  437. iNdEx := 0
  438. for iNdEx < l {
  439. preIndex := iNdEx
  440. var wire uint64
  441. for shift := uint(0); ; shift += 7 {
  442. if shift >= 64 {
  443. return ErrIntOverflowGenerated
  444. }
  445. if iNdEx >= l {
  446. return io.ErrUnexpectedEOF
  447. }
  448. b := dAtA[iNdEx]
  449. iNdEx++
  450. wire |= uint64(b&0x7F) << shift
  451. if b < 0x80 {
  452. break
  453. }
  454. }
  455. fieldNum := int32(wire >> 3)
  456. wireType := int(wire & 0x7)
  457. if wireType == 4 {
  458. return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group")
  459. }
  460. if fieldNum <= 0 {
  461. return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire)
  462. }
  463. switch fieldNum {
  464. case 1:
  465. if wireType != 2 {
  466. return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
  467. }
  468. var stringLen uint64
  469. for shift := uint(0); ; shift += 7 {
  470. if shift >= 64 {
  471. return ErrIntOverflowGenerated
  472. }
  473. if iNdEx >= l {
  474. return io.ErrUnexpectedEOF
  475. }
  476. b := dAtA[iNdEx]
  477. iNdEx++
  478. stringLen |= uint64(b&0x7F) << shift
  479. if b < 0x80 {
  480. break
  481. }
  482. }
  483. intStringLen := int(stringLen)
  484. if intStringLen < 0 {
  485. return ErrInvalidLengthGenerated
  486. }
  487. postIndex := iNdEx + intStringLen
  488. if postIndex < 0 {
  489. return ErrInvalidLengthGenerated
  490. }
  491. if postIndex > l {
  492. return io.ErrUnexpectedEOF
  493. }
  494. m.APIVersion = string(dAtA[iNdEx:postIndex])
  495. iNdEx = postIndex
  496. case 2:
  497. if wireType != 2 {
  498. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  499. }
  500. var stringLen uint64
  501. for shift := uint(0); ; shift += 7 {
  502. if shift >= 64 {
  503. return ErrIntOverflowGenerated
  504. }
  505. if iNdEx >= l {
  506. return io.ErrUnexpectedEOF
  507. }
  508. b := dAtA[iNdEx]
  509. iNdEx++
  510. stringLen |= uint64(b&0x7F) << shift
  511. if b < 0x80 {
  512. break
  513. }
  514. }
  515. intStringLen := int(stringLen)
  516. if intStringLen < 0 {
  517. return ErrInvalidLengthGenerated
  518. }
  519. postIndex := iNdEx + intStringLen
  520. if postIndex < 0 {
  521. return ErrInvalidLengthGenerated
  522. }
  523. if postIndex > l {
  524. return io.ErrUnexpectedEOF
  525. }
  526. m.Kind = string(dAtA[iNdEx:postIndex])
  527. iNdEx = postIndex
  528. default:
  529. iNdEx = preIndex
  530. skippy, err := skipGenerated(dAtA[iNdEx:])
  531. if err != nil {
  532. return err
  533. }
  534. if (skippy < 0) || (iNdEx+skippy) < 0 {
  535. return ErrInvalidLengthGenerated
  536. }
  537. if (iNdEx + skippy) > l {
  538. return io.ErrUnexpectedEOF
  539. }
  540. iNdEx += skippy
  541. }
  542. }
  543. if iNdEx > l {
  544. return io.ErrUnexpectedEOF
  545. }
  546. return nil
  547. }
  548. func (m *Unknown) Unmarshal(dAtA []byte) error {
  549. l := len(dAtA)
  550. iNdEx := 0
  551. for iNdEx < l {
  552. preIndex := iNdEx
  553. var wire uint64
  554. for shift := uint(0); ; shift += 7 {
  555. if shift >= 64 {
  556. return ErrIntOverflowGenerated
  557. }
  558. if iNdEx >= l {
  559. return io.ErrUnexpectedEOF
  560. }
  561. b := dAtA[iNdEx]
  562. iNdEx++
  563. wire |= uint64(b&0x7F) << shift
  564. if b < 0x80 {
  565. break
  566. }
  567. }
  568. fieldNum := int32(wire >> 3)
  569. wireType := int(wire & 0x7)
  570. if wireType == 4 {
  571. return fmt.Errorf("proto: Unknown: wiretype end group for non-group")
  572. }
  573. if fieldNum <= 0 {
  574. return fmt.Errorf("proto: Unknown: illegal tag %d (wire type %d)", fieldNum, wire)
  575. }
  576. switch fieldNum {
  577. case 1:
  578. if wireType != 2 {
  579. return fmt.Errorf("proto: wrong wireType = %d for field TypeMeta", wireType)
  580. }
  581. var msglen int
  582. for shift := uint(0); ; shift += 7 {
  583. if shift >= 64 {
  584. return ErrIntOverflowGenerated
  585. }
  586. if iNdEx >= l {
  587. return io.ErrUnexpectedEOF
  588. }
  589. b := dAtA[iNdEx]
  590. iNdEx++
  591. msglen |= int(b&0x7F) << shift
  592. if b < 0x80 {
  593. break
  594. }
  595. }
  596. if msglen < 0 {
  597. return ErrInvalidLengthGenerated
  598. }
  599. postIndex := iNdEx + msglen
  600. if postIndex < 0 {
  601. return ErrInvalidLengthGenerated
  602. }
  603. if postIndex > l {
  604. return io.ErrUnexpectedEOF
  605. }
  606. if err := m.TypeMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  607. return err
  608. }
  609. iNdEx = postIndex
  610. case 2:
  611. if wireType != 2 {
  612. return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType)
  613. }
  614. var byteLen int
  615. for shift := uint(0); ; shift += 7 {
  616. if shift >= 64 {
  617. return ErrIntOverflowGenerated
  618. }
  619. if iNdEx >= l {
  620. return io.ErrUnexpectedEOF
  621. }
  622. b := dAtA[iNdEx]
  623. iNdEx++
  624. byteLen |= int(b&0x7F) << shift
  625. if b < 0x80 {
  626. break
  627. }
  628. }
  629. if byteLen < 0 {
  630. return ErrInvalidLengthGenerated
  631. }
  632. postIndex := iNdEx + byteLen
  633. if postIndex < 0 {
  634. return ErrInvalidLengthGenerated
  635. }
  636. if postIndex > l {
  637. return io.ErrUnexpectedEOF
  638. }
  639. m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...)
  640. if m.Raw == nil {
  641. m.Raw = []byte{}
  642. }
  643. iNdEx = postIndex
  644. case 3:
  645. if wireType != 2 {
  646. return fmt.Errorf("proto: wrong wireType = %d for field ContentEncoding", wireType)
  647. }
  648. var stringLen uint64
  649. for shift := uint(0); ; shift += 7 {
  650. if shift >= 64 {
  651. return ErrIntOverflowGenerated
  652. }
  653. if iNdEx >= l {
  654. return io.ErrUnexpectedEOF
  655. }
  656. b := dAtA[iNdEx]
  657. iNdEx++
  658. stringLen |= uint64(b&0x7F) << shift
  659. if b < 0x80 {
  660. break
  661. }
  662. }
  663. intStringLen := int(stringLen)
  664. if intStringLen < 0 {
  665. return ErrInvalidLengthGenerated
  666. }
  667. postIndex := iNdEx + intStringLen
  668. if postIndex < 0 {
  669. return ErrInvalidLengthGenerated
  670. }
  671. if postIndex > l {
  672. return io.ErrUnexpectedEOF
  673. }
  674. m.ContentEncoding = string(dAtA[iNdEx:postIndex])
  675. iNdEx = postIndex
  676. case 4:
  677. if wireType != 2 {
  678. return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType)
  679. }
  680. var stringLen uint64
  681. for shift := uint(0); ; shift += 7 {
  682. if shift >= 64 {
  683. return ErrIntOverflowGenerated
  684. }
  685. if iNdEx >= l {
  686. return io.ErrUnexpectedEOF
  687. }
  688. b := dAtA[iNdEx]
  689. iNdEx++
  690. stringLen |= uint64(b&0x7F) << shift
  691. if b < 0x80 {
  692. break
  693. }
  694. }
  695. intStringLen := int(stringLen)
  696. if intStringLen < 0 {
  697. return ErrInvalidLengthGenerated
  698. }
  699. postIndex := iNdEx + intStringLen
  700. if postIndex < 0 {
  701. return ErrInvalidLengthGenerated
  702. }
  703. if postIndex > l {
  704. return io.ErrUnexpectedEOF
  705. }
  706. m.ContentType = string(dAtA[iNdEx:postIndex])
  707. iNdEx = postIndex
  708. default:
  709. iNdEx = preIndex
  710. skippy, err := skipGenerated(dAtA[iNdEx:])
  711. if err != nil {
  712. return err
  713. }
  714. if (skippy < 0) || (iNdEx+skippy) < 0 {
  715. return ErrInvalidLengthGenerated
  716. }
  717. if (iNdEx + skippy) > l {
  718. return io.ErrUnexpectedEOF
  719. }
  720. iNdEx += skippy
  721. }
  722. }
  723. if iNdEx > l {
  724. return io.ErrUnexpectedEOF
  725. }
  726. return nil
  727. }
  728. func skipGenerated(dAtA []byte) (n int, err error) {
  729. l := len(dAtA)
  730. iNdEx := 0
  731. depth := 0
  732. for iNdEx < l {
  733. var wire uint64
  734. for shift := uint(0); ; shift += 7 {
  735. if shift >= 64 {
  736. return 0, ErrIntOverflowGenerated
  737. }
  738. if iNdEx >= l {
  739. return 0, io.ErrUnexpectedEOF
  740. }
  741. b := dAtA[iNdEx]
  742. iNdEx++
  743. wire |= (uint64(b) & 0x7F) << shift
  744. if b < 0x80 {
  745. break
  746. }
  747. }
  748. wireType := int(wire & 0x7)
  749. switch wireType {
  750. case 0:
  751. for shift := uint(0); ; shift += 7 {
  752. if shift >= 64 {
  753. return 0, ErrIntOverflowGenerated
  754. }
  755. if iNdEx >= l {
  756. return 0, io.ErrUnexpectedEOF
  757. }
  758. iNdEx++
  759. if dAtA[iNdEx-1] < 0x80 {
  760. break
  761. }
  762. }
  763. case 1:
  764. iNdEx += 8
  765. case 2:
  766. var length int
  767. for shift := uint(0); ; shift += 7 {
  768. if shift >= 64 {
  769. return 0, ErrIntOverflowGenerated
  770. }
  771. if iNdEx >= l {
  772. return 0, io.ErrUnexpectedEOF
  773. }
  774. b := dAtA[iNdEx]
  775. iNdEx++
  776. length |= (int(b) & 0x7F) << shift
  777. if b < 0x80 {
  778. break
  779. }
  780. }
  781. if length < 0 {
  782. return 0, ErrInvalidLengthGenerated
  783. }
  784. iNdEx += length
  785. case 3:
  786. depth++
  787. case 4:
  788. if depth == 0 {
  789. return 0, ErrUnexpectedEndOfGroupGenerated
  790. }
  791. depth--
  792. case 5:
  793. iNdEx += 4
  794. default:
  795. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  796. }
  797. if iNdEx < 0 {
  798. return 0, ErrInvalidLengthGenerated
  799. }
  800. if depth == 0 {
  801. return iNdEx, nil
  802. }
  803. }
  804. return 0, io.ErrUnexpectedEOF
  805. }
  806. var (
  807. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  808. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  809. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  810. )