github.com/demonoid81/containerd@v1.3.4/api/services/leases/v1/leases.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/services/leases/v1/leases.proto 3 4 package leases 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/gogo/protobuf/proto" 10 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 types "github.com/gogo/protobuf/types" 13 grpc "google.golang.org/grpc" 14 io "io" 15 math "math" 16 reflect "reflect" 17 strings "strings" 18 time "time" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 var _ = time.Kitchen 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 32 33 // Lease is an object which retains resources while it exists. 34 type Lease struct { 35 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 36 CreatedAt time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` 37 Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 38 XXX_NoUnkeyedLiteral struct{} `json:"-"` 39 XXX_unrecognized []byte `json:"-"` 40 XXX_sizecache int32 `json:"-"` 41 } 42 43 func (m *Lease) Reset() { *m = Lease{} } 44 func (*Lease) ProtoMessage() {} 45 func (*Lease) Descriptor() ([]byte, []int) { 46 return fileDescriptor_fefd70dfe8d93cbf, []int{0} 47 } 48 func (m *Lease) XXX_Unmarshal(b []byte) error { 49 return m.Unmarshal(b) 50 } 51 func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 52 if deterministic { 53 return xxx_messageInfo_Lease.Marshal(b, m, deterministic) 54 } else { 55 b = b[:cap(b)] 56 n, err := m.MarshalTo(b) 57 if err != nil { 58 return nil, err 59 } 60 return b[:n], nil 61 } 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 type CreateRequest struct { 76 // ID is used to identity the lease, when the id is not set the service 77 // generates a random identifier for the lease. 78 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 79 Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 80 XXX_NoUnkeyedLiteral struct{} `json:"-"` 81 XXX_unrecognized []byte `json:"-"` 82 XXX_sizecache int32 `json:"-"` 83 } 84 85 func (m *CreateRequest) Reset() { *m = CreateRequest{} } 86 func (*CreateRequest) ProtoMessage() {} 87 func (*CreateRequest) Descriptor() ([]byte, []int) { 88 return fileDescriptor_fefd70dfe8d93cbf, []int{1} 89 } 90 func (m *CreateRequest) XXX_Unmarshal(b []byte) error { 91 return m.Unmarshal(b) 92 } 93 func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 94 if deterministic { 95 return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic) 96 } else { 97 b = b[:cap(b)] 98 n, err := m.MarshalTo(b) 99 if err != nil { 100 return nil, err 101 } 102 return b[:n], nil 103 } 104 } 105 func (m *CreateRequest) XXX_Merge(src proto.Message) { 106 xxx_messageInfo_CreateRequest.Merge(m, src) 107 } 108 func (m *CreateRequest) XXX_Size() int { 109 return m.Size() 110 } 111 func (m *CreateRequest) XXX_DiscardUnknown() { 112 xxx_messageInfo_CreateRequest.DiscardUnknown(m) 113 } 114 115 var xxx_messageInfo_CreateRequest proto.InternalMessageInfo 116 117 type CreateResponse struct { 118 Lease *Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease,omitempty"` 119 XXX_NoUnkeyedLiteral struct{} `json:"-"` 120 XXX_unrecognized []byte `json:"-"` 121 XXX_sizecache int32 `json:"-"` 122 } 123 124 func (m *CreateResponse) Reset() { *m = CreateResponse{} } 125 func (*CreateResponse) ProtoMessage() {} 126 func (*CreateResponse) Descriptor() ([]byte, []int) { 127 return fileDescriptor_fefd70dfe8d93cbf, []int{2} 128 } 129 func (m *CreateResponse) XXX_Unmarshal(b []byte) error { 130 return m.Unmarshal(b) 131 } 132 func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 133 if deterministic { 134 return xxx_messageInfo_CreateResponse.Marshal(b, m, deterministic) 135 } else { 136 b = b[:cap(b)] 137 n, err := m.MarshalTo(b) 138 if err != nil { 139 return nil, err 140 } 141 return b[:n], nil 142 } 143 } 144 func (m *CreateResponse) XXX_Merge(src proto.Message) { 145 xxx_messageInfo_CreateResponse.Merge(m, src) 146 } 147 func (m *CreateResponse) XXX_Size() int { 148 return m.Size() 149 } 150 func (m *CreateResponse) XXX_DiscardUnknown() { 151 xxx_messageInfo_CreateResponse.DiscardUnknown(m) 152 } 153 154 var xxx_messageInfo_CreateResponse proto.InternalMessageInfo 155 156 type DeleteRequest struct { 157 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 158 // Sync indicates that the delete and cleanup should be done 159 // synchronously before returning to the caller 160 // 161 // Default is false 162 Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"` 163 XXX_NoUnkeyedLiteral struct{} `json:"-"` 164 XXX_unrecognized []byte `json:"-"` 165 XXX_sizecache int32 `json:"-"` 166 } 167 168 func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } 169 func (*DeleteRequest) ProtoMessage() {} 170 func (*DeleteRequest) Descriptor() ([]byte, []int) { 171 return fileDescriptor_fefd70dfe8d93cbf, []int{3} 172 } 173 func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { 174 return m.Unmarshal(b) 175 } 176 func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 177 if deterministic { 178 return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) 179 } else { 180 b = b[:cap(b)] 181 n, err := m.MarshalTo(b) 182 if err != nil { 183 return nil, err 184 } 185 return b[:n], nil 186 } 187 } 188 func (m *DeleteRequest) XXX_Merge(src proto.Message) { 189 xxx_messageInfo_DeleteRequest.Merge(m, src) 190 } 191 func (m *DeleteRequest) XXX_Size() int { 192 return m.Size() 193 } 194 func (m *DeleteRequest) XXX_DiscardUnknown() { 195 xxx_messageInfo_DeleteRequest.DiscardUnknown(m) 196 } 197 198 var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo 199 200 type ListRequest struct { 201 Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` 202 XXX_NoUnkeyedLiteral struct{} `json:"-"` 203 XXX_unrecognized []byte `json:"-"` 204 XXX_sizecache int32 `json:"-"` 205 } 206 207 func (m *ListRequest) Reset() { *m = ListRequest{} } 208 func (*ListRequest) ProtoMessage() {} 209 func (*ListRequest) Descriptor() ([]byte, []int) { 210 return fileDescriptor_fefd70dfe8d93cbf, []int{4} 211 } 212 func (m *ListRequest) XXX_Unmarshal(b []byte) error { 213 return m.Unmarshal(b) 214 } 215 func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 216 if deterministic { 217 return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) 218 } else { 219 b = b[:cap(b)] 220 n, err := m.MarshalTo(b) 221 if err != nil { 222 return nil, err 223 } 224 return b[:n], nil 225 } 226 } 227 func (m *ListRequest) XXX_Merge(src proto.Message) { 228 xxx_messageInfo_ListRequest.Merge(m, src) 229 } 230 func (m *ListRequest) XXX_Size() int { 231 return m.Size() 232 } 233 func (m *ListRequest) XXX_DiscardUnknown() { 234 xxx_messageInfo_ListRequest.DiscardUnknown(m) 235 } 236 237 var xxx_messageInfo_ListRequest proto.InternalMessageInfo 238 239 type ListResponse struct { 240 Leases []*Lease `protobuf:"bytes,1,rep,name=leases,proto3" json:"leases,omitempty"` 241 XXX_NoUnkeyedLiteral struct{} `json:"-"` 242 XXX_unrecognized []byte `json:"-"` 243 XXX_sizecache int32 `json:"-"` 244 } 245 246 func (m *ListResponse) Reset() { *m = ListResponse{} } 247 func (*ListResponse) ProtoMessage() {} 248 func (*ListResponse) Descriptor() ([]byte, []int) { 249 return fileDescriptor_fefd70dfe8d93cbf, []int{5} 250 } 251 func (m *ListResponse) XXX_Unmarshal(b []byte) error { 252 return m.Unmarshal(b) 253 } 254 func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 255 if deterministic { 256 return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) 257 } else { 258 b = b[:cap(b)] 259 n, err := m.MarshalTo(b) 260 if err != nil { 261 return nil, err 262 } 263 return b[:n], nil 264 } 265 } 266 func (m *ListResponse) XXX_Merge(src proto.Message) { 267 xxx_messageInfo_ListResponse.Merge(m, src) 268 } 269 func (m *ListResponse) XXX_Size() int { 270 return m.Size() 271 } 272 func (m *ListResponse) XXX_DiscardUnknown() { 273 xxx_messageInfo_ListResponse.DiscardUnknown(m) 274 } 275 276 var xxx_messageInfo_ListResponse proto.InternalMessageInfo 277 278 type Resource struct { 279 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 280 // For snapshotter resource, there are many snapshotter types here, like 281 // overlayfs, devmapper etc. The type will be formatted with type, 282 // like "snapshotter/overlayfs". 283 Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` 284 XXX_NoUnkeyedLiteral struct{} `json:"-"` 285 XXX_unrecognized []byte `json:"-"` 286 XXX_sizecache int32 `json:"-"` 287 } 288 289 func (m *Resource) Reset() { *m = Resource{} } 290 func (*Resource) ProtoMessage() {} 291 func (*Resource) Descriptor() ([]byte, []int) { 292 return fileDescriptor_fefd70dfe8d93cbf, []int{6} 293 } 294 func (m *Resource) XXX_Unmarshal(b []byte) error { 295 return m.Unmarshal(b) 296 } 297 func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 298 if deterministic { 299 return xxx_messageInfo_Resource.Marshal(b, m, deterministic) 300 } else { 301 b = b[:cap(b)] 302 n, err := m.MarshalTo(b) 303 if err != nil { 304 return nil, err 305 } 306 return b[:n], nil 307 } 308 } 309 func (m *Resource) XXX_Merge(src proto.Message) { 310 xxx_messageInfo_Resource.Merge(m, src) 311 } 312 func (m *Resource) XXX_Size() int { 313 return m.Size() 314 } 315 func (m *Resource) XXX_DiscardUnknown() { 316 xxx_messageInfo_Resource.DiscardUnknown(m) 317 } 318 319 var xxx_messageInfo_Resource proto.InternalMessageInfo 320 321 type AddResourceRequest struct { 322 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 323 Resource Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource"` 324 XXX_NoUnkeyedLiteral struct{} `json:"-"` 325 XXX_unrecognized []byte `json:"-"` 326 XXX_sizecache int32 `json:"-"` 327 } 328 329 func (m *AddResourceRequest) Reset() { *m = AddResourceRequest{} } 330 func (*AddResourceRequest) ProtoMessage() {} 331 func (*AddResourceRequest) Descriptor() ([]byte, []int) { 332 return fileDescriptor_fefd70dfe8d93cbf, []int{7} 333 } 334 func (m *AddResourceRequest) XXX_Unmarshal(b []byte) error { 335 return m.Unmarshal(b) 336 } 337 func (m *AddResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 338 if deterministic { 339 return xxx_messageInfo_AddResourceRequest.Marshal(b, m, deterministic) 340 } else { 341 b = b[:cap(b)] 342 n, err := m.MarshalTo(b) 343 if err != nil { 344 return nil, err 345 } 346 return b[:n], nil 347 } 348 } 349 func (m *AddResourceRequest) XXX_Merge(src proto.Message) { 350 xxx_messageInfo_AddResourceRequest.Merge(m, src) 351 } 352 func (m *AddResourceRequest) XXX_Size() int { 353 return m.Size() 354 } 355 func (m *AddResourceRequest) XXX_DiscardUnknown() { 356 xxx_messageInfo_AddResourceRequest.DiscardUnknown(m) 357 } 358 359 var xxx_messageInfo_AddResourceRequest proto.InternalMessageInfo 360 361 type DeleteResourceRequest struct { 362 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 363 Resource Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource"` 364 XXX_NoUnkeyedLiteral struct{} `json:"-"` 365 XXX_unrecognized []byte `json:"-"` 366 XXX_sizecache int32 `json:"-"` 367 } 368 369 func (m *DeleteResourceRequest) Reset() { *m = DeleteResourceRequest{} } 370 func (*DeleteResourceRequest) ProtoMessage() {} 371 func (*DeleteResourceRequest) Descriptor() ([]byte, []int) { 372 return fileDescriptor_fefd70dfe8d93cbf, []int{8} 373 } 374 func (m *DeleteResourceRequest) XXX_Unmarshal(b []byte) error { 375 return m.Unmarshal(b) 376 } 377 func (m *DeleteResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 378 if deterministic { 379 return xxx_messageInfo_DeleteResourceRequest.Marshal(b, m, deterministic) 380 } else { 381 b = b[:cap(b)] 382 n, err := m.MarshalTo(b) 383 if err != nil { 384 return nil, err 385 } 386 return b[:n], nil 387 } 388 } 389 func (m *DeleteResourceRequest) XXX_Merge(src proto.Message) { 390 xxx_messageInfo_DeleteResourceRequest.Merge(m, src) 391 } 392 func (m *DeleteResourceRequest) XXX_Size() int { 393 return m.Size() 394 } 395 func (m *DeleteResourceRequest) XXX_DiscardUnknown() { 396 xxx_messageInfo_DeleteResourceRequest.DiscardUnknown(m) 397 } 398 399 var xxx_messageInfo_DeleteResourceRequest proto.InternalMessageInfo 400 401 type ListResourcesRequest struct { 402 ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 403 XXX_NoUnkeyedLiteral struct{} `json:"-"` 404 XXX_unrecognized []byte `json:"-"` 405 XXX_sizecache int32 `json:"-"` 406 } 407 408 func (m *ListResourcesRequest) Reset() { *m = ListResourcesRequest{} } 409 func (*ListResourcesRequest) ProtoMessage() {} 410 func (*ListResourcesRequest) Descriptor() ([]byte, []int) { 411 return fileDescriptor_fefd70dfe8d93cbf, []int{9} 412 } 413 func (m *ListResourcesRequest) XXX_Unmarshal(b []byte) error { 414 return m.Unmarshal(b) 415 } 416 func (m *ListResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 417 if deterministic { 418 return xxx_messageInfo_ListResourcesRequest.Marshal(b, m, deterministic) 419 } else { 420 b = b[:cap(b)] 421 n, err := m.MarshalTo(b) 422 if err != nil { 423 return nil, err 424 } 425 return b[:n], nil 426 } 427 } 428 func (m *ListResourcesRequest) XXX_Merge(src proto.Message) { 429 xxx_messageInfo_ListResourcesRequest.Merge(m, src) 430 } 431 func (m *ListResourcesRequest) XXX_Size() int { 432 return m.Size() 433 } 434 func (m *ListResourcesRequest) XXX_DiscardUnknown() { 435 xxx_messageInfo_ListResourcesRequest.DiscardUnknown(m) 436 } 437 438 var xxx_messageInfo_ListResourcesRequest proto.InternalMessageInfo 439 440 type ListResourcesResponse struct { 441 Resources []Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources"` 442 XXX_NoUnkeyedLiteral struct{} `json:"-"` 443 XXX_unrecognized []byte `json:"-"` 444 XXX_sizecache int32 `json:"-"` 445 } 446 447 func (m *ListResourcesResponse) Reset() { *m = ListResourcesResponse{} } 448 func (*ListResourcesResponse) ProtoMessage() {} 449 func (*ListResourcesResponse) Descriptor() ([]byte, []int) { 450 return fileDescriptor_fefd70dfe8d93cbf, []int{10} 451 } 452 func (m *ListResourcesResponse) XXX_Unmarshal(b []byte) error { 453 return m.Unmarshal(b) 454 } 455 func (m *ListResourcesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 456 if deterministic { 457 return xxx_messageInfo_ListResourcesResponse.Marshal(b, m, deterministic) 458 } else { 459 b = b[:cap(b)] 460 n, err := m.MarshalTo(b) 461 if err != nil { 462 return nil, err 463 } 464 return b[:n], nil 465 } 466 } 467 func (m *ListResourcesResponse) XXX_Merge(src proto.Message) { 468 xxx_messageInfo_ListResourcesResponse.Merge(m, src) 469 } 470 func (m *ListResourcesResponse) XXX_Size() int { 471 return m.Size() 472 } 473 func (m *ListResourcesResponse) XXX_DiscardUnknown() { 474 xxx_messageInfo_ListResourcesResponse.DiscardUnknown(m) 475 } 476 477 var xxx_messageInfo_ListResourcesResponse proto.InternalMessageInfo 478 479 func init() { 480 proto.RegisterType((*Lease)(nil), "containerd.services.leases.v1.Lease") 481 proto.RegisterMapType((map[string]string)(nil), "containerd.services.leases.v1.Lease.LabelsEntry") 482 proto.RegisterType((*CreateRequest)(nil), "containerd.services.leases.v1.CreateRequest") 483 proto.RegisterMapType((map[string]string)(nil), "containerd.services.leases.v1.CreateRequest.LabelsEntry") 484 proto.RegisterType((*CreateResponse)(nil), "containerd.services.leases.v1.CreateResponse") 485 proto.RegisterType((*DeleteRequest)(nil), "containerd.services.leases.v1.DeleteRequest") 486 proto.RegisterType((*ListRequest)(nil), "containerd.services.leases.v1.ListRequest") 487 proto.RegisterType((*ListResponse)(nil), "containerd.services.leases.v1.ListResponse") 488 proto.RegisterType((*Resource)(nil), "containerd.services.leases.v1.Resource") 489 proto.RegisterType((*AddResourceRequest)(nil), "containerd.services.leases.v1.AddResourceRequest") 490 proto.RegisterType((*DeleteResourceRequest)(nil), "containerd.services.leases.v1.DeleteResourceRequest") 491 proto.RegisterType((*ListResourcesRequest)(nil), "containerd.services.leases.v1.ListResourcesRequest") 492 proto.RegisterType((*ListResourcesResponse)(nil), "containerd.services.leases.v1.ListResourcesResponse") 493 } 494 495 func init() { 496 proto.RegisterFile("github.com/containerd/containerd/api/services/leases/v1/leases.proto", fileDescriptor_fefd70dfe8d93cbf) 497 } 498 499 var fileDescriptor_fefd70dfe8d93cbf = []byte{ 500 // 644 bytes of a gzipped FileDescriptorProto 501 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x40, 502 0x10, 0xce, 0x26, 0xa9, 0x49, 0x26, 0xb4, 0x42, 0xab, 0xb6, 0x8a, 0x8c, 0x48, 0x22, 0x0b, 0xa9, 503 0x11, 0x3f, 0x36, 0x4d, 0x2b, 0x54, 0x5a, 0x84, 0xd4, 0xb4, 0x95, 0xa8, 0x88, 0x10, 0xb2, 0x38, 504 0x54, 0x1c, 0xa8, 0x1c, 0x7b, 0x1b, 0x2c, 0x9c, 0xd8, 0x78, 0x37, 0x41, 0xe9, 0x89, 0x47, 0xe0, 505 0x61, 0x78, 0x88, 0x1e, 0x39, 0x21, 0x4e, 0x85, 0xe6, 0xc6, 0x5b, 0x20, 0xef, 0x0f, 0x6d, 0x5a, 506 0xb5, 0x76, 0x11, 0xe2, 0x36, 0x1b, 0x7f, 0xdf, 0xcc, 0x37, 0x33, 0xdf, 0x6e, 0x60, 0xbb, 0xe7, 507 0xb3, 0x77, 0xc3, 0xae, 0xe9, 0x86, 0x7d, 0xcb, 0x0d, 0x07, 0xcc, 0xf1, 0x07, 0x24, 0xf6, 0xce, 508 0x86, 0x4e, 0xe4, 0x5b, 0x94, 0xc4, 0x23, 0xdf, 0x25, 0xd4, 0x0a, 0x88, 0x43, 0x09, 0xb5, 0x46, 509 0xcb, 0x32, 0x32, 0xa3, 0x38, 0x64, 0x21, 0xbe, 0x73, 0x8a, 0x37, 0x15, 0xd6, 0x94, 0x88, 0xd1, 510 0xb2, 0x3e, 0xdf, 0x0b, 0x7b, 0x21, 0x47, 0x5a, 0x49, 0x24, 0x48, 0xfa, 0xed, 0x5e, 0x18, 0xf6, 511 0x02, 0x62, 0xf1, 0x53, 0x77, 0x78, 0x60, 0x91, 0x7e, 0xc4, 0xc6, 0xf2, 0x63, 0xfd, 0xfc, 0x47, 512 0xe6, 0xf7, 0x09, 0x65, 0x4e, 0x3f, 0x12, 0x00, 0xe3, 0x17, 0x82, 0x99, 0x4e, 0x52, 0x01, 0x2f, 513 0x42, 0xde, 0xf7, 0xaa, 0xa8, 0x81, 0x9a, 0xe5, 0xb6, 0x36, 0x39, 0xae, 0xe7, 0x77, 0xb7, 0xed, 514 0xbc, 0xef, 0xe1, 0x2d, 0x00, 0x37, 0x26, 0x0e, 0x23, 0xde, 0xbe, 0xc3, 0xaa, 0xf9, 0x06, 0x6a, 515 0x56, 0x5a, 0xba, 0x29, 0xf2, 0x9a, 0x2a, 0xaf, 0xf9, 0x5a, 0xe5, 0x6d, 0x97, 0x8e, 0x8e, 0xeb, 516 0xb9, 0xcf, 0x3f, 0xea, 0xc8, 0x2e, 0x4b, 0xde, 0x26, 0xc3, 0xcf, 0x41, 0x0b, 0x9c, 0x2e, 0x09, 517 0x68, 0xb5, 0xd0, 0x28, 0x34, 0x2b, 0xad, 0x47, 0xe6, 0x95, 0xad, 0x9a, 0x5c, 0x92, 0xd9, 0xe1, 518 0x94, 0x9d, 0x01, 0x8b, 0xc7, 0xb6, 0xe4, 0xeb, 0x4f, 0xa0, 0x72, 0xe6, 0x67, 0x7c, 0x0b, 0x0a, 519 0xef, 0xc9, 0x58, 0xc8, 0xb6, 0x93, 0x10, 0xcf, 0xc3, 0xcc, 0xc8, 0x09, 0x86, 0x84, 0x4b, 0x2d, 520 0xdb, 0xe2, 0xb0, 0x9e, 0x5f, 0x43, 0xc6, 0x17, 0x04, 0xb3, 0x5b, 0x5c, 0x92, 0x4d, 0x3e, 0x0c, 521 0x09, 0x65, 0x97, 0xf6, 0xfc, 0xea, 0x9c, 0xdc, 0xb5, 0x14, 0xb9, 0x53, 0x59, 0xff, 0xb5, 0xec, 522 0x0e, 0xcc, 0xa9, 0xfc, 0x34, 0x0a, 0x07, 0x94, 0xe0, 0x75, 0x98, 0xe1, 0xb5, 0x39, 0xbf, 0xd2, 523 0xba, 0x9b, 0x65, 0x98, 0xb6, 0xa0, 0x18, 0x1b, 0x30, 0xbb, 0x4d, 0x02, 0x92, 0x3e, 0x03, 0x0c, 524 0x45, 0x3a, 0x1e, 0xb8, 0x5c, 0x4f, 0xc9, 0xe6, 0xb1, 0xb1, 0x04, 0x95, 0x8e, 0x4f, 0x99, 0xa2, 525 0x56, 0xe1, 0xc6, 0x81, 0x1f, 0x30, 0x12, 0xd3, 0x2a, 0x6a, 0x14, 0x9a, 0x65, 0x5b, 0x1d, 0x8d, 526 0x0e, 0xdc, 0x14, 0x40, 0xa9, 0xf8, 0x29, 0x68, 0x42, 0x0f, 0x07, 0x66, 0x95, 0x2c, 0x39, 0xc6, 527 0x63, 0x28, 0xd9, 0x84, 0x86, 0xc3, 0xd8, 0x25, 0x57, 0xc9, 0x65, 0xe3, 0x48, 0x8d, 0x8f, 0xc7, 528 0xc6, 0x47, 0xc0, 0x9b, 0x9e, 0xa7, 0xa8, 0x69, 0x0d, 0xef, 0x42, 0x29, 0x96, 0x50, 0x69, 0xf3, 529 0xa5, 0x14, 0x95, 0x2a, 0x73, 0xbb, 0x98, 0x78, 0xde, 0xfe, 0x43, 0x37, 0x0e, 0x61, 0x41, 0x0d, 530 0xf9, 0xbf, 0xd7, 0x36, 0x61, 0x5e, 0x8e, 0x9e, 0x9f, 0x69, 0x4a, 0x69, 0xc3, 0x83, 0x85, 0x73, 531 0x78, 0xb9, 0xb3, 0x17, 0x50, 0x56, 0x49, 0xd5, 0xda, 0xae, 0x29, 0xea, 0x94, 0xdf, 0xfa, 0x56, 532 0x04, 0x8d, 0x2f, 0x95, 0x62, 0x02, 0x9a, 0xf0, 0x33, 0x7e, 0x70, 0x9d, 0x6b, 0xa5, 0x3f, 0xcc, 533 0x88, 0x96, 0xf2, 0x5f, 0x82, 0x26, 0x76, 0x90, 0x5a, 0x66, 0xea, 0x3e, 0xe8, 0x8b, 0x17, 0xde, 534 0xb6, 0x9d, 0xe4, 0x41, 0xc5, 0xfb, 0x50, 0x4c, 0xe6, 0x84, 0xef, 0xa5, 0x59, 0xf7, 0xf4, 0x82, 535 0xe8, 0xf7, 0x33, 0x61, 0xa5, 0xe0, 0x3d, 0xa8, 0x9c, 0x71, 0x2b, 0x5e, 0x4e, 0xe1, 0x5e, 0x74, 536 0xf6, 0xa5, 0xd2, 0xdf, 0xc2, 0xdc, 0xb4, 0x1d, 0xf1, 0x6a, 0xc6, 0x91, 0x64, 0xcb, 0x7f, 0x08, 537 0xb3, 0x53, 0x16, 0xc2, 0x2b, 0xd9, 0xfa, 0x9e, 0x32, 0xa8, 0xbe, 0x7a, 0x3d, 0x92, 0x98, 0x5a, 538 0x7b, 0xef, 0xe8, 0xa4, 0x96, 0xfb, 0x7e, 0x52, 0xcb, 0x7d, 0x9a, 0xd4, 0xd0, 0xd1, 0xa4, 0x86, 539 0xbe, 0x4e, 0x6a, 0xe8, 0xe7, 0xa4, 0x86, 0xde, 0x3c, 0xfb, 0xcb, 0xff, 0xe4, 0x0d, 0x11, 0xed, 540 0xe5, 0xba, 0x1a, 0xef, 0x73, 0xe5, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xfe, 0x39, 0x67, 541 0xde, 0x07, 0x00, 0x00, 542 } 543 544 // Reference imports to suppress errors if they are not otherwise used. 545 var _ context.Context 546 var _ grpc.ClientConn 547 548 // This is a compile-time assertion to ensure that this generated file 549 // is compatible with the grpc package it is being compiled against. 550 const _ = grpc.SupportPackageIsVersion4 551 552 // LeasesClient is the client API for Leases service. 553 // 554 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 555 type LeasesClient interface { 556 // Create creates a new lease for managing changes to metadata. A lease 557 // can be used to protect objects from being removed. 558 Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) 559 // Delete deletes the lease and makes any unreferenced objects created 560 // during the lease eligible for garbage collection if not referenced 561 // or retained by other resources during the lease. 562 Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) 563 // List lists all active leases, returning the full list of 564 // leases and optionally including the referenced resources. 565 List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) 566 // AddResource references the resource by the provided lease. 567 AddResource(ctx context.Context, in *AddResourceRequest, opts ...grpc.CallOption) (*types.Empty, error) 568 // DeleteResource dereferences the resource by the provided lease. 569 DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*types.Empty, error) 570 // ListResources lists all the resources referenced by the lease. 571 ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) 572 } 573 574 type leasesClient struct { 575 cc *grpc.ClientConn 576 } 577 578 func NewLeasesClient(cc *grpc.ClientConn) LeasesClient { 579 return &leasesClient{cc} 580 } 581 582 func (c *leasesClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { 583 out := new(CreateResponse) 584 err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Create", in, out, opts...) 585 if err != nil { 586 return nil, err 587 } 588 return out, nil 589 } 590 591 func (c *leasesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { 592 out := new(types.Empty) 593 err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Delete", in, out, opts...) 594 if err != nil { 595 return nil, err 596 } 597 return out, nil 598 } 599 600 func (c *leasesClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { 601 out := new(ListResponse) 602 err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/List", in, out, opts...) 603 if err != nil { 604 return nil, err 605 } 606 return out, nil 607 } 608 609 func (c *leasesClient) AddResource(ctx context.Context, in *AddResourceRequest, opts ...grpc.CallOption) (*types.Empty, error) { 610 out := new(types.Empty) 611 err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/AddResource", in, out, opts...) 612 if err != nil { 613 return nil, err 614 } 615 return out, nil 616 } 617 618 func (c *leasesClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*types.Empty, error) { 619 out := new(types.Empty) 620 err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/DeleteResource", in, out, opts...) 621 if err != nil { 622 return nil, err 623 } 624 return out, nil 625 } 626 627 func (c *leasesClient) ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) { 628 out := new(ListResourcesResponse) 629 err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/ListResources", in, out, opts...) 630 if err != nil { 631 return nil, err 632 } 633 return out, nil 634 } 635 636 // LeasesServer is the server API for Leases service. 637 type LeasesServer interface { 638 // Create creates a new lease for managing changes to metadata. A lease 639 // can be used to protect objects from being removed. 640 Create(context.Context, *CreateRequest) (*CreateResponse, error) 641 // Delete deletes the lease and makes any unreferenced objects created 642 // during the lease eligible for garbage collection if not referenced 643 // or retained by other resources during the lease. 644 Delete(context.Context, *DeleteRequest) (*types.Empty, error) 645 // List lists all active leases, returning the full list of 646 // leases and optionally including the referenced resources. 647 List(context.Context, *ListRequest) (*ListResponse, error) 648 // AddResource references the resource by the provided lease. 649 AddResource(context.Context, *AddResourceRequest) (*types.Empty, error) 650 // DeleteResource dereferences the resource by the provided lease. 651 DeleteResource(context.Context, *DeleteResourceRequest) (*types.Empty, error) 652 // ListResources lists all the resources referenced by the lease. 653 ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) 654 } 655 656 func RegisterLeasesServer(s *grpc.Server, srv LeasesServer) { 657 s.RegisterService(&_Leases_serviceDesc, srv) 658 } 659 660 func _Leases_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 661 in := new(CreateRequest) 662 if err := dec(in); err != nil { 663 return nil, err 664 } 665 if interceptor == nil { 666 return srv.(LeasesServer).Create(ctx, in) 667 } 668 info := &grpc.UnaryServerInfo{ 669 Server: srv, 670 FullMethod: "/containerd.services.leases.v1.Leases/Create", 671 } 672 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 673 return srv.(LeasesServer).Create(ctx, req.(*CreateRequest)) 674 } 675 return interceptor(ctx, in, info, handler) 676 } 677 678 func _Leases_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 679 in := new(DeleteRequest) 680 if err := dec(in); err != nil { 681 return nil, err 682 } 683 if interceptor == nil { 684 return srv.(LeasesServer).Delete(ctx, in) 685 } 686 info := &grpc.UnaryServerInfo{ 687 Server: srv, 688 FullMethod: "/containerd.services.leases.v1.Leases/Delete", 689 } 690 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 691 return srv.(LeasesServer).Delete(ctx, req.(*DeleteRequest)) 692 } 693 return interceptor(ctx, in, info, handler) 694 } 695 696 func _Leases_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 697 in := new(ListRequest) 698 if err := dec(in); err != nil { 699 return nil, err 700 } 701 if interceptor == nil { 702 return srv.(LeasesServer).List(ctx, in) 703 } 704 info := &grpc.UnaryServerInfo{ 705 Server: srv, 706 FullMethod: "/containerd.services.leases.v1.Leases/List", 707 } 708 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 709 return srv.(LeasesServer).List(ctx, req.(*ListRequest)) 710 } 711 return interceptor(ctx, in, info, handler) 712 } 713 714 func _Leases_AddResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 715 in := new(AddResourceRequest) 716 if err := dec(in); err != nil { 717 return nil, err 718 } 719 if interceptor == nil { 720 return srv.(LeasesServer).AddResource(ctx, in) 721 } 722 info := &grpc.UnaryServerInfo{ 723 Server: srv, 724 FullMethod: "/containerd.services.leases.v1.Leases/AddResource", 725 } 726 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 727 return srv.(LeasesServer).AddResource(ctx, req.(*AddResourceRequest)) 728 } 729 return interceptor(ctx, in, info, handler) 730 } 731 732 func _Leases_DeleteResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 733 in := new(DeleteResourceRequest) 734 if err := dec(in); err != nil { 735 return nil, err 736 } 737 if interceptor == nil { 738 return srv.(LeasesServer).DeleteResource(ctx, in) 739 } 740 info := &grpc.UnaryServerInfo{ 741 Server: srv, 742 FullMethod: "/containerd.services.leases.v1.Leases/DeleteResource", 743 } 744 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 745 return srv.(LeasesServer).DeleteResource(ctx, req.(*DeleteResourceRequest)) 746 } 747 return interceptor(ctx, in, info, handler) 748 } 749 750 func _Leases_ListResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 751 in := new(ListResourcesRequest) 752 if err := dec(in); err != nil { 753 return nil, err 754 } 755 if interceptor == nil { 756 return srv.(LeasesServer).ListResources(ctx, in) 757 } 758 info := &grpc.UnaryServerInfo{ 759 Server: srv, 760 FullMethod: "/containerd.services.leases.v1.Leases/ListResources", 761 } 762 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 763 return srv.(LeasesServer).ListResources(ctx, req.(*ListResourcesRequest)) 764 } 765 return interceptor(ctx, in, info, handler) 766 } 767 768 var _Leases_serviceDesc = grpc.ServiceDesc{ 769 ServiceName: "containerd.services.leases.v1.Leases", 770 HandlerType: (*LeasesServer)(nil), 771 Methods: []grpc.MethodDesc{ 772 { 773 MethodName: "Create", 774 Handler: _Leases_Create_Handler, 775 }, 776 { 777 MethodName: "Delete", 778 Handler: _Leases_Delete_Handler, 779 }, 780 { 781 MethodName: "List", 782 Handler: _Leases_List_Handler, 783 }, 784 { 785 MethodName: "AddResource", 786 Handler: _Leases_AddResource_Handler, 787 }, 788 { 789 MethodName: "DeleteResource", 790 Handler: _Leases_DeleteResource_Handler, 791 }, 792 { 793 MethodName: "ListResources", 794 Handler: _Leases_ListResources_Handler, 795 }, 796 }, 797 Streams: []grpc.StreamDesc{}, 798 Metadata: "github.com/containerd/containerd/api/services/leases/v1/leases.proto", 799 } 800 801 func (m *Lease) Marshal() (dAtA []byte, err error) { 802 size := m.Size() 803 dAtA = make([]byte, size) 804 n, err := m.MarshalTo(dAtA) 805 if err != nil { 806 return nil, err 807 } 808 return dAtA[:n], nil 809 } 810 811 func (m *Lease) MarshalTo(dAtA []byte) (int, error) { 812 var i int 813 _ = i 814 var l int 815 _ = l 816 if len(m.ID) > 0 { 817 dAtA[i] = 0xa 818 i++ 819 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 820 i += copy(dAtA[i:], m.ID) 821 } 822 dAtA[i] = 0x12 823 i++ 824 i = encodeVarintLeases(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) 825 n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) 826 if err != nil { 827 return 0, err 828 } 829 i += n1 830 if len(m.Labels) > 0 { 831 for k, _ := range m.Labels { 832 dAtA[i] = 0x1a 833 i++ 834 v := m.Labels[k] 835 mapSize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) 836 i = encodeVarintLeases(dAtA, i, uint64(mapSize)) 837 dAtA[i] = 0xa 838 i++ 839 i = encodeVarintLeases(dAtA, i, uint64(len(k))) 840 i += copy(dAtA[i:], k) 841 dAtA[i] = 0x12 842 i++ 843 i = encodeVarintLeases(dAtA, i, uint64(len(v))) 844 i += copy(dAtA[i:], v) 845 } 846 } 847 if m.XXX_unrecognized != nil { 848 i += copy(dAtA[i:], m.XXX_unrecognized) 849 } 850 return i, nil 851 } 852 853 func (m *CreateRequest) Marshal() (dAtA []byte, err error) { 854 size := m.Size() 855 dAtA = make([]byte, size) 856 n, err := m.MarshalTo(dAtA) 857 if err != nil { 858 return nil, err 859 } 860 return dAtA[:n], nil 861 } 862 863 func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { 864 var i int 865 _ = i 866 var l int 867 _ = l 868 if len(m.ID) > 0 { 869 dAtA[i] = 0xa 870 i++ 871 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 872 i += copy(dAtA[i:], m.ID) 873 } 874 if len(m.Labels) > 0 { 875 for k, _ := range m.Labels { 876 dAtA[i] = 0x1a 877 i++ 878 v := m.Labels[k] 879 mapSize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) 880 i = encodeVarintLeases(dAtA, i, uint64(mapSize)) 881 dAtA[i] = 0xa 882 i++ 883 i = encodeVarintLeases(dAtA, i, uint64(len(k))) 884 i += copy(dAtA[i:], k) 885 dAtA[i] = 0x12 886 i++ 887 i = encodeVarintLeases(dAtA, i, uint64(len(v))) 888 i += copy(dAtA[i:], v) 889 } 890 } 891 if m.XXX_unrecognized != nil { 892 i += copy(dAtA[i:], m.XXX_unrecognized) 893 } 894 return i, nil 895 } 896 897 func (m *CreateResponse) Marshal() (dAtA []byte, err error) { 898 size := m.Size() 899 dAtA = make([]byte, size) 900 n, err := m.MarshalTo(dAtA) 901 if err != nil { 902 return nil, err 903 } 904 return dAtA[:n], nil 905 } 906 907 func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) { 908 var i int 909 _ = i 910 var l int 911 _ = l 912 if m.Lease != nil { 913 dAtA[i] = 0xa 914 i++ 915 i = encodeVarintLeases(dAtA, i, uint64(m.Lease.Size())) 916 n2, err := m.Lease.MarshalTo(dAtA[i:]) 917 if err != nil { 918 return 0, err 919 } 920 i += n2 921 } 922 if m.XXX_unrecognized != nil { 923 i += copy(dAtA[i:], m.XXX_unrecognized) 924 } 925 return i, nil 926 } 927 928 func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { 929 size := m.Size() 930 dAtA = make([]byte, size) 931 n, err := m.MarshalTo(dAtA) 932 if err != nil { 933 return nil, err 934 } 935 return dAtA[:n], nil 936 } 937 938 func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { 939 var i int 940 _ = i 941 var l int 942 _ = l 943 if len(m.ID) > 0 { 944 dAtA[i] = 0xa 945 i++ 946 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 947 i += copy(dAtA[i:], m.ID) 948 } 949 if m.Sync { 950 dAtA[i] = 0x10 951 i++ 952 if m.Sync { 953 dAtA[i] = 1 954 } else { 955 dAtA[i] = 0 956 } 957 i++ 958 } 959 if m.XXX_unrecognized != nil { 960 i += copy(dAtA[i:], m.XXX_unrecognized) 961 } 962 return i, nil 963 } 964 965 func (m *ListRequest) Marshal() (dAtA []byte, err error) { 966 size := m.Size() 967 dAtA = make([]byte, size) 968 n, err := m.MarshalTo(dAtA) 969 if err != nil { 970 return nil, err 971 } 972 return dAtA[:n], nil 973 } 974 975 func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { 976 var i int 977 _ = i 978 var l int 979 _ = l 980 if len(m.Filters) > 0 { 981 for _, s := range m.Filters { 982 dAtA[i] = 0xa 983 i++ 984 l = len(s) 985 for l >= 1<<7 { 986 dAtA[i] = uint8(uint64(l)&0x7f | 0x80) 987 l >>= 7 988 i++ 989 } 990 dAtA[i] = uint8(l) 991 i++ 992 i += copy(dAtA[i:], s) 993 } 994 } 995 if m.XXX_unrecognized != nil { 996 i += copy(dAtA[i:], m.XXX_unrecognized) 997 } 998 return i, nil 999 } 1000 1001 func (m *ListResponse) Marshal() (dAtA []byte, err error) { 1002 size := m.Size() 1003 dAtA = make([]byte, size) 1004 n, err := m.MarshalTo(dAtA) 1005 if err != nil { 1006 return nil, err 1007 } 1008 return dAtA[:n], nil 1009 } 1010 1011 func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { 1012 var i int 1013 _ = i 1014 var l int 1015 _ = l 1016 if len(m.Leases) > 0 { 1017 for _, msg := range m.Leases { 1018 dAtA[i] = 0xa 1019 i++ 1020 i = encodeVarintLeases(dAtA, i, uint64(msg.Size())) 1021 n, err := msg.MarshalTo(dAtA[i:]) 1022 if err != nil { 1023 return 0, err 1024 } 1025 i += n 1026 } 1027 } 1028 if m.XXX_unrecognized != nil { 1029 i += copy(dAtA[i:], m.XXX_unrecognized) 1030 } 1031 return i, nil 1032 } 1033 1034 func (m *Resource) Marshal() (dAtA []byte, err error) { 1035 size := m.Size() 1036 dAtA = make([]byte, size) 1037 n, err := m.MarshalTo(dAtA) 1038 if err != nil { 1039 return nil, err 1040 } 1041 return dAtA[:n], nil 1042 } 1043 1044 func (m *Resource) MarshalTo(dAtA []byte) (int, error) { 1045 var i int 1046 _ = i 1047 var l int 1048 _ = l 1049 if len(m.ID) > 0 { 1050 dAtA[i] = 0xa 1051 i++ 1052 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 1053 i += copy(dAtA[i:], m.ID) 1054 } 1055 if len(m.Type) > 0 { 1056 dAtA[i] = 0x12 1057 i++ 1058 i = encodeVarintLeases(dAtA, i, uint64(len(m.Type))) 1059 i += copy(dAtA[i:], m.Type) 1060 } 1061 if m.XXX_unrecognized != nil { 1062 i += copy(dAtA[i:], m.XXX_unrecognized) 1063 } 1064 return i, nil 1065 } 1066 1067 func (m *AddResourceRequest) Marshal() (dAtA []byte, err error) { 1068 size := m.Size() 1069 dAtA = make([]byte, size) 1070 n, err := m.MarshalTo(dAtA) 1071 if err != nil { 1072 return nil, err 1073 } 1074 return dAtA[:n], nil 1075 } 1076 1077 func (m *AddResourceRequest) MarshalTo(dAtA []byte) (int, error) { 1078 var i int 1079 _ = i 1080 var l int 1081 _ = l 1082 if len(m.ID) > 0 { 1083 dAtA[i] = 0xa 1084 i++ 1085 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 1086 i += copy(dAtA[i:], m.ID) 1087 } 1088 dAtA[i] = 0x12 1089 i++ 1090 i = encodeVarintLeases(dAtA, i, uint64(m.Resource.Size())) 1091 n3, err := m.Resource.MarshalTo(dAtA[i:]) 1092 if err != nil { 1093 return 0, err 1094 } 1095 i += n3 1096 if m.XXX_unrecognized != nil { 1097 i += copy(dAtA[i:], m.XXX_unrecognized) 1098 } 1099 return i, nil 1100 } 1101 1102 func (m *DeleteResourceRequest) Marshal() (dAtA []byte, err error) { 1103 size := m.Size() 1104 dAtA = make([]byte, size) 1105 n, err := m.MarshalTo(dAtA) 1106 if err != nil { 1107 return nil, err 1108 } 1109 return dAtA[:n], nil 1110 } 1111 1112 func (m *DeleteResourceRequest) MarshalTo(dAtA []byte) (int, error) { 1113 var i int 1114 _ = i 1115 var l int 1116 _ = l 1117 if len(m.ID) > 0 { 1118 dAtA[i] = 0xa 1119 i++ 1120 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 1121 i += copy(dAtA[i:], m.ID) 1122 } 1123 dAtA[i] = 0x12 1124 i++ 1125 i = encodeVarintLeases(dAtA, i, uint64(m.Resource.Size())) 1126 n4, err := m.Resource.MarshalTo(dAtA[i:]) 1127 if err != nil { 1128 return 0, err 1129 } 1130 i += n4 1131 if m.XXX_unrecognized != nil { 1132 i += copy(dAtA[i:], m.XXX_unrecognized) 1133 } 1134 return i, nil 1135 } 1136 1137 func (m *ListResourcesRequest) Marshal() (dAtA []byte, err error) { 1138 size := m.Size() 1139 dAtA = make([]byte, size) 1140 n, err := m.MarshalTo(dAtA) 1141 if err != nil { 1142 return nil, err 1143 } 1144 return dAtA[:n], nil 1145 } 1146 1147 func (m *ListResourcesRequest) MarshalTo(dAtA []byte) (int, error) { 1148 var i int 1149 _ = i 1150 var l int 1151 _ = l 1152 if len(m.ID) > 0 { 1153 dAtA[i] = 0xa 1154 i++ 1155 i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) 1156 i += copy(dAtA[i:], m.ID) 1157 } 1158 if m.XXX_unrecognized != nil { 1159 i += copy(dAtA[i:], m.XXX_unrecognized) 1160 } 1161 return i, nil 1162 } 1163 1164 func (m *ListResourcesResponse) Marshal() (dAtA []byte, err error) { 1165 size := m.Size() 1166 dAtA = make([]byte, size) 1167 n, err := m.MarshalTo(dAtA) 1168 if err != nil { 1169 return nil, err 1170 } 1171 return dAtA[:n], nil 1172 } 1173 1174 func (m *ListResourcesResponse) MarshalTo(dAtA []byte) (int, error) { 1175 var i int 1176 _ = i 1177 var l int 1178 _ = l 1179 if len(m.Resources) > 0 { 1180 for _, msg := range m.Resources { 1181 dAtA[i] = 0xa 1182 i++ 1183 i = encodeVarintLeases(dAtA, i, uint64(msg.Size())) 1184 n, err := msg.MarshalTo(dAtA[i:]) 1185 if err != nil { 1186 return 0, err 1187 } 1188 i += n 1189 } 1190 } 1191 if m.XXX_unrecognized != nil { 1192 i += copy(dAtA[i:], m.XXX_unrecognized) 1193 } 1194 return i, nil 1195 } 1196 1197 func encodeVarintLeases(dAtA []byte, offset int, v uint64) int { 1198 for v >= 1<<7 { 1199 dAtA[offset] = uint8(v&0x7f | 0x80) 1200 v >>= 7 1201 offset++ 1202 } 1203 dAtA[offset] = uint8(v) 1204 return offset + 1 1205 } 1206 func (m *Lease) Size() (n int) { 1207 if m == nil { 1208 return 0 1209 } 1210 var l int 1211 _ = l 1212 l = len(m.ID) 1213 if l > 0 { 1214 n += 1 + l + sovLeases(uint64(l)) 1215 } 1216 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) 1217 n += 1 + l + sovLeases(uint64(l)) 1218 if len(m.Labels) > 0 { 1219 for k, v := range m.Labels { 1220 _ = k 1221 _ = v 1222 mapEntrySize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) 1223 n += mapEntrySize + 1 + sovLeases(uint64(mapEntrySize)) 1224 } 1225 } 1226 if m.XXX_unrecognized != nil { 1227 n += len(m.XXX_unrecognized) 1228 } 1229 return n 1230 } 1231 1232 func (m *CreateRequest) Size() (n int) { 1233 if m == nil { 1234 return 0 1235 } 1236 var l int 1237 _ = l 1238 l = len(m.ID) 1239 if l > 0 { 1240 n += 1 + l + sovLeases(uint64(l)) 1241 } 1242 if len(m.Labels) > 0 { 1243 for k, v := range m.Labels { 1244 _ = k 1245 _ = v 1246 mapEntrySize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) 1247 n += mapEntrySize + 1 + sovLeases(uint64(mapEntrySize)) 1248 } 1249 } 1250 if m.XXX_unrecognized != nil { 1251 n += len(m.XXX_unrecognized) 1252 } 1253 return n 1254 } 1255 1256 func (m *CreateResponse) Size() (n int) { 1257 if m == nil { 1258 return 0 1259 } 1260 var l int 1261 _ = l 1262 if m.Lease != nil { 1263 l = m.Lease.Size() 1264 n += 1 + l + sovLeases(uint64(l)) 1265 } 1266 if m.XXX_unrecognized != nil { 1267 n += len(m.XXX_unrecognized) 1268 } 1269 return n 1270 } 1271 1272 func (m *DeleteRequest) Size() (n int) { 1273 if m == nil { 1274 return 0 1275 } 1276 var l int 1277 _ = l 1278 l = len(m.ID) 1279 if l > 0 { 1280 n += 1 + l + sovLeases(uint64(l)) 1281 } 1282 if m.Sync { 1283 n += 2 1284 } 1285 if m.XXX_unrecognized != nil { 1286 n += len(m.XXX_unrecognized) 1287 } 1288 return n 1289 } 1290 1291 func (m *ListRequest) Size() (n int) { 1292 if m == nil { 1293 return 0 1294 } 1295 var l int 1296 _ = l 1297 if len(m.Filters) > 0 { 1298 for _, s := range m.Filters { 1299 l = len(s) 1300 n += 1 + l + sovLeases(uint64(l)) 1301 } 1302 } 1303 if m.XXX_unrecognized != nil { 1304 n += len(m.XXX_unrecognized) 1305 } 1306 return n 1307 } 1308 1309 func (m *ListResponse) Size() (n int) { 1310 if m == nil { 1311 return 0 1312 } 1313 var l int 1314 _ = l 1315 if len(m.Leases) > 0 { 1316 for _, e := range m.Leases { 1317 l = e.Size() 1318 n += 1 + l + sovLeases(uint64(l)) 1319 } 1320 } 1321 if m.XXX_unrecognized != nil { 1322 n += len(m.XXX_unrecognized) 1323 } 1324 return n 1325 } 1326 1327 func (m *Resource) Size() (n int) { 1328 if m == nil { 1329 return 0 1330 } 1331 var l int 1332 _ = l 1333 l = len(m.ID) 1334 if l > 0 { 1335 n += 1 + l + sovLeases(uint64(l)) 1336 } 1337 l = len(m.Type) 1338 if l > 0 { 1339 n += 1 + l + sovLeases(uint64(l)) 1340 } 1341 if m.XXX_unrecognized != nil { 1342 n += len(m.XXX_unrecognized) 1343 } 1344 return n 1345 } 1346 1347 func (m *AddResourceRequest) Size() (n int) { 1348 if m == nil { 1349 return 0 1350 } 1351 var l int 1352 _ = l 1353 l = len(m.ID) 1354 if l > 0 { 1355 n += 1 + l + sovLeases(uint64(l)) 1356 } 1357 l = m.Resource.Size() 1358 n += 1 + l + sovLeases(uint64(l)) 1359 if m.XXX_unrecognized != nil { 1360 n += len(m.XXX_unrecognized) 1361 } 1362 return n 1363 } 1364 1365 func (m *DeleteResourceRequest) Size() (n int) { 1366 if m == nil { 1367 return 0 1368 } 1369 var l int 1370 _ = l 1371 l = len(m.ID) 1372 if l > 0 { 1373 n += 1 + l + sovLeases(uint64(l)) 1374 } 1375 l = m.Resource.Size() 1376 n += 1 + l + sovLeases(uint64(l)) 1377 if m.XXX_unrecognized != nil { 1378 n += len(m.XXX_unrecognized) 1379 } 1380 return n 1381 } 1382 1383 func (m *ListResourcesRequest) Size() (n int) { 1384 if m == nil { 1385 return 0 1386 } 1387 var l int 1388 _ = l 1389 l = len(m.ID) 1390 if l > 0 { 1391 n += 1 + l + sovLeases(uint64(l)) 1392 } 1393 if m.XXX_unrecognized != nil { 1394 n += len(m.XXX_unrecognized) 1395 } 1396 return n 1397 } 1398 1399 func (m *ListResourcesResponse) Size() (n int) { 1400 if m == nil { 1401 return 0 1402 } 1403 var l int 1404 _ = l 1405 if len(m.Resources) > 0 { 1406 for _, e := range m.Resources { 1407 l = e.Size() 1408 n += 1 + l + sovLeases(uint64(l)) 1409 } 1410 } 1411 if m.XXX_unrecognized != nil { 1412 n += len(m.XXX_unrecognized) 1413 } 1414 return n 1415 } 1416 1417 func sovLeases(x uint64) (n int) { 1418 for { 1419 n++ 1420 x >>= 7 1421 if x == 0 { 1422 break 1423 } 1424 } 1425 return n 1426 } 1427 func sozLeases(x uint64) (n int) { 1428 return sovLeases(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1429 } 1430 func (this *Lease) String() string { 1431 if this == nil { 1432 return "nil" 1433 } 1434 keysForLabels := make([]string, 0, len(this.Labels)) 1435 for k, _ := range this.Labels { 1436 keysForLabels = append(keysForLabels, k) 1437 } 1438 github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) 1439 mapStringForLabels := "map[string]string{" 1440 for _, k := range keysForLabels { 1441 mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) 1442 } 1443 mapStringForLabels += "}" 1444 s := strings.Join([]string{`&Lease{`, 1445 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1446 `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, 1447 `Labels:` + mapStringForLabels + `,`, 1448 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1449 `}`, 1450 }, "") 1451 return s 1452 } 1453 func (this *CreateRequest) String() string { 1454 if this == nil { 1455 return "nil" 1456 } 1457 keysForLabels := make([]string, 0, len(this.Labels)) 1458 for k, _ := range this.Labels { 1459 keysForLabels = append(keysForLabels, k) 1460 } 1461 github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) 1462 mapStringForLabels := "map[string]string{" 1463 for _, k := range keysForLabels { 1464 mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) 1465 } 1466 mapStringForLabels += "}" 1467 s := strings.Join([]string{`&CreateRequest{`, 1468 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1469 `Labels:` + mapStringForLabels + `,`, 1470 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1471 `}`, 1472 }, "") 1473 return s 1474 } 1475 func (this *CreateResponse) String() string { 1476 if this == nil { 1477 return "nil" 1478 } 1479 s := strings.Join([]string{`&CreateResponse{`, 1480 `Lease:` + strings.Replace(fmt.Sprintf("%v", this.Lease), "Lease", "Lease", 1) + `,`, 1481 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1482 `}`, 1483 }, "") 1484 return s 1485 } 1486 func (this *DeleteRequest) String() string { 1487 if this == nil { 1488 return "nil" 1489 } 1490 s := strings.Join([]string{`&DeleteRequest{`, 1491 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1492 `Sync:` + fmt.Sprintf("%v", this.Sync) + `,`, 1493 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1494 `}`, 1495 }, "") 1496 return s 1497 } 1498 func (this *ListRequest) String() string { 1499 if this == nil { 1500 return "nil" 1501 } 1502 s := strings.Join([]string{`&ListRequest{`, 1503 `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, 1504 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1505 `}`, 1506 }, "") 1507 return s 1508 } 1509 func (this *ListResponse) String() string { 1510 if this == nil { 1511 return "nil" 1512 } 1513 s := strings.Join([]string{`&ListResponse{`, 1514 `Leases:` + strings.Replace(fmt.Sprintf("%v", this.Leases), "Lease", "Lease", 1) + `,`, 1515 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1516 `}`, 1517 }, "") 1518 return s 1519 } 1520 func (this *Resource) String() string { 1521 if this == nil { 1522 return "nil" 1523 } 1524 s := strings.Join([]string{`&Resource{`, 1525 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1526 `Type:` + fmt.Sprintf("%v", this.Type) + `,`, 1527 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1528 `}`, 1529 }, "") 1530 return s 1531 } 1532 func (this *AddResourceRequest) String() string { 1533 if this == nil { 1534 return "nil" 1535 } 1536 s := strings.Join([]string{`&AddResourceRequest{`, 1537 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1538 `Resource:` + strings.Replace(strings.Replace(this.Resource.String(), "Resource", "Resource", 1), `&`, ``, 1) + `,`, 1539 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1540 `}`, 1541 }, "") 1542 return s 1543 } 1544 func (this *DeleteResourceRequest) String() string { 1545 if this == nil { 1546 return "nil" 1547 } 1548 s := strings.Join([]string{`&DeleteResourceRequest{`, 1549 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1550 `Resource:` + strings.Replace(strings.Replace(this.Resource.String(), "Resource", "Resource", 1), `&`, ``, 1) + `,`, 1551 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1552 `}`, 1553 }, "") 1554 return s 1555 } 1556 func (this *ListResourcesRequest) String() string { 1557 if this == nil { 1558 return "nil" 1559 } 1560 s := strings.Join([]string{`&ListResourcesRequest{`, 1561 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 1562 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1563 `}`, 1564 }, "") 1565 return s 1566 } 1567 func (this *ListResourcesResponse) String() string { 1568 if this == nil { 1569 return "nil" 1570 } 1571 s := strings.Join([]string{`&ListResourcesResponse{`, 1572 `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, 1573 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 1574 `}`, 1575 }, "") 1576 return s 1577 } 1578 func valueToStringLeases(v interface{}) string { 1579 rv := reflect.ValueOf(v) 1580 if rv.IsNil() { 1581 return "nil" 1582 } 1583 pv := reflect.Indirect(rv).Interface() 1584 return fmt.Sprintf("*%v", pv) 1585 } 1586 func (m *Lease) Unmarshal(dAtA []byte) error { 1587 l := len(dAtA) 1588 iNdEx := 0 1589 for iNdEx < l { 1590 preIndex := iNdEx 1591 var wire uint64 1592 for shift := uint(0); ; shift += 7 { 1593 if shift >= 64 { 1594 return ErrIntOverflowLeases 1595 } 1596 if iNdEx >= l { 1597 return io.ErrUnexpectedEOF 1598 } 1599 b := dAtA[iNdEx] 1600 iNdEx++ 1601 wire |= uint64(b&0x7F) << shift 1602 if b < 0x80 { 1603 break 1604 } 1605 } 1606 fieldNum := int32(wire >> 3) 1607 wireType := int(wire & 0x7) 1608 if wireType == 4 { 1609 return fmt.Errorf("proto: Lease: wiretype end group for non-group") 1610 } 1611 if fieldNum <= 0 { 1612 return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) 1613 } 1614 switch fieldNum { 1615 case 1: 1616 if wireType != 2 { 1617 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 1618 } 1619 var stringLen uint64 1620 for shift := uint(0); ; shift += 7 { 1621 if shift >= 64 { 1622 return ErrIntOverflowLeases 1623 } 1624 if iNdEx >= l { 1625 return io.ErrUnexpectedEOF 1626 } 1627 b := dAtA[iNdEx] 1628 iNdEx++ 1629 stringLen |= uint64(b&0x7F) << shift 1630 if b < 0x80 { 1631 break 1632 } 1633 } 1634 intStringLen := int(stringLen) 1635 if intStringLen < 0 { 1636 return ErrInvalidLengthLeases 1637 } 1638 postIndex := iNdEx + intStringLen 1639 if postIndex < 0 { 1640 return ErrInvalidLengthLeases 1641 } 1642 if postIndex > l { 1643 return io.ErrUnexpectedEOF 1644 } 1645 m.ID = string(dAtA[iNdEx:postIndex]) 1646 iNdEx = postIndex 1647 case 2: 1648 if wireType != 2 { 1649 return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) 1650 } 1651 var msglen int 1652 for shift := uint(0); ; shift += 7 { 1653 if shift >= 64 { 1654 return ErrIntOverflowLeases 1655 } 1656 if iNdEx >= l { 1657 return io.ErrUnexpectedEOF 1658 } 1659 b := dAtA[iNdEx] 1660 iNdEx++ 1661 msglen |= int(b&0x7F) << shift 1662 if b < 0x80 { 1663 break 1664 } 1665 } 1666 if msglen < 0 { 1667 return ErrInvalidLengthLeases 1668 } 1669 postIndex := iNdEx + msglen 1670 if postIndex < 0 { 1671 return ErrInvalidLengthLeases 1672 } 1673 if postIndex > l { 1674 return io.ErrUnexpectedEOF 1675 } 1676 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { 1677 return err 1678 } 1679 iNdEx = postIndex 1680 case 3: 1681 if wireType != 2 { 1682 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 1683 } 1684 var msglen int 1685 for shift := uint(0); ; shift += 7 { 1686 if shift >= 64 { 1687 return ErrIntOverflowLeases 1688 } 1689 if iNdEx >= l { 1690 return io.ErrUnexpectedEOF 1691 } 1692 b := dAtA[iNdEx] 1693 iNdEx++ 1694 msglen |= int(b&0x7F) << shift 1695 if b < 0x80 { 1696 break 1697 } 1698 } 1699 if msglen < 0 { 1700 return ErrInvalidLengthLeases 1701 } 1702 postIndex := iNdEx + msglen 1703 if postIndex < 0 { 1704 return ErrInvalidLengthLeases 1705 } 1706 if postIndex > l { 1707 return io.ErrUnexpectedEOF 1708 } 1709 if m.Labels == nil { 1710 m.Labels = make(map[string]string) 1711 } 1712 var mapkey string 1713 var mapvalue string 1714 for iNdEx < postIndex { 1715 entryPreIndex := iNdEx 1716 var wire uint64 1717 for shift := uint(0); ; shift += 7 { 1718 if shift >= 64 { 1719 return ErrIntOverflowLeases 1720 } 1721 if iNdEx >= l { 1722 return io.ErrUnexpectedEOF 1723 } 1724 b := dAtA[iNdEx] 1725 iNdEx++ 1726 wire |= uint64(b&0x7F) << shift 1727 if b < 0x80 { 1728 break 1729 } 1730 } 1731 fieldNum := int32(wire >> 3) 1732 if fieldNum == 1 { 1733 var stringLenmapkey uint64 1734 for shift := uint(0); ; shift += 7 { 1735 if shift >= 64 { 1736 return ErrIntOverflowLeases 1737 } 1738 if iNdEx >= l { 1739 return io.ErrUnexpectedEOF 1740 } 1741 b := dAtA[iNdEx] 1742 iNdEx++ 1743 stringLenmapkey |= uint64(b&0x7F) << shift 1744 if b < 0x80 { 1745 break 1746 } 1747 } 1748 intStringLenmapkey := int(stringLenmapkey) 1749 if intStringLenmapkey < 0 { 1750 return ErrInvalidLengthLeases 1751 } 1752 postStringIndexmapkey := iNdEx + intStringLenmapkey 1753 if postStringIndexmapkey < 0 { 1754 return ErrInvalidLengthLeases 1755 } 1756 if postStringIndexmapkey > l { 1757 return io.ErrUnexpectedEOF 1758 } 1759 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1760 iNdEx = postStringIndexmapkey 1761 } else if fieldNum == 2 { 1762 var stringLenmapvalue uint64 1763 for shift := uint(0); ; shift += 7 { 1764 if shift >= 64 { 1765 return ErrIntOverflowLeases 1766 } 1767 if iNdEx >= l { 1768 return io.ErrUnexpectedEOF 1769 } 1770 b := dAtA[iNdEx] 1771 iNdEx++ 1772 stringLenmapvalue |= uint64(b&0x7F) << shift 1773 if b < 0x80 { 1774 break 1775 } 1776 } 1777 intStringLenmapvalue := int(stringLenmapvalue) 1778 if intStringLenmapvalue < 0 { 1779 return ErrInvalidLengthLeases 1780 } 1781 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1782 if postStringIndexmapvalue < 0 { 1783 return ErrInvalidLengthLeases 1784 } 1785 if postStringIndexmapvalue > l { 1786 return io.ErrUnexpectedEOF 1787 } 1788 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 1789 iNdEx = postStringIndexmapvalue 1790 } else { 1791 iNdEx = entryPreIndex 1792 skippy, err := skipLeases(dAtA[iNdEx:]) 1793 if err != nil { 1794 return err 1795 } 1796 if skippy < 0 { 1797 return ErrInvalidLengthLeases 1798 } 1799 if (iNdEx + skippy) > postIndex { 1800 return io.ErrUnexpectedEOF 1801 } 1802 iNdEx += skippy 1803 } 1804 } 1805 m.Labels[mapkey] = mapvalue 1806 iNdEx = postIndex 1807 default: 1808 iNdEx = preIndex 1809 skippy, err := skipLeases(dAtA[iNdEx:]) 1810 if err != nil { 1811 return err 1812 } 1813 if skippy < 0 { 1814 return ErrInvalidLengthLeases 1815 } 1816 if (iNdEx + skippy) < 0 { 1817 return ErrInvalidLengthLeases 1818 } 1819 if (iNdEx + skippy) > l { 1820 return io.ErrUnexpectedEOF 1821 } 1822 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1823 iNdEx += skippy 1824 } 1825 } 1826 1827 if iNdEx > l { 1828 return io.ErrUnexpectedEOF 1829 } 1830 return nil 1831 } 1832 func (m *CreateRequest) Unmarshal(dAtA []byte) error { 1833 l := len(dAtA) 1834 iNdEx := 0 1835 for iNdEx < l { 1836 preIndex := iNdEx 1837 var wire uint64 1838 for shift := uint(0); ; shift += 7 { 1839 if shift >= 64 { 1840 return ErrIntOverflowLeases 1841 } 1842 if iNdEx >= l { 1843 return io.ErrUnexpectedEOF 1844 } 1845 b := dAtA[iNdEx] 1846 iNdEx++ 1847 wire |= uint64(b&0x7F) << shift 1848 if b < 0x80 { 1849 break 1850 } 1851 } 1852 fieldNum := int32(wire >> 3) 1853 wireType := int(wire & 0x7) 1854 if wireType == 4 { 1855 return fmt.Errorf("proto: CreateRequest: wiretype end group for non-group") 1856 } 1857 if fieldNum <= 0 { 1858 return fmt.Errorf("proto: CreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1859 } 1860 switch fieldNum { 1861 case 1: 1862 if wireType != 2 { 1863 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 1864 } 1865 var stringLen uint64 1866 for shift := uint(0); ; shift += 7 { 1867 if shift >= 64 { 1868 return ErrIntOverflowLeases 1869 } 1870 if iNdEx >= l { 1871 return io.ErrUnexpectedEOF 1872 } 1873 b := dAtA[iNdEx] 1874 iNdEx++ 1875 stringLen |= uint64(b&0x7F) << shift 1876 if b < 0x80 { 1877 break 1878 } 1879 } 1880 intStringLen := int(stringLen) 1881 if intStringLen < 0 { 1882 return ErrInvalidLengthLeases 1883 } 1884 postIndex := iNdEx + intStringLen 1885 if postIndex < 0 { 1886 return ErrInvalidLengthLeases 1887 } 1888 if postIndex > l { 1889 return io.ErrUnexpectedEOF 1890 } 1891 m.ID = string(dAtA[iNdEx:postIndex]) 1892 iNdEx = postIndex 1893 case 3: 1894 if wireType != 2 { 1895 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 1896 } 1897 var msglen int 1898 for shift := uint(0); ; shift += 7 { 1899 if shift >= 64 { 1900 return ErrIntOverflowLeases 1901 } 1902 if iNdEx >= l { 1903 return io.ErrUnexpectedEOF 1904 } 1905 b := dAtA[iNdEx] 1906 iNdEx++ 1907 msglen |= int(b&0x7F) << shift 1908 if b < 0x80 { 1909 break 1910 } 1911 } 1912 if msglen < 0 { 1913 return ErrInvalidLengthLeases 1914 } 1915 postIndex := iNdEx + msglen 1916 if postIndex < 0 { 1917 return ErrInvalidLengthLeases 1918 } 1919 if postIndex > l { 1920 return io.ErrUnexpectedEOF 1921 } 1922 if m.Labels == nil { 1923 m.Labels = make(map[string]string) 1924 } 1925 var mapkey string 1926 var mapvalue string 1927 for iNdEx < postIndex { 1928 entryPreIndex := iNdEx 1929 var wire uint64 1930 for shift := uint(0); ; shift += 7 { 1931 if shift >= 64 { 1932 return ErrIntOverflowLeases 1933 } 1934 if iNdEx >= l { 1935 return io.ErrUnexpectedEOF 1936 } 1937 b := dAtA[iNdEx] 1938 iNdEx++ 1939 wire |= uint64(b&0x7F) << shift 1940 if b < 0x80 { 1941 break 1942 } 1943 } 1944 fieldNum := int32(wire >> 3) 1945 if fieldNum == 1 { 1946 var stringLenmapkey uint64 1947 for shift := uint(0); ; shift += 7 { 1948 if shift >= 64 { 1949 return ErrIntOverflowLeases 1950 } 1951 if iNdEx >= l { 1952 return io.ErrUnexpectedEOF 1953 } 1954 b := dAtA[iNdEx] 1955 iNdEx++ 1956 stringLenmapkey |= uint64(b&0x7F) << shift 1957 if b < 0x80 { 1958 break 1959 } 1960 } 1961 intStringLenmapkey := int(stringLenmapkey) 1962 if intStringLenmapkey < 0 { 1963 return ErrInvalidLengthLeases 1964 } 1965 postStringIndexmapkey := iNdEx + intStringLenmapkey 1966 if postStringIndexmapkey < 0 { 1967 return ErrInvalidLengthLeases 1968 } 1969 if postStringIndexmapkey > l { 1970 return io.ErrUnexpectedEOF 1971 } 1972 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1973 iNdEx = postStringIndexmapkey 1974 } else if fieldNum == 2 { 1975 var stringLenmapvalue uint64 1976 for shift := uint(0); ; shift += 7 { 1977 if shift >= 64 { 1978 return ErrIntOverflowLeases 1979 } 1980 if iNdEx >= l { 1981 return io.ErrUnexpectedEOF 1982 } 1983 b := dAtA[iNdEx] 1984 iNdEx++ 1985 stringLenmapvalue |= uint64(b&0x7F) << shift 1986 if b < 0x80 { 1987 break 1988 } 1989 } 1990 intStringLenmapvalue := int(stringLenmapvalue) 1991 if intStringLenmapvalue < 0 { 1992 return ErrInvalidLengthLeases 1993 } 1994 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1995 if postStringIndexmapvalue < 0 { 1996 return ErrInvalidLengthLeases 1997 } 1998 if postStringIndexmapvalue > l { 1999 return io.ErrUnexpectedEOF 2000 } 2001 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 2002 iNdEx = postStringIndexmapvalue 2003 } else { 2004 iNdEx = entryPreIndex 2005 skippy, err := skipLeases(dAtA[iNdEx:]) 2006 if err != nil { 2007 return err 2008 } 2009 if skippy < 0 { 2010 return ErrInvalidLengthLeases 2011 } 2012 if (iNdEx + skippy) > postIndex { 2013 return io.ErrUnexpectedEOF 2014 } 2015 iNdEx += skippy 2016 } 2017 } 2018 m.Labels[mapkey] = mapvalue 2019 iNdEx = postIndex 2020 default: 2021 iNdEx = preIndex 2022 skippy, err := skipLeases(dAtA[iNdEx:]) 2023 if err != nil { 2024 return err 2025 } 2026 if skippy < 0 { 2027 return ErrInvalidLengthLeases 2028 } 2029 if (iNdEx + skippy) < 0 { 2030 return ErrInvalidLengthLeases 2031 } 2032 if (iNdEx + skippy) > l { 2033 return io.ErrUnexpectedEOF 2034 } 2035 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2036 iNdEx += skippy 2037 } 2038 } 2039 2040 if iNdEx > l { 2041 return io.ErrUnexpectedEOF 2042 } 2043 return nil 2044 } 2045 func (m *CreateResponse) Unmarshal(dAtA []byte) error { 2046 l := len(dAtA) 2047 iNdEx := 0 2048 for iNdEx < l { 2049 preIndex := iNdEx 2050 var wire uint64 2051 for shift := uint(0); ; shift += 7 { 2052 if shift >= 64 { 2053 return ErrIntOverflowLeases 2054 } 2055 if iNdEx >= l { 2056 return io.ErrUnexpectedEOF 2057 } 2058 b := dAtA[iNdEx] 2059 iNdEx++ 2060 wire |= uint64(b&0x7F) << shift 2061 if b < 0x80 { 2062 break 2063 } 2064 } 2065 fieldNum := int32(wire >> 3) 2066 wireType := int(wire & 0x7) 2067 if wireType == 4 { 2068 return fmt.Errorf("proto: CreateResponse: wiretype end group for non-group") 2069 } 2070 if fieldNum <= 0 { 2071 return fmt.Errorf("proto: CreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2072 } 2073 switch fieldNum { 2074 case 1: 2075 if wireType != 2 { 2076 return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) 2077 } 2078 var msglen int 2079 for shift := uint(0); ; shift += 7 { 2080 if shift >= 64 { 2081 return ErrIntOverflowLeases 2082 } 2083 if iNdEx >= l { 2084 return io.ErrUnexpectedEOF 2085 } 2086 b := dAtA[iNdEx] 2087 iNdEx++ 2088 msglen |= int(b&0x7F) << shift 2089 if b < 0x80 { 2090 break 2091 } 2092 } 2093 if msglen < 0 { 2094 return ErrInvalidLengthLeases 2095 } 2096 postIndex := iNdEx + msglen 2097 if postIndex < 0 { 2098 return ErrInvalidLengthLeases 2099 } 2100 if postIndex > l { 2101 return io.ErrUnexpectedEOF 2102 } 2103 if m.Lease == nil { 2104 m.Lease = &Lease{} 2105 } 2106 if err := m.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2107 return err 2108 } 2109 iNdEx = postIndex 2110 default: 2111 iNdEx = preIndex 2112 skippy, err := skipLeases(dAtA[iNdEx:]) 2113 if err != nil { 2114 return err 2115 } 2116 if skippy < 0 { 2117 return ErrInvalidLengthLeases 2118 } 2119 if (iNdEx + skippy) < 0 { 2120 return ErrInvalidLengthLeases 2121 } 2122 if (iNdEx + skippy) > l { 2123 return io.ErrUnexpectedEOF 2124 } 2125 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2126 iNdEx += skippy 2127 } 2128 } 2129 2130 if iNdEx > l { 2131 return io.ErrUnexpectedEOF 2132 } 2133 return nil 2134 } 2135 func (m *DeleteRequest) Unmarshal(dAtA []byte) error { 2136 l := len(dAtA) 2137 iNdEx := 0 2138 for iNdEx < l { 2139 preIndex := iNdEx 2140 var wire uint64 2141 for shift := uint(0); ; shift += 7 { 2142 if shift >= 64 { 2143 return ErrIntOverflowLeases 2144 } 2145 if iNdEx >= l { 2146 return io.ErrUnexpectedEOF 2147 } 2148 b := dAtA[iNdEx] 2149 iNdEx++ 2150 wire |= uint64(b&0x7F) << shift 2151 if b < 0x80 { 2152 break 2153 } 2154 } 2155 fieldNum := int32(wire >> 3) 2156 wireType := int(wire & 0x7) 2157 if wireType == 4 { 2158 return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group") 2159 } 2160 if fieldNum <= 0 { 2161 return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2162 } 2163 switch fieldNum { 2164 case 1: 2165 if wireType != 2 { 2166 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 2167 } 2168 var stringLen uint64 2169 for shift := uint(0); ; shift += 7 { 2170 if shift >= 64 { 2171 return ErrIntOverflowLeases 2172 } 2173 if iNdEx >= l { 2174 return io.ErrUnexpectedEOF 2175 } 2176 b := dAtA[iNdEx] 2177 iNdEx++ 2178 stringLen |= uint64(b&0x7F) << shift 2179 if b < 0x80 { 2180 break 2181 } 2182 } 2183 intStringLen := int(stringLen) 2184 if intStringLen < 0 { 2185 return ErrInvalidLengthLeases 2186 } 2187 postIndex := iNdEx + intStringLen 2188 if postIndex < 0 { 2189 return ErrInvalidLengthLeases 2190 } 2191 if postIndex > l { 2192 return io.ErrUnexpectedEOF 2193 } 2194 m.ID = string(dAtA[iNdEx:postIndex]) 2195 iNdEx = postIndex 2196 case 2: 2197 if wireType != 0 { 2198 return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) 2199 } 2200 var v int 2201 for shift := uint(0); ; shift += 7 { 2202 if shift >= 64 { 2203 return ErrIntOverflowLeases 2204 } 2205 if iNdEx >= l { 2206 return io.ErrUnexpectedEOF 2207 } 2208 b := dAtA[iNdEx] 2209 iNdEx++ 2210 v |= int(b&0x7F) << shift 2211 if b < 0x80 { 2212 break 2213 } 2214 } 2215 m.Sync = bool(v != 0) 2216 default: 2217 iNdEx = preIndex 2218 skippy, err := skipLeases(dAtA[iNdEx:]) 2219 if err != nil { 2220 return err 2221 } 2222 if skippy < 0 { 2223 return ErrInvalidLengthLeases 2224 } 2225 if (iNdEx + skippy) < 0 { 2226 return ErrInvalidLengthLeases 2227 } 2228 if (iNdEx + skippy) > l { 2229 return io.ErrUnexpectedEOF 2230 } 2231 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2232 iNdEx += skippy 2233 } 2234 } 2235 2236 if iNdEx > l { 2237 return io.ErrUnexpectedEOF 2238 } 2239 return nil 2240 } 2241 func (m *ListRequest) Unmarshal(dAtA []byte) error { 2242 l := len(dAtA) 2243 iNdEx := 0 2244 for iNdEx < l { 2245 preIndex := iNdEx 2246 var wire uint64 2247 for shift := uint(0); ; shift += 7 { 2248 if shift >= 64 { 2249 return ErrIntOverflowLeases 2250 } 2251 if iNdEx >= l { 2252 return io.ErrUnexpectedEOF 2253 } 2254 b := dAtA[iNdEx] 2255 iNdEx++ 2256 wire |= uint64(b&0x7F) << shift 2257 if b < 0x80 { 2258 break 2259 } 2260 } 2261 fieldNum := int32(wire >> 3) 2262 wireType := int(wire & 0x7) 2263 if wireType == 4 { 2264 return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") 2265 } 2266 if fieldNum <= 0 { 2267 return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2268 } 2269 switch fieldNum { 2270 case 1: 2271 if wireType != 2 { 2272 return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) 2273 } 2274 var stringLen uint64 2275 for shift := uint(0); ; shift += 7 { 2276 if shift >= 64 { 2277 return ErrIntOverflowLeases 2278 } 2279 if iNdEx >= l { 2280 return io.ErrUnexpectedEOF 2281 } 2282 b := dAtA[iNdEx] 2283 iNdEx++ 2284 stringLen |= uint64(b&0x7F) << shift 2285 if b < 0x80 { 2286 break 2287 } 2288 } 2289 intStringLen := int(stringLen) 2290 if intStringLen < 0 { 2291 return ErrInvalidLengthLeases 2292 } 2293 postIndex := iNdEx + intStringLen 2294 if postIndex < 0 { 2295 return ErrInvalidLengthLeases 2296 } 2297 if postIndex > l { 2298 return io.ErrUnexpectedEOF 2299 } 2300 m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) 2301 iNdEx = postIndex 2302 default: 2303 iNdEx = preIndex 2304 skippy, err := skipLeases(dAtA[iNdEx:]) 2305 if err != nil { 2306 return err 2307 } 2308 if skippy < 0 { 2309 return ErrInvalidLengthLeases 2310 } 2311 if (iNdEx + skippy) < 0 { 2312 return ErrInvalidLengthLeases 2313 } 2314 if (iNdEx + skippy) > l { 2315 return io.ErrUnexpectedEOF 2316 } 2317 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2318 iNdEx += skippy 2319 } 2320 } 2321 2322 if iNdEx > l { 2323 return io.ErrUnexpectedEOF 2324 } 2325 return nil 2326 } 2327 func (m *ListResponse) Unmarshal(dAtA []byte) error { 2328 l := len(dAtA) 2329 iNdEx := 0 2330 for iNdEx < l { 2331 preIndex := iNdEx 2332 var wire uint64 2333 for shift := uint(0); ; shift += 7 { 2334 if shift >= 64 { 2335 return ErrIntOverflowLeases 2336 } 2337 if iNdEx >= l { 2338 return io.ErrUnexpectedEOF 2339 } 2340 b := dAtA[iNdEx] 2341 iNdEx++ 2342 wire |= uint64(b&0x7F) << shift 2343 if b < 0x80 { 2344 break 2345 } 2346 } 2347 fieldNum := int32(wire >> 3) 2348 wireType := int(wire & 0x7) 2349 if wireType == 4 { 2350 return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") 2351 } 2352 if fieldNum <= 0 { 2353 return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2354 } 2355 switch fieldNum { 2356 case 1: 2357 if wireType != 2 { 2358 return fmt.Errorf("proto: wrong wireType = %d for field Leases", wireType) 2359 } 2360 var msglen int 2361 for shift := uint(0); ; shift += 7 { 2362 if shift >= 64 { 2363 return ErrIntOverflowLeases 2364 } 2365 if iNdEx >= l { 2366 return io.ErrUnexpectedEOF 2367 } 2368 b := dAtA[iNdEx] 2369 iNdEx++ 2370 msglen |= int(b&0x7F) << shift 2371 if b < 0x80 { 2372 break 2373 } 2374 } 2375 if msglen < 0 { 2376 return ErrInvalidLengthLeases 2377 } 2378 postIndex := iNdEx + msglen 2379 if postIndex < 0 { 2380 return ErrInvalidLengthLeases 2381 } 2382 if postIndex > l { 2383 return io.ErrUnexpectedEOF 2384 } 2385 m.Leases = append(m.Leases, &Lease{}) 2386 if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2387 return err 2388 } 2389 iNdEx = postIndex 2390 default: 2391 iNdEx = preIndex 2392 skippy, err := skipLeases(dAtA[iNdEx:]) 2393 if err != nil { 2394 return err 2395 } 2396 if skippy < 0 { 2397 return ErrInvalidLengthLeases 2398 } 2399 if (iNdEx + skippy) < 0 { 2400 return ErrInvalidLengthLeases 2401 } 2402 if (iNdEx + skippy) > l { 2403 return io.ErrUnexpectedEOF 2404 } 2405 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2406 iNdEx += skippy 2407 } 2408 } 2409 2410 if iNdEx > l { 2411 return io.ErrUnexpectedEOF 2412 } 2413 return nil 2414 } 2415 func (m *Resource) Unmarshal(dAtA []byte) error { 2416 l := len(dAtA) 2417 iNdEx := 0 2418 for iNdEx < l { 2419 preIndex := iNdEx 2420 var wire uint64 2421 for shift := uint(0); ; shift += 7 { 2422 if shift >= 64 { 2423 return ErrIntOverflowLeases 2424 } 2425 if iNdEx >= l { 2426 return io.ErrUnexpectedEOF 2427 } 2428 b := dAtA[iNdEx] 2429 iNdEx++ 2430 wire |= uint64(b&0x7F) << shift 2431 if b < 0x80 { 2432 break 2433 } 2434 } 2435 fieldNum := int32(wire >> 3) 2436 wireType := int(wire & 0x7) 2437 if wireType == 4 { 2438 return fmt.Errorf("proto: Resource: wiretype end group for non-group") 2439 } 2440 if fieldNum <= 0 { 2441 return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) 2442 } 2443 switch fieldNum { 2444 case 1: 2445 if wireType != 2 { 2446 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 2447 } 2448 var stringLen uint64 2449 for shift := uint(0); ; shift += 7 { 2450 if shift >= 64 { 2451 return ErrIntOverflowLeases 2452 } 2453 if iNdEx >= l { 2454 return io.ErrUnexpectedEOF 2455 } 2456 b := dAtA[iNdEx] 2457 iNdEx++ 2458 stringLen |= uint64(b&0x7F) << shift 2459 if b < 0x80 { 2460 break 2461 } 2462 } 2463 intStringLen := int(stringLen) 2464 if intStringLen < 0 { 2465 return ErrInvalidLengthLeases 2466 } 2467 postIndex := iNdEx + intStringLen 2468 if postIndex < 0 { 2469 return ErrInvalidLengthLeases 2470 } 2471 if postIndex > l { 2472 return io.ErrUnexpectedEOF 2473 } 2474 m.ID = string(dAtA[iNdEx:postIndex]) 2475 iNdEx = postIndex 2476 case 2: 2477 if wireType != 2 { 2478 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2479 } 2480 var stringLen uint64 2481 for shift := uint(0); ; shift += 7 { 2482 if shift >= 64 { 2483 return ErrIntOverflowLeases 2484 } 2485 if iNdEx >= l { 2486 return io.ErrUnexpectedEOF 2487 } 2488 b := dAtA[iNdEx] 2489 iNdEx++ 2490 stringLen |= uint64(b&0x7F) << shift 2491 if b < 0x80 { 2492 break 2493 } 2494 } 2495 intStringLen := int(stringLen) 2496 if intStringLen < 0 { 2497 return ErrInvalidLengthLeases 2498 } 2499 postIndex := iNdEx + intStringLen 2500 if postIndex < 0 { 2501 return ErrInvalidLengthLeases 2502 } 2503 if postIndex > l { 2504 return io.ErrUnexpectedEOF 2505 } 2506 m.Type = string(dAtA[iNdEx:postIndex]) 2507 iNdEx = postIndex 2508 default: 2509 iNdEx = preIndex 2510 skippy, err := skipLeases(dAtA[iNdEx:]) 2511 if err != nil { 2512 return err 2513 } 2514 if skippy < 0 { 2515 return ErrInvalidLengthLeases 2516 } 2517 if (iNdEx + skippy) < 0 { 2518 return ErrInvalidLengthLeases 2519 } 2520 if (iNdEx + skippy) > l { 2521 return io.ErrUnexpectedEOF 2522 } 2523 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2524 iNdEx += skippy 2525 } 2526 } 2527 2528 if iNdEx > l { 2529 return io.ErrUnexpectedEOF 2530 } 2531 return nil 2532 } 2533 func (m *AddResourceRequest) Unmarshal(dAtA []byte) error { 2534 l := len(dAtA) 2535 iNdEx := 0 2536 for iNdEx < l { 2537 preIndex := iNdEx 2538 var wire uint64 2539 for shift := uint(0); ; shift += 7 { 2540 if shift >= 64 { 2541 return ErrIntOverflowLeases 2542 } 2543 if iNdEx >= l { 2544 return io.ErrUnexpectedEOF 2545 } 2546 b := dAtA[iNdEx] 2547 iNdEx++ 2548 wire |= uint64(b&0x7F) << shift 2549 if b < 0x80 { 2550 break 2551 } 2552 } 2553 fieldNum := int32(wire >> 3) 2554 wireType := int(wire & 0x7) 2555 if wireType == 4 { 2556 return fmt.Errorf("proto: AddResourceRequest: wiretype end group for non-group") 2557 } 2558 if fieldNum <= 0 { 2559 return fmt.Errorf("proto: AddResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2560 } 2561 switch fieldNum { 2562 case 1: 2563 if wireType != 2 { 2564 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 2565 } 2566 var stringLen uint64 2567 for shift := uint(0); ; shift += 7 { 2568 if shift >= 64 { 2569 return ErrIntOverflowLeases 2570 } 2571 if iNdEx >= l { 2572 return io.ErrUnexpectedEOF 2573 } 2574 b := dAtA[iNdEx] 2575 iNdEx++ 2576 stringLen |= uint64(b&0x7F) << shift 2577 if b < 0x80 { 2578 break 2579 } 2580 } 2581 intStringLen := int(stringLen) 2582 if intStringLen < 0 { 2583 return ErrInvalidLengthLeases 2584 } 2585 postIndex := iNdEx + intStringLen 2586 if postIndex < 0 { 2587 return ErrInvalidLengthLeases 2588 } 2589 if postIndex > l { 2590 return io.ErrUnexpectedEOF 2591 } 2592 m.ID = string(dAtA[iNdEx:postIndex]) 2593 iNdEx = postIndex 2594 case 2: 2595 if wireType != 2 { 2596 return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) 2597 } 2598 var msglen int 2599 for shift := uint(0); ; shift += 7 { 2600 if shift >= 64 { 2601 return ErrIntOverflowLeases 2602 } 2603 if iNdEx >= l { 2604 return io.ErrUnexpectedEOF 2605 } 2606 b := dAtA[iNdEx] 2607 iNdEx++ 2608 msglen |= int(b&0x7F) << shift 2609 if b < 0x80 { 2610 break 2611 } 2612 } 2613 if msglen < 0 { 2614 return ErrInvalidLengthLeases 2615 } 2616 postIndex := iNdEx + msglen 2617 if postIndex < 0 { 2618 return ErrInvalidLengthLeases 2619 } 2620 if postIndex > l { 2621 return io.ErrUnexpectedEOF 2622 } 2623 if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2624 return err 2625 } 2626 iNdEx = postIndex 2627 default: 2628 iNdEx = preIndex 2629 skippy, err := skipLeases(dAtA[iNdEx:]) 2630 if err != nil { 2631 return err 2632 } 2633 if skippy < 0 { 2634 return ErrInvalidLengthLeases 2635 } 2636 if (iNdEx + skippy) < 0 { 2637 return ErrInvalidLengthLeases 2638 } 2639 if (iNdEx + skippy) > l { 2640 return io.ErrUnexpectedEOF 2641 } 2642 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2643 iNdEx += skippy 2644 } 2645 } 2646 2647 if iNdEx > l { 2648 return io.ErrUnexpectedEOF 2649 } 2650 return nil 2651 } 2652 func (m *DeleteResourceRequest) Unmarshal(dAtA []byte) error { 2653 l := len(dAtA) 2654 iNdEx := 0 2655 for iNdEx < l { 2656 preIndex := iNdEx 2657 var wire uint64 2658 for shift := uint(0); ; shift += 7 { 2659 if shift >= 64 { 2660 return ErrIntOverflowLeases 2661 } 2662 if iNdEx >= l { 2663 return io.ErrUnexpectedEOF 2664 } 2665 b := dAtA[iNdEx] 2666 iNdEx++ 2667 wire |= uint64(b&0x7F) << shift 2668 if b < 0x80 { 2669 break 2670 } 2671 } 2672 fieldNum := int32(wire >> 3) 2673 wireType := int(wire & 0x7) 2674 if wireType == 4 { 2675 return fmt.Errorf("proto: DeleteResourceRequest: wiretype end group for non-group") 2676 } 2677 if fieldNum <= 0 { 2678 return fmt.Errorf("proto: DeleteResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2679 } 2680 switch fieldNum { 2681 case 1: 2682 if wireType != 2 { 2683 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 2684 } 2685 var stringLen uint64 2686 for shift := uint(0); ; shift += 7 { 2687 if shift >= 64 { 2688 return ErrIntOverflowLeases 2689 } 2690 if iNdEx >= l { 2691 return io.ErrUnexpectedEOF 2692 } 2693 b := dAtA[iNdEx] 2694 iNdEx++ 2695 stringLen |= uint64(b&0x7F) << shift 2696 if b < 0x80 { 2697 break 2698 } 2699 } 2700 intStringLen := int(stringLen) 2701 if intStringLen < 0 { 2702 return ErrInvalidLengthLeases 2703 } 2704 postIndex := iNdEx + intStringLen 2705 if postIndex < 0 { 2706 return ErrInvalidLengthLeases 2707 } 2708 if postIndex > l { 2709 return io.ErrUnexpectedEOF 2710 } 2711 m.ID = string(dAtA[iNdEx:postIndex]) 2712 iNdEx = postIndex 2713 case 2: 2714 if wireType != 2 { 2715 return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) 2716 } 2717 var msglen int 2718 for shift := uint(0); ; shift += 7 { 2719 if shift >= 64 { 2720 return ErrIntOverflowLeases 2721 } 2722 if iNdEx >= l { 2723 return io.ErrUnexpectedEOF 2724 } 2725 b := dAtA[iNdEx] 2726 iNdEx++ 2727 msglen |= int(b&0x7F) << shift 2728 if b < 0x80 { 2729 break 2730 } 2731 } 2732 if msglen < 0 { 2733 return ErrInvalidLengthLeases 2734 } 2735 postIndex := iNdEx + msglen 2736 if postIndex < 0 { 2737 return ErrInvalidLengthLeases 2738 } 2739 if postIndex > l { 2740 return io.ErrUnexpectedEOF 2741 } 2742 if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2743 return err 2744 } 2745 iNdEx = postIndex 2746 default: 2747 iNdEx = preIndex 2748 skippy, err := skipLeases(dAtA[iNdEx:]) 2749 if err != nil { 2750 return err 2751 } 2752 if skippy < 0 { 2753 return ErrInvalidLengthLeases 2754 } 2755 if (iNdEx + skippy) < 0 { 2756 return ErrInvalidLengthLeases 2757 } 2758 if (iNdEx + skippy) > l { 2759 return io.ErrUnexpectedEOF 2760 } 2761 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2762 iNdEx += skippy 2763 } 2764 } 2765 2766 if iNdEx > l { 2767 return io.ErrUnexpectedEOF 2768 } 2769 return nil 2770 } 2771 func (m *ListResourcesRequest) Unmarshal(dAtA []byte) error { 2772 l := len(dAtA) 2773 iNdEx := 0 2774 for iNdEx < l { 2775 preIndex := iNdEx 2776 var wire uint64 2777 for shift := uint(0); ; shift += 7 { 2778 if shift >= 64 { 2779 return ErrIntOverflowLeases 2780 } 2781 if iNdEx >= l { 2782 return io.ErrUnexpectedEOF 2783 } 2784 b := dAtA[iNdEx] 2785 iNdEx++ 2786 wire |= uint64(b&0x7F) << shift 2787 if b < 0x80 { 2788 break 2789 } 2790 } 2791 fieldNum := int32(wire >> 3) 2792 wireType := int(wire & 0x7) 2793 if wireType == 4 { 2794 return fmt.Errorf("proto: ListResourcesRequest: wiretype end group for non-group") 2795 } 2796 if fieldNum <= 0 { 2797 return fmt.Errorf("proto: ListResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2798 } 2799 switch fieldNum { 2800 case 1: 2801 if wireType != 2 { 2802 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 2803 } 2804 var stringLen uint64 2805 for shift := uint(0); ; shift += 7 { 2806 if shift >= 64 { 2807 return ErrIntOverflowLeases 2808 } 2809 if iNdEx >= l { 2810 return io.ErrUnexpectedEOF 2811 } 2812 b := dAtA[iNdEx] 2813 iNdEx++ 2814 stringLen |= uint64(b&0x7F) << shift 2815 if b < 0x80 { 2816 break 2817 } 2818 } 2819 intStringLen := int(stringLen) 2820 if intStringLen < 0 { 2821 return ErrInvalidLengthLeases 2822 } 2823 postIndex := iNdEx + intStringLen 2824 if postIndex < 0 { 2825 return ErrInvalidLengthLeases 2826 } 2827 if postIndex > l { 2828 return io.ErrUnexpectedEOF 2829 } 2830 m.ID = string(dAtA[iNdEx:postIndex]) 2831 iNdEx = postIndex 2832 default: 2833 iNdEx = preIndex 2834 skippy, err := skipLeases(dAtA[iNdEx:]) 2835 if err != nil { 2836 return err 2837 } 2838 if skippy < 0 { 2839 return ErrInvalidLengthLeases 2840 } 2841 if (iNdEx + skippy) < 0 { 2842 return ErrInvalidLengthLeases 2843 } 2844 if (iNdEx + skippy) > l { 2845 return io.ErrUnexpectedEOF 2846 } 2847 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2848 iNdEx += skippy 2849 } 2850 } 2851 2852 if iNdEx > l { 2853 return io.ErrUnexpectedEOF 2854 } 2855 return nil 2856 } 2857 func (m *ListResourcesResponse) Unmarshal(dAtA []byte) error { 2858 l := len(dAtA) 2859 iNdEx := 0 2860 for iNdEx < l { 2861 preIndex := iNdEx 2862 var wire uint64 2863 for shift := uint(0); ; shift += 7 { 2864 if shift >= 64 { 2865 return ErrIntOverflowLeases 2866 } 2867 if iNdEx >= l { 2868 return io.ErrUnexpectedEOF 2869 } 2870 b := dAtA[iNdEx] 2871 iNdEx++ 2872 wire |= uint64(b&0x7F) << shift 2873 if b < 0x80 { 2874 break 2875 } 2876 } 2877 fieldNum := int32(wire >> 3) 2878 wireType := int(wire & 0x7) 2879 if wireType == 4 { 2880 return fmt.Errorf("proto: ListResourcesResponse: wiretype end group for non-group") 2881 } 2882 if fieldNum <= 0 { 2883 return fmt.Errorf("proto: ListResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2884 } 2885 switch fieldNum { 2886 case 1: 2887 if wireType != 2 { 2888 return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) 2889 } 2890 var msglen int 2891 for shift := uint(0); ; shift += 7 { 2892 if shift >= 64 { 2893 return ErrIntOverflowLeases 2894 } 2895 if iNdEx >= l { 2896 return io.ErrUnexpectedEOF 2897 } 2898 b := dAtA[iNdEx] 2899 iNdEx++ 2900 msglen |= int(b&0x7F) << shift 2901 if b < 0x80 { 2902 break 2903 } 2904 } 2905 if msglen < 0 { 2906 return ErrInvalidLengthLeases 2907 } 2908 postIndex := iNdEx + msglen 2909 if postIndex < 0 { 2910 return ErrInvalidLengthLeases 2911 } 2912 if postIndex > l { 2913 return io.ErrUnexpectedEOF 2914 } 2915 m.Resources = append(m.Resources, Resource{}) 2916 if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2917 return err 2918 } 2919 iNdEx = postIndex 2920 default: 2921 iNdEx = preIndex 2922 skippy, err := skipLeases(dAtA[iNdEx:]) 2923 if err != nil { 2924 return err 2925 } 2926 if skippy < 0 { 2927 return ErrInvalidLengthLeases 2928 } 2929 if (iNdEx + skippy) < 0 { 2930 return ErrInvalidLengthLeases 2931 } 2932 if (iNdEx + skippy) > l { 2933 return io.ErrUnexpectedEOF 2934 } 2935 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2936 iNdEx += skippy 2937 } 2938 } 2939 2940 if iNdEx > l { 2941 return io.ErrUnexpectedEOF 2942 } 2943 return nil 2944 } 2945 func skipLeases(dAtA []byte) (n int, err error) { 2946 l := len(dAtA) 2947 iNdEx := 0 2948 for iNdEx < l { 2949 var wire uint64 2950 for shift := uint(0); ; shift += 7 { 2951 if shift >= 64 { 2952 return 0, ErrIntOverflowLeases 2953 } 2954 if iNdEx >= l { 2955 return 0, io.ErrUnexpectedEOF 2956 } 2957 b := dAtA[iNdEx] 2958 iNdEx++ 2959 wire |= (uint64(b) & 0x7F) << shift 2960 if b < 0x80 { 2961 break 2962 } 2963 } 2964 wireType := int(wire & 0x7) 2965 switch wireType { 2966 case 0: 2967 for shift := uint(0); ; shift += 7 { 2968 if shift >= 64 { 2969 return 0, ErrIntOverflowLeases 2970 } 2971 if iNdEx >= l { 2972 return 0, io.ErrUnexpectedEOF 2973 } 2974 iNdEx++ 2975 if dAtA[iNdEx-1] < 0x80 { 2976 break 2977 } 2978 } 2979 return iNdEx, nil 2980 case 1: 2981 iNdEx += 8 2982 return iNdEx, nil 2983 case 2: 2984 var length int 2985 for shift := uint(0); ; shift += 7 { 2986 if shift >= 64 { 2987 return 0, ErrIntOverflowLeases 2988 } 2989 if iNdEx >= l { 2990 return 0, io.ErrUnexpectedEOF 2991 } 2992 b := dAtA[iNdEx] 2993 iNdEx++ 2994 length |= (int(b) & 0x7F) << shift 2995 if b < 0x80 { 2996 break 2997 } 2998 } 2999 if length < 0 { 3000 return 0, ErrInvalidLengthLeases 3001 } 3002 iNdEx += length 3003 if iNdEx < 0 { 3004 return 0, ErrInvalidLengthLeases 3005 } 3006 return iNdEx, nil 3007 case 3: 3008 for { 3009 var innerWire uint64 3010 var start int = iNdEx 3011 for shift := uint(0); ; shift += 7 { 3012 if shift >= 64 { 3013 return 0, ErrIntOverflowLeases 3014 } 3015 if iNdEx >= l { 3016 return 0, io.ErrUnexpectedEOF 3017 } 3018 b := dAtA[iNdEx] 3019 iNdEx++ 3020 innerWire |= (uint64(b) & 0x7F) << shift 3021 if b < 0x80 { 3022 break 3023 } 3024 } 3025 innerWireType := int(innerWire & 0x7) 3026 if innerWireType == 4 { 3027 break 3028 } 3029 next, err := skipLeases(dAtA[start:]) 3030 if err != nil { 3031 return 0, err 3032 } 3033 iNdEx = start + next 3034 if iNdEx < 0 { 3035 return 0, ErrInvalidLengthLeases 3036 } 3037 } 3038 return iNdEx, nil 3039 case 4: 3040 return iNdEx, nil 3041 case 5: 3042 iNdEx += 4 3043 return iNdEx, nil 3044 default: 3045 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3046 } 3047 } 3048 panic("unreachable") 3049 } 3050 3051 var ( 3052 ErrInvalidLengthLeases = fmt.Errorf("proto: negative length found during unmarshaling") 3053 ErrIntOverflowLeases = fmt.Errorf("proto: integer overflow") 3054 )