1 // Copyright 2020 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package servicebroker provides access to the Service Broker API. 8 // 9 // For product documentation, see: https://cloud.google.com/kubernetes-engine/docs/concepts/add-on/service-broker 10 // 11 // # Creating a client 12 // 13 // Usage example: 14 // 15 // import "google.golang.org/api/servicebroker/v1alpha1" 16 // ... 17 // ctx := context.Background() 18 // servicebrokerService, err := servicebroker.NewService(ctx) 19 // 20 // In this example, Google Application Default Credentials are used for authentication. 21 // 22 // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23 // 24 // # Other authentication options 25 // 26 // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27 // 28 // servicebrokerService, err := servicebroker.NewService(ctx, option.WithAPIKey("AIza...")) 29 // 30 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31 // 32 // config := &oauth2.Config{...} 33 // // ... 34 // token, err := config.Exchange(ctx, ...) 35 // servicebrokerService, err := servicebroker.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36 // 37 // See https://godoc.org/google.golang.org/api/option/ for details on options. 38 package servicebroker // import "google.golang.org/api/servicebroker/v1alpha1" 39 40 import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 htransport "google.golang.org/api/transport/http" 56 ) 57 58 // Always reference these packages, just in case the auto-generated code 59 // below doesn't. 60 var _ = bytes.NewBuffer 61 var _ = strconv.Itoa 62 var _ = fmt.Sprintf 63 var _ = json.NewDecoder 64 var _ = io.Copy 65 var _ = url.Parse 66 var _ = gensupport.MarshalJSON 67 var _ = googleapi.Version 68 var _ = errors.New 69 var _ = strings.Replace 70 var _ = context.Canceled 71 72 const apiId = "servicebroker:v1alpha1" 73 const apiName = "servicebroker" 74 const apiVersion = "v1alpha1" 75 const basePath = "https://servicebroker.googleapis.com/" 76 77 // OAuth2 scopes used by this API. 78 const ( 79 // View and manage your data across Google Cloud Platform services 80 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 81 ) 82 83 // NewService creates a new Service. 84 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 85 scopesOption := option.WithScopes( 86 "https://www.googleapis.com/auth/cloud-platform", 87 ) 88 // NOTE: prepend, so we don't override user-specified scopes. 89 opts = append([]option.ClientOption{scopesOption}, opts...) 90 client, endpoint, err := htransport.NewClient(ctx, opts...) 91 if err != nil { 92 return nil, err 93 } 94 s, err := New(client) 95 if err != nil { 96 return nil, err 97 } 98 if endpoint != "" { 99 s.BasePath = endpoint 100 } 101 return s, nil 102 } 103 104 // New creates a new Service. It uses the provided http.Client for requests. 105 // 106 // Deprecated: please use NewService instead. 107 // To provide a custom HTTP client, use option.WithHTTPClient. 108 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 109 func New(client *http.Client) (*Service, error) { 110 if client == nil { 111 return nil, errors.New("client is nil") 112 } 113 s := &Service{client: client, BasePath: basePath} 114 s.Projects = NewProjectsService(s) 115 s.V1alpha1 = NewV1alpha1Service(s) 116 return s, nil 117 } 118 119 type Service struct { 120 client *http.Client 121 BasePath string // API endpoint base URL 122 UserAgent string // optional additional User-Agent fragment 123 124 Projects *ProjectsService 125 126 V1alpha1 *V1alpha1Service 127 } 128 129 func (s *Service) userAgent() string { 130 if s.UserAgent == "" { 131 return googleapi.UserAgent 132 } 133 return googleapi.UserAgent + " " + s.UserAgent 134 } 135 136 func NewProjectsService(s *Service) *ProjectsService { 137 rs := &ProjectsService{s: s} 138 rs.Brokers = NewProjectsBrokersService(s) 139 return rs 140 } 141 142 type ProjectsService struct { 143 s *Service 144 145 Brokers *ProjectsBrokersService 146 } 147 148 func NewProjectsBrokersService(s *Service) *ProjectsBrokersService { 149 rs := &ProjectsBrokersService{s: s} 150 rs.Instances = NewProjectsBrokersInstancesService(s) 151 rs.ServiceInstances = NewProjectsBrokersServiceInstancesService(s) 152 rs.V2 = NewProjectsBrokersV2Service(s) 153 return rs 154 } 155 156 type ProjectsBrokersService struct { 157 s *Service 158 159 Instances *ProjectsBrokersInstancesService 160 161 ServiceInstances *ProjectsBrokersServiceInstancesService 162 163 V2 *ProjectsBrokersV2Service 164 } 165 166 func NewProjectsBrokersInstancesService(s *Service) *ProjectsBrokersInstancesService { 167 rs := &ProjectsBrokersInstancesService{s: s} 168 rs.ServiceBindings = NewProjectsBrokersInstancesServiceBindingsService(s) 169 return rs 170 } 171 172 type ProjectsBrokersInstancesService struct { 173 s *Service 174 175 ServiceBindings *ProjectsBrokersInstancesServiceBindingsService 176 } 177 178 func NewProjectsBrokersInstancesServiceBindingsService(s *Service) *ProjectsBrokersInstancesServiceBindingsService { 179 rs := &ProjectsBrokersInstancesServiceBindingsService{s: s} 180 return rs 181 } 182 183 type ProjectsBrokersInstancesServiceBindingsService struct { 184 s *Service 185 } 186 187 func NewProjectsBrokersServiceInstancesService(s *Service) *ProjectsBrokersServiceInstancesService { 188 rs := &ProjectsBrokersServiceInstancesService{s: s} 189 return rs 190 } 191 192 type ProjectsBrokersServiceInstancesService struct { 193 s *Service 194 } 195 196 func NewProjectsBrokersV2Service(s *Service) *ProjectsBrokersV2Service { 197 rs := &ProjectsBrokersV2Service{s: s} 198 rs.Catalog = NewProjectsBrokersV2CatalogService(s) 199 rs.ServiceInstances = NewProjectsBrokersV2ServiceInstancesService(s) 200 return rs 201 } 202 203 type ProjectsBrokersV2Service struct { 204 s *Service 205 206 Catalog *ProjectsBrokersV2CatalogService 207 208 ServiceInstances *ProjectsBrokersV2ServiceInstancesService 209 } 210 211 func NewProjectsBrokersV2CatalogService(s *Service) *ProjectsBrokersV2CatalogService { 212 rs := &ProjectsBrokersV2CatalogService{s: s} 213 return rs 214 } 215 216 type ProjectsBrokersV2CatalogService struct { 217 s *Service 218 } 219 220 func NewProjectsBrokersV2ServiceInstancesService(s *Service) *ProjectsBrokersV2ServiceInstancesService { 221 rs := &ProjectsBrokersV2ServiceInstancesService{s: s} 222 rs.ServiceBindings = NewProjectsBrokersV2ServiceInstancesServiceBindingsService(s) 223 return rs 224 } 225 226 type ProjectsBrokersV2ServiceInstancesService struct { 227 s *Service 228 229 ServiceBindings *ProjectsBrokersV2ServiceInstancesServiceBindingsService 230 } 231 232 func NewProjectsBrokersV2ServiceInstancesServiceBindingsService(s *Service) *ProjectsBrokersV2ServiceInstancesServiceBindingsService { 233 rs := &ProjectsBrokersV2ServiceInstancesServiceBindingsService{s: s} 234 return rs 235 } 236 237 type ProjectsBrokersV2ServiceInstancesServiceBindingsService struct { 238 s *Service 239 } 240 241 func NewV1alpha1Service(s *Service) *V1alpha1Service { 242 rs := &V1alpha1Service{s: s} 243 return rs 244 } 245 246 type V1alpha1Service struct { 247 s *Service 248 } 249 250 // GoogleCloudServicebrokerV1alpha1__Binding: Describes the binding. 251 type GoogleCloudServicebrokerV1alpha1__Binding struct { 252 // BindResource: A JSON object that contains data for platform resources 253 // associated with 254 // the binding to be created. 255 BindResource googleapi.RawMessage `json:"bind_resource,omitempty"` 256 257 // BindingId: The id of the binding. Must be unique within GCP 258 // project. 259 // Maximum length is 64, GUID recommended. 260 // Required. 261 BindingId string `json:"binding_id,omitempty"` 262 263 // CreateTime: Output only. Timestamp for when the binding was created. 264 CreateTime string `json:"createTime,omitempty"` 265 266 // Parameters: Configuration options for the service binding. 267 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 268 269 // PlanId: The ID of the plan. See `Service` and `Plan` resources for 270 // details. 271 // Maximum length is 64, GUID recommended. 272 // Required. 273 PlanId string `json:"plan_id,omitempty"` 274 275 // ServiceId: The id of the service. Must be a valid identifier of a 276 // service 277 // contained in the list from a `ListServices()` call. 278 // Maximum length is 64, GUID recommended. 279 // Required. 280 ServiceId string `json:"service_id,omitempty"` 281 282 // ForceSendFields is a list of field names (e.g. "BindResource") to 283 // unconditionally include in API requests. By default, fields with 284 // empty values are omitted from API requests. However, any non-pointer, 285 // non-interface field appearing in ForceSendFields will be sent to the 286 // server regardless of whether the field is empty or not. This may be 287 // used to include empty fields in Patch requests. 288 ForceSendFields []string `json:"-"` 289 290 // NullFields is a list of field names (e.g. "BindResource") to include 291 // in API requests with the JSON null value. By default, fields with 292 // empty values are omitted from API requests. However, any field with 293 // an empty value appearing in NullFields will be sent to the server as 294 // null. It is an error if a field in this list has a non-empty value. 295 // This may be used to include null fields in Patch requests. 296 NullFields []string `json:"-"` 297 } 298 299 func (s *GoogleCloudServicebrokerV1alpha1__Binding) MarshalJSON() ([]byte, error) { 300 type NoMethod GoogleCloudServicebrokerV1alpha1__Binding 301 raw := NoMethod(*s) 302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 303 } 304 305 // GoogleCloudServicebrokerV1alpha1__CreateBindingResponse: Response for 306 // the `CreateBinding()` method. 307 type GoogleCloudServicebrokerV1alpha1__CreateBindingResponse struct { 308 // Credentials: Credentials to use the binding. 309 Credentials googleapi.RawMessage `json:"credentials,omitempty"` 310 311 // Description: Used to communicate description of the response. Usually 312 // for non-standard 313 // error 314 // codes. 315 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 316 // er/spec.md#service-broker-errors 317 Description string `json:"description,omitempty"` 318 319 // Operation: If broker executes operation asynchronously, this is the 320 // operation ID that 321 // can be polled to check the completion status of said operation. 322 // This broker always executes all create/delete operations 323 // asynchronously. 324 Operation string `json:"operation,omitempty"` 325 326 // RouteServiceUrl: A URL to which the platform may proxy requests for 327 // the address sent with 328 // bind_resource.route 329 RouteServiceUrl string `json:"route_service_url,omitempty"` 330 331 // SyslogDrainUrl: From where to read system logs. 332 SyslogDrainUrl string `json:"syslog_drain_url,omitempty"` 333 334 // VolumeMounts: An array of configuration for mounting volumes. 335 VolumeMounts []googleapi.RawMessage `json:"volume_mounts,omitempty"` 336 337 // ServerResponse contains the HTTP response code and headers from the 338 // server. 339 googleapi.ServerResponse `json:"-"` 340 341 // ForceSendFields is a list of field names (e.g. "Credentials") to 342 // unconditionally include in API requests. By default, fields with 343 // empty values are omitted from API requests. However, any non-pointer, 344 // non-interface field appearing in ForceSendFields will be sent to the 345 // server regardless of whether the field is empty or not. This may be 346 // used to include empty fields in Patch requests. 347 ForceSendFields []string `json:"-"` 348 349 // NullFields is a list of field names (e.g. "Credentials") to include 350 // in API requests with the JSON null value. By default, fields with 351 // empty values are omitted from API requests. However, any field with 352 // an empty value appearing in NullFields will be sent to the server as 353 // null. It is an error if a field in this list has a non-empty value. 354 // This may be used to include null fields in Patch requests. 355 NullFields []string `json:"-"` 356 } 357 358 func (s *GoogleCloudServicebrokerV1alpha1__CreateBindingResponse) MarshalJSON() ([]byte, error) { 359 type NoMethod GoogleCloudServicebrokerV1alpha1__CreateBindingResponse 360 raw := NoMethod(*s) 361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 362 } 363 364 // GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse: 365 // Response for the `CreateServiceInstance()` method. 366 type GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse struct { 367 // Description: Used to communicate description of the response. Usually 368 // for non-standard 369 // error 370 // codes. 371 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 372 // er/spec.md#service-broker-errors 373 Description string `json:"description,omitempty"` 374 375 // Operation: If broker executes operation asynchronously, this is the 376 // operation ID that 377 // can be polled to check the completion status of said operation. 378 // This broker always will return a non-empty operation on success. 379 Operation string `json:"operation,omitempty"` 380 381 // ServerResponse contains the HTTP response code and headers from the 382 // server. 383 googleapi.ServerResponse `json:"-"` 384 385 // ForceSendFields is a list of field names (e.g. "Description") to 386 // unconditionally include in API requests. By default, fields with 387 // empty values are omitted from API requests. However, any non-pointer, 388 // non-interface field appearing in ForceSendFields will be sent to the 389 // server regardless of whether the field is empty or not. This may be 390 // used to include empty fields in Patch requests. 391 ForceSendFields []string `json:"-"` 392 393 // NullFields is a list of field names (e.g. "Description") to include 394 // in API requests with the JSON null value. By default, fields with 395 // empty values are omitted from API requests. However, any field with 396 // an empty value appearing in NullFields will be sent to the server as 397 // null. It is an error if a field in this list has a non-empty value. 398 // This may be used to include null fields in Patch requests. 399 NullFields []string `json:"-"` 400 } 401 402 func (s *GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse) MarshalJSON() ([]byte, error) { 403 type NoMethod GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse 404 raw := NoMethod(*s) 405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 406 } 407 408 // GoogleCloudServicebrokerV1alpha1__DashboardClient: Message containing 409 // information required to activate Dashboard SSO feature. 410 type GoogleCloudServicebrokerV1alpha1__DashboardClient struct { 411 // Id: The id of the Oauth client that the dashboard will use. 412 Id string `json:"id,omitempty"` 413 414 // RedirectUri: A URI for the service dashboard. 415 // Validated by the OAuth token server when the dashboard requests a 416 // token. 417 RedirectUri string `json:"redirect_uri,omitempty"` 418 419 // Secret: A secret for the dashboard client. 420 Secret string `json:"secret,omitempty"` 421 422 // ForceSendFields is a list of field names (e.g. "Id") to 423 // unconditionally include in API requests. By default, fields with 424 // empty values are omitted from API requests. However, any non-pointer, 425 // non-interface field appearing in ForceSendFields will be sent to the 426 // server regardless of whether the field is empty or not. This may be 427 // used to include empty fields in Patch requests. 428 ForceSendFields []string `json:"-"` 429 430 // NullFields is a list of field names (e.g. "Id") to include in API 431 // requests with the JSON null value. By default, fields with empty 432 // values are omitted from API requests. However, any field with an 433 // empty value appearing in NullFields will be sent to the server as 434 // null. It is an error if a field in this list has a non-empty value. 435 // This may be used to include null fields in Patch requests. 436 NullFields []string `json:"-"` 437 } 438 439 func (s *GoogleCloudServicebrokerV1alpha1__DashboardClient) MarshalJSON() ([]byte, error) { 440 type NoMethod GoogleCloudServicebrokerV1alpha1__DashboardClient 441 raw := NoMethod(*s) 442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 443 } 444 445 // GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse: Response for 446 // the `DeleteBinding()` method. 447 type GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse struct { 448 // Description: Used to communicate description of the response. Usually 449 // for non-standard 450 // error 451 // codes. 452 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 453 // er/spec.md#service-broker-errors 454 Description string `json:"description,omitempty"` 455 456 // Operation: If broker executes operation asynchronously, this is the 457 // operation ID that 458 // can be polled to check the completion status of said operation. 459 Operation string `json:"operation,omitempty"` 460 461 // ServerResponse contains the HTTP response code and headers from the 462 // server. 463 googleapi.ServerResponse `json:"-"` 464 465 // ForceSendFields is a list of field names (e.g. "Description") to 466 // unconditionally include in API requests. By default, fields with 467 // empty values are omitted from API requests. However, any non-pointer, 468 // non-interface field appearing in ForceSendFields will be sent to the 469 // server regardless of whether the field is empty or not. This may be 470 // used to include empty fields in Patch requests. 471 ForceSendFields []string `json:"-"` 472 473 // NullFields is a list of field names (e.g. "Description") to include 474 // in API requests with the JSON null value. By default, fields with 475 // empty values are omitted from API requests. However, any field with 476 // an empty value appearing in NullFields will be sent to the server as 477 // null. It is an error if a field in this list has a non-empty value. 478 // This may be used to include null fields in Patch requests. 479 NullFields []string `json:"-"` 480 } 481 482 func (s *GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse) MarshalJSON() ([]byte, error) { 483 type NoMethod GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse 484 raw := NoMethod(*s) 485 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 486 } 487 488 // GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse: 489 // Response for the `DeleteServiceInstance()` method. 490 type GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse struct { 491 // Description: Used to communicate description of the response. Usually 492 // for non-standard 493 // error 494 // codes. 495 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 496 // er/spec.md#service-broker-errors 497 Description string `json:"description,omitempty"` 498 499 // Operation: If broker executes operation asynchronously, this is the 500 // operation ID that 501 // can be polled to check the completion status of said operation. 502 Operation string `json:"operation,omitempty"` 503 504 // ServerResponse contains the HTTP response code and headers from the 505 // server. 506 googleapi.ServerResponse `json:"-"` 507 508 // ForceSendFields is a list of field names (e.g. "Description") to 509 // unconditionally include in API requests. By default, fields with 510 // empty values are omitted from API requests. However, any non-pointer, 511 // non-interface field appearing in ForceSendFields will be sent to the 512 // server regardless of whether the field is empty or not. This may be 513 // used to include empty fields in Patch requests. 514 ForceSendFields []string `json:"-"` 515 516 // NullFields is a list of field names (e.g. "Description") to include 517 // in API requests with the JSON null value. By default, fields with 518 // empty values are omitted from API requests. However, any field with 519 // an empty value appearing in NullFields will be sent to the server as 520 // null. It is an error if a field in this list has a non-empty value. 521 // This may be used to include null fields in Patch requests. 522 NullFields []string `json:"-"` 523 } 524 525 func (s *GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse) MarshalJSON() ([]byte, error) { 526 type NoMethod GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse 527 raw := NoMethod(*s) 528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 529 } 530 531 // GoogleCloudServicebrokerV1alpha1__GetBindingResponse: Response for 532 // the `GetBinding()` method. 533 type GoogleCloudServicebrokerV1alpha1__GetBindingResponse struct { 534 // Credentials: Credentials to use the binding. 535 Credentials googleapi.RawMessage `json:"credentials,omitempty"` 536 537 // Description: Used to communicate description of the response. Usually 538 // for non-standard 539 // error 540 // codes. 541 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 542 // er/spec.md#service-broker-errors 543 Description string `json:"description,omitempty"` 544 545 // RouteServiceUrl: A URL to which the platform may proxy requests for 546 // the address sent with 547 // bind_resource.route 548 RouteServiceUrl string `json:"route_service_url,omitempty"` 549 550 // SyslogDrainUrl: From where to read system logs. 551 SyslogDrainUrl string `json:"syslog_drain_url,omitempty"` 552 553 // VolumeMounts: An array of configuration for mounting volumes. 554 VolumeMounts []googleapi.RawMessage `json:"volume_mounts,omitempty"` 555 556 // ServerResponse contains the HTTP response code and headers from the 557 // server. 558 googleapi.ServerResponse `json:"-"` 559 560 // ForceSendFields is a list of field names (e.g. "Credentials") to 561 // unconditionally include in API requests. By default, fields with 562 // empty values are omitted from API requests. However, any non-pointer, 563 // non-interface field appearing in ForceSendFields will be sent to the 564 // server regardless of whether the field is empty or not. This may be 565 // used to include empty fields in Patch requests. 566 ForceSendFields []string `json:"-"` 567 568 // NullFields is a list of field names (e.g. "Credentials") to include 569 // in API requests with the JSON null value. By default, fields with 570 // empty values are omitted from API requests. However, any field with 571 // an empty value appearing in NullFields will be sent to the server as 572 // null. It is an error if a field in this list has a non-empty value. 573 // This may be used to include null fields in Patch requests. 574 NullFields []string `json:"-"` 575 } 576 577 func (s *GoogleCloudServicebrokerV1alpha1__GetBindingResponse) MarshalJSON() ([]byte, error) { 578 type NoMethod GoogleCloudServicebrokerV1alpha1__GetBindingResponse 579 raw := NoMethod(*s) 580 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 581 } 582 583 // GoogleCloudServicebrokerV1alpha1__ListBindingsResponse: The response 584 // for the `ListBindings()` method. 585 type GoogleCloudServicebrokerV1alpha1__ListBindingsResponse struct { 586 // Bindings: The list of the bindings in the instance. 587 Bindings []*GoogleCloudServicebrokerV1alpha1__Binding `json:"bindings,omitempty"` 588 589 // Description: Used to communicate description of the response. Usually 590 // for non-standard 591 // error 592 // codes. 593 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 594 // er/spec.md#service-broker-errors 595 Description string `json:"description,omitempty"` 596 597 // NextPageToken: This token allows you to get the next page of results 598 // for list requests. 599 // If the number of results is larger than `pageSize`, use the 600 // `nextPageToken` 601 // as a value for the query parameter `pageToken` in the next list 602 // request. 603 // Subsequent list requests will have their own `nextPageToken` to 604 // continue 605 // paging through the results 606 NextPageToken string `json:"nextPageToken,omitempty"` 607 608 // ServerResponse contains the HTTP response code and headers from the 609 // server. 610 googleapi.ServerResponse `json:"-"` 611 612 // ForceSendFields is a list of field names (e.g. "Bindings") to 613 // unconditionally include in API requests. By default, fields with 614 // empty values are omitted from API requests. However, any non-pointer, 615 // non-interface field appearing in ForceSendFields will be sent to the 616 // server regardless of whether the field is empty or not. This may be 617 // used to include empty fields in Patch requests. 618 ForceSendFields []string `json:"-"` 619 620 // NullFields is a list of field names (e.g. "Bindings") to include in 621 // API requests with the JSON null value. By default, fields with empty 622 // values are omitted from API requests. However, any field with an 623 // empty value appearing in NullFields will be sent to the server as 624 // null. It is an error if a field in this list has a non-empty value. 625 // This may be used to include null fields in Patch requests. 626 NullFields []string `json:"-"` 627 } 628 629 func (s *GoogleCloudServicebrokerV1alpha1__ListBindingsResponse) MarshalJSON() ([]byte, error) { 630 type NoMethod GoogleCloudServicebrokerV1alpha1__ListBindingsResponse 631 raw := NoMethod(*s) 632 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 633 } 634 635 // GoogleCloudServicebrokerV1alpha1__ListCatalogResponse: Response 636 // message for the `ListCatalog()` method. 637 type GoogleCloudServicebrokerV1alpha1__ListCatalogResponse struct { 638 // Description: Used to communicate description of the response. Usually 639 // for non-standard 640 // error 641 // codes. 642 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 643 // er/spec.md#service-broker-errors 644 Description string `json:"description,omitempty"` 645 646 // NextPageToken: This token allows you to get the next page of results 647 // for list requests. 648 // If the number of results is larger than `pageSize`, use the 649 // `nextPageToken` 650 // as a value for the query parameter `pageToken` in the next list 651 // request. 652 // Subsequent list requests will have their own `nextPageToken` to 653 // continue 654 // paging through the results 655 NextPageToken string `json:"nextPageToken,omitempty"` 656 657 // Services: The services available for the requested GCP project. 658 Services []*GoogleCloudServicebrokerV1alpha1__Service `json:"services,omitempty"` 659 660 // ServerResponse contains the HTTP response code and headers from the 661 // server. 662 googleapi.ServerResponse `json:"-"` 663 664 // ForceSendFields is a list of field names (e.g. "Description") to 665 // unconditionally include in API requests. By default, fields with 666 // empty values are omitted from API requests. However, any non-pointer, 667 // non-interface field appearing in ForceSendFields will be sent to the 668 // server regardless of whether the field is empty or not. This may be 669 // used to include empty fields in Patch requests. 670 ForceSendFields []string `json:"-"` 671 672 // NullFields is a list of field names (e.g. "Description") to include 673 // in API requests with the JSON null value. By default, fields with 674 // empty values are omitted from API requests. However, any field with 675 // an empty value appearing in NullFields will be sent to the server as 676 // null. It is an error if a field in this list has a non-empty value. 677 // This may be used to include null fields in Patch requests. 678 NullFields []string `json:"-"` 679 } 680 681 func (s *GoogleCloudServicebrokerV1alpha1__ListCatalogResponse) MarshalJSON() ([]byte, error) { 682 type NoMethod GoogleCloudServicebrokerV1alpha1__ListCatalogResponse 683 raw := NoMethod(*s) 684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 685 } 686 687 // GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse: The 688 // response for the `ListServiceInstances()` method. 689 type GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse struct { 690 // Description: Used to communicate description of the response. Usually 691 // for non-standard 692 // error 693 // codes. 694 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 695 // er/spec.md#service-broker-errors 696 Description string `json:"description,omitempty"` 697 698 // Instances: The list of the instances in the broker. 699 Instances []*GoogleCloudServicebrokerV1alpha1__ServiceInstance `json:"instances,omitempty"` 700 701 // NextPageToken: This token allows you to get the next page of results 702 // for list requests. 703 // If the number of results is larger than `pageSize`, use the 704 // `nextPageToken` 705 // as a value for the query parameter `pageToken` in the next list 706 // request. 707 // Subsequent list requests will have their own `nextPageToken` to 708 // continue 709 // paging through the results 710 NextPageToken string `json:"nextPageToken,omitempty"` 711 712 // ServerResponse contains the HTTP response code and headers from the 713 // server. 714 googleapi.ServerResponse `json:"-"` 715 716 // ForceSendFields is a list of field names (e.g. "Description") to 717 // unconditionally include in API requests. By default, fields with 718 // empty values are omitted from API requests. However, any non-pointer, 719 // non-interface field appearing in ForceSendFields will be sent to the 720 // server regardless of whether the field is empty or not. This may be 721 // used to include empty fields in Patch requests. 722 ForceSendFields []string `json:"-"` 723 724 // NullFields is a list of field names (e.g. "Description") to include 725 // in API requests with the JSON null value. By default, fields with 726 // empty values are omitted from API requests. However, any field with 727 // an empty value appearing in NullFields will be sent to the server as 728 // null. It is an error if a field in this list has a non-empty value. 729 // This may be used to include null fields in Patch requests. 730 NullFields []string `json:"-"` 731 } 732 733 func (s *GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse) MarshalJSON() ([]byte, error) { 734 type NoMethod GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse 735 raw := NoMethod(*s) 736 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 737 } 738 739 // GoogleCloudServicebrokerV1alpha1__Operation: Describes a long running 740 // operation, which conforms to OpenService API. 741 type GoogleCloudServicebrokerV1alpha1__Operation struct { 742 // Description: Optional description of the Operation state. 743 Description string `json:"description,omitempty"` 744 745 // State: The state of the operation. 746 // Valid values are: "in progress", "succeeded", and "failed". 747 State string `json:"state,omitempty"` 748 749 // ServerResponse contains the HTTP response code and headers from the 750 // server. 751 googleapi.ServerResponse `json:"-"` 752 753 // ForceSendFields is a list of field names (e.g. "Description") to 754 // unconditionally include in API requests. By default, fields with 755 // empty values are omitted from API requests. However, any non-pointer, 756 // non-interface field appearing in ForceSendFields will be sent to the 757 // server regardless of whether the field is empty or not. This may be 758 // used to include empty fields in Patch requests. 759 ForceSendFields []string `json:"-"` 760 761 // NullFields is a list of field names (e.g. "Description") to include 762 // in API requests with the JSON null value. By default, fields with 763 // empty values are omitted from API requests. However, any field with 764 // an empty value appearing in NullFields will be sent to the server as 765 // null. It is an error if a field in this list has a non-empty value. 766 // This may be used to include null fields in Patch requests. 767 NullFields []string `json:"-"` 768 } 769 770 func (s *GoogleCloudServicebrokerV1alpha1__Operation) MarshalJSON() ([]byte, error) { 771 type NoMethod GoogleCloudServicebrokerV1alpha1__Operation 772 raw := NoMethod(*s) 773 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 774 } 775 776 // GoogleCloudServicebrokerV1alpha1__Plan: Plan message describes a 777 // Service Plan. 778 type GoogleCloudServicebrokerV1alpha1__Plan struct { 779 // Bindable: Specifies whether instances of the service can be bound to 780 // applications. 781 // If not specified, `Service.bindable` will be presumed. 782 Bindable bool `json:"bindable,omitempty"` 783 784 // Description: Textual description of the plan. Optional. 785 Description string `json:"description,omitempty"` 786 787 // Free: Whether the service is free. 788 Free bool `json:"free,omitempty"` 789 790 // Id: ID is a globally unique identifier used to uniquely identify the 791 // plan. 792 // User must make no presumption about the format of this field. 793 Id string `json:"id,omitempty"` 794 795 // Metadata: A list of metadata for a service offering. 796 // Metadata is an arbitrary JSON object. 797 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 798 799 // Name: User friendly name of the plan. 800 // The name must be globally unique within GCP project. 801 // Note, which is different from ("This must be globally unique within 802 // a 803 // platform marketplace"). 804 Name string `json:"name,omitempty"` 805 806 // Schemas: Schema definitions for service instances and bindings for 807 // the plan. 808 Schemas googleapi.RawMessage `json:"schemas,omitempty"` 809 810 // ForceSendFields is a list of field names (e.g. "Bindable") to 811 // unconditionally include in API requests. By default, fields with 812 // empty values are omitted from API requests. However, any non-pointer, 813 // non-interface field appearing in ForceSendFields will be sent to the 814 // server regardless of whether the field is empty or not. This may be 815 // used to include empty fields in Patch requests. 816 ForceSendFields []string `json:"-"` 817 818 // NullFields is a list of field names (e.g. "Bindable") to include in 819 // API requests with the JSON null value. By default, fields with empty 820 // values are omitted from API requests. However, any field with an 821 // empty value appearing in NullFields will be sent to the server as 822 // null. It is an error if a field in this list has a non-empty value. 823 // This may be used to include null fields in Patch requests. 824 NullFields []string `json:"-"` 825 } 826 827 func (s *GoogleCloudServicebrokerV1alpha1__Plan) MarshalJSON() ([]byte, error) { 828 type NoMethod GoogleCloudServicebrokerV1alpha1__Plan 829 raw := NoMethod(*s) 830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 831 } 832 833 // GoogleCloudServicebrokerV1alpha1__Service: The resource model mostly 834 // follows the Open Service Broker API, as 835 // described 836 // here: 837 // https://github.com/openservicebrokerapi/servicebroker/blob/maste 838 // r/_spec.md 839 // Though due to Google Specifics it has additional optional fields. 840 type GoogleCloudServicebrokerV1alpha1__Service struct { 841 // Bindable: Specifies whether instances of the service can be bound to 842 // applications. 843 // Required. 844 Bindable bool `json:"bindable,omitempty"` 845 846 // BindingRetrievable: Whether the service provides an endpoint to get 847 // service bindings. 848 BindingRetrievable bool `json:"binding_retrievable,omitempty"` 849 850 // DashboardClient: Information to activate Dashboard SSO feature. 851 DashboardClient *GoogleCloudServicebrokerV1alpha1__DashboardClient `json:"dashboard_client,omitempty"` 852 853 // Description: Textual description of the service. Required. 854 Description string `json:"description,omitempty"` 855 856 // Id: ID is a globally unique identifier used to uniquely identify the 857 // service. 858 // ID is an opaque string. 859 Id string `json:"id,omitempty"` 860 861 // InstanceRetrievable: Whether the service provides an endpoint to get 862 // service instances. 863 InstanceRetrievable bool `json:"instance_retrievable,omitempty"` 864 865 // Metadata: A list of metadata for a service offering. 866 // Metadata is an arbitrary JSON object. 867 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 868 869 // Name: User friendly service name. 870 // Name must match [a-z0-9]+ regexp. 871 // The name must be globally unique within GCP project. 872 // Note, which is different from ("This must be globally unique within 873 // a 874 // platform marketplace"). 875 // Required. 876 Name string `json:"name,omitempty"` 877 878 // PlanUpdateable: Whether the service supports upgrade/downgrade for 879 // some plans. 880 PlanUpdateable bool `json:"plan_updateable,omitempty"` 881 882 // Plans: A list of plans for this service. 883 // At least one plan is required. 884 Plans []*GoogleCloudServicebrokerV1alpha1__Plan `json:"plans,omitempty"` 885 886 // Tags: Tags provide a flexible mechanism to expose a classification, 887 // attribute, or 888 // base technology of a service. 889 Tags []string `json:"tags,omitempty"` 890 891 // ForceSendFields is a list of field names (e.g. "Bindable") to 892 // unconditionally include in API requests. By default, fields with 893 // empty values are omitted from API requests. However, any non-pointer, 894 // non-interface field appearing in ForceSendFields will be sent to the 895 // server regardless of whether the field is empty or not. This may be 896 // used to include empty fields in Patch requests. 897 ForceSendFields []string `json:"-"` 898 899 // NullFields is a list of field names (e.g. "Bindable") to include in 900 // API requests with the JSON null value. By default, fields with empty 901 // values are omitted from API requests. However, any field with an 902 // empty value appearing in NullFields will be sent to the server as 903 // null. It is an error if a field in this list has a non-empty value. 904 // This may be used to include null fields in Patch requests. 905 NullFields []string `json:"-"` 906 } 907 908 func (s *GoogleCloudServicebrokerV1alpha1__Service) MarshalJSON() ([]byte, error) { 909 type NoMethod GoogleCloudServicebrokerV1alpha1__Service 910 raw := NoMethod(*s) 911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 912 } 913 914 // GoogleCloudServicebrokerV1alpha1__ServiceInstance: Message describing 915 // inputs to Provision and Update Service instance requests. 916 type GoogleCloudServicebrokerV1alpha1__ServiceInstance struct { 917 // Context: Platform specific contextual information under which the 918 // service instance 919 // is to be provisioned. This replaces organization_guid and 920 // space_guid. 921 // But can also contain anything. 922 // Currently only used for logging context information. 923 Context googleapi.RawMessage `json:"context,omitempty"` 924 925 // CreateTime: Output only. Timestamp for when the instance was created. 926 CreateTime string `json:"createTime,omitempty"` 927 928 // DeploymentName: Output only. Name of the Deployment Manager 929 // deployment used for provisioning of this 930 // service instance. 931 DeploymentName string `json:"deploymentName,omitempty"` 932 933 // InstanceId: The id of the service instance. Must be unique within GCP 934 // project. 935 // Maximum length is 64, GUID recommended. 936 // Required. 937 InstanceId string `json:"instance_id,omitempty"` 938 939 // OrganizationGuid: The platform GUID for the organization under which 940 // the service is to be 941 // provisioned. 942 // Required. 943 OrganizationGuid string `json:"organization_guid,omitempty"` 944 945 // Parameters: Configuration options for the service 946 // instance. 947 // Parameters is JSON object serialized to string. 948 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 949 950 // PlanId: The ID of the plan. See `Service` and `Plan` resources for 951 // details. 952 // Maximum length is 64, GUID recommended. 953 // Required. 954 PlanId string `json:"plan_id,omitempty"` 955 956 // PreviousValues: Used only in UpdateServiceInstance request to 957 // optionally specify previous 958 // fields. 959 PreviousValues googleapi.RawMessage `json:"previous_values,omitempty"` 960 961 // ResourceName: Output only. The resource name of the instance, 962 // e.g. 963 // projects/project_id/brokers/broker_id/service_instances/instance_ 964 // id 965 ResourceName string `json:"resourceName,omitempty"` 966 967 // ServiceId: The id of the service. Must be a valid identifier of a 968 // service 969 // contained in the list from a `ListServices()` call. 970 // Maximum length is 64, GUID recommended. 971 // Required. 972 ServiceId string `json:"service_id,omitempty"` 973 974 // SpaceGuid: The identifier for the project space within the platform 975 // organization. 976 // Required. 977 SpaceGuid string `json:"space_guid,omitempty"` 978 979 // ServerResponse contains the HTTP response code and headers from the 980 // server. 981 googleapi.ServerResponse `json:"-"` 982 983 // ForceSendFields is a list of field names (e.g. "Context") to 984 // unconditionally include in API requests. By default, fields with 985 // empty values are omitted from API requests. However, any non-pointer, 986 // non-interface field appearing in ForceSendFields will be sent to the 987 // server regardless of whether the field is empty or not. This may be 988 // used to include empty fields in Patch requests. 989 ForceSendFields []string `json:"-"` 990 991 // NullFields is a list of field names (e.g. "Context") to include in 992 // API requests with the JSON null value. By default, fields with empty 993 // values are omitted from API requests. However, any field with an 994 // empty value appearing in NullFields will be sent to the server as 995 // null. It is an error if a field in this list has a non-empty value. 996 // This may be used to include null fields in Patch requests. 997 NullFields []string `json:"-"` 998 } 999 1000 func (s *GoogleCloudServicebrokerV1alpha1__ServiceInstance) MarshalJSON() ([]byte, error) { 1001 type NoMethod GoogleCloudServicebrokerV1alpha1__ServiceInstance 1002 raw := NoMethod(*s) 1003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1004 } 1005 1006 // GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse: 1007 // Response for the `UpdateServiceInstance()` method. 1008 type GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse struct { 1009 // Description: Used to communicate description of the response. Usually 1010 // for non-standard 1011 // error 1012 // codes. 1013 // https://github.com/openservicebrokerapi/servicebroker/blob/mast 1014 // er/spec.md#service-broker-errors 1015 Description string `json:"description,omitempty"` 1016 1017 // Operation: If broker executes operation asynchronously, this is the 1018 // operation ID that 1019 // can be polled to check the completion status of said operation. 1020 Operation string `json:"operation,omitempty"` 1021 1022 // ServerResponse contains the HTTP response code and headers from the 1023 // server. 1024 googleapi.ServerResponse `json:"-"` 1025 1026 // ForceSendFields is a list of field names (e.g. "Description") to 1027 // unconditionally include in API requests. By default, fields with 1028 // empty values are omitted from API requests. However, any non-pointer, 1029 // non-interface field appearing in ForceSendFields will be sent to the 1030 // server regardless of whether the field is empty or not. This may be 1031 // used to include empty fields in Patch requests. 1032 ForceSendFields []string `json:"-"` 1033 1034 // NullFields is a list of field names (e.g. "Description") to include 1035 // in API requests with the JSON null value. By default, fields with 1036 // empty values are omitted from API requests. However, any field with 1037 // an empty value appearing in NullFields will be sent to the server as 1038 // null. It is an error if a field in this list has a non-empty value. 1039 // This may be used to include null fields in Patch requests. 1040 NullFields []string `json:"-"` 1041 } 1042 1043 func (s *GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse) MarshalJSON() ([]byte, error) { 1044 type NoMethod GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse 1045 raw := NoMethod(*s) 1046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1047 } 1048 1049 // GoogleIamV1__Binding: Associates `members` with a `role`. 1050 type GoogleIamV1__Binding struct { 1051 // Condition: The condition that is associated with this binding. 1052 // NOTE: An unsatisfied condition will not allow user access via 1053 // current 1054 // binding. Different bindings, including their conditions, are 1055 // examined 1056 // independently. 1057 Condition *GoogleType__Expr `json:"condition,omitempty"` 1058 1059 // Members: Specifies the identities requesting access for a Cloud 1060 // Platform resource. 1061 // `members` can have the following values: 1062 // 1063 // * `allUsers`: A special identifier that represents anyone who is 1064 // on the internet; with or without a Google account. 1065 // 1066 // * `allAuthenticatedUsers`: A special identifier that represents 1067 // anyone 1068 // who is authenticated with a Google account or a service 1069 // account. 1070 // 1071 // * `user:{emailid}`: An email address that represents a specific 1072 // Google 1073 // account. For example, `alice@example.com` . 1074 // 1075 // 1076 // * `serviceAccount:{emailid}`: An email address that represents a 1077 // service 1078 // account. For example, 1079 // `my-other-app@appspot.gserviceaccount.com`. 1080 // 1081 // * `group:{emailid}`: An email address that represents a Google 1082 // group. 1083 // For example, `admins@example.com`. 1084 // 1085 // * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 1086 // unique 1087 // identifier) representing a user that has been recently deleted. 1088 // For 1089 // example, `alice@example.com?uid=123456789012345678901`. If the 1090 // user is 1091 // recovered, this value reverts to `user:{emailid}` and the 1092 // recovered user 1093 // retains the role in the binding. 1094 // 1095 // * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 1096 // (plus 1097 // unique identifier) representing a service account that has been 1098 // recently 1099 // deleted. For example, 1100 // 1101 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 1102 // 1103 // If the service account is undeleted, this value reverts to 1104 // `serviceAccount:{emailid}` and the undeleted service account 1105 // retains the 1106 // role in the binding. 1107 // 1108 // * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus 1109 // unique 1110 // identifier) representing a Google group that has been recently 1111 // deleted. For example, 1112 // `admins@example.com?uid=123456789012345678901`. If 1113 // the group is recovered, this value reverts to `group:{emailid}` 1114 // and the 1115 // recovered group retains the role in the binding. 1116 // 1117 // 1118 // * `domain:{domain}`: The G Suite domain (primary) that represents all 1119 // the 1120 // users of that domain. For example, `google.com` or 1121 // `example.com`. 1122 // 1123 // 1124 Members []string `json:"members,omitempty"` 1125 1126 // Role: Role that is assigned to `members`. 1127 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1128 Role string `json:"role,omitempty"` 1129 1130 // ForceSendFields is a list of field names (e.g. "Condition") to 1131 // unconditionally include in API requests. By default, fields with 1132 // empty values are omitted from API requests. However, any non-pointer, 1133 // non-interface field appearing in ForceSendFields will be sent to the 1134 // server regardless of whether the field is empty or not. This may be 1135 // used to include empty fields in Patch requests. 1136 ForceSendFields []string `json:"-"` 1137 1138 // NullFields is a list of field names (e.g. "Condition") to include in 1139 // API requests with the JSON null value. By default, fields with empty 1140 // values are omitted from API requests. However, any field with an 1141 // empty value appearing in NullFields will be sent to the server as 1142 // null. It is an error if a field in this list has a non-empty value. 1143 // This may be used to include null fields in Patch requests. 1144 NullFields []string `json:"-"` 1145 } 1146 1147 func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) { 1148 type NoMethod GoogleIamV1__Binding 1149 raw := NoMethod(*s) 1150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1151 } 1152 1153 // GoogleIamV1__Policy: An Identity and Access Management (IAM) policy, 1154 // which specifies access 1155 // controls for Google Cloud resources. 1156 // 1157 // A `Policy` is a collection of `bindings`. A `binding` binds one or 1158 // more 1159 // `members` to a single `role`. Members can be user accounts, service 1160 // accounts, 1161 // Google groups, and domains (such as G Suite). A `role` is a named 1162 // list of 1163 // permissions; each `role` can be an IAM predefined role or a 1164 // user-created 1165 // custom role. 1166 // 1167 // Optionally, a `binding` can specify a `condition`, which is a 1168 // logical 1169 // expression that allows access to a resource only if the expression 1170 // evaluates 1171 // to `true`. A condition can add constraints based on attributes of 1172 // the 1173 // request, the resource, or both. 1174 // 1175 // **JSON example:** 1176 // 1177 // { 1178 // "bindings": [ 1179 // { 1180 // "role": "roles/resourcemanager.organizationAdmin", 1181 // "members": [ 1182 // "user:mike@example.com", 1183 // "group:admins@example.com", 1184 // "domain:google.com", 1185 // 1186 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" 1187 // 1188 // ] 1189 // }, 1190 // { 1191 // "role": "roles/resourcemanager.organizationViewer", 1192 // "members": ["user:eve@example.com"], 1193 // "condition": { 1194 // "title": "expirable access", 1195 // "description": "Does not grant access after Sep 2020", 1196 // "expression": "request.time < 1197 // 1198 // timestamp('2020-10-01T00:00:00.000Z')", 1199 // 1200 // } 1201 // } 1202 // ], 1203 // "etag": "BwWWja0YfJA=", 1204 // "version": 3 1205 // } 1206 // 1207 // **YAML example:** 1208 // 1209 // bindings: 1210 // - members: 1211 // - user:mike@example.com 1212 // - group:admins@example.com 1213 // - domain:google.com 1214 // - serviceAccount:my-project-id@appspot.gserviceaccount.com 1215 // role: roles/resourcemanager.organizationAdmin 1216 // - members: 1217 // - user:eve@example.com 1218 // role: roles/resourcemanager.organizationViewer 1219 // condition: 1220 // title: expirable access 1221 // description: Does not grant access after Sep 2020 1222 // expression: request.time < 1223 // 1224 // timestamp('2020-10-01T00:00:00.000Z') 1225 // - etag: BwWWja0YfJA= 1226 // - version: 3 1227 // 1228 // For a description of IAM and its features, see the 1229 // [IAM documentation](https://cloud.google.com/iam/docs/). 1230 type GoogleIamV1__Policy struct { 1231 // Bindings: Associates a list of `members` to a `role`. Optionally, may 1232 // specify a 1233 // `condition` that determines how and when the `bindings` are applied. 1234 // Each 1235 // of the `bindings` must contain at least one member. 1236 Bindings []*GoogleIamV1__Binding `json:"bindings,omitempty"` 1237 1238 // Etag: `etag` is used for optimistic concurrency control as a way to 1239 // help 1240 // prevent simultaneous updates of a policy from overwriting each 1241 // other. 1242 // It is strongly suggested that systems make use of the `etag` in 1243 // the 1244 // read-modify-write cycle to perform policy updates in order to avoid 1245 // race 1246 // conditions: An `etag` is returned in the response to `getIamPolicy`, 1247 // and 1248 // systems are expected to put that etag in the request to 1249 // `setIamPolicy` to 1250 // ensure that their change will be applied to the same version of the 1251 // policy. 1252 // 1253 // **Important:** If you use IAM Conditions, you must include the `etag` 1254 // field 1255 // whenever you call `setIamPolicy`. If you omit this field, then IAM 1256 // allows 1257 // you to overwrite a version `3` policy with a version `1` policy, and 1258 // all of 1259 // the conditions in the version `3` policy are lost. 1260 Etag string `json:"etag,omitempty"` 1261 1262 // Version: Specifies the format of the policy. 1263 // 1264 // Valid values are `0`, `1`, and `3`. Requests that specify an invalid 1265 // value 1266 // are rejected. 1267 // 1268 // Any operation that affects conditional role bindings must specify 1269 // version 1270 // `3`. This requirement applies to the following operations: 1271 // 1272 // * Getting a policy that includes a conditional role binding 1273 // * Adding a conditional role binding to a policy 1274 // * Changing a conditional role binding in a policy 1275 // * Removing any role binding, with or without a condition, from a 1276 // policy 1277 // that includes conditions 1278 // 1279 // **Important:** If you use IAM Conditions, you must include the `etag` 1280 // field 1281 // whenever you call `setIamPolicy`. If you omit this field, then IAM 1282 // allows 1283 // you to overwrite a version `3` policy with a version `1` policy, and 1284 // all of 1285 // the conditions in the version `3` policy are lost. 1286 // 1287 // If a policy does not include any conditions, operations on that 1288 // policy may 1289 // specify any valid version or leave the field unset. 1290 Version int64 `json:"version,omitempty"` 1291 1292 // ServerResponse contains the HTTP response code and headers from the 1293 // server. 1294 googleapi.ServerResponse `json:"-"` 1295 1296 // ForceSendFields is a list of field names (e.g. "Bindings") to 1297 // unconditionally include in API requests. By default, fields with 1298 // empty values are omitted from API requests. However, any non-pointer, 1299 // non-interface field appearing in ForceSendFields will be sent to the 1300 // server regardless of whether the field is empty or not. This may be 1301 // used to include empty fields in Patch requests. 1302 ForceSendFields []string `json:"-"` 1303 1304 // NullFields is a list of field names (e.g. "Bindings") to include in 1305 // API requests with the JSON null value. By default, fields with empty 1306 // values are omitted from API requests. However, any field with an 1307 // empty value appearing in NullFields will be sent to the server as 1308 // null. It is an error if a field in this list has a non-empty value. 1309 // This may be used to include null fields in Patch requests. 1310 NullFields []string `json:"-"` 1311 } 1312 1313 func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) { 1314 type NoMethod GoogleIamV1__Policy 1315 raw := NoMethod(*s) 1316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1317 } 1318 1319 // GoogleIamV1__SetIamPolicyRequest: Request message for `SetIamPolicy` 1320 // method. 1321 type GoogleIamV1__SetIamPolicyRequest struct { 1322 // Policy: REQUIRED: The complete policy to be applied to the 1323 // `resource`. The size of 1324 // the policy is limited to a few 10s of KB. An empty policy is a 1325 // valid policy but certain Cloud Platform services (such as 1326 // Projects) 1327 // might reject them. 1328 Policy *GoogleIamV1__Policy `json:"policy,omitempty"` 1329 1330 // ForceSendFields is a list of field names (e.g. "Policy") to 1331 // unconditionally include in API requests. By default, fields with 1332 // empty values are omitted from API requests. However, any non-pointer, 1333 // non-interface field appearing in ForceSendFields will be sent to the 1334 // server regardless of whether the field is empty or not. This may be 1335 // used to include empty fields in Patch requests. 1336 ForceSendFields []string `json:"-"` 1337 1338 // NullFields is a list of field names (e.g. "Policy") to include in API 1339 // requests with the JSON null value. By default, fields with empty 1340 // values are omitted from API requests. However, any field with an 1341 // empty value appearing in NullFields will be sent to the server as 1342 // null. It is an error if a field in this list has a non-empty value. 1343 // This may be used to include null fields in Patch requests. 1344 NullFields []string `json:"-"` 1345 } 1346 1347 func (s *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 1348 type NoMethod GoogleIamV1__SetIamPolicyRequest 1349 raw := NoMethod(*s) 1350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1351 } 1352 1353 // GoogleIamV1__TestIamPermissionsRequest: Request message for 1354 // `TestIamPermissions` method. 1355 type GoogleIamV1__TestIamPermissionsRequest struct { 1356 // Permissions: The set of permissions to check for the `resource`. 1357 // Permissions with 1358 // wildcards (such as '*' or 'storage.*') are not allowed. For 1359 // more 1360 // information see 1361 // [IAM 1362 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 1363 Permissions []string `json:"permissions,omitempty"` 1364 1365 // ForceSendFields is a list of field names (e.g. "Permissions") to 1366 // unconditionally include in API requests. By default, fields with 1367 // empty values are omitted from API requests. However, any non-pointer, 1368 // non-interface field appearing in ForceSendFields will be sent to the 1369 // server regardless of whether the field is empty or not. This may be 1370 // used to include empty fields in Patch requests. 1371 ForceSendFields []string `json:"-"` 1372 1373 // NullFields is a list of field names (e.g. "Permissions") to include 1374 // in API requests with the JSON null value. By default, fields with 1375 // empty values are omitted from API requests. However, any field with 1376 // an empty value appearing in NullFields will be sent to the server as 1377 // null. It is an error if a field in this list has a non-empty value. 1378 // This may be used to include null fields in Patch requests. 1379 NullFields []string `json:"-"` 1380 } 1381 1382 func (s *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 1383 type NoMethod GoogleIamV1__TestIamPermissionsRequest 1384 raw := NoMethod(*s) 1385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1386 } 1387 1388 // GoogleIamV1__TestIamPermissionsResponse: Response message for 1389 // `TestIamPermissions` method. 1390 type GoogleIamV1__TestIamPermissionsResponse struct { 1391 // Permissions: A subset of `TestPermissionsRequest.permissions` that 1392 // the caller is 1393 // allowed. 1394 Permissions []string `json:"permissions,omitempty"` 1395 1396 // ServerResponse contains the HTTP response code and headers from the 1397 // server. 1398 googleapi.ServerResponse `json:"-"` 1399 1400 // ForceSendFields is a list of field names (e.g. "Permissions") to 1401 // unconditionally include in API requests. By default, fields with 1402 // empty values are omitted from API requests. However, any non-pointer, 1403 // non-interface field appearing in ForceSendFields will be sent to the 1404 // server regardless of whether the field is empty or not. This may be 1405 // used to include empty fields in Patch requests. 1406 ForceSendFields []string `json:"-"` 1407 1408 // NullFields is a list of field names (e.g. "Permissions") to include 1409 // in API requests with the JSON null value. By default, fields with 1410 // empty values are omitted from API requests. However, any field with 1411 // an empty value appearing in NullFields will be sent to the server as 1412 // null. It is an error if a field in this list has a non-empty value. 1413 // This may be used to include null fields in Patch requests. 1414 NullFields []string `json:"-"` 1415 } 1416 1417 func (s *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 1418 type NoMethod GoogleIamV1__TestIamPermissionsResponse 1419 raw := NoMethod(*s) 1420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1421 } 1422 1423 // GoogleType__Expr: Represents an expression text. Example: 1424 // 1425 // title: "User account presence" 1426 // description: "Determines whether the request has a user account" 1427 // expression: "size(request.user) > 0" 1428 type GoogleType__Expr struct { 1429 // Description: An optional description of the expression. This is a 1430 // longer text which 1431 // describes the expression, e.g. when hovered over it in a UI. 1432 Description string `json:"description,omitempty"` 1433 1434 // Expression: Textual representation of an expression in 1435 // Common Expression Language syntax. 1436 // 1437 // The application context of the containing message determines 1438 // which 1439 // well-known feature set of CEL is supported. 1440 Expression string `json:"expression,omitempty"` 1441 1442 // Location: An optional string indicating the location of the 1443 // expression for error 1444 // reporting, e.g. a file name and a position in the file. 1445 Location string `json:"location,omitempty"` 1446 1447 // Title: An optional title for the expression, i.e. a short string 1448 // describing 1449 // its purpose. This can be used e.g. in UIs which allow to enter 1450 // the 1451 // expression. 1452 Title string `json:"title,omitempty"` 1453 1454 // ForceSendFields is a list of field names (e.g. "Description") to 1455 // unconditionally include in API requests. By default, fields with 1456 // empty values are omitted from API requests. However, any non-pointer, 1457 // non-interface field appearing in ForceSendFields will be sent to the 1458 // server regardless of whether the field is empty or not. This may be 1459 // used to include empty fields in Patch requests. 1460 ForceSendFields []string `json:"-"` 1461 1462 // NullFields is a list of field names (e.g. "Description") to include 1463 // in API requests with the JSON null value. By default, fields with 1464 // empty values are omitted from API requests. However, any field with 1465 // an empty value appearing in NullFields will be sent to the server as 1466 // null. It is an error if a field in this list has a non-empty value. 1467 // This may be used to include null fields in Patch requests. 1468 NullFields []string `json:"-"` 1469 } 1470 1471 func (s *GoogleType__Expr) MarshalJSON() ([]byte, error) { 1472 type NoMethod GoogleType__Expr 1473 raw := NoMethod(*s) 1474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1475 } 1476 1477 // method id "servicebroker.projects.brokers.instances.get": 1478 1479 type ProjectsBrokersInstancesGetCall struct { 1480 s *Service 1481 name string 1482 urlParams_ gensupport.URLParams 1483 ifNoneMatch_ string 1484 ctx_ context.Context 1485 header_ http.Header 1486 } 1487 1488 // Get: Gets the given service instance from the system. 1489 // This API is an extension and not part of the OSB spec. 1490 // Hence the path is a standard Google API URL. 1491 func (r *ProjectsBrokersInstancesService) Get(name string) *ProjectsBrokersInstancesGetCall { 1492 c := &ProjectsBrokersInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1493 c.name = name 1494 return c 1495 } 1496 1497 // Fields allows partial responses to be retrieved. See 1498 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1499 // for more information. 1500 func (c *ProjectsBrokersInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesGetCall { 1501 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1502 return c 1503 } 1504 1505 // IfNoneMatch sets the optional parameter which makes the operation 1506 // fail if the object's ETag matches the given value. This is useful for 1507 // getting updates only after the object has changed since the last 1508 // request. Use googleapi.IsNotModified to check whether the response 1509 // error from Do is the result of In-None-Match. 1510 func (c *ProjectsBrokersInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesGetCall { 1511 c.ifNoneMatch_ = entityTag 1512 return c 1513 } 1514 1515 // Context sets the context to be used in this call's Do method. Any 1516 // pending HTTP request will be aborted if the provided context is 1517 // canceled. 1518 func (c *ProjectsBrokersInstancesGetCall) Context(ctx context.Context) *ProjectsBrokersInstancesGetCall { 1519 c.ctx_ = ctx 1520 return c 1521 } 1522 1523 // Header returns an http.Header that can be modified by the caller to 1524 // add HTTP headers to the request. 1525 func (c *ProjectsBrokersInstancesGetCall) Header() http.Header { 1526 if c.header_ == nil { 1527 c.header_ = make(http.Header) 1528 } 1529 return c.header_ 1530 } 1531 1532 func (c *ProjectsBrokersInstancesGetCall) doRequest(alt string) (*http.Response, error) { 1533 reqHeaders := make(http.Header) 1534 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1535 for k, v := range c.header_ { 1536 reqHeaders[k] = v 1537 } 1538 reqHeaders.Set("User-Agent", c.s.userAgent()) 1539 if c.ifNoneMatch_ != "" { 1540 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1541 } 1542 var body io.Reader = nil 1543 c.urlParams_.Set("alt", alt) 1544 c.urlParams_.Set("prettyPrint", "false") 1545 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 1546 urls += "?" + c.urlParams_.Encode() 1547 req, err := http.NewRequest("GET", urls, body) 1548 if err != nil { 1549 return nil, err 1550 } 1551 req.Header = reqHeaders 1552 googleapi.Expand(req.URL, map[string]string{ 1553 "name": c.name, 1554 }) 1555 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1556 } 1557 1558 // Do executes the "servicebroker.projects.brokers.instances.get" call. 1559 // Exactly one of *GoogleCloudServicebrokerV1alpha1__ServiceInstance or 1560 // error will be non-nil. Any non-2xx status code is an error. Response 1561 // headers are in either 1562 // *GoogleCloudServicebrokerV1alpha1__ServiceInstance.ServerResponse.Head 1563 // er or (if a response was returned at all) in 1564 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 1565 // whether the returned error was because http.StatusNotModified was 1566 // returned. 1567 func (c *ProjectsBrokersInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__ServiceInstance, error) { 1568 gensupport.SetOptions(c.urlParams_, opts...) 1569 res, err := c.doRequest("json") 1570 if res != nil && res.StatusCode == http.StatusNotModified { 1571 if res.Body != nil { 1572 res.Body.Close() 1573 } 1574 return nil, &googleapi.Error{ 1575 Code: res.StatusCode, 1576 Header: res.Header, 1577 } 1578 } 1579 if err != nil { 1580 return nil, err 1581 } 1582 defer googleapi.CloseBody(res) 1583 if err := googleapi.CheckResponse(res); err != nil { 1584 return nil, err 1585 } 1586 ret := &GoogleCloudServicebrokerV1alpha1__ServiceInstance{ 1587 ServerResponse: googleapi.ServerResponse{ 1588 Header: res.Header, 1589 HTTPStatusCode: res.StatusCode, 1590 }, 1591 } 1592 target := &ret 1593 if err := gensupport.DecodeResponse(target, res); err != nil { 1594 return nil, err 1595 } 1596 return ret, nil 1597 // { 1598 // "description": "Gets the given service instance from the system.\nThis API is an extension and not part of the OSB spec.\nHence the path is a standard Google API URL.", 1599 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/instances/{instancesId}", 1600 // "httpMethod": "GET", 1601 // "id": "servicebroker.projects.brokers.instances.get", 1602 // "parameterOrder": [ 1603 // "name" 1604 // ], 1605 // "parameters": { 1606 // "name": { 1607 // "description": "The resource name of the instance to return.", 1608 // "location": "path", 1609 // "pattern": "^projects/[^/]+/brokers/[^/]+/instances/[^/]+$", 1610 // "required": true, 1611 // "type": "string" 1612 // } 1613 // }, 1614 // "path": "v1alpha1/{+name}", 1615 // "response": { 1616 // "$ref": "GoogleCloudServicebrokerV1alpha1__ServiceInstance" 1617 // }, 1618 // "scopes": [ 1619 // "https://www.googleapis.com/auth/cloud-platform" 1620 // ] 1621 // } 1622 1623 } 1624 1625 // method id "servicebroker.projects.brokers.instances.service_bindings.list": 1626 1627 type ProjectsBrokersInstancesServiceBindingsListCall struct { 1628 s *Service 1629 parent string 1630 urlParams_ gensupport.URLParams 1631 ifNoneMatch_ string 1632 ctx_ context.Context 1633 header_ http.Header 1634 } 1635 1636 // List: Lists all the bindings in the instance 1637 func (r *ProjectsBrokersInstancesServiceBindingsService) List(parent string) *ProjectsBrokersInstancesServiceBindingsListCall { 1638 c := &ProjectsBrokersInstancesServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1639 c.parent = parent 1640 return c 1641 } 1642 1643 // PageSize sets the optional parameter "pageSize": Specifies the number 1644 // of results to return per page. If there are fewer 1645 // elements than the specified number, returns all elements. 1646 // 1647 // If unset or 0, all the results will be returned. 1648 func (c *ProjectsBrokersInstancesServiceBindingsListCall) PageSize(pageSize int64) *ProjectsBrokersInstancesServiceBindingsListCall { 1649 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 1650 return c 1651 } 1652 1653 // PageToken sets the optional parameter "pageToken": Specifies a page 1654 // token to use. Set `pageToken` to a `nextPageToken` 1655 // returned by a previous list request to get the next page of results. 1656 func (c *ProjectsBrokersInstancesServiceBindingsListCall) PageToken(pageToken string) *ProjectsBrokersInstancesServiceBindingsListCall { 1657 c.urlParams_.Set("pageToken", pageToken) 1658 return c 1659 } 1660 1661 // Fields allows partial responses to be retrieved. See 1662 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1663 // for more information. 1664 func (c *ProjectsBrokersInstancesServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesServiceBindingsListCall { 1665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1666 return c 1667 } 1668 1669 // IfNoneMatch sets the optional parameter which makes the operation 1670 // fail if the object's ETag matches the given value. This is useful for 1671 // getting updates only after the object has changed since the last 1672 // request. Use googleapi.IsNotModified to check whether the response 1673 // error from Do is the result of In-None-Match. 1674 func (c *ProjectsBrokersInstancesServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesServiceBindingsListCall { 1675 c.ifNoneMatch_ = entityTag 1676 return c 1677 } 1678 1679 // Context sets the context to be used in this call's Do method. Any 1680 // pending HTTP request will be aborted if the provided context is 1681 // canceled. 1682 func (c *ProjectsBrokersInstancesServiceBindingsListCall) Context(ctx context.Context) *ProjectsBrokersInstancesServiceBindingsListCall { 1683 c.ctx_ = ctx 1684 return c 1685 } 1686 1687 // Header returns an http.Header that can be modified by the caller to 1688 // add HTTP headers to the request. 1689 func (c *ProjectsBrokersInstancesServiceBindingsListCall) Header() http.Header { 1690 if c.header_ == nil { 1691 c.header_ = make(http.Header) 1692 } 1693 return c.header_ 1694 } 1695 1696 func (c *ProjectsBrokersInstancesServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { 1697 reqHeaders := make(http.Header) 1698 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1699 for k, v := range c.header_ { 1700 reqHeaders[k] = v 1701 } 1702 reqHeaders.Set("User-Agent", c.s.userAgent()) 1703 if c.ifNoneMatch_ != "" { 1704 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1705 } 1706 var body io.Reader = nil 1707 c.urlParams_.Set("alt", alt) 1708 c.urlParams_.Set("prettyPrint", "false") 1709 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/service_bindings") 1710 urls += "?" + c.urlParams_.Encode() 1711 req, err := http.NewRequest("GET", urls, body) 1712 if err != nil { 1713 return nil, err 1714 } 1715 req.Header = reqHeaders 1716 googleapi.Expand(req.URL, map[string]string{ 1717 "parent": c.parent, 1718 }) 1719 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1720 } 1721 1722 // Do executes the "servicebroker.projects.brokers.instances.service_bindings.list" call. 1723 // Exactly one of 1724 // *GoogleCloudServicebrokerV1alpha1__ListBindingsResponse or error will 1725 // be non-nil. Any non-2xx status code is an error. Response headers are 1726 // in either 1727 // *GoogleCloudServicebrokerV1alpha1__ListBindingsResponse.ServerResponse 1728 // .Header or (if a response was returned at all) in 1729 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 1730 // whether the returned error was because http.StatusNotModified was 1731 // returned. 1732 func (c *ProjectsBrokersInstancesServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__ListBindingsResponse, error) { 1733 gensupport.SetOptions(c.urlParams_, opts...) 1734 res, err := c.doRequest("json") 1735 if res != nil && res.StatusCode == http.StatusNotModified { 1736 if res.Body != nil { 1737 res.Body.Close() 1738 } 1739 return nil, &googleapi.Error{ 1740 Code: res.StatusCode, 1741 Header: res.Header, 1742 } 1743 } 1744 if err != nil { 1745 return nil, err 1746 } 1747 defer googleapi.CloseBody(res) 1748 if err := googleapi.CheckResponse(res); err != nil { 1749 return nil, err 1750 } 1751 ret := &GoogleCloudServicebrokerV1alpha1__ListBindingsResponse{ 1752 ServerResponse: googleapi.ServerResponse{ 1753 Header: res.Header, 1754 HTTPStatusCode: res.StatusCode, 1755 }, 1756 } 1757 target := &ret 1758 if err := gensupport.DecodeResponse(target, res); err != nil { 1759 return nil, err 1760 } 1761 return ret, nil 1762 // { 1763 // "description": "Lists all the bindings in the instance", 1764 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/instances/{instancesId}/service_bindings", 1765 // "httpMethod": "GET", 1766 // "id": "servicebroker.projects.brokers.instances.service_bindings.list", 1767 // "parameterOrder": [ 1768 // "parent" 1769 // ], 1770 // "parameters": { 1771 // "pageSize": { 1772 // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. If unset or 0, all the results will be returned.", 1773 // "format": "int32", 1774 // "location": "query", 1775 // "type": "integer" 1776 // }, 1777 // "pageToken": { 1778 // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", 1779 // "location": "query", 1780 // "type": "string" 1781 // }, 1782 // "parent": { 1783 // "description": "Parent must match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]/instances/[INSTANCE_ID]`.", 1784 // "location": "path", 1785 // "pattern": "^projects/[^/]+/brokers/[^/]+/instances/[^/]+$", 1786 // "required": true, 1787 // "type": "string" 1788 // } 1789 // }, 1790 // "path": "v1alpha1/{+parent}/service_bindings", 1791 // "response": { 1792 // "$ref": "GoogleCloudServicebrokerV1alpha1__ListBindingsResponse" 1793 // }, 1794 // "scopes": [ 1795 // "https://www.googleapis.com/auth/cloud-platform" 1796 // ] 1797 // } 1798 1799 } 1800 1801 // Pages invokes f for each page of results. 1802 // A non-nil error returned from f will halt the iteration. 1803 // The provided context supersedes any context provided to the Context method. 1804 func (c *ProjectsBrokersInstancesServiceBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1alpha1__ListBindingsResponse) error) error { 1805 c.ctx_ = ctx 1806 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 1807 for { 1808 x, err := c.Do() 1809 if err != nil { 1810 return err 1811 } 1812 if err := f(x); err != nil { 1813 return err 1814 } 1815 if x.NextPageToken == "" { 1816 return nil 1817 } 1818 c.PageToken(x.NextPageToken) 1819 } 1820 } 1821 1822 // method id "servicebroker.projects.brokers.service_instances.list": 1823 1824 type ProjectsBrokersServiceInstancesListCall struct { 1825 s *Service 1826 parent string 1827 urlParams_ gensupport.URLParams 1828 ifNoneMatch_ string 1829 ctx_ context.Context 1830 header_ http.Header 1831 } 1832 1833 // List: Lists all the instances in the brokers 1834 // This API is an extension and not part of the OSB spec. 1835 // Hence the path is a standard Google API URL. 1836 func (r *ProjectsBrokersServiceInstancesService) List(parent string) *ProjectsBrokersServiceInstancesListCall { 1837 c := &ProjectsBrokersServiceInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1838 c.parent = parent 1839 return c 1840 } 1841 1842 // PageSize sets the optional parameter "pageSize": Specifies the number 1843 // of results to return per page. If there are fewer 1844 // elements than the specified number, returns all elements. 1845 // 1846 // If unset or 0, all the results will be returned. 1847 func (c *ProjectsBrokersServiceInstancesListCall) PageSize(pageSize int64) *ProjectsBrokersServiceInstancesListCall { 1848 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 1849 return c 1850 } 1851 1852 // PageToken sets the optional parameter "pageToken": Specifies a page 1853 // token to use. Set `pageToken` to a `nextPageToken` 1854 // returned by a previous list request to get the next page of results. 1855 func (c *ProjectsBrokersServiceInstancesListCall) PageToken(pageToken string) *ProjectsBrokersServiceInstancesListCall { 1856 c.urlParams_.Set("pageToken", pageToken) 1857 return c 1858 } 1859 1860 // Fields allows partial responses to be retrieved. See 1861 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1862 // for more information. 1863 func (c *ProjectsBrokersServiceInstancesListCall) Fields(s ...googleapi.Field) *ProjectsBrokersServiceInstancesListCall { 1864 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1865 return c 1866 } 1867 1868 // IfNoneMatch sets the optional parameter which makes the operation 1869 // fail if the object's ETag matches the given value. This is useful for 1870 // getting updates only after the object has changed since the last 1871 // request. Use googleapi.IsNotModified to check whether the response 1872 // error from Do is the result of In-None-Match. 1873 func (c *ProjectsBrokersServiceInstancesListCall) IfNoneMatch(entityTag string) *ProjectsBrokersServiceInstancesListCall { 1874 c.ifNoneMatch_ = entityTag 1875 return c 1876 } 1877 1878 // Context sets the context to be used in this call's Do method. Any 1879 // pending HTTP request will be aborted if the provided context is 1880 // canceled. 1881 func (c *ProjectsBrokersServiceInstancesListCall) Context(ctx context.Context) *ProjectsBrokersServiceInstancesListCall { 1882 c.ctx_ = ctx 1883 return c 1884 } 1885 1886 // Header returns an http.Header that can be modified by the caller to 1887 // add HTTP headers to the request. 1888 func (c *ProjectsBrokersServiceInstancesListCall) Header() http.Header { 1889 if c.header_ == nil { 1890 c.header_ = make(http.Header) 1891 } 1892 return c.header_ 1893 } 1894 1895 func (c *ProjectsBrokersServiceInstancesListCall) doRequest(alt string) (*http.Response, error) { 1896 reqHeaders := make(http.Header) 1897 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 1898 for k, v := range c.header_ { 1899 reqHeaders[k] = v 1900 } 1901 reqHeaders.Set("User-Agent", c.s.userAgent()) 1902 if c.ifNoneMatch_ != "" { 1903 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1904 } 1905 var body io.Reader = nil 1906 c.urlParams_.Set("alt", alt) 1907 c.urlParams_.Set("prettyPrint", "false") 1908 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/service_instances") 1909 urls += "?" + c.urlParams_.Encode() 1910 req, err := http.NewRequest("GET", urls, body) 1911 if err != nil { 1912 return nil, err 1913 } 1914 req.Header = reqHeaders 1915 googleapi.Expand(req.URL, map[string]string{ 1916 "parent": c.parent, 1917 }) 1918 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1919 } 1920 1921 // Do executes the "servicebroker.projects.brokers.service_instances.list" call. 1922 // Exactly one of 1923 // *GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse or 1924 // error will be non-nil. Any non-2xx status code is an error. Response 1925 // headers are in either 1926 // *GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse.Server 1927 // Response.Header or (if a response was returned at all) in 1928 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 1929 // whether the returned error was because http.StatusNotModified was 1930 // returned. 1931 func (c *ProjectsBrokersServiceInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse, error) { 1932 gensupport.SetOptions(c.urlParams_, opts...) 1933 res, err := c.doRequest("json") 1934 if res != nil && res.StatusCode == http.StatusNotModified { 1935 if res.Body != nil { 1936 res.Body.Close() 1937 } 1938 return nil, &googleapi.Error{ 1939 Code: res.StatusCode, 1940 Header: res.Header, 1941 } 1942 } 1943 if err != nil { 1944 return nil, err 1945 } 1946 defer googleapi.CloseBody(res) 1947 if err := googleapi.CheckResponse(res); err != nil { 1948 return nil, err 1949 } 1950 ret := &GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse{ 1951 ServerResponse: googleapi.ServerResponse{ 1952 Header: res.Header, 1953 HTTPStatusCode: res.StatusCode, 1954 }, 1955 } 1956 target := &ret 1957 if err := gensupport.DecodeResponse(target, res); err != nil { 1958 return nil, err 1959 } 1960 return ret, nil 1961 // { 1962 // "description": "Lists all the instances in the brokers\nThis API is an extension and not part of the OSB spec.\nHence the path is a standard Google API URL.", 1963 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/service_instances", 1964 // "httpMethod": "GET", 1965 // "id": "servicebroker.projects.brokers.service_instances.list", 1966 // "parameterOrder": [ 1967 // "parent" 1968 // ], 1969 // "parameters": { 1970 // "pageSize": { 1971 // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. If unset or 0, all the results will be returned.", 1972 // "format": "int32", 1973 // "location": "query", 1974 // "type": "integer" 1975 // }, 1976 // "pageToken": { 1977 // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", 1978 // "location": "query", 1979 // "type": "string" 1980 // }, 1981 // "parent": { 1982 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 1983 // "location": "path", 1984 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 1985 // "required": true, 1986 // "type": "string" 1987 // } 1988 // }, 1989 // "path": "v1alpha1/{+parent}/service_instances", 1990 // "response": { 1991 // "$ref": "GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse" 1992 // }, 1993 // "scopes": [ 1994 // "https://www.googleapis.com/auth/cloud-platform" 1995 // ] 1996 // } 1997 1998 } 1999 2000 // Pages invokes f for each page of results. 2001 // A non-nil error returned from f will halt the iteration. 2002 // The provided context supersedes any context provided to the Context method. 2003 func (c *ProjectsBrokersServiceInstancesListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1alpha1__ListServiceInstancesResponse) error) error { 2004 c.ctx_ = ctx 2005 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 2006 for { 2007 x, err := c.Do() 2008 if err != nil { 2009 return err 2010 } 2011 if err := f(x); err != nil { 2012 return err 2013 } 2014 if x.NextPageToken == "" { 2015 return nil 2016 } 2017 c.PageToken(x.NextPageToken) 2018 } 2019 } 2020 2021 // method id "servicebroker.projects.brokers.v2.catalog.list": 2022 2023 type ProjectsBrokersV2CatalogListCall struct { 2024 s *Service 2025 parent string 2026 urlParams_ gensupport.URLParams 2027 ifNoneMatch_ string 2028 ctx_ context.Context 2029 header_ http.Header 2030 } 2031 2032 // List: Lists all the Services registered with this broker for 2033 // consumption for 2034 // given service registry broker, which contains an set of 2035 // services. 2036 // Note, that Service producer API is separate from Broker API. 2037 func (r *ProjectsBrokersV2CatalogService) List(parent string) *ProjectsBrokersV2CatalogListCall { 2038 c := &ProjectsBrokersV2CatalogListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2039 c.parent = parent 2040 return c 2041 } 2042 2043 // PageSize sets the optional parameter "pageSize": Specifies the number 2044 // of results to return per page. If there are fewer 2045 // elements than the specified number, returns all elements. 2046 // 2047 // If unset or 0, all the results will be returned. 2048 func (c *ProjectsBrokersV2CatalogListCall) PageSize(pageSize int64) *ProjectsBrokersV2CatalogListCall { 2049 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2050 return c 2051 } 2052 2053 // PageToken sets the optional parameter "pageToken": Specifies a page 2054 // token to use. Set `pageToken` to a `nextPageToken` 2055 // returned by a previous list request to get the next page of results. 2056 func (c *ProjectsBrokersV2CatalogListCall) PageToken(pageToken string) *ProjectsBrokersV2CatalogListCall { 2057 c.urlParams_.Set("pageToken", pageToken) 2058 return c 2059 } 2060 2061 // Fields allows partial responses to be retrieved. See 2062 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2063 // for more information. 2064 func (c *ProjectsBrokersV2CatalogListCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2CatalogListCall { 2065 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2066 return c 2067 } 2068 2069 // IfNoneMatch sets the optional parameter which makes the operation 2070 // fail if the object's ETag matches the given value. This is useful for 2071 // getting updates only after the object has changed since the last 2072 // request. Use googleapi.IsNotModified to check whether the response 2073 // error from Do is the result of In-None-Match. 2074 func (c *ProjectsBrokersV2CatalogListCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2CatalogListCall { 2075 c.ifNoneMatch_ = entityTag 2076 return c 2077 } 2078 2079 // Context sets the context to be used in this call's Do method. Any 2080 // pending HTTP request will be aborted if the provided context is 2081 // canceled. 2082 func (c *ProjectsBrokersV2CatalogListCall) Context(ctx context.Context) *ProjectsBrokersV2CatalogListCall { 2083 c.ctx_ = ctx 2084 return c 2085 } 2086 2087 // Header returns an http.Header that can be modified by the caller to 2088 // add HTTP headers to the request. 2089 func (c *ProjectsBrokersV2CatalogListCall) Header() http.Header { 2090 if c.header_ == nil { 2091 c.header_ = make(http.Header) 2092 } 2093 return c.header_ 2094 } 2095 2096 func (c *ProjectsBrokersV2CatalogListCall) doRequest(alt string) (*http.Response, error) { 2097 reqHeaders := make(http.Header) 2098 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2099 for k, v := range c.header_ { 2100 reqHeaders[k] = v 2101 } 2102 reqHeaders.Set("User-Agent", c.s.userAgent()) 2103 if c.ifNoneMatch_ != "" { 2104 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2105 } 2106 var body io.Reader = nil 2107 c.urlParams_.Set("alt", alt) 2108 c.urlParams_.Set("prettyPrint", "false") 2109 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/catalog") 2110 urls += "?" + c.urlParams_.Encode() 2111 req, err := http.NewRequest("GET", urls, body) 2112 if err != nil { 2113 return nil, err 2114 } 2115 req.Header = reqHeaders 2116 googleapi.Expand(req.URL, map[string]string{ 2117 "parent": c.parent, 2118 }) 2119 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2120 } 2121 2122 // Do executes the "servicebroker.projects.brokers.v2.catalog.list" call. 2123 // Exactly one of *GoogleCloudServicebrokerV1alpha1__ListCatalogResponse 2124 // or error will be non-nil. Any non-2xx status code is an error. 2125 // Response headers are in either 2126 // *GoogleCloudServicebrokerV1alpha1__ListCatalogResponse.ServerResponse. 2127 // Header or (if a response was returned at all) in 2128 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2129 // whether the returned error was because http.StatusNotModified was 2130 // returned. 2131 func (c *ProjectsBrokersV2CatalogListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__ListCatalogResponse, error) { 2132 gensupport.SetOptions(c.urlParams_, opts...) 2133 res, err := c.doRequest("json") 2134 if res != nil && res.StatusCode == http.StatusNotModified { 2135 if res.Body != nil { 2136 res.Body.Close() 2137 } 2138 return nil, &googleapi.Error{ 2139 Code: res.StatusCode, 2140 Header: res.Header, 2141 } 2142 } 2143 if err != nil { 2144 return nil, err 2145 } 2146 defer googleapi.CloseBody(res) 2147 if err := googleapi.CheckResponse(res); err != nil { 2148 return nil, err 2149 } 2150 ret := &GoogleCloudServicebrokerV1alpha1__ListCatalogResponse{ 2151 ServerResponse: googleapi.ServerResponse{ 2152 Header: res.Header, 2153 HTTPStatusCode: res.StatusCode, 2154 }, 2155 } 2156 target := &ret 2157 if err := gensupport.DecodeResponse(target, res); err != nil { 2158 return nil, err 2159 } 2160 return ret, nil 2161 // { 2162 // "description": "Lists all the Services registered with this broker for consumption for\ngiven service registry broker, which contains an set of services.\nNote, that Service producer API is separate from Broker API.", 2163 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/catalog", 2164 // "httpMethod": "GET", 2165 // "id": "servicebroker.projects.brokers.v2.catalog.list", 2166 // "parameterOrder": [ 2167 // "parent" 2168 // ], 2169 // "parameters": { 2170 // "pageSize": { 2171 // "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.\nOptional. If unset or 0, all the results will be returned.", 2172 // "format": "int32", 2173 // "location": "query", 2174 // "type": "integer" 2175 // }, 2176 // "pageToken": { 2177 // "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", 2178 // "location": "query", 2179 // "type": "string" 2180 // }, 2181 // "parent": { 2182 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 2183 // "location": "path", 2184 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 2185 // "required": true, 2186 // "type": "string" 2187 // } 2188 // }, 2189 // "path": "v1alpha1/{+parent}/v2/catalog", 2190 // "response": { 2191 // "$ref": "GoogleCloudServicebrokerV1alpha1__ListCatalogResponse" 2192 // }, 2193 // "scopes": [ 2194 // "https://www.googleapis.com/auth/cloud-platform" 2195 // ] 2196 // } 2197 2198 } 2199 2200 // Pages invokes f for each page of results. 2201 // A non-nil error returned from f will halt the iteration. 2202 // The provided context supersedes any context provided to the Context method. 2203 func (c *ProjectsBrokersV2CatalogListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1alpha1__ListCatalogResponse) error) error { 2204 c.ctx_ = ctx 2205 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 2206 for { 2207 x, err := c.Do() 2208 if err != nil { 2209 return err 2210 } 2211 if err := f(x); err != nil { 2212 return err 2213 } 2214 if x.NextPageToken == "" { 2215 return nil 2216 } 2217 c.PageToken(x.NextPageToken) 2218 } 2219 } 2220 2221 // method id "servicebroker.projects.brokers.v2.service_instances.create": 2222 2223 type ProjectsBrokersV2ServiceInstancesCreateCall struct { 2224 s *Service 2225 parent string 2226 instanceId string 2227 googlecloudservicebrokerv1alpha1__serviceinstance *GoogleCloudServicebrokerV1alpha1__ServiceInstance 2228 urlParams_ gensupport.URLParams 2229 ctx_ context.Context 2230 header_ http.Header 2231 } 2232 2233 // Create: Provisions a service instance. 2234 // If `request.accepts_incomplete` is false and Broker cannot execute 2235 // request 2236 // synchronously HTTP 422 error will be returned along 2237 // with 2238 // FAILED_PRECONDITION status. 2239 // If `request.accepts_incomplete` is true and the Broker decides to 2240 // execute 2241 // resource asynchronously then HTTP 202 response code will be returned 2242 // and a 2243 // valid polling operation in the response will be included. 2244 // If Broker executes the request synchronously and it succeeds HTTP 2245 // 201 2246 // response will be furnished. 2247 // If identical instance exists, then HTTP 200 response will be 2248 // returned. 2249 // If an instance with identical ID but mismatching parameters exists, 2250 // then 2251 // HTTP 409 status code will be returned. 2252 func (r *ProjectsBrokersV2ServiceInstancesService) Create(parent string, instanceId string, googlecloudservicebrokerv1alpha1__serviceinstance *GoogleCloudServicebrokerV1alpha1__ServiceInstance) *ProjectsBrokersV2ServiceInstancesCreateCall { 2253 c := &ProjectsBrokersV2ServiceInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2254 c.parent = parent 2255 c.instanceId = instanceId 2256 c.googlecloudservicebrokerv1alpha1__serviceinstance = googlecloudservicebrokerv1alpha1__serviceinstance 2257 return c 2258 } 2259 2260 // AcceptsIncomplete sets the optional parameter "acceptsIncomplete": 2261 // Value indicating that API client supports asynchronous operations. 2262 // If 2263 // Broker cannot execute the request synchronously HTTP 422 code will 2264 // be 2265 // returned to HTTP clients along with FAILED_PRECONDITION error. 2266 // If true and broker will execute request asynchronously 202 HTTP code 2267 // will 2268 // be returned. 2269 // This broker always requires this to be true as all mutator operations 2270 // are 2271 // asynchronous. 2272 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesCreateCall { 2273 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete)) 2274 return c 2275 } 2276 2277 // Fields allows partial responses to be retrieved. See 2278 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2279 // for more information. 2280 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesCreateCall { 2281 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2282 return c 2283 } 2284 2285 // Context sets the context to be used in this call's Do method. Any 2286 // pending HTTP request will be aborted if the provided context is 2287 // canceled. 2288 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesCreateCall { 2289 c.ctx_ = ctx 2290 return c 2291 } 2292 2293 // Header returns an http.Header that can be modified by the caller to 2294 // add HTTP headers to the request. 2295 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Header() http.Header { 2296 if c.header_ == nil { 2297 c.header_ = make(http.Header) 2298 } 2299 return c.header_ 2300 } 2301 2302 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) doRequest(alt string) (*http.Response, error) { 2303 reqHeaders := make(http.Header) 2304 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2305 for k, v := range c.header_ { 2306 reqHeaders[k] = v 2307 } 2308 reqHeaders.Set("User-Agent", c.s.userAgent()) 2309 var body io.Reader = nil 2310 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1alpha1__serviceinstance) 2311 if err != nil { 2312 return nil, err 2313 } 2314 reqHeaders.Set("Content-Type", "application/json") 2315 c.urlParams_.Set("alt", alt) 2316 c.urlParams_.Set("prettyPrint", "false") 2317 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instance_id}") 2318 urls += "?" + c.urlParams_.Encode() 2319 req, err := http.NewRequest("PUT", urls, body) 2320 if err != nil { 2321 return nil, err 2322 } 2323 req.Header = reqHeaders 2324 googleapi.Expand(req.URL, map[string]string{ 2325 "parent": c.parent, 2326 "instance_id": c.instanceId, 2327 }) 2328 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2329 } 2330 2331 // Do executes the "servicebroker.projects.brokers.v2.service_instances.create" call. 2332 // Exactly one of 2333 // *GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse or 2334 // error will be non-nil. Any non-2xx status code is an error. Response 2335 // headers are in either 2336 // *GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse.Serve 2337 // rResponse.Header or (if a response was returned at all) in 2338 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2339 // whether the returned error was because http.StatusNotModified was 2340 // returned. 2341 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse, error) { 2342 gensupport.SetOptions(c.urlParams_, opts...) 2343 res, err := c.doRequest("json") 2344 if res != nil && res.StatusCode == http.StatusNotModified { 2345 if res.Body != nil { 2346 res.Body.Close() 2347 } 2348 return nil, &googleapi.Error{ 2349 Code: res.StatusCode, 2350 Header: res.Header, 2351 } 2352 } 2353 if err != nil { 2354 return nil, err 2355 } 2356 defer googleapi.CloseBody(res) 2357 if err := googleapi.CheckResponse(res); err != nil { 2358 return nil, err 2359 } 2360 ret := &GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse{ 2361 ServerResponse: googleapi.ServerResponse{ 2362 Header: res.Header, 2363 HTTPStatusCode: res.StatusCode, 2364 }, 2365 } 2366 target := &ret 2367 if err := gensupport.DecodeResponse(target, res); err != nil { 2368 return nil, err 2369 } 2370 return ret, nil 2371 // { 2372 // "description": "Provisions a service instance.\nIf `request.accepts_incomplete` is false and Broker cannot execute request\nsynchronously HTTP 422 error will be returned along with\nFAILED_PRECONDITION status.\nIf `request.accepts_incomplete` is true and the Broker decides to execute\nresource asynchronously then HTTP 202 response code will be returned and a\nvalid polling operation in the response will be included.\nIf Broker executes the request synchronously and it succeeds HTTP 201\nresponse will be furnished.\nIf identical instance exists, then HTTP 200 response will be returned.\nIf an instance with identical ID but mismatching parameters exists, then\nHTTP 409 status code will be returned.", 2373 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}", 2374 // "httpMethod": "PUT", 2375 // "id": "servicebroker.projects.brokers.v2.service_instances.create", 2376 // "parameterOrder": [ 2377 // "parent", 2378 // "instance_id" 2379 // ], 2380 // "parameters": { 2381 // "acceptsIncomplete": { 2382 // "description": "Value indicating that API client supports asynchronous operations. If\nBroker cannot execute the request synchronously HTTP 422 code will be\nreturned to HTTP clients along with FAILED_PRECONDITION error.\nIf true and broker will execute request asynchronously 202 HTTP code will\nbe returned.\nThis broker always requires this to be true as all mutator operations are\nasynchronous.", 2383 // "location": "query", 2384 // "type": "boolean" 2385 // }, 2386 // "instance_id": { 2387 // "description": "The id of the service instance. Must be unique within GCP project.\nMaximum length is 64, GUID recommended.\nRequired.", 2388 // "location": "path", 2389 // "pattern": "^[^/]+$", 2390 // "required": true, 2391 // "type": "string" 2392 // }, 2393 // "parent": { 2394 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 2395 // "location": "path", 2396 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 2397 // "required": true, 2398 // "type": "string" 2399 // } 2400 // }, 2401 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instance_id}", 2402 // "request": { 2403 // "$ref": "GoogleCloudServicebrokerV1alpha1__ServiceInstance" 2404 // }, 2405 // "response": { 2406 // "$ref": "GoogleCloudServicebrokerV1alpha1__CreateServiceInstanceResponse" 2407 // }, 2408 // "scopes": [ 2409 // "https://www.googleapis.com/auth/cloud-platform" 2410 // ] 2411 // } 2412 2413 } 2414 2415 // method id "servicebroker.projects.brokers.v2.service_instances.delete": 2416 2417 type ProjectsBrokersV2ServiceInstancesDeleteCall struct { 2418 s *Service 2419 parent string 2420 instanceId string 2421 urlParams_ gensupport.URLParams 2422 ctx_ context.Context 2423 header_ http.Header 2424 } 2425 2426 // Delete: Deprovisions a service instance. 2427 // For synchronous/asynchronous request details see 2428 // CreateServiceInstance 2429 // method. 2430 // If service instance does not exist HTTP 410 status will be returned. 2431 func (r *ProjectsBrokersV2ServiceInstancesService) Delete(parent string, instanceId string) *ProjectsBrokersV2ServiceInstancesDeleteCall { 2432 c := &ProjectsBrokersV2ServiceInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2433 c.parent = parent 2434 c.instanceId = instanceId 2435 return c 2436 } 2437 2438 // AcceptsIncomplete sets the optional parameter "acceptsIncomplete": 2439 // See CreateServiceInstanceRequest for details. 2440 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesDeleteCall { 2441 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete)) 2442 return c 2443 } 2444 2445 // PlanId sets the optional parameter "planId": The plan id of the 2446 // service instance. 2447 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesDeleteCall { 2448 c.urlParams_.Set("planId", planId) 2449 return c 2450 } 2451 2452 // ServiceId sets the optional parameter "serviceId": The service id of 2453 // the service instance. 2454 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesDeleteCall { 2455 c.urlParams_.Set("serviceId", serviceId) 2456 return c 2457 } 2458 2459 // Fields allows partial responses to be retrieved. See 2460 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2461 // for more information. 2462 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesDeleteCall { 2463 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2464 return c 2465 } 2466 2467 // Context sets the context to be used in this call's Do method. Any 2468 // pending HTTP request will be aborted if the provided context is 2469 // canceled. 2470 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesDeleteCall { 2471 c.ctx_ = ctx 2472 return c 2473 } 2474 2475 // Header returns an http.Header that can be modified by the caller to 2476 // add HTTP headers to the request. 2477 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Header() http.Header { 2478 if c.header_ == nil { 2479 c.header_ = make(http.Header) 2480 } 2481 return c.header_ 2482 } 2483 2484 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 2485 reqHeaders := make(http.Header) 2486 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2487 for k, v := range c.header_ { 2488 reqHeaders[k] = v 2489 } 2490 reqHeaders.Set("User-Agent", c.s.userAgent()) 2491 var body io.Reader = nil 2492 c.urlParams_.Set("alt", alt) 2493 c.urlParams_.Set("prettyPrint", "false") 2494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instanceId}") 2495 urls += "?" + c.urlParams_.Encode() 2496 req, err := http.NewRequest("DELETE", urls, body) 2497 if err != nil { 2498 return nil, err 2499 } 2500 req.Header = reqHeaders 2501 googleapi.Expand(req.URL, map[string]string{ 2502 "parent": c.parent, 2503 "instanceId": c.instanceId, 2504 }) 2505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2506 } 2507 2508 // Do executes the "servicebroker.projects.brokers.v2.service_instances.delete" call. 2509 // Exactly one of 2510 // *GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse or 2511 // error will be non-nil. Any non-2xx status code is an error. Response 2512 // headers are in either 2513 // *GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse.Serve 2514 // rResponse.Header or (if a response was returned at all) in 2515 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2516 // whether the returned error was because http.StatusNotModified was 2517 // returned. 2518 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse, error) { 2519 gensupport.SetOptions(c.urlParams_, opts...) 2520 res, err := c.doRequest("json") 2521 if res != nil && res.StatusCode == http.StatusNotModified { 2522 if res.Body != nil { 2523 res.Body.Close() 2524 } 2525 return nil, &googleapi.Error{ 2526 Code: res.StatusCode, 2527 Header: res.Header, 2528 } 2529 } 2530 if err != nil { 2531 return nil, err 2532 } 2533 defer googleapi.CloseBody(res) 2534 if err := googleapi.CheckResponse(res); err != nil { 2535 return nil, err 2536 } 2537 ret := &GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse{ 2538 ServerResponse: googleapi.ServerResponse{ 2539 Header: res.Header, 2540 HTTPStatusCode: res.StatusCode, 2541 }, 2542 } 2543 target := &ret 2544 if err := gensupport.DecodeResponse(target, res); err != nil { 2545 return nil, err 2546 } 2547 return ret, nil 2548 // { 2549 // "description": "Deprovisions a service instance.\nFor synchronous/asynchronous request details see CreateServiceInstance\nmethod.\nIf service instance does not exist HTTP 410 status will be returned.", 2550 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}", 2551 // "httpMethod": "DELETE", 2552 // "id": "servicebroker.projects.brokers.v2.service_instances.delete", 2553 // "parameterOrder": [ 2554 // "parent", 2555 // "instanceId" 2556 // ], 2557 // "parameters": { 2558 // "acceptsIncomplete": { 2559 // "description": "See CreateServiceInstanceRequest for details.", 2560 // "location": "query", 2561 // "type": "boolean" 2562 // }, 2563 // "instanceId": { 2564 // "description": "The instance id to deprovision.", 2565 // "location": "path", 2566 // "pattern": "^[^/]+$", 2567 // "required": true, 2568 // "type": "string" 2569 // }, 2570 // "parent": { 2571 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 2572 // "location": "path", 2573 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 2574 // "required": true, 2575 // "type": "string" 2576 // }, 2577 // "planId": { 2578 // "description": "The plan id of the service instance.", 2579 // "location": "query", 2580 // "type": "string" 2581 // }, 2582 // "serviceId": { 2583 // "description": "The service id of the service instance.", 2584 // "location": "query", 2585 // "type": "string" 2586 // } 2587 // }, 2588 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instanceId}", 2589 // "response": { 2590 // "$ref": "GoogleCloudServicebrokerV1alpha1__DeleteServiceInstanceResponse" 2591 // }, 2592 // "scopes": [ 2593 // "https://www.googleapis.com/auth/cloud-platform" 2594 // ] 2595 // } 2596 2597 } 2598 2599 // method id "servicebroker.projects.brokers.v2.service_instances.get": 2600 2601 type ProjectsBrokersV2ServiceInstancesGetCall struct { 2602 s *Service 2603 name string 2604 urlParams_ gensupport.URLParams 2605 ifNoneMatch_ string 2606 ctx_ context.Context 2607 header_ http.Header 2608 } 2609 2610 // Get: Gets the given service instance from the system. 2611 // This API is an extension and not part of the OSB spec. 2612 // Hence the path is a standard Google API URL. 2613 func (r *ProjectsBrokersV2ServiceInstancesService) Get(name string) *ProjectsBrokersV2ServiceInstancesGetCall { 2614 c := &ProjectsBrokersV2ServiceInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2615 c.name = name 2616 return c 2617 } 2618 2619 // Fields allows partial responses to be retrieved. See 2620 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2621 // for more information. 2622 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesGetCall { 2623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2624 return c 2625 } 2626 2627 // IfNoneMatch sets the optional parameter which makes the operation 2628 // fail if the object's ETag matches the given value. This is useful for 2629 // getting updates only after the object has changed since the last 2630 // request. Use googleapi.IsNotModified to check whether the response 2631 // error from Do is the result of In-None-Match. 2632 func (c *ProjectsBrokersV2ServiceInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesGetCall { 2633 c.ifNoneMatch_ = entityTag 2634 return c 2635 } 2636 2637 // Context sets the context to be used in this call's Do method. Any 2638 // pending HTTP request will be aborted if the provided context is 2639 // canceled. 2640 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesGetCall { 2641 c.ctx_ = ctx 2642 return c 2643 } 2644 2645 // Header returns an http.Header that can be modified by the caller to 2646 // add HTTP headers to the request. 2647 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Header() http.Header { 2648 if c.header_ == nil { 2649 c.header_ = make(http.Header) 2650 } 2651 return c.header_ 2652 } 2653 2654 func (c *ProjectsBrokersV2ServiceInstancesGetCall) doRequest(alt string) (*http.Response, error) { 2655 reqHeaders := make(http.Header) 2656 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2657 for k, v := range c.header_ { 2658 reqHeaders[k] = v 2659 } 2660 reqHeaders.Set("User-Agent", c.s.userAgent()) 2661 if c.ifNoneMatch_ != "" { 2662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2663 } 2664 var body io.Reader = nil 2665 c.urlParams_.Set("alt", alt) 2666 c.urlParams_.Set("prettyPrint", "false") 2667 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 2668 urls += "?" + c.urlParams_.Encode() 2669 req, err := http.NewRequest("GET", urls, body) 2670 if err != nil { 2671 return nil, err 2672 } 2673 req.Header = reqHeaders 2674 googleapi.Expand(req.URL, map[string]string{ 2675 "name": c.name, 2676 }) 2677 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2678 } 2679 2680 // Do executes the "servicebroker.projects.brokers.v2.service_instances.get" call. 2681 // Exactly one of *GoogleCloudServicebrokerV1alpha1__ServiceInstance or 2682 // error will be non-nil. Any non-2xx status code is an error. Response 2683 // headers are in either 2684 // *GoogleCloudServicebrokerV1alpha1__ServiceInstance.ServerResponse.Head 2685 // er or (if a response was returned at all) in 2686 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2687 // whether the returned error was because http.StatusNotModified was 2688 // returned. 2689 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__ServiceInstance, error) { 2690 gensupport.SetOptions(c.urlParams_, opts...) 2691 res, err := c.doRequest("json") 2692 if res != nil && res.StatusCode == http.StatusNotModified { 2693 if res.Body != nil { 2694 res.Body.Close() 2695 } 2696 return nil, &googleapi.Error{ 2697 Code: res.StatusCode, 2698 Header: res.Header, 2699 } 2700 } 2701 if err != nil { 2702 return nil, err 2703 } 2704 defer googleapi.CloseBody(res) 2705 if err := googleapi.CheckResponse(res); err != nil { 2706 return nil, err 2707 } 2708 ret := &GoogleCloudServicebrokerV1alpha1__ServiceInstance{ 2709 ServerResponse: googleapi.ServerResponse{ 2710 Header: res.Header, 2711 HTTPStatusCode: res.StatusCode, 2712 }, 2713 } 2714 target := &ret 2715 if err := gensupport.DecodeResponse(target, res); err != nil { 2716 return nil, err 2717 } 2718 return ret, nil 2719 // { 2720 // "description": "Gets the given service instance from the system.\nThis API is an extension and not part of the OSB spec.\nHence the path is a standard Google API URL.", 2721 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}", 2722 // "httpMethod": "GET", 2723 // "id": "servicebroker.projects.brokers.v2.service_instances.get", 2724 // "parameterOrder": [ 2725 // "name" 2726 // ], 2727 // "parameters": { 2728 // "name": { 2729 // "description": "The resource name of the instance to return.", 2730 // "location": "path", 2731 // "pattern": "^projects/[^/]+/brokers/[^/]+/v2/service_instances/[^/]+$", 2732 // "required": true, 2733 // "type": "string" 2734 // } 2735 // }, 2736 // "path": "v1alpha1/{+name}", 2737 // "response": { 2738 // "$ref": "GoogleCloudServicebrokerV1alpha1__ServiceInstance" 2739 // }, 2740 // "scopes": [ 2741 // "https://www.googleapis.com/auth/cloud-platform" 2742 // ] 2743 // } 2744 2745 } 2746 2747 // method id "servicebroker.projects.brokers.v2.service_instances.getLast_operation": 2748 2749 type ProjectsBrokersV2ServiceInstancesGetLastOperationCall struct { 2750 s *Service 2751 parent string 2752 instanceId string 2753 urlParams_ gensupport.URLParams 2754 ifNoneMatch_ string 2755 ctx_ context.Context 2756 header_ http.Header 2757 } 2758 2759 // GetLastOperation: Returns the state of the last operation for the 2760 // service instance. 2761 // Only last (or current) operation can be polled. 2762 func (r *ProjectsBrokersV2ServiceInstancesService) GetLastOperation(parent string, instanceId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2763 c := &ProjectsBrokersV2ServiceInstancesGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2764 c.parent = parent 2765 c.instanceId = instanceId 2766 return c 2767 } 2768 2769 // Operation sets the optional parameter "operation": If `operation` was 2770 // returned during mutation operation, this field must be 2771 // populated with the provided value. 2772 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Operation(operation string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2773 c.urlParams_.Set("operation", operation) 2774 return c 2775 } 2776 2777 // PlanId sets the optional parameter "planId": Plan id. 2778 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2779 c.urlParams_.Set("planId", planId) 2780 return c 2781 } 2782 2783 // ServiceId sets the optional parameter "serviceId": Service id. 2784 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2785 c.urlParams_.Set("serviceId", serviceId) 2786 return c 2787 } 2788 2789 // Fields allows partial responses to be retrieved. See 2790 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2791 // for more information. 2792 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2793 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2794 return c 2795 } 2796 2797 // IfNoneMatch sets the optional parameter which makes the operation 2798 // fail if the object's ETag matches the given value. This is useful for 2799 // getting updates only after the object has changed since the last 2800 // request. Use googleapi.IsNotModified to check whether the response 2801 // error from Do is the result of In-None-Match. 2802 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2803 c.ifNoneMatch_ = entityTag 2804 return c 2805 } 2806 2807 // Context sets the context to be used in this call's Do method. Any 2808 // pending HTTP request will be aborted if the provided context is 2809 // canceled. 2810 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall { 2811 c.ctx_ = ctx 2812 return c 2813 } 2814 2815 // Header returns an http.Header that can be modified by the caller to 2816 // add HTTP headers to the request. 2817 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Header() http.Header { 2818 if c.header_ == nil { 2819 c.header_ = make(http.Header) 2820 } 2821 return c.header_ 2822 } 2823 2824 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) doRequest(alt string) (*http.Response, error) { 2825 reqHeaders := make(http.Header) 2826 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2827 for k, v := range c.header_ { 2828 reqHeaders[k] = v 2829 } 2830 reqHeaders.Set("User-Agent", c.s.userAgent()) 2831 if c.ifNoneMatch_ != "" { 2832 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2833 } 2834 var body io.Reader = nil 2835 c.urlParams_.Set("alt", alt) 2836 c.urlParams_.Set("prettyPrint", "false") 2837 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/last_operation") 2838 urls += "?" + c.urlParams_.Encode() 2839 req, err := http.NewRequest("GET", urls, body) 2840 if err != nil { 2841 return nil, err 2842 } 2843 req.Header = reqHeaders 2844 googleapi.Expand(req.URL, map[string]string{ 2845 "parent": c.parent, 2846 "instanceId": c.instanceId, 2847 }) 2848 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2849 } 2850 2851 // Do executes the "servicebroker.projects.brokers.v2.service_instances.getLast_operation" call. 2852 // Exactly one of *GoogleCloudServicebrokerV1alpha1__Operation or error 2853 // will be non-nil. Any non-2xx status code is an error. Response 2854 // headers are in either 2855 // *GoogleCloudServicebrokerV1alpha1__Operation.ServerResponse.Header or 2856 // (if a response was returned at all) in 2857 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2858 // whether the returned error was because http.StatusNotModified was 2859 // returned. 2860 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__Operation, error) { 2861 gensupport.SetOptions(c.urlParams_, opts...) 2862 res, err := c.doRequest("json") 2863 if res != nil && res.StatusCode == http.StatusNotModified { 2864 if res.Body != nil { 2865 res.Body.Close() 2866 } 2867 return nil, &googleapi.Error{ 2868 Code: res.StatusCode, 2869 Header: res.Header, 2870 } 2871 } 2872 if err != nil { 2873 return nil, err 2874 } 2875 defer googleapi.CloseBody(res) 2876 if err := googleapi.CheckResponse(res); err != nil { 2877 return nil, err 2878 } 2879 ret := &GoogleCloudServicebrokerV1alpha1__Operation{ 2880 ServerResponse: googleapi.ServerResponse{ 2881 Header: res.Header, 2882 HTTPStatusCode: res.StatusCode, 2883 }, 2884 } 2885 target := &ret 2886 if err := gensupport.DecodeResponse(target, res); err != nil { 2887 return nil, err 2888 } 2889 return ret, nil 2890 // { 2891 // "description": "Returns the state of the last operation for the service instance.\nOnly last (or current) operation can be polled.", 2892 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/last_operation", 2893 // "httpMethod": "GET", 2894 // "id": "servicebroker.projects.brokers.v2.service_instances.getLast_operation", 2895 // "parameterOrder": [ 2896 // "parent", 2897 // "instanceId" 2898 // ], 2899 // "parameters": { 2900 // "instanceId": { 2901 // "description": "The instance id for which to return the last operation status.", 2902 // "location": "path", 2903 // "pattern": "^[^/]+$", 2904 // "required": true, 2905 // "type": "string" 2906 // }, 2907 // "operation": { 2908 // "description": "If `operation` was returned during mutation operation, this field must be\npopulated with the provided value.", 2909 // "location": "query", 2910 // "type": "string" 2911 // }, 2912 // "parent": { 2913 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 2914 // "location": "path", 2915 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 2916 // "required": true, 2917 // "type": "string" 2918 // }, 2919 // "planId": { 2920 // "description": "Plan id.", 2921 // "location": "query", 2922 // "type": "string" 2923 // }, 2924 // "serviceId": { 2925 // "description": "Service id.", 2926 // "location": "query", 2927 // "type": "string" 2928 // } 2929 // }, 2930 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/last_operation", 2931 // "response": { 2932 // "$ref": "GoogleCloudServicebrokerV1alpha1__Operation" 2933 // }, 2934 // "scopes": [ 2935 // "https://www.googleapis.com/auth/cloud-platform" 2936 // ] 2937 // } 2938 2939 } 2940 2941 // method id "servicebroker.projects.brokers.v2.service_instances.patch": 2942 2943 type ProjectsBrokersV2ServiceInstancesPatchCall struct { 2944 s *Service 2945 parent string 2946 instanceId string 2947 googlecloudservicebrokerv1alpha1__serviceinstance *GoogleCloudServicebrokerV1alpha1__ServiceInstance 2948 urlParams_ gensupport.URLParams 2949 ctx_ context.Context 2950 header_ http.Header 2951 } 2952 2953 // Patch: Updates an existing service instance. 2954 // See CreateServiceInstance for possible response codes. 2955 func (r *ProjectsBrokersV2ServiceInstancesService) Patch(parent string, instanceId string, googlecloudservicebrokerv1alpha1__serviceinstance *GoogleCloudServicebrokerV1alpha1__ServiceInstance) *ProjectsBrokersV2ServiceInstancesPatchCall { 2956 c := &ProjectsBrokersV2ServiceInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2957 c.parent = parent 2958 c.instanceId = instanceId 2959 c.googlecloudservicebrokerv1alpha1__serviceinstance = googlecloudservicebrokerv1alpha1__serviceinstance 2960 return c 2961 } 2962 2963 // AcceptsIncomplete sets the optional parameter "acceptsIncomplete": 2964 // See CreateServiceInstanceRequest for details. 2965 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesPatchCall { 2966 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete)) 2967 return c 2968 } 2969 2970 // Fields allows partial responses to be retrieved. See 2971 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2972 // for more information. 2973 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesPatchCall { 2974 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2975 return c 2976 } 2977 2978 // Context sets the context to be used in this call's Do method. Any 2979 // pending HTTP request will be aborted if the provided context is 2980 // canceled. 2981 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesPatchCall { 2982 c.ctx_ = ctx 2983 return c 2984 } 2985 2986 // Header returns an http.Header that can be modified by the caller to 2987 // add HTTP headers to the request. 2988 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Header() http.Header { 2989 if c.header_ == nil { 2990 c.header_ = make(http.Header) 2991 } 2992 return c.header_ 2993 } 2994 2995 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) doRequest(alt string) (*http.Response, error) { 2996 reqHeaders := make(http.Header) 2997 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 2998 for k, v := range c.header_ { 2999 reqHeaders[k] = v 3000 } 3001 reqHeaders.Set("User-Agent", c.s.userAgent()) 3002 var body io.Reader = nil 3003 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1alpha1__serviceinstance) 3004 if err != nil { 3005 return nil, err 3006 } 3007 reqHeaders.Set("Content-Type", "application/json") 3008 c.urlParams_.Set("alt", alt) 3009 c.urlParams_.Set("prettyPrint", "false") 3010 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instance_id}") 3011 urls += "?" + c.urlParams_.Encode() 3012 req, err := http.NewRequest("PATCH", urls, body) 3013 if err != nil { 3014 return nil, err 3015 } 3016 req.Header = reqHeaders 3017 googleapi.Expand(req.URL, map[string]string{ 3018 "parent": c.parent, 3019 "instance_id": c.instanceId, 3020 }) 3021 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3022 } 3023 3024 // Do executes the "servicebroker.projects.brokers.v2.service_instances.patch" call. 3025 // Exactly one of 3026 // *GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse or 3027 // error will be non-nil. Any non-2xx status code is an error. Response 3028 // headers are in either 3029 // *GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse.Serve 3030 // rResponse.Header or (if a response was returned at all) in 3031 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3032 // whether the returned error was because http.StatusNotModified was 3033 // returned. 3034 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse, error) { 3035 gensupport.SetOptions(c.urlParams_, opts...) 3036 res, err := c.doRequest("json") 3037 if res != nil && res.StatusCode == http.StatusNotModified { 3038 if res.Body != nil { 3039 res.Body.Close() 3040 } 3041 return nil, &googleapi.Error{ 3042 Code: res.StatusCode, 3043 Header: res.Header, 3044 } 3045 } 3046 if err != nil { 3047 return nil, err 3048 } 3049 defer googleapi.CloseBody(res) 3050 if err := googleapi.CheckResponse(res); err != nil { 3051 return nil, err 3052 } 3053 ret := &GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse{ 3054 ServerResponse: googleapi.ServerResponse{ 3055 Header: res.Header, 3056 HTTPStatusCode: res.StatusCode, 3057 }, 3058 } 3059 target := &ret 3060 if err := gensupport.DecodeResponse(target, res); err != nil { 3061 return nil, err 3062 } 3063 return ret, nil 3064 // { 3065 // "description": "Updates an existing service instance.\nSee CreateServiceInstance for possible response codes.", 3066 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}", 3067 // "httpMethod": "PATCH", 3068 // "id": "servicebroker.projects.brokers.v2.service_instances.patch", 3069 // "parameterOrder": [ 3070 // "parent", 3071 // "instance_id" 3072 // ], 3073 // "parameters": { 3074 // "acceptsIncomplete": { 3075 // "description": "See CreateServiceInstanceRequest for details.", 3076 // "location": "query", 3077 // "type": "boolean" 3078 // }, 3079 // "instance_id": { 3080 // "description": "The id of the service instance. Must be unique within GCP project.\nMaximum length is 64, GUID recommended.\nRequired.", 3081 // "location": "path", 3082 // "pattern": "^[^/]+$", 3083 // "required": true, 3084 // "type": "string" 3085 // }, 3086 // "parent": { 3087 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 3088 // "location": "path", 3089 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 3090 // "required": true, 3091 // "type": "string" 3092 // } 3093 // }, 3094 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instance_id}", 3095 // "request": { 3096 // "$ref": "GoogleCloudServicebrokerV1alpha1__ServiceInstance" 3097 // }, 3098 // "response": { 3099 // "$ref": "GoogleCloudServicebrokerV1alpha1__UpdateServiceInstanceResponse" 3100 // }, 3101 // "scopes": [ 3102 // "https://www.googleapis.com/auth/cloud-platform" 3103 // ] 3104 // } 3105 3106 } 3107 3108 // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.create": 3109 3110 type ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall struct { 3111 s *Service 3112 parent string 3113 instanceId string 3114 bindingId string 3115 googlecloudservicebrokerv1alpha1__binding *GoogleCloudServicebrokerV1alpha1__Binding 3116 urlParams_ gensupport.URLParams 3117 ctx_ context.Context 3118 header_ http.Header 3119 } 3120 3121 // Create: CreateBinding generates a service binding to an existing 3122 // service instance. 3123 // See ProviServiceInstance for async operation details. 3124 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Create(parent string, instanceId string, bindingId string, googlecloudservicebrokerv1alpha1__binding *GoogleCloudServicebrokerV1alpha1__Binding) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall { 3125 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3126 c.parent = parent 3127 c.instanceId = instanceId 3128 c.bindingId = bindingId 3129 c.googlecloudservicebrokerv1alpha1__binding = googlecloudservicebrokerv1alpha1__binding 3130 return c 3131 } 3132 3133 // AcceptsIncomplete sets the optional parameter "acceptsIncomplete": 3134 // See CreateServiceInstanceRequest for details. 3135 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall { 3136 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete)) 3137 return c 3138 } 3139 3140 // Fields allows partial responses to be retrieved. See 3141 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3142 // for more information. 3143 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall { 3144 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3145 return c 3146 } 3147 3148 // Context sets the context to be used in this call's Do method. Any 3149 // pending HTTP request will be aborted if the provided context is 3150 // canceled. 3151 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall { 3152 c.ctx_ = ctx 3153 return c 3154 } 3155 3156 // Header returns an http.Header that can be modified by the caller to 3157 // add HTTP headers to the request. 3158 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Header() http.Header { 3159 if c.header_ == nil { 3160 c.header_ = make(http.Header) 3161 } 3162 return c.header_ 3163 } 3164 3165 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { 3166 reqHeaders := make(http.Header) 3167 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 3168 for k, v := range c.header_ { 3169 reqHeaders[k] = v 3170 } 3171 reqHeaders.Set("User-Agent", c.s.userAgent()) 3172 var body io.Reader = nil 3173 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1alpha1__binding) 3174 if err != nil { 3175 return nil, err 3176 } 3177 reqHeaders.Set("Content-Type", "application/json") 3178 c.urlParams_.Set("alt", alt) 3179 c.urlParams_.Set("prettyPrint", "false") 3180 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/service_bindings/{+binding_id}") 3181 urls += "?" + c.urlParams_.Encode() 3182 req, err := http.NewRequest("PUT", urls, body) 3183 if err != nil { 3184 return nil, err 3185 } 3186 req.Header = reqHeaders 3187 googleapi.Expand(req.URL, map[string]string{ 3188 "parent": c.parent, 3189 "instanceId": c.instanceId, 3190 "binding_id": c.bindingId, 3191 }) 3192 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3193 } 3194 3195 // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.create" call. 3196 // Exactly one of 3197 // *GoogleCloudServicebrokerV1alpha1__CreateBindingResponse or error 3198 // will be non-nil. Any non-2xx status code is an error. Response 3199 // headers are in either 3200 // *GoogleCloudServicebrokerV1alpha1__CreateBindingResponse.ServerRespons 3201 // e.Header or (if a response was returned at all) in 3202 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3203 // whether the returned error was because http.StatusNotModified was 3204 // returned. 3205 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__CreateBindingResponse, error) { 3206 gensupport.SetOptions(c.urlParams_, opts...) 3207 res, err := c.doRequest("json") 3208 if res != nil && res.StatusCode == http.StatusNotModified { 3209 if res.Body != nil { 3210 res.Body.Close() 3211 } 3212 return nil, &googleapi.Error{ 3213 Code: res.StatusCode, 3214 Header: res.Header, 3215 } 3216 } 3217 if err != nil { 3218 return nil, err 3219 } 3220 defer googleapi.CloseBody(res) 3221 if err := googleapi.CheckResponse(res); err != nil { 3222 return nil, err 3223 } 3224 ret := &GoogleCloudServicebrokerV1alpha1__CreateBindingResponse{ 3225 ServerResponse: googleapi.ServerResponse{ 3226 Header: res.Header, 3227 HTTPStatusCode: res.StatusCode, 3228 }, 3229 } 3230 target := &ret 3231 if err := gensupport.DecodeResponse(target, res); err != nil { 3232 return nil, err 3233 } 3234 return ret, nil 3235 // { 3236 // "description": "CreateBinding generates a service binding to an existing service instance.\nSee ProviServiceInstance for async operation details.", 3237 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}", 3238 // "httpMethod": "PUT", 3239 // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.create", 3240 // "parameterOrder": [ 3241 // "parent", 3242 // "instanceId", 3243 // "binding_id" 3244 // ], 3245 // "parameters": { 3246 // "acceptsIncomplete": { 3247 // "description": "See CreateServiceInstanceRequest for details.", 3248 // "location": "query", 3249 // "type": "boolean" 3250 // }, 3251 // "binding_id": { 3252 // "description": "The id of the binding. Must be unique within GCP project.\nMaximum length is 64, GUID recommended.\nRequired.", 3253 // "location": "path", 3254 // "pattern": "^[^/]+$", 3255 // "required": true, 3256 // "type": "string" 3257 // }, 3258 // "instanceId": { 3259 // "description": "The service instance to which to bind.", 3260 // "location": "path", 3261 // "pattern": "^[^/]+$", 3262 // "required": true, 3263 // "type": "string" 3264 // }, 3265 // "parent": { 3266 // "description": "The GCP container.\nMust match\n`projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 3267 // "location": "path", 3268 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 3269 // "required": true, 3270 // "type": "string" 3271 // } 3272 // }, 3273 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/service_bindings/{+binding_id}", 3274 // "request": { 3275 // "$ref": "GoogleCloudServicebrokerV1alpha1__Binding" 3276 // }, 3277 // "response": { 3278 // "$ref": "GoogleCloudServicebrokerV1alpha1__CreateBindingResponse" 3279 // }, 3280 // "scopes": [ 3281 // "https://www.googleapis.com/auth/cloud-platform" 3282 // ] 3283 // } 3284 3285 } 3286 3287 // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.delete": 3288 3289 type ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall struct { 3290 s *Service 3291 parent string 3292 instanceId string 3293 bindingId string 3294 urlParams_ gensupport.URLParams 3295 ctx_ context.Context 3296 header_ http.Header 3297 } 3298 3299 // Delete: Unbinds from a service instance. 3300 // For synchronous/asynchronous request details see 3301 // CreateServiceInstance 3302 // method. 3303 // If binding does not exist HTTP 410 status will be returned. 3304 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Delete(parent string, instanceId string, bindingId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall { 3305 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3306 c.parent = parent 3307 c.instanceId = instanceId 3308 c.bindingId = bindingId 3309 return c 3310 } 3311 3312 // AcceptsIncomplete sets the optional parameter "acceptsIncomplete": 3313 // See CreateServiceInstanceRequest for details. 3314 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall { 3315 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete)) 3316 return c 3317 } 3318 3319 // PlanId sets the optional parameter "planId": The plan id of the 3320 // service instance. 3321 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall { 3322 c.urlParams_.Set("planId", planId) 3323 return c 3324 } 3325 3326 // ServiceId sets the optional parameter "serviceId": Additional query 3327 // parameter hints. 3328 // The service id of the service instance. 3329 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall { 3330 c.urlParams_.Set("serviceId", serviceId) 3331 return c 3332 } 3333 3334 // Fields allows partial responses to be retrieved. See 3335 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3336 // for more information. 3337 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall { 3338 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3339 return c 3340 } 3341 3342 // Context sets the context to be used in this call's Do method. Any 3343 // pending HTTP request will be aborted if the provided context is 3344 // canceled. 3345 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall { 3346 c.ctx_ = ctx 3347 return c 3348 } 3349 3350 // Header returns an http.Header that can be modified by the caller to 3351 // add HTTP headers to the request. 3352 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Header() http.Header { 3353 if c.header_ == nil { 3354 c.header_ = make(http.Header) 3355 } 3356 return c.header_ 3357 } 3358 3359 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { 3360 reqHeaders := make(http.Header) 3361 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 3362 for k, v := range c.header_ { 3363 reqHeaders[k] = v 3364 } 3365 reqHeaders.Set("User-Agent", c.s.userAgent()) 3366 var body io.Reader = nil 3367 c.urlParams_.Set("alt", alt) 3368 c.urlParams_.Set("prettyPrint", "false") 3369 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{instanceId}/service_bindings/{bindingId}") 3370 urls += "?" + c.urlParams_.Encode() 3371 req, err := http.NewRequest("DELETE", urls, body) 3372 if err != nil { 3373 return nil, err 3374 } 3375 req.Header = reqHeaders 3376 googleapi.Expand(req.URL, map[string]string{ 3377 "parent": c.parent, 3378 "instanceId": c.instanceId, 3379 "bindingId": c.bindingId, 3380 }) 3381 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3382 } 3383 3384 // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.delete" call. 3385 // Exactly one of 3386 // *GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse or error 3387 // will be non-nil. Any non-2xx status code is an error. Response 3388 // headers are in either 3389 // *GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse.ServerRespons 3390 // e.Header or (if a response was returned at all) in 3391 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3392 // whether the returned error was because http.StatusNotModified was 3393 // returned. 3394 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse, error) { 3395 gensupport.SetOptions(c.urlParams_, opts...) 3396 res, err := c.doRequest("json") 3397 if res != nil && res.StatusCode == http.StatusNotModified { 3398 if res.Body != nil { 3399 res.Body.Close() 3400 } 3401 return nil, &googleapi.Error{ 3402 Code: res.StatusCode, 3403 Header: res.Header, 3404 } 3405 } 3406 if err != nil { 3407 return nil, err 3408 } 3409 defer googleapi.CloseBody(res) 3410 if err := googleapi.CheckResponse(res); err != nil { 3411 return nil, err 3412 } 3413 ret := &GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse{ 3414 ServerResponse: googleapi.ServerResponse{ 3415 Header: res.Header, 3416 HTTPStatusCode: res.StatusCode, 3417 }, 3418 } 3419 target := &ret 3420 if err := gensupport.DecodeResponse(target, res); err != nil { 3421 return nil, err 3422 } 3423 return ret, nil 3424 // { 3425 // "description": "Unbinds from a service instance.\nFor synchronous/asynchronous request details see CreateServiceInstance\nmethod.\nIf binding does not exist HTTP 410 status will be returned.", 3426 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{instanceId}/service_bindings/{bindingId}", 3427 // "httpMethod": "DELETE", 3428 // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.delete", 3429 // "parameterOrder": [ 3430 // "parent", 3431 // "instanceId", 3432 // "bindingId" 3433 // ], 3434 // "parameters": { 3435 // "acceptsIncomplete": { 3436 // "description": "See CreateServiceInstanceRequest for details.", 3437 // "location": "query", 3438 // "type": "boolean" 3439 // }, 3440 // "bindingId": { 3441 // "description": "The id of the binding to delete.", 3442 // "location": "path", 3443 // "required": true, 3444 // "type": "string" 3445 // }, 3446 // "instanceId": { 3447 // "description": "The service instance id that deleted binding is bound to.", 3448 // "location": "path", 3449 // "required": true, 3450 // "type": "string" 3451 // }, 3452 // "parent": { 3453 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 3454 // "location": "path", 3455 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 3456 // "required": true, 3457 // "type": "string" 3458 // }, 3459 // "planId": { 3460 // "description": "The plan id of the service instance.", 3461 // "location": "query", 3462 // "type": "string" 3463 // }, 3464 // "serviceId": { 3465 // "description": "Additional query parameter hints.\nThe service id of the service instance.", 3466 // "location": "query", 3467 // "type": "string" 3468 // } 3469 // }, 3470 // "path": "v1alpha1/{+parent}/v2/service_instances/{instanceId}/service_bindings/{bindingId}", 3471 // "response": { 3472 // "$ref": "GoogleCloudServicebrokerV1alpha1__DeleteBindingResponse" 3473 // }, 3474 // "scopes": [ 3475 // "https://www.googleapis.com/auth/cloud-platform" 3476 // ] 3477 // } 3478 3479 } 3480 3481 // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.get": 3482 3483 type ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall struct { 3484 s *Service 3485 parent string 3486 instanceId string 3487 bindingId string 3488 urlParams_ gensupport.URLParams 3489 ifNoneMatch_ string 3490 ctx_ context.Context 3491 header_ http.Header 3492 } 3493 3494 // Get: GetBinding returns the binding information. 3495 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Get(parent string, instanceId string, bindingId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall { 3496 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3497 c.parent = parent 3498 c.instanceId = instanceId 3499 c.bindingId = bindingId 3500 return c 3501 } 3502 3503 // PlanId sets the optional parameter "planId": Plan id. 3504 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall { 3505 c.urlParams_.Set("planId", planId) 3506 return c 3507 } 3508 3509 // ServiceId sets the optional parameter "serviceId": Service id. 3510 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall { 3511 c.urlParams_.Set("serviceId", serviceId) 3512 return c 3513 } 3514 3515 // Fields allows partial responses to be retrieved. See 3516 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3517 // for more information. 3518 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall { 3519 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3520 return c 3521 } 3522 3523 // IfNoneMatch sets the optional parameter which makes the operation 3524 // fail if the object's ETag matches the given value. This is useful for 3525 // getting updates only after the object has changed since the last 3526 // request. Use googleapi.IsNotModified to check whether the response 3527 // error from Do is the result of In-None-Match. 3528 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall { 3529 c.ifNoneMatch_ = entityTag 3530 return c 3531 } 3532 3533 // Context sets the context to be used in this call's Do method. Any 3534 // pending HTTP request will be aborted if the provided context is 3535 // canceled. 3536 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall { 3537 c.ctx_ = ctx 3538 return c 3539 } 3540 3541 // Header returns an http.Header that can be modified by the caller to 3542 // add HTTP headers to the request. 3543 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Header() http.Header { 3544 if c.header_ == nil { 3545 c.header_ = make(http.Header) 3546 } 3547 return c.header_ 3548 } 3549 3550 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { 3551 reqHeaders := make(http.Header) 3552 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 3553 for k, v := range c.header_ { 3554 reqHeaders[k] = v 3555 } 3556 reqHeaders.Set("User-Agent", c.s.userAgent()) 3557 if c.ifNoneMatch_ != "" { 3558 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3559 } 3560 var body io.Reader = nil 3561 c.urlParams_.Set("alt", alt) 3562 c.urlParams_.Set("prettyPrint", "false") 3563 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/service_bindings/{+bindingId}") 3564 urls += "?" + c.urlParams_.Encode() 3565 req, err := http.NewRequest("GET", urls, body) 3566 if err != nil { 3567 return nil, err 3568 } 3569 req.Header = reqHeaders 3570 googleapi.Expand(req.URL, map[string]string{ 3571 "parent": c.parent, 3572 "instanceId": c.instanceId, 3573 "bindingId": c.bindingId, 3574 }) 3575 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3576 } 3577 3578 // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.get" call. 3579 // Exactly one of *GoogleCloudServicebrokerV1alpha1__GetBindingResponse 3580 // or error will be non-nil. Any non-2xx status code is an error. 3581 // Response headers are in either 3582 // *GoogleCloudServicebrokerV1alpha1__GetBindingResponse.ServerResponse.H 3583 // eader or (if a response was returned at all) in 3584 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3585 // whether the returned error was because http.StatusNotModified was 3586 // returned. 3587 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__GetBindingResponse, error) { 3588 gensupport.SetOptions(c.urlParams_, opts...) 3589 res, err := c.doRequest("json") 3590 if res != nil && res.StatusCode == http.StatusNotModified { 3591 if res.Body != nil { 3592 res.Body.Close() 3593 } 3594 return nil, &googleapi.Error{ 3595 Code: res.StatusCode, 3596 Header: res.Header, 3597 } 3598 } 3599 if err != nil { 3600 return nil, err 3601 } 3602 defer googleapi.CloseBody(res) 3603 if err := googleapi.CheckResponse(res); err != nil { 3604 return nil, err 3605 } 3606 ret := &GoogleCloudServicebrokerV1alpha1__GetBindingResponse{ 3607 ServerResponse: googleapi.ServerResponse{ 3608 Header: res.Header, 3609 HTTPStatusCode: res.StatusCode, 3610 }, 3611 } 3612 target := &ret 3613 if err := gensupport.DecodeResponse(target, res); err != nil { 3614 return nil, err 3615 } 3616 return ret, nil 3617 // { 3618 // "description": "GetBinding returns the binding information.", 3619 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}", 3620 // "httpMethod": "GET", 3621 // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.get", 3622 // "parameterOrder": [ 3623 // "parent", 3624 // "instanceId", 3625 // "bindingId" 3626 // ], 3627 // "parameters": { 3628 // "bindingId": { 3629 // "description": "The binding id.", 3630 // "location": "path", 3631 // "pattern": "^[^/]+$", 3632 // "required": true, 3633 // "type": "string" 3634 // }, 3635 // "instanceId": { 3636 // "description": "Instance id to which the binding is bound.", 3637 // "location": "path", 3638 // "pattern": "^[^/]+$", 3639 // "required": true, 3640 // "type": "string" 3641 // }, 3642 // "parent": { 3643 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 3644 // "location": "path", 3645 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 3646 // "required": true, 3647 // "type": "string" 3648 // }, 3649 // "planId": { 3650 // "description": "Plan id.", 3651 // "location": "query", 3652 // "type": "string" 3653 // }, 3654 // "serviceId": { 3655 // "description": "Service id.", 3656 // "location": "query", 3657 // "type": "string" 3658 // } 3659 // }, 3660 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/service_bindings/{+bindingId}", 3661 // "response": { 3662 // "$ref": "GoogleCloudServicebrokerV1alpha1__GetBindingResponse" 3663 // }, 3664 // "scopes": [ 3665 // "https://www.googleapis.com/auth/cloud-platform" 3666 // ] 3667 // } 3668 3669 } 3670 3671 // method id "servicebroker.projects.brokers.v2.service_instances.service_bindings.getLast_operation": 3672 3673 type ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall struct { 3674 s *Service 3675 parent string 3676 instanceId string 3677 bindingId string 3678 urlParams_ gensupport.URLParams 3679 ifNoneMatch_ string 3680 ctx_ context.Context 3681 header_ http.Header 3682 } 3683 3684 // GetLastOperation: Returns the state of the last operation for the 3685 // binding. 3686 // Only last (or current) operation can be polled. 3687 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) GetLastOperation(parent string, instanceId string, bindingId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3688 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3689 c.parent = parent 3690 c.instanceId = instanceId 3691 c.bindingId = bindingId 3692 return c 3693 } 3694 3695 // Operation sets the optional parameter "operation": If `operation` was 3696 // returned during mutation operation, this field must be 3697 // populated with the provided value. 3698 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Operation(operation string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3699 c.urlParams_.Set("operation", operation) 3700 return c 3701 } 3702 3703 // PlanId sets the optional parameter "planId": Plan id. 3704 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3705 c.urlParams_.Set("planId", planId) 3706 return c 3707 } 3708 3709 // ServiceId sets the optional parameter "serviceId": Service id. 3710 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3711 c.urlParams_.Set("serviceId", serviceId) 3712 return c 3713 } 3714 3715 // Fields allows partial responses to be retrieved. See 3716 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3717 // for more information. 3718 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3719 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3720 return c 3721 } 3722 3723 // IfNoneMatch sets the optional parameter which makes the operation 3724 // fail if the object's ETag matches the given value. This is useful for 3725 // getting updates only after the object has changed since the last 3726 // request. Use googleapi.IsNotModified to check whether the response 3727 // error from Do is the result of In-None-Match. 3728 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3729 c.ifNoneMatch_ = entityTag 3730 return c 3731 } 3732 3733 // Context sets the context to be used in this call's Do method. Any 3734 // pending HTTP request will be aborted if the provided context is 3735 // canceled. 3736 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall { 3737 c.ctx_ = ctx 3738 return c 3739 } 3740 3741 // Header returns an http.Header that can be modified by the caller to 3742 // add HTTP headers to the request. 3743 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Header() http.Header { 3744 if c.header_ == nil { 3745 c.header_ = make(http.Header) 3746 } 3747 return c.header_ 3748 } 3749 3750 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) doRequest(alt string) (*http.Response, error) { 3751 reqHeaders := make(http.Header) 3752 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 3753 for k, v := range c.header_ { 3754 reqHeaders[k] = v 3755 } 3756 reqHeaders.Set("User-Agent", c.s.userAgent()) 3757 if c.ifNoneMatch_ != "" { 3758 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3759 } 3760 var body io.Reader = nil 3761 c.urlParams_.Set("alt", alt) 3762 c.urlParams_.Set("prettyPrint", "false") 3763 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/service_bindings/{+bindingId}/last_operation") 3764 urls += "?" + c.urlParams_.Encode() 3765 req, err := http.NewRequest("GET", urls, body) 3766 if err != nil { 3767 return nil, err 3768 } 3769 req.Header = reqHeaders 3770 googleapi.Expand(req.URL, map[string]string{ 3771 "parent": c.parent, 3772 "instanceId": c.instanceId, 3773 "bindingId": c.bindingId, 3774 }) 3775 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3776 } 3777 3778 // Do executes the "servicebroker.projects.brokers.v2.service_instances.service_bindings.getLast_operation" call. 3779 // Exactly one of *GoogleCloudServicebrokerV1alpha1__Operation or error 3780 // will be non-nil. Any non-2xx status code is an error. Response 3781 // headers are in either 3782 // *GoogleCloudServicebrokerV1alpha1__Operation.ServerResponse.Header or 3783 // (if a response was returned at all) in 3784 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3785 // whether the returned error was because http.StatusNotModified was 3786 // returned. 3787 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1alpha1__Operation, error) { 3788 gensupport.SetOptions(c.urlParams_, opts...) 3789 res, err := c.doRequest("json") 3790 if res != nil && res.StatusCode == http.StatusNotModified { 3791 if res.Body != nil { 3792 res.Body.Close() 3793 } 3794 return nil, &googleapi.Error{ 3795 Code: res.StatusCode, 3796 Header: res.Header, 3797 } 3798 } 3799 if err != nil { 3800 return nil, err 3801 } 3802 defer googleapi.CloseBody(res) 3803 if err := googleapi.CheckResponse(res); err != nil { 3804 return nil, err 3805 } 3806 ret := &GoogleCloudServicebrokerV1alpha1__Operation{ 3807 ServerResponse: googleapi.ServerResponse{ 3808 Header: res.Header, 3809 HTTPStatusCode: res.StatusCode, 3810 }, 3811 } 3812 target := &ret 3813 if err := gensupport.DecodeResponse(target, res); err != nil { 3814 return nil, err 3815 } 3816 return ret, nil 3817 // { 3818 // "description": "Returns the state of the last operation for the binding.\nOnly last (or current) operation can be polled.", 3819 // "flatPath": "v1alpha1/projects/{projectsId}/brokers/{brokersId}/v2/service_instances/{service_instancesId}/service_bindings/{service_bindingsId}/last_operation", 3820 // "httpMethod": "GET", 3821 // "id": "servicebroker.projects.brokers.v2.service_instances.service_bindings.getLast_operation", 3822 // "parameterOrder": [ 3823 // "parent", 3824 // "instanceId", 3825 // "bindingId" 3826 // ], 3827 // "parameters": { 3828 // "bindingId": { 3829 // "description": "The binding id for which to return the last operation", 3830 // "location": "path", 3831 // "pattern": "^[^/]+$", 3832 // "required": true, 3833 // "type": "string" 3834 // }, 3835 // "instanceId": { 3836 // "description": "The instance id that the binding is bound to.", 3837 // "location": "path", 3838 // "pattern": "^[^/]+$", 3839 // "required": true, 3840 // "type": "string" 3841 // }, 3842 // "operation": { 3843 // "description": "If `operation` was returned during mutation operation, this field must be\npopulated with the provided value.", 3844 // "location": "query", 3845 // "type": "string" 3846 // }, 3847 // "parent": { 3848 // "description": "Parent must match `projects/[PROJECT_ID]/brokers/[BROKER_ID]`.", 3849 // "location": "path", 3850 // "pattern": "^projects/[^/]+/brokers/[^/]+$", 3851 // "required": true, 3852 // "type": "string" 3853 // }, 3854 // "planId": { 3855 // "description": "Plan id.", 3856 // "location": "query", 3857 // "type": "string" 3858 // }, 3859 // "serviceId": { 3860 // "description": "Service id.", 3861 // "location": "query", 3862 // "type": "string" 3863 // } 3864 // }, 3865 // "path": "v1alpha1/{+parent}/v2/service_instances/{+instanceId}/service_bindings/{+bindingId}/last_operation", 3866 // "response": { 3867 // "$ref": "GoogleCloudServicebrokerV1alpha1__Operation" 3868 // }, 3869 // "scopes": [ 3870 // "https://www.googleapis.com/auth/cloud-platform" 3871 // ] 3872 // } 3873 3874 } 3875 3876 // method id "servicebroker.getIamPolicy": 3877 3878 type V1alpha1GetIamPolicyCall struct { 3879 s *Service 3880 resource string 3881 urlParams_ gensupport.URLParams 3882 ifNoneMatch_ string 3883 ctx_ context.Context 3884 header_ http.Header 3885 } 3886 3887 // GetIamPolicy: Gets the access control policy for a resource. 3888 // Returns an empty policy if the resource exists and does not have a 3889 // policy 3890 // set. 3891 func (r *V1alpha1Service) GetIamPolicy(resource string) *V1alpha1GetIamPolicyCall { 3892 c := &V1alpha1GetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3893 c.resource = resource 3894 return c 3895 } 3896 3897 // OptionsRequestedPolicyVersion sets the optional parameter 3898 // "options.requestedPolicyVersion": The policy format version to be 3899 // returned. 3900 // 3901 // Valid values are 0, 1, and 3. Requests specifying an invalid value 3902 // will be 3903 // rejected. 3904 // 3905 // Requests for policies with any conditional bindings must specify 3906 // version 3. 3907 // Policies without any conditional bindings may specify any valid value 3908 // or 3909 // leave the field unset. 3910 func (c *V1alpha1GetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *V1alpha1GetIamPolicyCall { 3911 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3912 return c 3913 } 3914 3915 // Fields allows partial responses to be retrieved. See 3916 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3917 // for more information. 3918 func (c *V1alpha1GetIamPolicyCall) Fields(s ...googleapi.Field) *V1alpha1GetIamPolicyCall { 3919 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3920 return c 3921 } 3922 3923 // IfNoneMatch sets the optional parameter which makes the operation 3924 // fail if the object's ETag matches the given value. This is useful for 3925 // getting updates only after the object has changed since the last 3926 // request. Use googleapi.IsNotModified to check whether the response 3927 // error from Do is the result of In-None-Match. 3928 func (c *V1alpha1GetIamPolicyCall) IfNoneMatch(entityTag string) *V1alpha1GetIamPolicyCall { 3929 c.ifNoneMatch_ = entityTag 3930 return c 3931 } 3932 3933 // Context sets the context to be used in this call's Do method. Any 3934 // pending HTTP request will be aborted if the provided context is 3935 // canceled. 3936 func (c *V1alpha1GetIamPolicyCall) Context(ctx context.Context) *V1alpha1GetIamPolicyCall { 3937 c.ctx_ = ctx 3938 return c 3939 } 3940 3941 // Header returns an http.Header that can be modified by the caller to 3942 // add HTTP headers to the request. 3943 func (c *V1alpha1GetIamPolicyCall) Header() http.Header { 3944 if c.header_ == nil { 3945 c.header_ = make(http.Header) 3946 } 3947 return c.header_ 3948 } 3949 3950 func (c *V1alpha1GetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3951 reqHeaders := make(http.Header) 3952 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 3953 for k, v := range c.header_ { 3954 reqHeaders[k] = v 3955 } 3956 reqHeaders.Set("User-Agent", c.s.userAgent()) 3957 if c.ifNoneMatch_ != "" { 3958 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3959 } 3960 var body io.Reader = nil 3961 c.urlParams_.Set("alt", alt) 3962 c.urlParams_.Set("prettyPrint", "false") 3963 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 3964 urls += "?" + c.urlParams_.Encode() 3965 req, err := http.NewRequest("GET", urls, body) 3966 if err != nil { 3967 return nil, err 3968 } 3969 req.Header = reqHeaders 3970 googleapi.Expand(req.URL, map[string]string{ 3971 "resource": c.resource, 3972 }) 3973 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3974 } 3975 3976 // Do executes the "servicebroker.getIamPolicy" call. 3977 // Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any 3978 // non-2xx status code is an error. Response headers are in either 3979 // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was 3980 // returned at all) in error.(*googleapi.Error).Header. Use 3981 // googleapi.IsNotModified to check whether the returned error was 3982 // because http.StatusNotModified was returned. 3983 func (c *V1alpha1GetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) { 3984 gensupport.SetOptions(c.urlParams_, opts...) 3985 res, err := c.doRequest("json") 3986 if res != nil && res.StatusCode == http.StatusNotModified { 3987 if res.Body != nil { 3988 res.Body.Close() 3989 } 3990 return nil, &googleapi.Error{ 3991 Code: res.StatusCode, 3992 Header: res.Header, 3993 } 3994 } 3995 if err != nil { 3996 return nil, err 3997 } 3998 defer googleapi.CloseBody(res) 3999 if err := googleapi.CheckResponse(res); err != nil { 4000 return nil, err 4001 } 4002 ret := &GoogleIamV1__Policy{ 4003 ServerResponse: googleapi.ServerResponse{ 4004 Header: res.Header, 4005 HTTPStatusCode: res.StatusCode, 4006 }, 4007 } 4008 target := &ret 4009 if err := gensupport.DecodeResponse(target, res); err != nil { 4010 return nil, err 4011 } 4012 return ret, nil 4013 // { 4014 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 4015 // "flatPath": "v1alpha1/{v1alpha1Id}:getIamPolicy", 4016 // "httpMethod": "GET", 4017 // "id": "servicebroker.getIamPolicy", 4018 // "parameterOrder": [ 4019 // "resource" 4020 // ], 4021 // "parameters": { 4022 // "options.requestedPolicyVersion": { 4023 // "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.", 4024 // "format": "int32", 4025 // "location": "query", 4026 // "type": "integer" 4027 // }, 4028 // "resource": { 4029 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 4030 // "location": "path", 4031 // "pattern": "^.+$", 4032 // "required": true, 4033 // "type": "string" 4034 // } 4035 // }, 4036 // "path": "v1alpha1/{+resource}:getIamPolicy", 4037 // "response": { 4038 // "$ref": "GoogleIamV1__Policy" 4039 // }, 4040 // "scopes": [ 4041 // "https://www.googleapis.com/auth/cloud-platform" 4042 // ] 4043 // } 4044 4045 } 4046 4047 // method id "servicebroker.setIamPolicy": 4048 4049 type V1alpha1SetIamPolicyCall struct { 4050 s *Service 4051 resource string 4052 googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest 4053 urlParams_ gensupport.URLParams 4054 ctx_ context.Context 4055 header_ http.Header 4056 } 4057 4058 // SetIamPolicy: Sets the access control policy on the specified 4059 // resource. Replaces any 4060 // existing policy. 4061 // 4062 // Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and 4063 // PERMISSION_DENIED 4064 func (r *V1alpha1Service) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *V1alpha1SetIamPolicyCall { 4065 c := &V1alpha1SetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4066 c.resource = resource 4067 c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest 4068 return c 4069 } 4070 4071 // Fields allows partial responses to be retrieved. See 4072 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4073 // for more information. 4074 func (c *V1alpha1SetIamPolicyCall) Fields(s ...googleapi.Field) *V1alpha1SetIamPolicyCall { 4075 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4076 return c 4077 } 4078 4079 // Context sets the context to be used in this call's Do method. Any 4080 // pending HTTP request will be aborted if the provided context is 4081 // canceled. 4082 func (c *V1alpha1SetIamPolicyCall) Context(ctx context.Context) *V1alpha1SetIamPolicyCall { 4083 c.ctx_ = ctx 4084 return c 4085 } 4086 4087 // Header returns an http.Header that can be modified by the caller to 4088 // add HTTP headers to the request. 4089 func (c *V1alpha1SetIamPolicyCall) Header() http.Header { 4090 if c.header_ == nil { 4091 c.header_ = make(http.Header) 4092 } 4093 return c.header_ 4094 } 4095 4096 func (c *V1alpha1SetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4097 reqHeaders := make(http.Header) 4098 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 4099 for k, v := range c.header_ { 4100 reqHeaders[k] = v 4101 } 4102 reqHeaders.Set("User-Agent", c.s.userAgent()) 4103 var body io.Reader = nil 4104 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest) 4105 if err != nil { 4106 return nil, err 4107 } 4108 reqHeaders.Set("Content-Type", "application/json") 4109 c.urlParams_.Set("alt", alt) 4110 c.urlParams_.Set("prettyPrint", "false") 4111 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") 4112 urls += "?" + c.urlParams_.Encode() 4113 req, err := http.NewRequest("POST", urls, body) 4114 if err != nil { 4115 return nil, err 4116 } 4117 req.Header = reqHeaders 4118 googleapi.Expand(req.URL, map[string]string{ 4119 "resource": c.resource, 4120 }) 4121 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4122 } 4123 4124 // Do executes the "servicebroker.setIamPolicy" call. 4125 // Exactly one of *GoogleIamV1__Policy or error will be non-nil. Any 4126 // non-2xx status code is an error. Response headers are in either 4127 // *GoogleIamV1__Policy.ServerResponse.Header or (if a response was 4128 // returned at all) in error.(*googleapi.Error).Header. Use 4129 // googleapi.IsNotModified to check whether the returned error was 4130 // because http.StatusNotModified was returned. 4131 func (c *V1alpha1SetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) { 4132 gensupport.SetOptions(c.urlParams_, opts...) 4133 res, err := c.doRequest("json") 4134 if res != nil && res.StatusCode == http.StatusNotModified { 4135 if res.Body != nil { 4136 res.Body.Close() 4137 } 4138 return nil, &googleapi.Error{ 4139 Code: res.StatusCode, 4140 Header: res.Header, 4141 } 4142 } 4143 if err != nil { 4144 return nil, err 4145 } 4146 defer googleapi.CloseBody(res) 4147 if err := googleapi.CheckResponse(res); err != nil { 4148 return nil, err 4149 } 4150 ret := &GoogleIamV1__Policy{ 4151 ServerResponse: googleapi.ServerResponse{ 4152 Header: res.Header, 4153 HTTPStatusCode: res.StatusCode, 4154 }, 4155 } 4156 target := &ret 4157 if err := gensupport.DecodeResponse(target, res); err != nil { 4158 return nil, err 4159 } 4160 return ret, nil 4161 // { 4162 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.\n\nCan return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED", 4163 // "flatPath": "v1alpha1/{v1alpha1Id}:setIamPolicy", 4164 // "httpMethod": "POST", 4165 // "id": "servicebroker.setIamPolicy", 4166 // "parameterOrder": [ 4167 // "resource" 4168 // ], 4169 // "parameters": { 4170 // "resource": { 4171 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 4172 // "location": "path", 4173 // "pattern": "^.+$", 4174 // "required": true, 4175 // "type": "string" 4176 // } 4177 // }, 4178 // "path": "v1alpha1/{+resource}:setIamPolicy", 4179 // "request": { 4180 // "$ref": "GoogleIamV1__SetIamPolicyRequest" 4181 // }, 4182 // "response": { 4183 // "$ref": "GoogleIamV1__Policy" 4184 // }, 4185 // "scopes": [ 4186 // "https://www.googleapis.com/auth/cloud-platform" 4187 // ] 4188 // } 4189 4190 } 4191 4192 // method id "servicebroker.testIamPermissions": 4193 4194 type V1alpha1TestIamPermissionsCall struct { 4195 s *Service 4196 resource string 4197 googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest 4198 urlParams_ gensupport.URLParams 4199 ctx_ context.Context 4200 header_ http.Header 4201 } 4202 4203 // TestIamPermissions: Returns permissions that a caller has on the 4204 // specified resource. 4205 // If the resource does not exist, this will return an empty set 4206 // of 4207 // permissions, not a NOT_FOUND error. 4208 // 4209 // Note: This operation is designed to be used for building 4210 // permission-aware 4211 // UIs and command-line tools, not for authorization checking. This 4212 // operation 4213 // may "fail open" without warning. 4214 func (r *V1alpha1Service) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *V1alpha1TestIamPermissionsCall { 4215 c := &V1alpha1TestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4216 c.resource = resource 4217 c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest 4218 return c 4219 } 4220 4221 // Fields allows partial responses to be retrieved. See 4222 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4223 // for more information. 4224 func (c *V1alpha1TestIamPermissionsCall) Fields(s ...googleapi.Field) *V1alpha1TestIamPermissionsCall { 4225 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4226 return c 4227 } 4228 4229 // Context sets the context to be used in this call's Do method. Any 4230 // pending HTTP request will be aborted if the provided context is 4231 // canceled. 4232 func (c *V1alpha1TestIamPermissionsCall) Context(ctx context.Context) *V1alpha1TestIamPermissionsCall { 4233 c.ctx_ = ctx 4234 return c 4235 } 4236 4237 // Header returns an http.Header that can be modified by the caller to 4238 // add HTTP headers to the request. 4239 func (c *V1alpha1TestIamPermissionsCall) Header() http.Header { 4240 if c.header_ == nil { 4241 c.header_ = make(http.Header) 4242 } 4243 return c.header_ 4244 } 4245 4246 func (c *V1alpha1TestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4247 reqHeaders := make(http.Header) 4248 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 4249 for k, v := range c.header_ { 4250 reqHeaders[k] = v 4251 } 4252 reqHeaders.Set("User-Agent", c.s.userAgent()) 4253 var body io.Reader = nil 4254 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest) 4255 if err != nil { 4256 return nil, err 4257 } 4258 reqHeaders.Set("Content-Type", "application/json") 4259 c.urlParams_.Set("alt", alt) 4260 c.urlParams_.Set("prettyPrint", "false") 4261 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") 4262 urls += "?" + c.urlParams_.Encode() 4263 req, err := http.NewRequest("POST", urls, body) 4264 if err != nil { 4265 return nil, err 4266 } 4267 req.Header = reqHeaders 4268 googleapi.Expand(req.URL, map[string]string{ 4269 "resource": c.resource, 4270 }) 4271 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4272 } 4273 4274 // Do executes the "servicebroker.testIamPermissions" call. 4275 // Exactly one of *GoogleIamV1__TestIamPermissionsResponse or error will 4276 // be non-nil. Any non-2xx status code is an error. Response headers are 4277 // in either 4278 // *GoogleIamV1__TestIamPermissionsResponse.ServerResponse.Header or (if 4279 // a response was returned at all) in error.(*googleapi.Error).Header. 4280 // Use googleapi.IsNotModified to check whether the returned error was 4281 // because http.StatusNotModified was returned. 4282 func (c *V1alpha1TestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) { 4283 gensupport.SetOptions(c.urlParams_, opts...) 4284 res, err := c.doRequest("json") 4285 if res != nil && res.StatusCode == http.StatusNotModified { 4286 if res.Body != nil { 4287 res.Body.Close() 4288 } 4289 return nil, &googleapi.Error{ 4290 Code: res.StatusCode, 4291 Header: res.Header, 4292 } 4293 } 4294 if err != nil { 4295 return nil, err 4296 } 4297 defer googleapi.CloseBody(res) 4298 if err := googleapi.CheckResponse(res); err != nil { 4299 return nil, err 4300 } 4301 ret := &GoogleIamV1__TestIamPermissionsResponse{ 4302 ServerResponse: googleapi.ServerResponse{ 4303 Header: res.Header, 4304 HTTPStatusCode: res.StatusCode, 4305 }, 4306 } 4307 target := &ret 4308 if err := gensupport.DecodeResponse(target, res); err != nil { 4309 return nil, err 4310 } 4311 return ret, nil 4312 // { 4313 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 4314 // "flatPath": "v1alpha1/{v1alpha1Id}:testIamPermissions", 4315 // "httpMethod": "POST", 4316 // "id": "servicebroker.testIamPermissions", 4317 // "parameterOrder": [ 4318 // "resource" 4319 // ], 4320 // "parameters": { 4321 // "resource": { 4322 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 4323 // "location": "path", 4324 // "pattern": "^.+$", 4325 // "required": true, 4326 // "type": "string" 4327 // } 4328 // }, 4329 // "path": "v1alpha1/{+resource}:testIamPermissions", 4330 // "request": { 4331 // "$ref": "GoogleIamV1__TestIamPermissionsRequest" 4332 // }, 4333 // "response": { 4334 // "$ref": "GoogleIamV1__TestIamPermissionsResponse" 4335 // }, 4336 // "scopes": [ 4337 // "https://www.googleapis.com/auth/cloud-platform" 4338 // ] 4339 // } 4340 4341 } 4342