generated.pb.go 24 KB

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