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