1// Copyright 2019 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 container provides access to the Kubernetes Engine API. 8// 9// For product documentation, see: https://cloud.google.com/container-engine/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/container/v1beta1" 16// ... 17// ctx := context.Background() 18// containerService, err := container.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// containerService, err := container.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// containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package container // import "google.golang.org/api/container/v1beta1" 39 40import ( 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 gensupport "google.golang.org/api/gensupport" 53 googleapi "google.golang.org/api/googleapi" 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. 60var _ = bytes.NewBuffer 61var _ = strconv.Itoa 62var _ = fmt.Sprintf 63var _ = json.NewDecoder 64var _ = io.Copy 65var _ = url.Parse 66var _ = gensupport.MarshalJSON 67var _ = googleapi.Version 68var _ = errors.New 69var _ = strings.Replace 70var _ = context.Canceled 71 72const apiId = "container:v1beta1" 73const apiName = "container" 74const apiVersion = "v1beta1" 75const basePath = "https://container.googleapis.com/" 76 77// OAuth2 scopes used by this API. 78const ( 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. 84func 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. 109func 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 return s, nil 116} 117 118type Service struct { 119 client *http.Client 120 BasePath string // API endpoint base URL 121 UserAgent string // optional additional User-Agent fragment 122 123 Projects *ProjectsService 124} 125 126func (s *Service) userAgent() string { 127 if s.UserAgent == "" { 128 return googleapi.UserAgent 129 } 130 return googleapi.UserAgent + " " + s.UserAgent 131} 132 133func NewProjectsService(s *Service) *ProjectsService { 134 rs := &ProjectsService{s: s} 135 rs.Aggregated = NewProjectsAggregatedService(s) 136 rs.Locations = NewProjectsLocationsService(s) 137 rs.Zones = NewProjectsZonesService(s) 138 return rs 139} 140 141type ProjectsService struct { 142 s *Service 143 144 Aggregated *ProjectsAggregatedService 145 146 Locations *ProjectsLocationsService 147 148 Zones *ProjectsZonesService 149} 150 151func NewProjectsAggregatedService(s *Service) *ProjectsAggregatedService { 152 rs := &ProjectsAggregatedService{s: s} 153 rs.UsableSubnetworks = NewProjectsAggregatedUsableSubnetworksService(s) 154 return rs 155} 156 157type ProjectsAggregatedService struct { 158 s *Service 159 160 UsableSubnetworks *ProjectsAggregatedUsableSubnetworksService 161} 162 163func NewProjectsAggregatedUsableSubnetworksService(s *Service) *ProjectsAggregatedUsableSubnetworksService { 164 rs := &ProjectsAggregatedUsableSubnetworksService{s: s} 165 return rs 166} 167 168type ProjectsAggregatedUsableSubnetworksService struct { 169 s *Service 170} 171 172func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 173 rs := &ProjectsLocationsService{s: s} 174 rs.Clusters = NewProjectsLocationsClustersService(s) 175 rs.Operations = NewProjectsLocationsOperationsService(s) 176 return rs 177} 178 179type ProjectsLocationsService struct { 180 s *Service 181 182 Clusters *ProjectsLocationsClustersService 183 184 Operations *ProjectsLocationsOperationsService 185} 186 187func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { 188 rs := &ProjectsLocationsClustersService{s: s} 189 rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) 190 rs.WellKnown = NewProjectsLocationsClustersWellKnownService(s) 191 return rs 192} 193 194type ProjectsLocationsClustersService struct { 195 s *Service 196 197 NodePools *ProjectsLocationsClustersNodePoolsService 198 199 WellKnown *ProjectsLocationsClustersWellKnownService 200} 201 202func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { 203 rs := &ProjectsLocationsClustersNodePoolsService{s: s} 204 return rs 205} 206 207type ProjectsLocationsClustersNodePoolsService struct { 208 s *Service 209} 210 211func NewProjectsLocationsClustersWellKnownService(s *Service) *ProjectsLocationsClustersWellKnownService { 212 rs := &ProjectsLocationsClustersWellKnownService{s: s} 213 return rs 214} 215 216type ProjectsLocationsClustersWellKnownService struct { 217 s *Service 218} 219 220func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 221 rs := &ProjectsLocationsOperationsService{s: s} 222 return rs 223} 224 225type ProjectsLocationsOperationsService struct { 226 s *Service 227} 228 229func NewProjectsZonesService(s *Service) *ProjectsZonesService { 230 rs := &ProjectsZonesService{s: s} 231 rs.Clusters = NewProjectsZonesClustersService(s) 232 rs.Operations = NewProjectsZonesOperationsService(s) 233 return rs 234} 235 236type ProjectsZonesService struct { 237 s *Service 238 239 Clusters *ProjectsZonesClustersService 240 241 Operations *ProjectsZonesOperationsService 242} 243 244func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { 245 rs := &ProjectsZonesClustersService{s: s} 246 rs.NodePools = NewProjectsZonesClustersNodePoolsService(s) 247 return rs 248} 249 250type ProjectsZonesClustersService struct { 251 s *Service 252 253 NodePools *ProjectsZonesClustersNodePoolsService 254} 255 256func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService { 257 rs := &ProjectsZonesClustersNodePoolsService{s: s} 258 return rs 259} 260 261type ProjectsZonesClustersNodePoolsService struct { 262 s *Service 263} 264 265func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { 266 rs := &ProjectsZonesOperationsService{s: s} 267 return rs 268} 269 270type ProjectsZonesOperationsService struct { 271 s *Service 272} 273 274// AcceleratorConfig: AcceleratorConfig represents a Hardware 275// Accelerator request. 276type AcceleratorConfig struct { 277 // AcceleratorCount: The number of the accelerator cards exposed to an 278 // instance. 279 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` 280 281 // AcceleratorType: The accelerator type resource name. List of 282 // supported accelerators 283 // [here](/compute/docs/gpus/#Introduction) 284 AcceleratorType string `json:"acceleratorType,omitempty"` 285 286 // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to 287 // unconditionally include in API requests. By default, fields with 288 // empty values are omitted from API requests. However, any non-pointer, 289 // non-interface field appearing in ForceSendFields will be sent to the 290 // server regardless of whether the field is empty or not. This may be 291 // used to include empty fields in Patch requests. 292 ForceSendFields []string `json:"-"` 293 294 // NullFields is a list of field names (e.g. "AcceleratorCount") to 295 // include in API requests with the JSON null value. By default, fields 296 // with empty values are omitted from API requests. However, any field 297 // with an empty value appearing in NullFields will be sent to the 298 // server as null. It is an error if a field in this list has a 299 // non-empty value. This may be used to include null fields in Patch 300 // requests. 301 NullFields []string `json:"-"` 302} 303 304func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { 305 type NoMethod AcceleratorConfig 306 raw := NoMethod(*s) 307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 308} 309 310// AddonsConfig: Configuration for the addons that can be automatically 311// spun up in the 312// cluster, enabling additional functionality. 313type AddonsConfig struct { 314 // CloudRunConfig: Configuration for the Cloud Run addon. The 315 // `IstioConfig` addon must be 316 // enabled in order to enable Cloud Run addon. This option can only be 317 // enabled 318 // at cluster creation time. 319 CloudRunConfig *CloudRunConfig `json:"cloudRunConfig,omitempty"` 320 321 // HorizontalPodAutoscaling: Configuration for the horizontal pod 322 // autoscaling feature, which 323 // increases or decreases the number of replica pods a replication 324 // controller 325 // has based on the resource usage of the existing pods. 326 HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"` 327 328 // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing 329 // controller addon, which 330 // makes it easy to set up HTTP load balancers for services in a 331 // cluster. 332 HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` 333 334 // IstioConfig: Configuration for Istio, an open platform to connect, 335 // manage, and secure 336 // microservices. 337 IstioConfig *IstioConfig `json:"istioConfig,omitempty"` 338 339 // KubernetesDashboard: Configuration for the Kubernetes Dashboard. 340 // This addon is deprecated, and will be disabled in 1.15. It is 341 // recommended 342 // to use the Cloud Console to manage and monitor your Kubernetes 343 // clusters, 344 // workloads and applications. For more information, 345 // see: 346 // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboar 347 // ds 348 KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` 349 350 // NetworkPolicyConfig: Configuration for NetworkPolicy. This only 351 // tracks whether the addon 352 // is enabled or not on the Master, it does not track whether network 353 // policy 354 // is enabled for the nodes. 355 NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` 356 357 // ForceSendFields is a list of field names (e.g. "CloudRunConfig") to 358 // unconditionally include in API requests. By default, fields with 359 // empty values are omitted from API requests. However, any non-pointer, 360 // non-interface field appearing in ForceSendFields will be sent to the 361 // server regardless of whether the field is empty or not. This may be 362 // used to include empty fields in Patch requests. 363 ForceSendFields []string `json:"-"` 364 365 // NullFields is a list of field names (e.g. "CloudRunConfig") to 366 // include in API requests with the JSON null value. By default, fields 367 // with empty values are omitted from API requests. However, any field 368 // with an empty value appearing in NullFields will be sent to the 369 // server as null. It is an error if a field in this list has a 370 // non-empty value. This may be used to include null fields in Patch 371 // requests. 372 NullFields []string `json:"-"` 373} 374 375func (s *AddonsConfig) MarshalJSON() ([]byte, error) { 376 type NoMethod AddonsConfig 377 raw := NoMethod(*s) 378 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 379} 380 381// AuthenticatorGroupsConfig: Configuration for returning group 382// information from authenticators. 383type AuthenticatorGroupsConfig struct { 384 // Enabled: Whether this cluster should return group membership 385 // lookups 386 // during authentication using a group of security groups. 387 Enabled bool `json:"enabled,omitempty"` 388 389 // SecurityGroup: The name of the security group-of-groups to be used. 390 // Only relevant 391 // if enabled = true. 392 SecurityGroup string `json:"securityGroup,omitempty"` 393 394 // ForceSendFields is a list of field names (e.g. "Enabled") to 395 // unconditionally include in API requests. By default, fields with 396 // empty values are omitted from API requests. However, any non-pointer, 397 // non-interface field appearing in ForceSendFields will be sent to the 398 // server regardless of whether the field is empty or not. This may be 399 // used to include empty fields in Patch requests. 400 ForceSendFields []string `json:"-"` 401 402 // NullFields is a list of field names (e.g. "Enabled") to include in 403 // API requests with the JSON null value. By default, fields with empty 404 // values are omitted from API requests. However, any field with an 405 // empty value appearing in NullFields will be sent to the server as 406 // null. It is an error if a field in this list has a non-empty value. 407 // This may be used to include null fields in Patch requests. 408 NullFields []string `json:"-"` 409} 410 411func (s *AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { 412 type NoMethod AuthenticatorGroupsConfig 413 raw := NoMethod(*s) 414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 415} 416 417// AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for 418// the user to control how 419// the Auto Upgrades will proceed. 420type AutoUpgradeOptions struct { 421 // AutoUpgradeStartTime: [Output only] This field is set when upgrades 422 // are about to commence 423 // with the approximate start time for the upgrades, 424 // in 425 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 426 AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` 427 428 // Description: [Output only] This field is set when upgrades are about 429 // to commence 430 // with the description of the upgrade. 431 Description string `json:"description,omitempty"` 432 433 // ForceSendFields is a list of field names (e.g. 434 // "AutoUpgradeStartTime") to unconditionally include in API requests. 435 // By default, fields with empty values are omitted from API requests. 436 // However, any non-pointer, non-interface field appearing in 437 // ForceSendFields will be sent to the server regardless of whether the 438 // field is empty or not. This may be used to include empty fields in 439 // Patch requests. 440 ForceSendFields []string `json:"-"` 441 442 // NullFields is a list of field names (e.g. "AutoUpgradeStartTime") to 443 // include in API requests with the JSON null value. By default, fields 444 // with empty values are omitted from API requests. However, any field 445 // with an empty value appearing in NullFields will be sent to the 446 // server as null. It is an error if a field in this list has a 447 // non-empty value. This may be used to include null fields in Patch 448 // requests. 449 NullFields []string `json:"-"` 450} 451 452func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { 453 type NoMethod AutoUpgradeOptions 454 raw := NoMethod(*s) 455 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 456} 457 458// AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults 459// contains defaults for a node pool created 460// by NAP. 461type AutoprovisioningNodePoolDefaults struct { 462 // OauthScopes: Scopes that are used by NAP when creating node pools. If 463 // oauth_scopes are 464 // specified, service_account should be empty. 465 OauthScopes []string `json:"oauthScopes,omitempty"` 466 467 // ServiceAccount: The Google Cloud Platform Service Account to be used 468 // by the node VMs. If 469 // service_account is specified, scopes should be empty. 470 ServiceAccount string `json:"serviceAccount,omitempty"` 471 472 // ForceSendFields is a list of field names (e.g. "OauthScopes") to 473 // unconditionally include in API requests. By default, fields with 474 // empty values are omitted from API requests. However, any non-pointer, 475 // non-interface field appearing in ForceSendFields will be sent to the 476 // server regardless of whether the field is empty or not. This may be 477 // used to include empty fields in Patch requests. 478 ForceSendFields []string `json:"-"` 479 480 // NullFields is a list of field names (e.g. "OauthScopes") to include 481 // in API requests with the JSON null value. By default, fields with 482 // empty values are omitted from API requests. However, any field with 483 // an empty value appearing in NullFields will be sent to the server as 484 // null. It is an error if a field in this list has a non-empty value. 485 // This may be used to include null fields in Patch requests. 486 NullFields []string `json:"-"` 487} 488 489func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { 490 type NoMethod AutoprovisioningNodePoolDefaults 491 raw := NoMethod(*s) 492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 493} 494 495// BigQueryDestination: Parameters for using BigQuery as the destination 496// of resource usage export. 497type BigQueryDestination struct { 498 // DatasetId: The ID of a BigQuery Dataset. 499 DatasetId string `json:"datasetId,omitempty"` 500 501 // ForceSendFields is a list of field names (e.g. "DatasetId") to 502 // unconditionally include in API requests. By default, fields with 503 // empty values are omitted from API requests. However, any non-pointer, 504 // non-interface field appearing in ForceSendFields will be sent to the 505 // server regardless of whether the field is empty or not. This may be 506 // used to include empty fields in Patch requests. 507 ForceSendFields []string `json:"-"` 508 509 // NullFields is a list of field names (e.g. "DatasetId") to include in 510 // API requests with the JSON null value. By default, fields with empty 511 // values are omitted from API requests. However, any field with an 512 // empty value appearing in NullFields will be sent to the server as 513 // null. It is an error if a field in this list has a non-empty value. 514 // This may be used to include null fields in Patch requests. 515 NullFields []string `json:"-"` 516} 517 518func (s *BigQueryDestination) MarshalJSON() ([]byte, error) { 519 type NoMethod BigQueryDestination 520 raw := NoMethod(*s) 521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 522} 523 524// BinaryAuthorization: Configuration for Binary Authorization. 525type BinaryAuthorization struct { 526 // Enabled: Enable Binary Authorization for this cluster. If enabled, 527 // all container 528 // images will be validated by Google Binauthz. 529 Enabled bool `json:"enabled,omitempty"` 530 531 // ForceSendFields is a list of field names (e.g. "Enabled") to 532 // unconditionally include in API requests. By default, fields with 533 // empty values are omitted from API requests. However, any non-pointer, 534 // non-interface field appearing in ForceSendFields will be sent to the 535 // server regardless of whether the field is empty or not. This may be 536 // used to include empty fields in Patch requests. 537 ForceSendFields []string `json:"-"` 538 539 // NullFields is a list of field names (e.g. "Enabled") to include in 540 // API requests with the JSON null value. By default, fields with empty 541 // values are omitted from API requests. However, any field with an 542 // empty value appearing in NullFields will be sent to the server as 543 // null. It is an error if a field in this list has a non-empty value. 544 // This may be used to include null fields in Patch requests. 545 NullFields []string `json:"-"` 546} 547 548func (s *BinaryAuthorization) MarshalJSON() ([]byte, error) { 549 type NoMethod BinaryAuthorization 550 raw := NoMethod(*s) 551 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 552} 553 554// CancelOperationRequest: CancelOperationRequest cancels a single 555// operation. 556type CancelOperationRequest struct { 557 // Name: The name (project, location, operation id) of the operation to 558 // cancel. 559 // Specified in the format 'projects/*/locations/*/operations/*'. 560 Name string `json:"name,omitempty"` 561 562 // OperationId: Deprecated. The server-assigned `name` of the 563 // operation. 564 // This field has been deprecated and replaced by the name field. 565 OperationId string `json:"operationId,omitempty"` 566 567 // ProjectId: Deprecated. The Google Developers Console [project ID or 568 // project 569 // number](https://support.google.com/cloud/answer/6158840). 570 // This 571 // field has been deprecated and replaced by the name field. 572 ProjectId string `json:"projectId,omitempty"` 573 574 // Zone: Deprecated. The name of the Google Compute 575 // Engine 576 // [zone](/compute/docs/zones#available) in which the operation 577 // resides. 578 // This field has been deprecated and replaced by the name field. 579 Zone string `json:"zone,omitempty"` 580 581 // ForceSendFields is a list of field names (e.g. "Name") to 582 // unconditionally include in API requests. By default, fields with 583 // empty values are omitted from API requests. However, any non-pointer, 584 // non-interface field appearing in ForceSendFields will be sent to the 585 // server regardless of whether the field is empty or not. This may be 586 // used to include empty fields in Patch requests. 587 ForceSendFields []string `json:"-"` 588 589 // NullFields is a list of field names (e.g. "Name") to include in API 590 // requests with the JSON null value. By default, fields with empty 591 // values are omitted from API requests. However, any field with an 592 // empty value appearing in NullFields will be sent to the server as 593 // null. It is an error if a field in this list has a non-empty value. 594 // This may be used to include null fields in Patch requests. 595 NullFields []string `json:"-"` 596} 597 598func (s *CancelOperationRequest) MarshalJSON() ([]byte, error) { 599 type NoMethod CancelOperationRequest 600 raw := NoMethod(*s) 601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 602} 603 604// CidrBlock: CidrBlock contains an optional name and one CIDR block. 605type CidrBlock struct { 606 // CidrBlock: cidr_block must be specified in CIDR notation. 607 CidrBlock string `json:"cidrBlock,omitempty"` 608 609 // DisplayName: display_name is an optional field for users to identify 610 // CIDR blocks. 611 DisplayName string `json:"displayName,omitempty"` 612 613 // ForceSendFields is a list of field names (e.g. "CidrBlock") to 614 // unconditionally include in API requests. By default, fields with 615 // empty values are omitted from API requests. However, any non-pointer, 616 // non-interface field appearing in ForceSendFields will be sent to the 617 // server regardless of whether the field is empty or not. This may be 618 // used to include empty fields in Patch requests. 619 ForceSendFields []string `json:"-"` 620 621 // NullFields is a list of field names (e.g. "CidrBlock") to include in 622 // API requests with the JSON null value. By default, fields with empty 623 // values are omitted from API requests. However, any field with an 624 // empty value appearing in NullFields will be sent to the server as 625 // null. It is an error if a field in this list has a non-empty value. 626 // This may be used to include null fields in Patch requests. 627 NullFields []string `json:"-"` 628} 629 630func (s *CidrBlock) MarshalJSON() ([]byte, error) { 631 type NoMethod CidrBlock 632 raw := NoMethod(*s) 633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 634} 635 636// ClientCertificateConfig: Configuration for client certificates on the 637// cluster. 638type ClientCertificateConfig struct { 639 // IssueClientCertificate: Issue a client certificate. 640 IssueClientCertificate bool `json:"issueClientCertificate,omitempty"` 641 642 // ForceSendFields is a list of field names (e.g. 643 // "IssueClientCertificate") to unconditionally include in API requests. 644 // By default, fields with empty values are omitted from API requests. 645 // However, any non-pointer, non-interface field appearing in 646 // ForceSendFields will be sent to the server regardless of whether the 647 // field is empty or not. This may be used to include empty fields in 648 // Patch requests. 649 ForceSendFields []string `json:"-"` 650 651 // NullFields is a list of field names (e.g. "IssueClientCertificate") 652 // to include in API requests with the JSON null value. By default, 653 // fields with empty values are omitted from API requests. However, any 654 // field with an empty value appearing in NullFields will be sent to the 655 // server as null. It is an error if a field in this list has a 656 // non-empty value. This may be used to include null fields in Patch 657 // requests. 658 NullFields []string `json:"-"` 659} 660 661func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { 662 type NoMethod ClientCertificateConfig 663 raw := NoMethod(*s) 664 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 665} 666 667// CloudRunConfig: Configuration options for the Cloud Run feature. 668type CloudRunConfig struct { 669 // Disabled: Whether Cloud Run addon is enabled for this cluster. 670 Disabled bool `json:"disabled,omitempty"` 671 672 // ForceSendFields is a list of field names (e.g. "Disabled") to 673 // unconditionally include in API requests. By default, fields with 674 // empty values are omitted from API requests. However, any non-pointer, 675 // non-interface field appearing in ForceSendFields will be sent to the 676 // server regardless of whether the field is empty or not. This may be 677 // used to include empty fields in Patch requests. 678 ForceSendFields []string `json:"-"` 679 680 // NullFields is a list of field names (e.g. "Disabled") to include in 681 // API requests with the JSON null value. By default, fields with empty 682 // values are omitted from API requests. However, any field with an 683 // empty value appearing in NullFields will be sent to the server as 684 // null. It is an error if a field in this list has a non-empty value. 685 // This may be used to include null fields in Patch requests. 686 NullFields []string `json:"-"` 687} 688 689func (s *CloudRunConfig) MarshalJSON() ([]byte, error) { 690 type NoMethod CloudRunConfig 691 raw := NoMethod(*s) 692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 693} 694 695// Cluster: A Google Kubernetes Engine cluster. 696type Cluster struct { 697 // AddonsConfig: Configurations for the various addons available to run 698 // in the cluster. 699 AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` 700 701 // AuthenticatorGroupsConfig: Configuration controlling RBAC group 702 // membership information. 703 AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"authenticatorGroupsConfig,omitempty"` 704 705 // Autoscaling: Cluster-level autoscaling configuration. 706 Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"` 707 708 // BinaryAuthorization: Configuration for Binary Authorization. 709 BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` 710 711 // ClusterIpv4Cidr: The IP address range of the container pods in this 712 // cluster, 713 // in 714 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 715 // 716 // notation (e.g. `10.96.0.0/14`). Leave blank to have 717 // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. 718 ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` 719 720 // Conditions: Which conditions caused the current cluster state. 721 Conditions []*StatusCondition `json:"conditions,omitempty"` 722 723 // CreateTime: [Output only] The time the cluster was created, 724 // in 725 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 726 CreateTime string `json:"createTime,omitempty"` 727 728 // CurrentMasterVersion: [Output only] The current software version of 729 // the master endpoint. 730 CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` 731 732 // CurrentNodeCount: [Output only] The number of nodes currently in the 733 // cluster. Deprecated. 734 // Call Kubernetes API directly to retrieve node information. 735 CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` 736 737 // CurrentNodeVersion: [Output only] Deprecated, 738 // use 739 // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/ 740 // projects.locations.clusters.nodePools) 741 // instead. The current version of the node software components. 742 // If they are currently at multiple versions because they're in the 743 // process 744 // of being upgraded, this reflects the minimum version of all nodes. 745 CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` 746 747 // DatabaseEncryption: Configuration of etcd encryption. 748 DatabaseEncryption *DatabaseEncryption `json:"databaseEncryption,omitempty"` 749 750 // DefaultMaxPodsConstraint: The default constraint on the maximum 751 // number of pods that can be run 752 // simultaneously on a node in the node pool of this cluster. Only 753 // honored 754 // if cluster created with IP Alias support. 755 DefaultMaxPodsConstraint *MaxPodsConstraint `json:"defaultMaxPodsConstraint,omitempty"` 756 757 // Description: An optional description of this cluster. 758 Description string `json:"description,omitempty"` 759 760 // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this 761 // cluster. This includes alpha 762 // API groups (e.g. v1beta1) and features that may not be production 763 // ready in 764 // the kubernetes version of the master and nodes. 765 // The cluster has no SLA for uptime and master/node upgrades are 766 // disabled. 767 // Alpha enabled clusters are automatically deleted thirty days 768 // after 769 // creation. 770 EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` 771 772 // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. 773 EnableTpu bool `json:"enableTpu,omitempty"` 774 775 // Endpoint: [Output only] The IP address of this cluster's master 776 // endpoint. 777 // The endpoint can be accessed from the internet 778 // at 779 // `https://username:password@endpoint/`. 780 // 781 // See the `masterAuth` property of this resource for username 782 // and 783 // password information. 784 Endpoint string `json:"endpoint,omitempty"` 785 786 // ExpireTime: [Output only] The time the cluster will be 787 // automatically 788 // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text 789 // format. 790 ExpireTime string `json:"expireTime,omitempty"` 791 792 // InitialClusterVersion: The initial Kubernetes version for this 793 // cluster. Valid versions are those 794 // found in validMasterVersions returned by getServerConfig. The 795 // version can 796 // be upgraded over time; such upgrades are reflected 797 // in 798 // currentMasterVersion and currentNodeVersion. 799 // 800 // Users may specify either explicit versions offered by 801 // Kubernetes Engine or version aliases, which have the following 802 // behavior: 803 // 804 // - "latest": picks the highest valid Kubernetes version 805 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 806 // version 807 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 808 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 809 // - "","-": picks the default Kubernetes version 810 InitialClusterVersion string `json:"initialClusterVersion,omitempty"` 811 812 // InitialNodeCount: The number of nodes to create in this cluster. You 813 // must ensure that your 814 // Compute Engine <a href="/compute/docs/resource-quotas">resource 815 // quota</a> 816 // is sufficient for this number of instances. You must also have 817 // available 818 // firewall and routes quota. 819 // For requests, this field should only be used in lieu of a 820 // "node_pool" object, since this configuration (along with 821 // the 822 // "node_config") will be used to create a "NodePool" object with 823 // an 824 // auto-generated name. Do not use this and a node_pool at the same 825 // time. 826 // 827 // This field is deprecated, use node_pool.initial_node_count instead. 828 InitialNodeCount int64 `json:"initialNodeCount,omitempty"` 829 830 // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls. 831 InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` 832 833 // IpAllocationPolicy: Configuration for cluster IP allocation. 834 IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` 835 836 // LabelFingerprint: The fingerprint of the set of labels for this 837 // cluster. 838 LabelFingerprint string `json:"labelFingerprint,omitempty"` 839 840 // LegacyAbac: Configuration for the legacy ABAC authorization mode. 841 LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` 842 843 // Location: [Output only] The name of the Google Compute 844 // Engine 845 // [zone](/compute/docs/regions-zones/regions-zones#available) 846 // or 847 // [region](/compute/docs/regions-zones/regions-zones#available) in 848 // which 849 // the cluster resides. 850 Location string `json:"location,omitempty"` 851 852 // Locations: The list of Google Compute 853 // Engine 854 // [zones](/compute/docs/zones#available) in which the cluster's 855 // nodes 856 // should be located. 857 Locations []string `json:"locations,omitempty"` 858 859 // LoggingService: The logging service the cluster should use to write 860 // logs. 861 // Currently available options: 862 // 863 // * `logging.googleapis.com` - the Google Cloud Logging service. 864 // * `none` - no logs will be exported from the cluster. 865 // * if left as an empty string,`logging.googleapis.com` will be used. 866 LoggingService string `json:"loggingService,omitempty"` 867 868 // MaintenancePolicy: Configure the maintenance policy for this cluster. 869 MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` 870 871 // MasterAuth: The authentication information for accessing the master 872 // endpoint. 873 // If unspecified, the defaults are used: 874 // For clusters before v1.12, if master_auth is unspecified, `username` 875 // will 876 // be set to "admin", a random password will be generated, and a 877 // client 878 // certificate will be issued. 879 MasterAuth *MasterAuth `json:"masterAuth,omitempty"` 880 881 // MasterAuthorizedNetworksConfig: The configuration options for master 882 // authorized networks feature. 883 MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"` 884 885 // MasterIpv4CidrBlock: The IP prefix in CIDR notation to use for the 886 // hosted master network. 887 // This prefix will be used for assigning private IP addresses to 888 // the 889 // master or set of masters, as well as the ILB VIP. 890 // This field is deprecated, 891 // use 892 // private_cluster_config.master_ipv4_cidr_block instead. 893 MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` 894 895 // MonitoringService: The monitoring service the cluster should use to 896 // write metrics. 897 // Currently available options: 898 // 899 // * `monitoring.googleapis.com` - the Google Cloud Monitoring 900 // service. 901 // * `none` - no metrics will be exported from the cluster. 902 // * if left as an empty string, `monitoring.googleapis.com` will be 903 // used. 904 MonitoringService string `json:"monitoringService,omitempty"` 905 906 // Name: The name of this cluster. The name must be unique within this 907 // project 908 // and zone, and can be up to 40 characters with the following 909 // restrictions: 910 // 911 // * Lowercase letters, numbers, and hyphens only. 912 // * Must start with a letter. 913 // * Must end with a number or a letter. 914 Name string `json:"name,omitempty"` 915 916 // Network: The name of the Google Compute 917 // Engine 918 // [network](/compute/docs/networks-and-firewalls#networks) to which 919 // the 920 // cluster is connected. If left unspecified, the `default` network 921 // will be used. On output this shows the network ID instead of 922 // the name. 923 Network string `json:"network,omitempty"` 924 925 // NetworkConfig: Configuration for cluster networking. 926 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` 927 928 // NetworkPolicy: Configuration options for the NetworkPolicy feature. 929 NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` 930 931 // NodeConfig: Parameters used in creating the cluster's nodes. 932 // For requests, this field should only be used in lieu of a 933 // "node_pool" object, since this configuration (along with 934 // the 935 // "initial_node_count") will be used to create a "NodePool" object with 936 // an 937 // auto-generated name. Do not use this and a node_pool at the same 938 // time. 939 // For responses, this field will be populated with the node 940 // configuration of 941 // the first node pool. (For configuration of each node pool, 942 // see 943 // `node_pool.config`) 944 // 945 // If unspecified, the defaults are used. 946 // This field is deprecated, use node_pool.config instead. 947 NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` 948 949 // NodeIpv4CidrSize: [Output only] The size of the address space on each 950 // node for hosting 951 // containers. This is provisioned from within the 952 // `container_ipv4_cidr` 953 // range. This field will only be set when cluster is in route-based 954 // network 955 // mode. 956 NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` 957 958 // NodePools: The node pools associated with this cluster. 959 // This field should not be set if "node_config" or "initial_node_count" 960 // are 961 // specified. 962 NodePools []*NodePool `json:"nodePools,omitempty"` 963 964 // PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy 965 // feature. 966 PodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"podSecurityPolicyConfig,omitempty"` 967 968 // PrivateCluster: If this is a private cluster setup. Private clusters 969 // are clusters that, by 970 // default have no external IP addresses on the nodes and where nodes 971 // and the 972 // master communicate over private IP addresses. 973 // This field is deprecated, use 974 // private_cluster_config.enable_private_nodes 975 // instead. 976 PrivateCluster bool `json:"privateCluster,omitempty"` 977 978 // PrivateClusterConfig: Configuration for private cluster. 979 PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` 980 981 // ResourceLabels: The resource labels for the cluster to use to 982 // annotate any related 983 // Google Compute Engine resources. 984 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 985 986 // ResourceUsageExportConfig: Configuration for exporting resource 987 // usages. Resource usage export is 988 // disabled when this config unspecified. 989 ResourceUsageExportConfig *ResourceUsageExportConfig `json:"resourceUsageExportConfig,omitempty"` 990 991 // SelfLink: [Output only] Server-defined URL for the resource. 992 SelfLink string `json:"selfLink,omitempty"` 993 994 // ServicesIpv4Cidr: [Output only] The IP address range of the 995 // Kubernetes services in 996 // this cluster, 997 // in 998 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 999 // 1000 // notation (e.g. `1.2.3.4/29`). Service addresses are 1001 // typically put in the last `/16` from the container CIDR. 1002 ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` 1003 1004 // Status: [Output only] The current status of this cluster. 1005 // 1006 // Possible values: 1007 // "STATUS_UNSPECIFIED" - Not set. 1008 // "PROVISIONING" - The PROVISIONING state indicates the cluster is 1009 // being created. 1010 // "RUNNING" - The RUNNING state indicates the cluster has been 1011 // created and is fully 1012 // usable. 1013 // "RECONCILING" - The RECONCILING state indicates that some work is 1014 // actively being done on 1015 // the cluster, such as upgrading the master or node software. Details 1016 // can 1017 // be found in the `statusMessage` field. 1018 // "STOPPING" - The STOPPING state indicates the cluster is being 1019 // deleted. 1020 // "ERROR" - The ERROR state indicates the cluster may be unusable. 1021 // Details 1022 // can be found in the `statusMessage` field. 1023 // "DEGRADED" - The DEGRADED state indicates the cluster requires user 1024 // action to restore 1025 // full functionality. Details can be found in the `statusMessage` 1026 // field. 1027 Status string `json:"status,omitempty"` 1028 1029 // StatusMessage: [Output only] Additional information about the current 1030 // status of this 1031 // cluster, if available. 1032 StatusMessage string `json:"statusMessage,omitempty"` 1033 1034 // Subnetwork: The name of the Google Compute 1035 // Engine 1036 // [subnetwork](/compute/docs/subnetworks) to which the 1037 // cluster is connected. On output this shows the subnetwork ID instead 1038 // of 1039 // the name. 1040 Subnetwork string `json:"subnetwork,omitempty"` 1041 1042 // TierSettings: Cluster tier settings. 1043 TierSettings *TierSettings `json:"tierSettings,omitempty"` 1044 1045 // TpuIpv4CidrBlock: [Output only] The IP address range of the Cloud 1046 // TPUs in this cluster, 1047 // in 1048 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1049 // 1050 // notation (e.g. `1.2.3.4/29`). 1051 TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` 1052 1053 // VerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling 1054 // configuration. 1055 VerticalPodAutoscaling *VerticalPodAutoscaling `json:"verticalPodAutoscaling,omitempty"` 1056 1057 // WorkloadIdentityConfig: Configuration for the use of Kubernetes 1058 // Service Accounts in GCP IAM 1059 // policies. 1060 WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` 1061 1062 // Zone: [Output only] The name of the Google Compute 1063 // Engine 1064 // [zone](/compute/docs/zones#available) in which the 1065 // cluster 1066 // resides. 1067 // This field is deprecated, use location instead. 1068 Zone string `json:"zone,omitempty"` 1069 1070 // ServerResponse contains the HTTP response code and headers from the 1071 // server. 1072 googleapi.ServerResponse `json:"-"` 1073 1074 // ForceSendFields is a list of field names (e.g. "AddonsConfig") to 1075 // unconditionally include in API requests. By default, fields with 1076 // empty values are omitted from API requests. However, any non-pointer, 1077 // non-interface field appearing in ForceSendFields will be sent to the 1078 // server regardless of whether the field is empty or not. This may be 1079 // used to include empty fields in Patch requests. 1080 ForceSendFields []string `json:"-"` 1081 1082 // NullFields is a list of field names (e.g. "AddonsConfig") to include 1083 // in API requests with the JSON null value. By default, fields with 1084 // empty values are omitted from API requests. However, any field with 1085 // an empty value appearing in NullFields will be sent to the server as 1086 // null. It is an error if a field in this list has a non-empty value. 1087 // This may be used to include null fields in Patch requests. 1088 NullFields []string `json:"-"` 1089} 1090 1091func (s *Cluster) MarshalJSON() ([]byte, error) { 1092 type NoMethod Cluster 1093 raw := NoMethod(*s) 1094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1095} 1096 1097// ClusterAutoscaling: ClusterAutoscaling contains global, per-cluster 1098// information 1099// required by Cluster Autoscaler to automatically adjust 1100// the size of the cluster and create/delete 1101// node pools based on the current needs. 1102type ClusterAutoscaling struct { 1103 // AutoprovisioningLocations: The list of Google Compute Engine 1104 // [zones](/compute/docs/zones#available) 1105 // in which the NodePool's nodes can be created by NAP. 1106 AutoprovisioningLocations []string `json:"autoprovisioningLocations,omitempty"` 1107 1108 // AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults 1109 // contains defaults for a node pool 1110 // created by NAP. 1111 AutoprovisioningNodePoolDefaults *AutoprovisioningNodePoolDefaults `json:"autoprovisioningNodePoolDefaults,omitempty"` 1112 1113 // EnableNodeAutoprovisioning: Enables automatic node pool creation and 1114 // deletion. 1115 EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` 1116 1117 // ResourceLimits: Contains global constraints regarding minimum and 1118 // maximum 1119 // amount of resources in the cluster. 1120 ResourceLimits []*ResourceLimit `json:"resourceLimits,omitempty"` 1121 1122 // ForceSendFields is a list of field names (e.g. 1123 // "AutoprovisioningLocations") to unconditionally include in API 1124 // requests. By default, fields with empty values are omitted from API 1125 // requests. However, any non-pointer, non-interface field appearing in 1126 // ForceSendFields will be sent to the server regardless of whether the 1127 // field is empty or not. This may be used to include empty fields in 1128 // Patch requests. 1129 ForceSendFields []string `json:"-"` 1130 1131 // NullFields is a list of field names (e.g. 1132 // "AutoprovisioningLocations") to include in API requests with the JSON 1133 // null value. By default, fields with empty values are omitted from API 1134 // requests. However, any field with an empty value appearing in 1135 // NullFields will be sent to the server as null. It is an error if a 1136 // field in this list has a non-empty value. This may be used to include 1137 // null fields in Patch requests. 1138 NullFields []string `json:"-"` 1139} 1140 1141func (s *ClusterAutoscaling) MarshalJSON() ([]byte, error) { 1142 type NoMethod ClusterAutoscaling 1143 raw := NoMethod(*s) 1144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1145} 1146 1147// ClusterUpdate: ClusterUpdate describes an update to the cluster. 1148// Exactly one update can 1149// be applied to a cluster with each request, so at most one field can 1150// be 1151// provided. 1152type ClusterUpdate struct { 1153 // DesiredAddonsConfig: Configurations for the various addons available 1154 // to run in the cluster. 1155 DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` 1156 1157 // DesiredBinaryAuthorization: The desired configuration options for the 1158 // Binary Authorization feature. 1159 DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"` 1160 1161 // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. 1162 DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` 1163 1164 // DesiredDatabaseEncryption: Configuration of etcd encryption. 1165 DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` 1166 1167 // DesiredImageType: The desired image type for the node pool. 1168 // NOTE: Set the "desired_node_pool" field as well. 1169 DesiredImageType string `json:"desiredImageType,omitempty"` 1170 1171 // DesiredIntraNodeVisibilityConfig: The desired config of Intra-node 1172 // visibility. 1173 DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"` 1174 1175 // DesiredLocations: The desired list of Google Compute 1176 // Engine 1177 // [zones](/compute/docs/zones#available) in which the cluster's 1178 // nodes 1179 // should be located. Changing the locations a cluster is in will 1180 // result 1181 // in nodes being either created or removed from the cluster, depending 1182 // on 1183 // whether locations are being added or removed. 1184 // 1185 // This list must always include the cluster's primary zone. 1186 DesiredLocations []string `json:"desiredLocations,omitempty"` 1187 1188 // DesiredLoggingService: The logging service the cluster should use to 1189 // write metrics. 1190 // Currently available options: 1191 // 1192 // * "logging.googleapis.com/kubernetes" - the Google Cloud 1193 // Logging 1194 // service with Kubernetes-native resource model in Stackdriver 1195 // * "logging.googleapis.com" - the Google Cloud Logging service 1196 // * "none" - no logs will be exported from the cluster 1197 DesiredLoggingService string `json:"desiredLoggingService,omitempty"` 1198 1199 // DesiredMasterAuthorizedNetworksConfig: The desired configuration 1200 // options for master authorized networks feature. 1201 DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` 1202 1203 // DesiredMasterVersion: The Kubernetes version to change the master to. 1204 // The only valid value is the 1205 // latest supported version. 1206 // 1207 // Users may specify either explicit versions offered by 1208 // Kubernetes Engine or version aliases, which have the following 1209 // behavior: 1210 // 1211 // - "latest": picks the highest valid Kubernetes version 1212 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 1213 // version 1214 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 1215 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 1216 // - "-": picks the default Kubernetes version 1217 DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` 1218 1219 // DesiredMonitoringService: The monitoring service the cluster should 1220 // use to write metrics. 1221 // Currently available options: 1222 // 1223 // * "monitoring.googleapis.com/kubernetes" - the Google Cloud 1224 // Monitoring 1225 // service with Kubernetes-native resource model in Stackdriver 1226 // * "monitoring.googleapis.com" - the Google Cloud Monitoring service 1227 // * "none" - no metrics will be exported from the cluster 1228 DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` 1229 1230 // DesiredNodePoolAutoscaling: Autoscaler configuration for the node 1231 // pool specified in 1232 // desired_node_pool_id. If there is only one pool in the 1233 // cluster and desired_node_pool_id is not provided then 1234 // the change applies to that single node pool. 1235 DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"` 1236 1237 // DesiredNodePoolId: The node pool to be upgraded. This field is 1238 // mandatory if 1239 // "desired_node_version", 1240 // "desired_image_family", 1241 // "desired_node_pool_autoscaling", or 1242 // "desired_workload_metadata_config" 1243 // is specified and there is more than one node pool on the cluster. 1244 DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` 1245 1246 // DesiredNodeVersion: The Kubernetes version to change the nodes to 1247 // (typically an 1248 // upgrade). 1249 // 1250 // Users may specify either explicit versions offered by 1251 // Kubernetes Engine or version aliases, which have the following 1252 // behavior: 1253 // 1254 // - "latest": picks the highest valid Kubernetes version 1255 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 1256 // version 1257 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 1258 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 1259 // - "-": picks the Kubernetes master version 1260 DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` 1261 1262 // DesiredPodSecurityPolicyConfig: The desired configuration options for 1263 // the PodSecurityPolicy feature. 1264 DesiredPodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"desiredPodSecurityPolicyConfig,omitempty"` 1265 1266 // DesiredPrivateClusterConfig: The desired private cluster 1267 // configuration. 1268 DesiredPrivateClusterConfig *PrivateClusterConfig `json:"desiredPrivateClusterConfig,omitempty"` 1269 1270 // DesiredResourceUsageExportConfig: The desired configuration for 1271 // exporting resource usage. 1272 DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"` 1273 1274 // DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling 1275 // configuration. 1276 DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"` 1277 1278 // DesiredWorkloadIdentityConfig: Configuration for Workload Identity. 1279 DesiredWorkloadIdentityConfig *WorkloadIdentityConfig `json:"desiredWorkloadIdentityConfig,omitempty"` 1280 1281 // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig") 1282 // to unconditionally include in API requests. By default, fields with 1283 // empty values are omitted from API requests. However, any non-pointer, 1284 // non-interface field appearing in ForceSendFields will be sent to the 1285 // server regardless of whether the field is empty or not. This may be 1286 // used to include empty fields in Patch requests. 1287 ForceSendFields []string `json:"-"` 1288 1289 // NullFields is a list of field names (e.g. "DesiredAddonsConfig") to 1290 // include in API requests with the JSON null value. By default, fields 1291 // with empty values are omitted from API requests. However, any field 1292 // with an empty value appearing in NullFields will be sent to the 1293 // server as null. It is an error if a field in this list has a 1294 // non-empty value. This may be used to include null fields in Patch 1295 // requests. 1296 NullFields []string `json:"-"` 1297} 1298 1299func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { 1300 type NoMethod ClusterUpdate 1301 raw := NoMethod(*s) 1302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1303} 1304 1305// CompleteIPRotationRequest: CompleteIPRotationRequest moves the 1306// cluster master back into single-IP mode. 1307type CompleteIPRotationRequest struct { 1308 // ClusterId: Deprecated. The name of the cluster. 1309 // This field has been deprecated and replaced by the name field. 1310 ClusterId string `json:"clusterId,omitempty"` 1311 1312 // Name: The name (project, location, cluster id) of the cluster to 1313 // complete IP 1314 // rotation. Specified in the format 1315 // 'projects/*/locations/*/clusters/*'. 1316 Name string `json:"name,omitempty"` 1317 1318 // ProjectId: Deprecated. The Google Developers Console [project ID or 1319 // project 1320 // number](https://developers.google.com/console/help/new/#projec 1321 // tnumber). 1322 // This field has been deprecated and replaced by the name field. 1323 ProjectId string `json:"projectId,omitempty"` 1324 1325 // Zone: Deprecated. The name of the Google Compute 1326 // Engine 1327 // [zone](/compute/docs/zones#available) in which the 1328 // cluster 1329 // resides. 1330 // This field has been deprecated and replaced by the name field. 1331 Zone string `json:"zone,omitempty"` 1332 1333 // ForceSendFields is a list of field names (e.g. "ClusterId") to 1334 // unconditionally include in API requests. By default, fields with 1335 // empty values are omitted from API requests. However, any non-pointer, 1336 // non-interface field appearing in ForceSendFields will be sent to the 1337 // server regardless of whether the field is empty or not. This may be 1338 // used to include empty fields in Patch requests. 1339 ForceSendFields []string `json:"-"` 1340 1341 // NullFields is a list of field names (e.g. "ClusterId") to include in 1342 // API requests with the JSON null value. By default, fields with empty 1343 // values are omitted from API requests. However, any field with an 1344 // empty value appearing in NullFields will be sent to the server as 1345 // null. It is an error if a field in this list has a non-empty value. 1346 // This may be used to include null fields in Patch requests. 1347 NullFields []string `json:"-"` 1348} 1349 1350func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { 1351 type NoMethod CompleteIPRotationRequest 1352 raw := NoMethod(*s) 1353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1354} 1355 1356// ConsumptionMeteringConfig: Parameters for controlling consumption 1357// metering. 1358type ConsumptionMeteringConfig struct { 1359 // Enabled: Whether to enable consumption metering for this cluster. If 1360 // enabled, a 1361 // second BigQuery table will be created to hold resource 1362 // consumption 1363 // records. 1364 Enabled bool `json:"enabled,omitempty"` 1365 1366 // ForceSendFields is a list of field names (e.g. "Enabled") to 1367 // unconditionally include in API requests. By default, fields with 1368 // empty values are omitted from API requests. However, any non-pointer, 1369 // non-interface field appearing in ForceSendFields will be sent to the 1370 // server regardless of whether the field is empty or not. This may be 1371 // used to include empty fields in Patch requests. 1372 ForceSendFields []string `json:"-"` 1373 1374 // NullFields is a list of field names (e.g. "Enabled") to include in 1375 // API requests with the JSON null value. By default, fields with empty 1376 // values are omitted from API requests. However, any field with an 1377 // empty value appearing in NullFields will be sent to the server as 1378 // null. It is an error if a field in this list has a non-empty value. 1379 // This may be used to include null fields in Patch requests. 1380 NullFields []string `json:"-"` 1381} 1382 1383func (s *ConsumptionMeteringConfig) MarshalJSON() ([]byte, error) { 1384 type NoMethod ConsumptionMeteringConfig 1385 raw := NoMethod(*s) 1386 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1387} 1388 1389// CreateClusterRequest: CreateClusterRequest creates a cluster. 1390type CreateClusterRequest struct { 1391 // Cluster: A 1392 // [cluster 1393 // resource](/container-engine/reference/rest/v1beta1/projects.z 1394 // ones.clusters) 1395 Cluster *Cluster `json:"cluster,omitempty"` 1396 1397 // Parent: The parent (project and location) where the cluster will be 1398 // created. 1399 // Specified in the format 'projects/*/locations/*'. 1400 Parent string `json:"parent,omitempty"` 1401 1402 // ProjectId: Deprecated. The Google Developers Console [project ID or 1403 // project 1404 // number](https://support.google.com/cloud/answer/6158840). 1405 // This 1406 // field has been deprecated and replaced by the parent field. 1407 ProjectId string `json:"projectId,omitempty"` 1408 1409 // Zone: Deprecated. The name of the Google Compute 1410 // Engine 1411 // [zone](/compute/docs/zones#available) in which the 1412 // cluster 1413 // resides. 1414 // This field has been deprecated and replaced by the parent field. 1415 Zone string `json:"zone,omitempty"` 1416 1417 // ForceSendFields is a list of field names (e.g. "Cluster") to 1418 // unconditionally include in API requests. By default, fields with 1419 // empty values are omitted from API requests. However, any non-pointer, 1420 // non-interface field appearing in ForceSendFields will be sent to the 1421 // server regardless of whether the field is empty or not. This may be 1422 // used to include empty fields in Patch requests. 1423 ForceSendFields []string `json:"-"` 1424 1425 // NullFields is a list of field names (e.g. "Cluster") to include in 1426 // API requests with the JSON null value. By default, fields with empty 1427 // values are omitted from API requests. However, any field with an 1428 // empty value appearing in NullFields will be sent to the server as 1429 // null. It is an error if a field in this list has a non-empty value. 1430 // This may be used to include null fields in Patch requests. 1431 NullFields []string `json:"-"` 1432} 1433 1434func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { 1435 type NoMethod CreateClusterRequest 1436 raw := NoMethod(*s) 1437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1438} 1439 1440// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for 1441// a cluster. 1442type CreateNodePoolRequest struct { 1443 // ClusterId: Deprecated. The name of the cluster. 1444 // This field has been deprecated and replaced by the parent field. 1445 ClusterId string `json:"clusterId,omitempty"` 1446 1447 // NodePool: The node pool to create. 1448 NodePool *NodePool `json:"nodePool,omitempty"` 1449 1450 // Parent: The parent (project, location, cluster id) where the node 1451 // pool will be 1452 // created. Specified in the format 1453 // 'projects/*/locations/*/clusters/*'. 1454 Parent string `json:"parent,omitempty"` 1455 1456 // ProjectId: Deprecated. The Google Developers Console [project ID or 1457 // project 1458 // number](https://developers.google.com/console/help/new/#projec 1459 // tnumber). 1460 // This field has been deprecated and replaced by the parent field. 1461 ProjectId string `json:"projectId,omitempty"` 1462 1463 // Zone: Deprecated. The name of the Google Compute 1464 // Engine 1465 // [zone](/compute/docs/zones#available) in which the 1466 // cluster 1467 // resides. 1468 // This field has been deprecated and replaced by the parent field. 1469 Zone string `json:"zone,omitempty"` 1470 1471 // ForceSendFields is a list of field names (e.g. "ClusterId") to 1472 // unconditionally include in API requests. By default, fields with 1473 // empty values are omitted from API requests. However, any non-pointer, 1474 // non-interface field appearing in ForceSendFields will be sent to the 1475 // server regardless of whether the field is empty or not. This may be 1476 // used to include empty fields in Patch requests. 1477 ForceSendFields []string `json:"-"` 1478 1479 // NullFields is a list of field names (e.g. "ClusterId") to include in 1480 // API requests with the JSON null value. By default, fields with empty 1481 // values are omitted from API requests. However, any field with an 1482 // empty value appearing in NullFields will be sent to the server as 1483 // null. It is an error if a field in this list has a non-empty value. 1484 // This may be used to include null fields in Patch requests. 1485 NullFields []string `json:"-"` 1486} 1487 1488func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { 1489 type NoMethod CreateNodePoolRequest 1490 raw := NoMethod(*s) 1491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1492} 1493 1494// DailyMaintenanceWindow: Time window specified for daily maintenance 1495// operations. 1496type DailyMaintenanceWindow struct { 1497 // Duration: [Output only] Duration of the time window, automatically 1498 // chosen to be 1499 // smallest possible in the given scenario. 1500 Duration string `json:"duration,omitempty"` 1501 1502 // StartTime: Time within the maintenance window to start the 1503 // maintenance operations. 1504 // It must be in format "HH:MM", where HH : [00-23] and MM : [00-59] 1505 // GMT. 1506 StartTime string `json:"startTime,omitempty"` 1507 1508 // ForceSendFields is a list of field names (e.g. "Duration") to 1509 // unconditionally include in API requests. By default, fields with 1510 // empty values are omitted from API requests. However, any non-pointer, 1511 // non-interface field appearing in ForceSendFields will be sent to the 1512 // server regardless of whether the field is empty or not. This may be 1513 // used to include empty fields in Patch requests. 1514 ForceSendFields []string `json:"-"` 1515 1516 // NullFields is a list of field names (e.g. "Duration") to include in 1517 // API requests with the JSON null value. By default, fields with empty 1518 // values are omitted from API requests. However, any field with an 1519 // empty value appearing in NullFields will be sent to the server as 1520 // null. It is an error if a field in this list has a non-empty value. 1521 // This may be used to include null fields in Patch requests. 1522 NullFields []string `json:"-"` 1523} 1524 1525func (s *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) { 1526 type NoMethod DailyMaintenanceWindow 1527 raw := NoMethod(*s) 1528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1529} 1530 1531// DatabaseEncryption: Configuration of etcd encryption. 1532type DatabaseEncryption struct { 1533 // KeyName: Name of CloudKMS key to use for the encryption of secrets in 1534 // etcd. 1535 // Ex. 1536 // projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-ke 1537 // y 1538 KeyName string `json:"keyName,omitempty"` 1539 1540 // State: Denotes the state of etcd encryption. 1541 // 1542 // Possible values: 1543 // "UNKNOWN" - Should never be set 1544 // "ENCRYPTED" - Secrets in etcd are encrypted. 1545 // "DECRYPTED" - Secrets in etcd are stored in plain text (at etcd 1546 // level) - this is 1547 // unrelated to Google Compute Engine level full disk encryption. 1548 State string `json:"state,omitempty"` 1549 1550 // ForceSendFields is a list of field names (e.g. "KeyName") to 1551 // unconditionally include in API requests. By default, fields with 1552 // empty values are omitted from API requests. However, any non-pointer, 1553 // non-interface field appearing in ForceSendFields will be sent to the 1554 // server regardless of whether the field is empty or not. This may be 1555 // used to include empty fields in Patch requests. 1556 ForceSendFields []string `json:"-"` 1557 1558 // NullFields is a list of field names (e.g. "KeyName") to include in 1559 // API requests with the JSON null value. By default, fields with empty 1560 // values are omitted from API requests. However, any field with an 1561 // empty value appearing in NullFields will be sent to the server as 1562 // null. It is an error if a field in this list has a non-empty value. 1563 // This may be used to include null fields in Patch requests. 1564 NullFields []string `json:"-"` 1565} 1566 1567func (s *DatabaseEncryption) MarshalJSON() ([]byte, error) { 1568 type NoMethod DatabaseEncryption 1569 raw := NoMethod(*s) 1570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1571} 1572 1573// Empty: A generic empty message that you can re-use to avoid defining 1574// duplicated 1575// empty messages in your APIs. A typical example is to use it as the 1576// request 1577// or the response type of an API method. For instance: 1578// 1579// service Foo { 1580// rpc Bar(google.protobuf.Empty) returns 1581// (google.protobuf.Empty); 1582// } 1583// 1584// The JSON representation for `Empty` is empty JSON object `{}`. 1585type Empty struct { 1586 // ServerResponse contains the HTTP response code and headers from the 1587 // server. 1588 googleapi.ServerResponse `json:"-"` 1589} 1590 1591// GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web 1592// Key Set as specififed in rfc 7517 1593type GetJSONWebKeysResponse struct { 1594 // Keys: The public component of the keys used by the cluster to sign 1595 // token 1596 // requests. 1597 Keys []*Jwk `json:"keys,omitempty"` 1598 1599 // ServerResponse contains the HTTP response code and headers from the 1600 // server. 1601 googleapi.ServerResponse `json:"-"` 1602 1603 // ForceSendFields is a list of field names (e.g. "Keys") to 1604 // unconditionally include in API requests. By default, fields with 1605 // empty values are omitted from API requests. However, any non-pointer, 1606 // non-interface field appearing in ForceSendFields will be sent to the 1607 // server regardless of whether the field is empty or not. This may be 1608 // used to include empty fields in Patch requests. 1609 ForceSendFields []string `json:"-"` 1610 1611 // NullFields is a list of field names (e.g. "Keys") to include in API 1612 // requests with the JSON null value. By default, fields with empty 1613 // values are omitted from API requests. However, any field with an 1614 // empty value appearing in NullFields will be sent to the server as 1615 // null. It is an error if a field in this list has a non-empty value. 1616 // This may be used to include null fields in Patch requests. 1617 NullFields []string `json:"-"` 1618} 1619 1620func (s *GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { 1621 type NoMethod GetJSONWebKeysResponse 1622 raw := NoMethod(*s) 1623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1624} 1625 1626// GetOpenIDConfigResponse: GetOpenIDConfigResponse is an OIDC discovery 1627// document for the cluster. 1628// See the OpenID Connect Discovery 1.0 specification for details. 1629type GetOpenIDConfigResponse struct { 1630 // ClaimsSupported: Supported claims. 1631 ClaimsSupported []string `json:"claims_supported,omitempty"` 1632 1633 // GrantTypes: Supported grant types. 1634 GrantTypes []string `json:"grant_types,omitempty"` 1635 1636 // IdTokenSigningAlgValuesSupported: supported ID Token signing 1637 // Algorithms. 1638 IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` 1639 1640 // Issuer: OIDC Issuer. 1641 Issuer string `json:"issuer,omitempty"` 1642 1643 // JwksUri: JSON Web Key uri. 1644 JwksUri string `json:"jwks_uri,omitempty"` 1645 1646 // ResponseTypesSupported: Supported response types. 1647 ResponseTypesSupported []string `json:"response_types_supported,omitempty"` 1648 1649 // SubjectTypesSupported: Supported subject types. 1650 SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` 1651 1652 // ServerResponse contains the HTTP response code and headers from the 1653 // server. 1654 googleapi.ServerResponse `json:"-"` 1655 1656 // ForceSendFields is a list of field names (e.g. "ClaimsSupported") to 1657 // unconditionally include in API requests. By default, fields with 1658 // empty values are omitted from API requests. However, any non-pointer, 1659 // non-interface field appearing in ForceSendFields will be sent to the 1660 // server regardless of whether the field is empty or not. This may be 1661 // used to include empty fields in Patch requests. 1662 ForceSendFields []string `json:"-"` 1663 1664 // NullFields is a list of field names (e.g. "ClaimsSupported") to 1665 // include in API requests with the JSON null value. By default, fields 1666 // with empty values are omitted from API requests. However, any field 1667 // with an empty value appearing in NullFields will be sent to the 1668 // server as null. It is an error if a field in this list has a 1669 // non-empty value. This may be used to include null fields in Patch 1670 // requests. 1671 NullFields []string `json:"-"` 1672} 1673 1674func (s *GetOpenIDConfigResponse) MarshalJSON() ([]byte, error) { 1675 type NoMethod GetOpenIDConfigResponse 1676 raw := NoMethod(*s) 1677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1678} 1679 1680// HorizontalPodAutoscaling: Configuration options for the horizontal 1681// pod autoscaling feature, which 1682// increases or decreases the number of replica pods a replication 1683// controller 1684// has based on the resource usage of the existing pods. 1685type HorizontalPodAutoscaling struct { 1686 // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled 1687 // in the cluster. 1688 // When enabled, it ensures that a Heapster pod is running in the 1689 // cluster, 1690 // which is also used by the Cloud Monitoring service. 1691 Disabled bool `json:"disabled,omitempty"` 1692 1693 // ForceSendFields is a list of field names (e.g. "Disabled") to 1694 // unconditionally include in API requests. By default, fields with 1695 // empty values are omitted from API requests. However, any non-pointer, 1696 // non-interface field appearing in ForceSendFields will be sent to the 1697 // server regardless of whether the field is empty or not. This may be 1698 // used to include empty fields in Patch requests. 1699 ForceSendFields []string `json:"-"` 1700 1701 // NullFields is a list of field names (e.g. "Disabled") to include in 1702 // API requests with the JSON null value. By default, fields with empty 1703 // values are omitted from API requests. However, any field with an 1704 // empty value appearing in NullFields will be sent to the server as 1705 // null. It is an error if a field in this list has a non-empty value. 1706 // This may be used to include null fields in Patch requests. 1707 NullFields []string `json:"-"` 1708} 1709 1710func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { 1711 type NoMethod HorizontalPodAutoscaling 1712 raw := NoMethod(*s) 1713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1714} 1715 1716// HttpLoadBalancing: Configuration options for the HTTP (L7) load 1717// balancing controller addon, 1718// which makes it easy to set up HTTP load balancers for services in a 1719// cluster. 1720type HttpLoadBalancing struct { 1721 // Disabled: Whether the HTTP Load Balancing controller is enabled in 1722 // the cluster. 1723 // When enabled, it runs a small pod in the cluster that manages the 1724 // load 1725 // balancers. 1726 Disabled bool `json:"disabled,omitempty"` 1727 1728 // ForceSendFields is a list of field names (e.g. "Disabled") to 1729 // unconditionally include in API requests. By default, fields with 1730 // empty values are omitted from API requests. However, any non-pointer, 1731 // non-interface field appearing in ForceSendFields will be sent to the 1732 // server regardless of whether the field is empty or not. This may be 1733 // used to include empty fields in Patch requests. 1734 ForceSendFields []string `json:"-"` 1735 1736 // NullFields is a list of field names (e.g. "Disabled") to include in 1737 // API requests with the JSON null value. By default, fields with empty 1738 // values are omitted from API requests. However, any field with an 1739 // empty value appearing in NullFields will be sent to the server as 1740 // null. It is an error if a field in this list has a non-empty value. 1741 // This may be used to include null fields in Patch requests. 1742 NullFields []string `json:"-"` 1743} 1744 1745func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { 1746 type NoMethod HttpLoadBalancing 1747 raw := NoMethod(*s) 1748 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1749} 1750 1751// IPAllocationPolicy: Configuration for controlling how IPs are 1752// allocated in the cluster. 1753type IPAllocationPolicy struct { 1754 // AllowRouteOverlap: If true, allow allocation of cluster CIDR ranges 1755 // that overlap with certain 1756 // kinds of network routes. By default we do not allow cluster CIDR 1757 // ranges to 1758 // intersect with any user declared routes. With allow_route_overlap == 1759 // true, 1760 // we allow overlapping with CIDR ranges that are larger than the 1761 // cluster CIDR 1762 // range. 1763 // 1764 // If this field is set to true, then cluster and services CIDRs must 1765 // be 1766 // fully-specified (e.g. `10.96.0.0/14`, but not `/14`), which means: 1767 // 1) When `use_ip_aliases` is true, `cluster_ipv4_cidr_block` and 1768 // `services_ipv4_cidr_block` must be fully-specified. 1769 // 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse 1770 // be 1771 // fully-specified. 1772 AllowRouteOverlap bool `json:"allowRouteOverlap,omitempty"` 1773 1774 // ClusterIpv4Cidr: This field is deprecated, use 1775 // cluster_ipv4_cidr_block. 1776 ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` 1777 1778 // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs. 1779 // If this field is set, then 1780 // `cluster.cluster_ipv4_cidr` must be left blank. 1781 // 1782 // This field is only applicable when `use_ip_aliases` is true. 1783 // 1784 // Set to blank to have a range chosen with the default size. 1785 // 1786 // Set to /netmask (e.g. `/14`) to have a range chosen with a 1787 // specific 1788 // netmask. 1789 // 1790 // Set to 1791 // a 1792 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1793 // 1794 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 1795 // (e.g. 1796 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 1797 // range 1798 // to use. 1799 ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` 1800 1801 // ClusterSecondaryRangeName: The name of the secondary range to be used 1802 // for the cluster CIDR 1803 // block. The secondary range will be used for pod IP 1804 // addresses. This must be an existing secondary range associated 1805 // with the cluster subnetwork. 1806 // 1807 // This field is only applicable with use_ip_aliases 1808 // and 1809 // create_subnetwork is false. 1810 ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` 1811 1812 // CreateSubnetwork: Whether a new subnetwork will be created 1813 // automatically for the cluster. 1814 // 1815 // This field is only applicable when `use_ip_aliases` is true. 1816 CreateSubnetwork bool `json:"createSubnetwork,omitempty"` 1817 1818 // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block. 1819 NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` 1820 1821 // NodeIpv4CidrBlock: The IP address range of the instance IPs in this 1822 // cluster. 1823 // 1824 // This is applicable only if `create_subnetwork` is true. 1825 // 1826 // Set to blank to have a range chosen with the default size. 1827 // 1828 // Set to /netmask (e.g. `/14`) to have a range chosen with a 1829 // specific 1830 // netmask. 1831 // 1832 // Set to 1833 // a 1834 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1835 // 1836 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 1837 // (e.g. 1838 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 1839 // range 1840 // to use. 1841 NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"` 1842 1843 // ServicesIpv4Cidr: This field is deprecated, use 1844 // services_ipv4_cidr_block. 1845 ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` 1846 1847 // ServicesIpv4CidrBlock: The IP address range of the services IPs in 1848 // this cluster. If blank, a range 1849 // will be automatically chosen with the default size. 1850 // 1851 // This field is only applicable when `use_ip_aliases` is true. 1852 // 1853 // Set to blank to have a range chosen with the default size. 1854 // 1855 // Set to /netmask (e.g. `/14`) to have a range chosen with a 1856 // specific 1857 // netmask. 1858 // 1859 // Set to 1860 // a 1861 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1862 // 1863 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 1864 // (e.g. 1865 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 1866 // range 1867 // to use. 1868 ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` 1869 1870 // ServicesSecondaryRangeName: The name of the secondary range to be 1871 // used as for the services 1872 // CIDR block. The secondary range will be used for service 1873 // ClusterIPs. This must be an existing secondary range associated 1874 // with the cluster subnetwork. 1875 // 1876 // This field is only applicable with use_ip_aliases 1877 // and 1878 // create_subnetwork is false. 1879 ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` 1880 1881 // SubnetworkName: A custom subnetwork name to be used if 1882 // `create_subnetwork` is true. If 1883 // this field is empty, then an automatic name will be chosen for the 1884 // new 1885 // subnetwork. 1886 SubnetworkName string `json:"subnetworkName,omitempty"` 1887 1888 // TpuIpv4CidrBlock: The IP address range of the Cloud TPUs in this 1889 // cluster. If unspecified, a 1890 // range will be automatically chosen with the default size. 1891 // 1892 // This field is only applicable when `use_ip_aliases` is true. 1893 // 1894 // If unspecified, the range will use the default size. 1895 // 1896 // Set to /netmask (e.g. `/14`) to have a range chosen with a 1897 // specific 1898 // netmask. 1899 // 1900 // Set to 1901 // a 1902 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1903 // 1904 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 1905 // (e.g. 1906 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 1907 // range 1908 // to use. 1909 TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` 1910 1911 // UseIpAliases: Whether alias IPs will be used for pod IPs in the 1912 // cluster. 1913 UseIpAliases bool `json:"useIpAliases,omitempty"` 1914 1915 // ForceSendFields is a list of field names (e.g. "AllowRouteOverlap") 1916 // to unconditionally include in API requests. By default, fields with 1917 // empty values are omitted from API requests. However, any non-pointer, 1918 // non-interface field appearing in ForceSendFields will be sent to the 1919 // server regardless of whether the field is empty or not. This may be 1920 // used to include empty fields in Patch requests. 1921 ForceSendFields []string `json:"-"` 1922 1923 // NullFields is a list of field names (e.g. "AllowRouteOverlap") to 1924 // include in API requests with the JSON null value. By default, fields 1925 // with empty values are omitted from API requests. However, any field 1926 // with an empty value appearing in NullFields will be sent to the 1927 // server as null. It is an error if a field in this list has a 1928 // non-empty value. This may be used to include null fields in Patch 1929 // requests. 1930 NullFields []string `json:"-"` 1931} 1932 1933func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { 1934 type NoMethod IPAllocationPolicy 1935 raw := NoMethod(*s) 1936 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1937} 1938 1939// IntraNodeVisibilityConfig: IntraNodeVisibilityConfig contains the 1940// desired config of the intra-node 1941// visibility on this cluster. 1942type IntraNodeVisibilityConfig struct { 1943 // Enabled: Enables intra node visibility for this cluster. 1944 Enabled bool `json:"enabled,omitempty"` 1945 1946 // ForceSendFields is a list of field names (e.g. "Enabled") to 1947 // unconditionally include in API requests. By default, fields with 1948 // empty values are omitted from API requests. However, any non-pointer, 1949 // non-interface field appearing in ForceSendFields will be sent to the 1950 // server regardless of whether the field is empty or not. This may be 1951 // used to include empty fields in Patch requests. 1952 ForceSendFields []string `json:"-"` 1953 1954 // NullFields is a list of field names (e.g. "Enabled") to include in 1955 // API requests with the JSON null value. By default, fields with empty 1956 // values are omitted from API requests. However, any field with an 1957 // empty value appearing in NullFields will be sent to the server as 1958 // null. It is an error if a field in this list has a non-empty value. 1959 // This may be used to include null fields in Patch requests. 1960 NullFields []string `json:"-"` 1961} 1962 1963func (s *IntraNodeVisibilityConfig) MarshalJSON() ([]byte, error) { 1964 type NoMethod IntraNodeVisibilityConfig 1965 raw := NoMethod(*s) 1966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1967} 1968 1969// IstioConfig: Configuration options for Istio addon. 1970type IstioConfig struct { 1971 // Auth: The specified Istio auth mode, either none, or mutual TLS. 1972 // 1973 // Possible values: 1974 // "AUTH_NONE" - auth not enabled 1975 // "AUTH_MUTUAL_TLS" - auth mutual TLS enabled 1976 Auth string `json:"auth,omitempty"` 1977 1978 // Disabled: Whether Istio is enabled for this cluster. 1979 Disabled bool `json:"disabled,omitempty"` 1980 1981 // ForceSendFields is a list of field names (e.g. "Auth") to 1982 // unconditionally include in API requests. By default, fields with 1983 // empty values are omitted from API requests. However, any non-pointer, 1984 // non-interface field appearing in ForceSendFields will be sent to the 1985 // server regardless of whether the field is empty or not. This may be 1986 // used to include empty fields in Patch requests. 1987 ForceSendFields []string `json:"-"` 1988 1989 // NullFields is a list of field names (e.g. "Auth") to include in API 1990 // requests with the JSON null value. By default, fields with empty 1991 // values are omitted from API requests. However, any field with an 1992 // empty value appearing in NullFields will be sent to the server as 1993 // null. It is an error if a field in this list has a non-empty value. 1994 // This may be used to include null fields in Patch requests. 1995 NullFields []string `json:"-"` 1996} 1997 1998func (s *IstioConfig) MarshalJSON() ([]byte, error) { 1999 type NoMethod IstioConfig 2000 raw := NoMethod(*s) 2001 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2002} 2003 2004// Jwk: Jwk is a JSON Web Key as specified in RFC 7517 2005type Jwk struct { 2006 // Alg: Algorithm. 2007 Alg string `json:"alg,omitempty"` 2008 2009 // Crv: Used for ECDSA keys. 2010 Crv string `json:"crv,omitempty"` 2011 2012 // E: Used for RSA keys. 2013 E string `json:"e,omitempty"` 2014 2015 // Kid: Key ID. 2016 Kid string `json:"kid,omitempty"` 2017 2018 // Kty: Key Type. 2019 Kty string `json:"kty,omitempty"` 2020 2021 // N: Used for RSA keys. 2022 N string `json:"n,omitempty"` 2023 2024 // Use: Permitted uses for the public keys. 2025 Use string `json:"use,omitempty"` 2026 2027 // X: Used for ECDSA keys. 2028 X string `json:"x,omitempty"` 2029 2030 // Y: Used for ECDSA keys. 2031 Y string `json:"y,omitempty"` 2032 2033 // ForceSendFields is a list of field names (e.g. "Alg") to 2034 // unconditionally include in API requests. By default, fields with 2035 // empty values are omitted from API requests. However, any non-pointer, 2036 // non-interface field appearing in ForceSendFields will be sent to the 2037 // server regardless of whether the field is empty or not. This may be 2038 // used to include empty fields in Patch requests. 2039 ForceSendFields []string `json:"-"` 2040 2041 // NullFields is a list of field names (e.g. "Alg") to include in API 2042 // requests with the JSON null value. By default, fields with empty 2043 // values are omitted from API requests. However, any field with an 2044 // empty value appearing in NullFields will be sent to the server as 2045 // null. It is an error if a field in this list has a non-empty value. 2046 // This may be used to include null fields in Patch requests. 2047 NullFields []string `json:"-"` 2048} 2049 2050func (s *Jwk) MarshalJSON() ([]byte, error) { 2051 type NoMethod Jwk 2052 raw := NoMethod(*s) 2053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2054} 2055 2056// KubernetesDashboard: Configuration for the Kubernetes Dashboard. 2057type KubernetesDashboard struct { 2058 // Disabled: Whether the Kubernetes Dashboard is enabled for this 2059 // cluster. 2060 Disabled bool `json:"disabled,omitempty"` 2061 2062 // ForceSendFields is a list of field names (e.g. "Disabled") to 2063 // unconditionally include in API requests. By default, fields with 2064 // empty values are omitted from API requests. However, any non-pointer, 2065 // non-interface field appearing in ForceSendFields will be sent to the 2066 // server regardless of whether the field is empty or not. This may be 2067 // used to include empty fields in Patch requests. 2068 ForceSendFields []string `json:"-"` 2069 2070 // NullFields is a list of field names (e.g. "Disabled") to include in 2071 // API requests with the JSON null value. By default, fields with empty 2072 // values are omitted from API requests. However, any field with an 2073 // empty value appearing in NullFields will be sent to the server as 2074 // null. It is an error if a field in this list has a non-empty value. 2075 // This may be used to include null fields in Patch requests. 2076 NullFields []string `json:"-"` 2077} 2078 2079func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) { 2080 type NoMethod KubernetesDashboard 2081 raw := NoMethod(*s) 2082 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2083} 2084 2085// LegacyAbac: Configuration for the legacy Attribute Based Access 2086// Control authorization 2087// mode. 2088type LegacyAbac struct { 2089 // Enabled: Whether the ABAC authorizer is enabled for this cluster. 2090 // When enabled, 2091 // identities in the system, including service accounts, nodes, 2092 // and 2093 // controllers, will have statically granted permissions beyond 2094 // those 2095 // provided by the RBAC configuration or IAM. 2096 Enabled bool `json:"enabled,omitempty"` 2097 2098 // ForceSendFields is a list of field names (e.g. "Enabled") to 2099 // unconditionally include in API requests. By default, fields with 2100 // empty values are omitted from API requests. However, any non-pointer, 2101 // non-interface field appearing in ForceSendFields will be sent to the 2102 // server regardless of whether the field is empty or not. This may be 2103 // used to include empty fields in Patch requests. 2104 ForceSendFields []string `json:"-"` 2105 2106 // NullFields is a list of field names (e.g. "Enabled") to include in 2107 // API requests with the JSON null value. By default, fields with empty 2108 // values are omitted from API requests. However, any field with an 2109 // empty value appearing in NullFields will be sent to the server as 2110 // null. It is an error if a field in this list has a non-empty value. 2111 // This may be used to include null fields in Patch requests. 2112 NullFields []string `json:"-"` 2113} 2114 2115func (s *LegacyAbac) MarshalJSON() ([]byte, error) { 2116 type NoMethod LegacyAbac 2117 raw := NoMethod(*s) 2118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2119} 2120 2121// ListClustersResponse: ListClustersResponse is the result of 2122// ListClustersRequest. 2123type ListClustersResponse struct { 2124 // Clusters: A list of clusters in the project in the specified zone, 2125 // or 2126 // across all ones. 2127 Clusters []*Cluster `json:"clusters,omitempty"` 2128 2129 // MissingZones: If any zones are listed here, the list of clusters 2130 // returned 2131 // may be missing those zones. 2132 MissingZones []string `json:"missingZones,omitempty"` 2133 2134 // ServerResponse contains the HTTP response code and headers from the 2135 // server. 2136 googleapi.ServerResponse `json:"-"` 2137 2138 // ForceSendFields is a list of field names (e.g. "Clusters") to 2139 // unconditionally include in API requests. By default, fields with 2140 // empty values are omitted from API requests. However, any non-pointer, 2141 // non-interface field appearing in ForceSendFields will be sent to the 2142 // server regardless of whether the field is empty or not. This may be 2143 // used to include empty fields in Patch requests. 2144 ForceSendFields []string `json:"-"` 2145 2146 // NullFields is a list of field names (e.g. "Clusters") to include in 2147 // API requests with the JSON null value. By default, fields with empty 2148 // values are omitted from API requests. However, any field with an 2149 // empty value appearing in NullFields will be sent to the server as 2150 // null. It is an error if a field in this list has a non-empty value. 2151 // This may be used to include null fields in Patch requests. 2152 NullFields []string `json:"-"` 2153} 2154 2155func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { 2156 type NoMethod ListClustersResponse 2157 raw := NoMethod(*s) 2158 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2159} 2160 2161// ListLocationsResponse: ListLocationsResponse returns the list of all 2162// GKE locations and their 2163// recommendation state. 2164type ListLocationsResponse struct { 2165 // Locations: A full list of GKE locations. 2166 Locations []*Location `json:"locations,omitempty"` 2167 2168 // NextPageToken: Only return ListLocationsResponse that occur after the 2169 // page_token. This 2170 // value should be populated from the 2171 // ListLocationsResponse.next_page_token if 2172 // that response token was set (which happens when listing more 2173 // Locations than 2174 // fit in a single ListLocationsResponse). 2175 NextPageToken string `json:"nextPageToken,omitempty"` 2176 2177 // ServerResponse contains the HTTP response code and headers from the 2178 // server. 2179 googleapi.ServerResponse `json:"-"` 2180 2181 // ForceSendFields is a list of field names (e.g. "Locations") to 2182 // unconditionally include in API requests. By default, fields with 2183 // empty values are omitted from API requests. However, any non-pointer, 2184 // non-interface field appearing in ForceSendFields will be sent to the 2185 // server regardless of whether the field is empty or not. This may be 2186 // used to include empty fields in Patch requests. 2187 ForceSendFields []string `json:"-"` 2188 2189 // NullFields is a list of field names (e.g. "Locations") to include in 2190 // API requests with the JSON null value. By default, fields with empty 2191 // values are omitted from API requests. However, any field with an 2192 // empty value appearing in NullFields will be sent to the server as 2193 // null. It is an error if a field in this list has a non-empty value. 2194 // This may be used to include null fields in Patch requests. 2195 NullFields []string `json:"-"` 2196} 2197 2198func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2199 type NoMethod ListLocationsResponse 2200 raw := NoMethod(*s) 2201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2202} 2203 2204// ListNodePoolsResponse: ListNodePoolsResponse is the result of 2205// ListNodePoolsRequest. 2206type ListNodePoolsResponse struct { 2207 // NodePools: A list of node pools for a cluster. 2208 NodePools []*NodePool `json:"nodePools,omitempty"` 2209 2210 // ServerResponse contains the HTTP response code and headers from the 2211 // server. 2212 googleapi.ServerResponse `json:"-"` 2213 2214 // ForceSendFields is a list of field names (e.g. "NodePools") to 2215 // unconditionally include in API requests. By default, fields with 2216 // empty values are omitted from API requests. However, any non-pointer, 2217 // non-interface field appearing in ForceSendFields will be sent to the 2218 // server regardless of whether the field is empty or not. This may be 2219 // used to include empty fields in Patch requests. 2220 ForceSendFields []string `json:"-"` 2221 2222 // NullFields is a list of field names (e.g. "NodePools") to include in 2223 // API requests with the JSON null value. By default, fields with empty 2224 // values are omitted from API requests. However, any field with an 2225 // empty value appearing in NullFields will be sent to the server as 2226 // null. It is an error if a field in this list has a non-empty value. 2227 // This may be used to include null fields in Patch requests. 2228 NullFields []string `json:"-"` 2229} 2230 2231func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { 2232 type NoMethod ListNodePoolsResponse 2233 raw := NoMethod(*s) 2234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2235} 2236 2237// ListOperationsResponse: ListOperationsResponse is the result of 2238// ListOperationsRequest. 2239type ListOperationsResponse struct { 2240 // MissingZones: If any zones are listed here, the list of operations 2241 // returned 2242 // may be missing the operations from those zones. 2243 MissingZones []string `json:"missingZones,omitempty"` 2244 2245 // Operations: A list of operations in the project in the specified 2246 // zone. 2247 Operations []*Operation `json:"operations,omitempty"` 2248 2249 // ServerResponse contains the HTTP response code and headers from the 2250 // server. 2251 googleapi.ServerResponse `json:"-"` 2252 2253 // ForceSendFields is a list of field names (e.g. "MissingZones") to 2254 // unconditionally include in API requests. By default, fields with 2255 // empty values are omitted from API requests. However, any non-pointer, 2256 // non-interface field appearing in ForceSendFields will be sent to the 2257 // server regardless of whether the field is empty or not. This may be 2258 // used to include empty fields in Patch requests. 2259 ForceSendFields []string `json:"-"` 2260 2261 // NullFields is a list of field names (e.g. "MissingZones") to include 2262 // in API requests with the JSON null value. By default, fields with 2263 // empty values are omitted from API requests. However, any field with 2264 // an empty value appearing in NullFields will be sent to the server as 2265 // null. It is an error if a field in this list has a non-empty value. 2266 // This may be used to include null fields in Patch requests. 2267 NullFields []string `json:"-"` 2268} 2269 2270func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2271 type NoMethod ListOperationsResponse 2272 raw := NoMethod(*s) 2273 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2274} 2275 2276// ListUsableSubnetworksResponse: ListUsableSubnetworksResponse is the 2277// response of 2278// ListUsableSubnetworksRequest. 2279type ListUsableSubnetworksResponse struct { 2280 // NextPageToken: This token allows you to get the next page of results 2281 // for list requests. 2282 // If the number of results is larger than `page_size`, use 2283 // the 2284 // `next_page_token` as a value for the query parameter `page_token` in 2285 // the 2286 // next request. The value will become empty when there are no more 2287 // pages. 2288 NextPageToken string `json:"nextPageToken,omitempty"` 2289 2290 // Subnetworks: A list of usable subnetworks in the specified network 2291 // project. 2292 Subnetworks []*UsableSubnetwork `json:"subnetworks,omitempty"` 2293 2294 // ServerResponse contains the HTTP response code and headers from the 2295 // server. 2296 googleapi.ServerResponse `json:"-"` 2297 2298 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2299 // unconditionally include in API requests. By default, fields with 2300 // empty values are omitted from API requests. However, any non-pointer, 2301 // non-interface field appearing in ForceSendFields will be sent to the 2302 // server regardless of whether the field is empty or not. This may be 2303 // used to include empty fields in Patch requests. 2304 ForceSendFields []string `json:"-"` 2305 2306 // NullFields is a list of field names (e.g. "NextPageToken") to include 2307 // in API requests with the JSON null value. By default, fields with 2308 // empty values are omitted from API requests. However, any field with 2309 // an empty value appearing in NullFields will be sent to the server as 2310 // null. It is an error if a field in this list has a non-empty value. 2311 // This may be used to include null fields in Patch requests. 2312 NullFields []string `json:"-"` 2313} 2314 2315func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { 2316 type NoMethod ListUsableSubnetworksResponse 2317 raw := NoMethod(*s) 2318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2319} 2320 2321// Location: Location returns the location name, and if the location is 2322// recommended 2323// for GKE cluster scheduling. 2324type Location struct { 2325 // Name: Contains the name of the resource requested. 2326 // Specified in the format 'projects/*/locations/*'. 2327 Name string `json:"name,omitempty"` 2328 2329 // Recommended: Whether the location is recomended for GKE cluster 2330 // scheduling. 2331 Recommended bool `json:"recommended,omitempty"` 2332 2333 // Type: Contains the type of location this Location is for. 2334 // Regional or Zonal. 2335 // 2336 // Possible values: 2337 // "LOCATION_TYPE_UNSPECIFIED" - LOCATION_TYPE_UNSPECIFIED means the 2338 // location type was not determined. 2339 // "ZONE" - A GKE Location where Zonal clusters can be created. 2340 // "REGION" - A GKE Location where Regional clusters can be created. 2341 Type string `json:"type,omitempty"` 2342 2343 // ForceSendFields is a list of field names (e.g. "Name") to 2344 // unconditionally include in API requests. By default, fields with 2345 // empty values are omitted from API requests. However, any non-pointer, 2346 // non-interface field appearing in ForceSendFields will be sent to the 2347 // server regardless of whether the field is empty or not. This may be 2348 // used to include empty fields in Patch requests. 2349 ForceSendFields []string `json:"-"` 2350 2351 // NullFields is a list of field names (e.g. "Name") to include in API 2352 // requests with the JSON null value. By default, fields with empty 2353 // values are omitted from API requests. However, any field with an 2354 // empty value appearing in NullFields will be sent to the server as 2355 // null. It is an error if a field in this list has a non-empty value. 2356 // This may be used to include null fields in Patch requests. 2357 NullFields []string `json:"-"` 2358} 2359 2360func (s *Location) MarshalJSON() ([]byte, error) { 2361 type NoMethod Location 2362 raw := NoMethod(*s) 2363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2364} 2365 2366// MaintenancePolicy: MaintenancePolicy defines the maintenance policy 2367// to be used for the cluster. 2368type MaintenancePolicy struct { 2369 // Window: Specifies the maintenance window in which maintenance may be 2370 // performed. 2371 Window *MaintenanceWindow `json:"window,omitempty"` 2372 2373 // ForceSendFields is a list of field names (e.g. "Window") to 2374 // unconditionally include in API requests. By default, fields with 2375 // empty values are omitted from API requests. However, any non-pointer, 2376 // non-interface field appearing in ForceSendFields will be sent to the 2377 // server regardless of whether the field is empty or not. This may be 2378 // used to include empty fields in Patch requests. 2379 ForceSendFields []string `json:"-"` 2380 2381 // NullFields is a list of field names (e.g. "Window") to include in API 2382 // requests with the JSON null value. By default, fields with empty 2383 // values are omitted from API requests. However, any field with an 2384 // empty value appearing in NullFields will be sent to the server as 2385 // null. It is an error if a field in this list has a non-empty value. 2386 // This may be used to include null fields in Patch requests. 2387 NullFields []string `json:"-"` 2388} 2389 2390func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { 2391 type NoMethod MaintenancePolicy 2392 raw := NoMethod(*s) 2393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2394} 2395 2396// MaintenanceWindow: MaintenanceWindow defines the maintenance window 2397// to be used for the cluster. 2398type MaintenanceWindow struct { 2399 // DailyMaintenanceWindow: DailyMaintenanceWindow specifies a daily 2400 // maintenance operation window. 2401 DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"` 2402 2403 // ForceSendFields is a list of field names (e.g. 2404 // "DailyMaintenanceWindow") to unconditionally include in API requests. 2405 // By default, fields with empty values are omitted from API requests. 2406 // However, any non-pointer, non-interface field appearing in 2407 // ForceSendFields will be sent to the server regardless of whether the 2408 // field is empty or not. This may be used to include empty fields in 2409 // Patch requests. 2410 ForceSendFields []string `json:"-"` 2411 2412 // NullFields is a list of field names (e.g. "DailyMaintenanceWindow") 2413 // to include in API requests with the JSON null value. By default, 2414 // fields with empty values are omitted from API requests. However, any 2415 // field with an empty value appearing in NullFields will be sent to the 2416 // server as null. It is an error if a field in this list has a 2417 // non-empty value. This may be used to include null fields in Patch 2418 // requests. 2419 NullFields []string `json:"-"` 2420} 2421 2422func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { 2423 type NoMethod MaintenanceWindow 2424 raw := NoMethod(*s) 2425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2426} 2427 2428// MasterAuth: The authentication information for accessing the master 2429// endpoint. 2430// Authentication can be done using HTTP basic auth or using 2431// client 2432// certificates. 2433type MasterAuth struct { 2434 // ClientCertificate: [Output only] Base64-encoded public certificate 2435 // used by clients to 2436 // authenticate to the cluster endpoint. 2437 ClientCertificate string `json:"clientCertificate,omitempty"` 2438 2439 // ClientCertificateConfig: Configuration for client certificate 2440 // authentication on the cluster. For 2441 // clusters before v1.12, if no configuration is specified, a 2442 // client 2443 // certificate is issued. 2444 ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` 2445 2446 // ClientKey: [Output only] Base64-encoded private key used by clients 2447 // to authenticate 2448 // to the cluster endpoint. 2449 ClientKey string `json:"clientKey,omitempty"` 2450 2451 ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` 2452 2453 // Password: The password to use for HTTP basic authentication to the 2454 // master endpoint. 2455 // Because the master endpoint is open to the Internet, you should 2456 // create a 2457 // strong password. If a password is provided for cluster creation, 2458 // username 2459 // must be non-empty. 2460 Password string `json:"password,omitempty"` 2461 2462 // Username: The username to use for HTTP basic authentication to the 2463 // master endpoint. 2464 // For clusters v1.6.0 and later, basic authentication can be disabled 2465 // by 2466 // leaving username unspecified (or setting it to the empty string). 2467 Username string `json:"username,omitempty"` 2468 2469 // ForceSendFields is a list of field names (e.g. "ClientCertificate") 2470 // to unconditionally include in API requests. By default, fields with 2471 // empty values are omitted from API requests. However, any non-pointer, 2472 // non-interface field appearing in ForceSendFields will be sent to the 2473 // server regardless of whether the field is empty or not. This may be 2474 // used to include empty fields in Patch requests. 2475 ForceSendFields []string `json:"-"` 2476 2477 // NullFields is a list of field names (e.g. "ClientCertificate") to 2478 // include in API requests with the JSON null value. By default, fields 2479 // with empty values are omitted from API requests. However, any field 2480 // with an empty value appearing in NullFields will be sent to the 2481 // server as null. It is an error if a field in this list has a 2482 // non-empty value. This may be used to include null fields in Patch 2483 // requests. 2484 NullFields []string `json:"-"` 2485} 2486 2487func (s *MasterAuth) MarshalJSON() ([]byte, error) { 2488 type NoMethod MasterAuth 2489 raw := NoMethod(*s) 2490 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2491} 2492 2493// MasterAuthorizedNetworksConfig: Configuration options for the master 2494// authorized networks feature. Enabled 2495// master authorized networks will disallow all external traffic to 2496// access 2497// Kubernetes master through HTTPS except traffic from the given CIDR 2498// blocks, 2499// Google Compute Engine Public IPs and Google Prod IPs. 2500type MasterAuthorizedNetworksConfig struct { 2501 // CidrBlocks: cidr_blocks define up to 10 external networks that could 2502 // access 2503 // Kubernetes master through HTTPS. 2504 CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"` 2505 2506 // Enabled: Whether or not master authorized networks is enabled. 2507 Enabled bool `json:"enabled,omitempty"` 2508 2509 // ForceSendFields is a list of field names (e.g. "CidrBlocks") to 2510 // unconditionally include in API requests. By default, fields with 2511 // empty values are omitted from API requests. However, any non-pointer, 2512 // non-interface field appearing in ForceSendFields will be sent to the 2513 // server regardless of whether the field is empty or not. This may be 2514 // used to include empty fields in Patch requests. 2515 ForceSendFields []string `json:"-"` 2516 2517 // NullFields is a list of field names (e.g. "CidrBlocks") to include in 2518 // API requests with the JSON null value. By default, fields with empty 2519 // values are omitted from API requests. However, any field with an 2520 // empty value appearing in NullFields will be sent to the server as 2521 // null. It is an error if a field in this list has a non-empty value. 2522 // This may be used to include null fields in Patch requests. 2523 NullFields []string `json:"-"` 2524} 2525 2526func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { 2527 type NoMethod MasterAuthorizedNetworksConfig 2528 raw := NoMethod(*s) 2529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2530} 2531 2532// MaxPodsConstraint: Constraints applied to pods. 2533type MaxPodsConstraint struct { 2534 // MaxPodsPerNode: Constraint enforced on the max num of pods per node. 2535 MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"` 2536 2537 // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to 2538 // unconditionally include in API requests. By default, fields with 2539 // empty values are omitted from API requests. However, any non-pointer, 2540 // non-interface field appearing in ForceSendFields will be sent to the 2541 // server regardless of whether the field is empty or not. This may be 2542 // used to include empty fields in Patch requests. 2543 ForceSendFields []string `json:"-"` 2544 2545 // NullFields is a list of field names (e.g. "MaxPodsPerNode") to 2546 // include in API requests with the JSON null value. By default, fields 2547 // with empty values are omitted from API requests. However, any field 2548 // with an empty value appearing in NullFields will be sent to the 2549 // server as null. It is an error if a field in this list has a 2550 // non-empty value. This may be used to include null fields in Patch 2551 // requests. 2552 NullFields []string `json:"-"` 2553} 2554 2555func (s *MaxPodsConstraint) MarshalJSON() ([]byte, error) { 2556 type NoMethod MaxPodsConstraint 2557 raw := NoMethod(*s) 2558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2559} 2560 2561// Metric: Progress metric is (string, int|float|string) pair. 2562type Metric struct { 2563 // DoubleValue: For metrics with floating point value. 2564 DoubleValue float64 `json:"doubleValue,omitempty"` 2565 2566 // IntValue: For metrics with integer value. 2567 IntValue int64 `json:"intValue,omitempty,string"` 2568 2569 // Name: Metric name, required. 2570 // e.g., "nodes total", "percent done" 2571 Name string `json:"name,omitempty"` 2572 2573 // StringValue: For metrics with custom values (ratios, visual progress, 2574 // etc.). 2575 StringValue string `json:"stringValue,omitempty"` 2576 2577 // ForceSendFields is a list of field names (e.g. "DoubleValue") to 2578 // unconditionally include in API requests. By default, fields with 2579 // empty values are omitted from API requests. However, any non-pointer, 2580 // non-interface field appearing in ForceSendFields will be sent to the 2581 // server regardless of whether the field is empty or not. This may be 2582 // used to include empty fields in Patch requests. 2583 ForceSendFields []string `json:"-"` 2584 2585 // NullFields is a list of field names (e.g. "DoubleValue") to include 2586 // in API requests with the JSON null value. By default, fields with 2587 // empty values are omitted from API requests. However, any field with 2588 // an empty value appearing in NullFields will be sent to the server as 2589 // null. It is an error if a field in this list has a non-empty value. 2590 // This may be used to include null fields in Patch requests. 2591 NullFields []string `json:"-"` 2592} 2593 2594func (s *Metric) MarshalJSON() ([]byte, error) { 2595 type NoMethod Metric 2596 raw := NoMethod(*s) 2597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2598} 2599 2600func (s *Metric) UnmarshalJSON(data []byte) error { 2601 type NoMethod Metric 2602 var s1 struct { 2603 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` 2604 *NoMethod 2605 } 2606 s1.NoMethod = (*NoMethod)(s) 2607 if err := json.Unmarshal(data, &s1); err != nil { 2608 return err 2609 } 2610 s.DoubleValue = float64(s1.DoubleValue) 2611 return nil 2612} 2613 2614// NetworkConfig: NetworkConfig reports the relative names of network & 2615// subnetwork. 2616type NetworkConfig struct { 2617 // EnableIntraNodeVisibility: Whether Intra-node visibility is enabled 2618 // for this cluster. 2619 // This makes same node pod to pod traffic visible for VPC network. 2620 EnableIntraNodeVisibility bool `json:"enableIntraNodeVisibility,omitempty"` 2621 2622 // Network: Output only. The relative name of the Google Compute 2623 // Engine 2624 // network(/compute/docs/networks-and-firewalls#networks) to which 2625 // the cluster is connected. 2626 // Example: projects/my-project/global/networks/my-network 2627 Network string `json:"network,omitempty"` 2628 2629 // Subnetwork: Output only. The relative name of the Google Compute 2630 // Engine 2631 // [subnetwork](/compute/docs/vpc) to which the cluster is 2632 // connected. 2633 // Example: 2634 // projects/my-project/regions/us-central1/subnetworks/my-subnet 2635 Subnetwork string `json:"subnetwork,omitempty"` 2636 2637 // ForceSendFields is a list of field names (e.g. 2638 // "EnableIntraNodeVisibility") to unconditionally include in API 2639 // requests. By default, fields with empty values are omitted from API 2640 // requests. However, any non-pointer, non-interface field appearing in 2641 // ForceSendFields will be sent to the server regardless of whether the 2642 // field is empty or not. This may be used to include empty fields in 2643 // Patch requests. 2644 ForceSendFields []string `json:"-"` 2645 2646 // NullFields is a list of field names (e.g. 2647 // "EnableIntraNodeVisibility") to include in API requests with the JSON 2648 // null value. By default, fields with empty values are omitted from API 2649 // requests. However, any field with an empty value appearing in 2650 // NullFields will be sent to the server as null. It is an error if a 2651 // field in this list has a non-empty value. This may be used to include 2652 // null fields in Patch requests. 2653 NullFields []string `json:"-"` 2654} 2655 2656func (s *NetworkConfig) MarshalJSON() ([]byte, error) { 2657 type NoMethod NetworkConfig 2658 raw := NoMethod(*s) 2659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2660} 2661 2662// NetworkPolicy: Configuration options for the NetworkPolicy 2663// feature. 2664// https://kubernetes.io/docs/concepts/services-networking/netwo 2665// rkpolicies/ 2666type NetworkPolicy struct { 2667 // Enabled: Whether network policy is enabled on the cluster. 2668 Enabled bool `json:"enabled,omitempty"` 2669 2670 // Provider: The selected network policy provider. 2671 // 2672 // Possible values: 2673 // "PROVIDER_UNSPECIFIED" - Not set 2674 // "CALICO" - Tigera (Calico Felix). 2675 Provider string `json:"provider,omitempty"` 2676 2677 // ForceSendFields is a list of field names (e.g. "Enabled") to 2678 // unconditionally include in API requests. By default, fields with 2679 // empty values are omitted from API requests. However, any non-pointer, 2680 // non-interface field appearing in ForceSendFields will be sent to the 2681 // server regardless of whether the field is empty or not. This may be 2682 // used to include empty fields in Patch requests. 2683 ForceSendFields []string `json:"-"` 2684 2685 // NullFields is a list of field names (e.g. "Enabled") to include in 2686 // API requests with the JSON null value. By default, fields with empty 2687 // values are omitted from API requests. However, any field with an 2688 // empty value appearing in NullFields will be sent to the server as 2689 // null. It is an error if a field in this list has a non-empty value. 2690 // This may be used to include null fields in Patch requests. 2691 NullFields []string `json:"-"` 2692} 2693 2694func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { 2695 type NoMethod NetworkPolicy 2696 raw := NoMethod(*s) 2697 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2698} 2699 2700// NetworkPolicyConfig: Configuration for NetworkPolicy. This only 2701// tracks whether the addon 2702// is enabled or not on the Master, it does not track whether network 2703// policy 2704// is enabled for the nodes. 2705type NetworkPolicyConfig struct { 2706 // Disabled: Whether NetworkPolicy is enabled for this cluster. 2707 Disabled bool `json:"disabled,omitempty"` 2708 2709 // ForceSendFields is a list of field names (e.g. "Disabled") to 2710 // unconditionally include in API requests. By default, fields with 2711 // empty values are omitted from API requests. However, any non-pointer, 2712 // non-interface field appearing in ForceSendFields will be sent to the 2713 // server regardless of whether the field is empty or not. This may be 2714 // used to include empty fields in Patch requests. 2715 ForceSendFields []string `json:"-"` 2716 2717 // NullFields is a list of field names (e.g. "Disabled") to include in 2718 // API requests with the JSON null value. By default, fields with empty 2719 // values are omitted from API requests. However, any field with an 2720 // empty value appearing in NullFields will be sent to the server as 2721 // null. It is an error if a field in this list has a non-empty value. 2722 // This may be used to include null fields in Patch requests. 2723 NullFields []string `json:"-"` 2724} 2725 2726func (s *NetworkPolicyConfig) MarshalJSON() ([]byte, error) { 2727 type NoMethod NetworkPolicyConfig 2728 raw := NoMethod(*s) 2729 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2730} 2731 2732// NodeConfig: Parameters that describe the nodes in a cluster. 2733type NodeConfig struct { 2734 // Accelerators: A list of hardware accelerators to be attached to each 2735 // node. 2736 // See https://cloud.google.com/compute/docs/gpus for more information 2737 // about 2738 // support for GPUs. 2739 Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` 2740 2741 // DiskSizeGb: Size of the disk attached to each node, specified in 2742 // GB. 2743 // The smallest allowed disk size is 10GB. 2744 // 2745 // If unspecified, the default disk size is 100GB. 2746 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 2747 2748 // DiskType: Type of the disk attached to each node (e.g. 'pd-standard' 2749 // or 'pd-ssd') 2750 // 2751 // If unspecified, the default disk type is 'pd-standard' 2752 DiskType string `json:"diskType,omitempty"` 2753 2754 // ImageType: The image type to use for this node. Note that for a given 2755 // image type, 2756 // the latest version of it will be used. 2757 ImageType string `json:"imageType,omitempty"` 2758 2759 // Labels: The map of Kubernetes labels (key/value pairs) to be applied 2760 // to each node. 2761 // These will added in addition to any default label(s) that 2762 // Kubernetes may apply to the node. 2763 // In case of conflict in label keys, the applied set may differ 2764 // depending on 2765 // the Kubernetes version -- it's best to assume the behavior is 2766 // undefined 2767 // and conflicts should be avoided. 2768 // For more information, including usage and the valid values, 2769 // see: 2770 // https://kubernetes.io/docs/concepts/overview/working-with-objects 2771 // /labels/ 2772 Labels map[string]string `json:"labels,omitempty"` 2773 2774 // LocalSsdCount: The number of local SSD disks to be attached to the 2775 // node. 2776 // 2777 // The limit for this value is dependant upon the maximum number 2778 // of 2779 // disks available on a machine per zone. 2780 // See: 2781 // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_l 2782 // imits 2783 // for more information. 2784 LocalSsdCount int64 `json:"localSsdCount,omitempty"` 2785 2786 // MachineType: The name of a Google Compute Engine 2787 // [machine 2788 // type](/compute/docs/machine-types) (e.g. 2789 // `n1-standard-1`). 2790 // 2791 // If unspecified, the default machine type is 2792 // `n1-standard-1`. 2793 MachineType string `json:"machineType,omitempty"` 2794 2795 // Metadata: The metadata key/value pairs assigned to instances in the 2796 // cluster. 2797 // 2798 // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 2799 // bytes 2800 // in length. These are reflected as part of a URL in the metadata 2801 // server. 2802 // Additionally, to avoid ambiguity, keys must not conflict with any 2803 // other 2804 // metadata keys for the project or be one of the reserved keys: 2805 // "cluster-location" 2806 // "cluster-name" 2807 // "cluster-uid" 2808 // "configure-sh" 2809 // "containerd-configure-sh" 2810 // "enable-oslogin" 2811 // "gci-ensure-gke-docker" 2812 // "gci-update-strategy" 2813 // "instance-template" 2814 // "kube-env" 2815 // "startup-script" 2816 // "user-data" 2817 // "disable-address-manager" 2818 // "windows-startup-script-ps1" 2819 // "common-psm1" 2820 // "k8s-node-setup-psm1" 2821 // "install-ssh-psm1" 2822 // "user-profile-psm1" 2823 // "serial-port-logging-enable" 2824 // Values are free-form strings, and only have meaning as interpreted 2825 // by 2826 // the image running in the instance. The only restriction placed on 2827 // them is 2828 // that each value's size must be less than or equal to 32 KB. 2829 // 2830 // The total size of all keys and values must be less than 512 KB. 2831 Metadata map[string]string `json:"metadata,omitempty"` 2832 2833 // MinCpuPlatform: Minimum CPU platform to be used by this instance. The 2834 // instance may be 2835 // scheduled on the specified or newer CPU platform. Applicable values 2836 // are the 2837 // friendly names of CPU platforms, such as 2838 // <code>minCpuPlatform: "Intel Haswell"</code> 2839 // or 2840 // <code>minCpuPlatform: "Intel Sandy Bridge"</code>. For 2841 // more 2842 // information, read [how to specify min 2843 // CPU 2844 // platform](https://cloud.google.com/compute/docs/instances/specify- 2845 // min-cpu-platform) 2846 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 2847 2848 // OauthScopes: The set of Google API scopes to be made available on all 2849 // of the 2850 // node VMs under the "default" service account. 2851 // 2852 // The following scopes are recommended, but not required, and by 2853 // default are 2854 // not included: 2855 // 2856 // * `https://www.googleapis.com/auth/compute` is required for 2857 // mounting 2858 // persistent storage on your nodes. 2859 // * `https://www.googleapis.com/auth/devstorage.read_only` is required 2860 // for 2861 // communicating with **gcr.io** 2862 // (the [Google Container Registry](/container-registry/)). 2863 // 2864 // If unspecified, no scopes are added, unless Cloud Logging or 2865 // Cloud 2866 // Monitoring are enabled, in which case their required scopes will be 2867 // added. 2868 OauthScopes []string `json:"oauthScopes,omitempty"` 2869 2870 // Preemptible: Whether the nodes are created as preemptible VM 2871 // instances. 2872 // See: 2873 // https://cloud.google.com/compute/docs/instances/preemptible for 2874 // more 2875 // inforamtion about preemptible VM instances. 2876 Preemptible bool `json:"preemptible,omitempty"` 2877 2878 // SandboxConfig: Sandbox configuration for this node. 2879 SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` 2880 2881 // ServiceAccount: The Google Cloud Platform Service Account to be used 2882 // by the node VMs. If 2883 // no Service Account is specified, the "default" service account is 2884 // used. 2885 ServiceAccount string `json:"serviceAccount,omitempty"` 2886 2887 // ShieldedInstanceConfig: Shielded Instance options. 2888 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` 2889 2890 // Tags: The list of instance tags applied to all nodes. Tags are used 2891 // to identify 2892 // valid sources or targets for network firewalls and are specified 2893 // by 2894 // the client during cluster or node pool creation. Each tag within the 2895 // list 2896 // must comply with RFC1035. 2897 Tags []string `json:"tags,omitempty"` 2898 2899 // Taints: List of kubernetes taints to be applied to each node. 2900 // 2901 // For more information, including usage and the valid values, 2902 // see: 2903 // https://kubernetes.io/docs/concepts/configuration/taint-and-toler 2904 // ation/ 2905 Taints []*NodeTaint `json:"taints,omitempty"` 2906 2907 // WorkloadMetadataConfig: The workload metadata configuration for this 2908 // node. 2909 WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` 2910 2911 // ForceSendFields is a list of field names (e.g. "Accelerators") to 2912 // unconditionally include in API requests. By default, fields with 2913 // empty values are omitted from API requests. However, any non-pointer, 2914 // non-interface field appearing in ForceSendFields will be sent to the 2915 // server regardless of whether the field is empty or not. This may be 2916 // used to include empty fields in Patch requests. 2917 ForceSendFields []string `json:"-"` 2918 2919 // NullFields is a list of field names (e.g. "Accelerators") to include 2920 // in API requests with the JSON null value. By default, fields with 2921 // empty values are omitted from API requests. However, any field with 2922 // an empty value appearing in NullFields will be sent to the server as 2923 // null. It is an error if a field in this list has a non-empty value. 2924 // This may be used to include null fields in Patch requests. 2925 NullFields []string `json:"-"` 2926} 2927 2928func (s *NodeConfig) MarshalJSON() ([]byte, error) { 2929 type NoMethod NodeConfig 2930 raw := NoMethod(*s) 2931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2932} 2933 2934// NodeManagement: NodeManagement defines the set of node management 2935// services turned on for the 2936// node pool. 2937type NodeManagement struct { 2938 // AutoRepair: Whether the nodes will be automatically repaired. 2939 AutoRepair bool `json:"autoRepair,omitempty"` 2940 2941 // AutoUpgrade: Whether the nodes will be automatically upgraded. 2942 AutoUpgrade bool `json:"autoUpgrade,omitempty"` 2943 2944 // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool. 2945 UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"` 2946 2947 // ForceSendFields is a list of field names (e.g. "AutoRepair") to 2948 // unconditionally include in API requests. By default, fields with 2949 // empty values are omitted from API requests. However, any non-pointer, 2950 // non-interface field appearing in ForceSendFields will be sent to the 2951 // server regardless of whether the field is empty or not. This may be 2952 // used to include empty fields in Patch requests. 2953 ForceSendFields []string `json:"-"` 2954 2955 // NullFields is a list of field names (e.g. "AutoRepair") to include in 2956 // API requests with the JSON null value. By default, fields with empty 2957 // values are omitted from API requests. However, any field with an 2958 // empty value appearing in NullFields will be sent to the server as 2959 // null. It is an error if a field in this list has a non-empty value. 2960 // This may be used to include null fields in Patch requests. 2961 NullFields []string `json:"-"` 2962} 2963 2964func (s *NodeManagement) MarshalJSON() ([]byte, error) { 2965 type NoMethod NodeManagement 2966 raw := NoMethod(*s) 2967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2968} 2969 2970// NodePool: NodePool contains the name and configuration for a 2971// cluster's node pool. 2972// Node pools are a set of nodes (i.e. VM's), with a common 2973// configuration and 2974// specification, under the control of the cluster master. They may have 2975// a set 2976// of Kubernetes labels applied to them, which may be used to reference 2977// them 2978// during pod scheduling. They may also be resized up or down, to 2979// accommodate 2980// the workload. 2981type NodePool struct { 2982 // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler 2983 // is enabled 2984 // only if a valid configuration is present. 2985 Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` 2986 2987 // Conditions: Which conditions caused the current node pool state. 2988 Conditions []*StatusCondition `json:"conditions,omitempty"` 2989 2990 // Config: The node configuration of the pool. 2991 Config *NodeConfig `json:"config,omitempty"` 2992 2993 // InitialNodeCount: The initial node count for the pool. You must 2994 // ensure that your 2995 // Compute Engine <a href="/compute/docs/resource-quotas">resource 2996 // quota</a> 2997 // is sufficient for this number of instances. You must also have 2998 // available 2999 // firewall and routes quota. 3000 InitialNodeCount int64 `json:"initialNodeCount,omitempty"` 3001 3002 // InstanceGroupUrls: [Output only] The resource URLs of the [managed 3003 // instance 3004 // groups](/compute/docs/instance-groups/creating-groups-of-mana 3005 // ged-instances) 3006 // associated with this node pool. 3007 InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` 3008 3009 // Locations: The list of Google Compute Engine 3010 // [zones](/compute/docs/zones#available) 3011 // in which the NodePool's nodes should be located. 3012 Locations []string `json:"locations,omitempty"` 3013 3014 // Management: NodeManagement configuration for this NodePool. 3015 Management *NodeManagement `json:"management,omitempty"` 3016 3017 // MaxPodsConstraint: The constraint on the maximum number of pods that 3018 // can be run 3019 // simultaneously on a node in the node pool. 3020 MaxPodsConstraint *MaxPodsConstraint `json:"maxPodsConstraint,omitempty"` 3021 3022 // Name: The name of the node pool. 3023 Name string `json:"name,omitempty"` 3024 3025 // PodIpv4CidrSize: [Output only] The pod CIDR block size per node in 3026 // this node pool. 3027 PodIpv4CidrSize int64 `json:"podIpv4CidrSize,omitempty"` 3028 3029 // SelfLink: [Output only] Server-defined URL for the resource. 3030 SelfLink string `json:"selfLink,omitempty"` 3031 3032 // Status: [Output only] The status of the nodes in this pool instance. 3033 // 3034 // Possible values: 3035 // "STATUS_UNSPECIFIED" - Not set. 3036 // "PROVISIONING" - The PROVISIONING state indicates the node pool is 3037 // being created. 3038 // "RUNNING" - The RUNNING state indicates the node pool has been 3039 // created 3040 // and is fully usable. 3041 // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the 3042 // node pool has been created 3043 // and is partially usable. Some error state has occurred and 3044 // some 3045 // functionality may be impaired. Customer may need to reissue a 3046 // request 3047 // or trigger a new update. 3048 // "RECONCILING" - The RECONCILING state indicates that some work is 3049 // actively being done on 3050 // the node pool, such as upgrading node software. Details can 3051 // be found in the `statusMessage` field. 3052 // "STOPPING" - The STOPPING state indicates the node pool is being 3053 // deleted. 3054 // "ERROR" - The ERROR state indicates the node pool may be unusable. 3055 // Details 3056 // can be found in the `statusMessage` field. 3057 Status string `json:"status,omitempty"` 3058 3059 // StatusMessage: [Output only] Additional information about the current 3060 // status of this 3061 // node pool instance, if available. 3062 StatusMessage string `json:"statusMessage,omitempty"` 3063 3064 // Version: The version of the Kubernetes of this node. 3065 Version string `json:"version,omitempty"` 3066 3067 // ServerResponse contains the HTTP response code and headers from the 3068 // server. 3069 googleapi.ServerResponse `json:"-"` 3070 3071 // ForceSendFields is a list of field names (e.g. "Autoscaling") to 3072 // unconditionally include in API requests. By default, fields with 3073 // empty values are omitted from API requests. However, any non-pointer, 3074 // non-interface field appearing in ForceSendFields will be sent to the 3075 // server regardless of whether the field is empty or not. This may be 3076 // used to include empty fields in Patch requests. 3077 ForceSendFields []string `json:"-"` 3078 3079 // NullFields is a list of field names (e.g. "Autoscaling") to include 3080 // in API requests with the JSON null value. By default, fields with 3081 // empty values are omitted from API requests. However, any field with 3082 // an empty value appearing in NullFields will be sent to the server as 3083 // null. It is an error if a field in this list has a non-empty value. 3084 // This may be used to include null fields in Patch requests. 3085 NullFields []string `json:"-"` 3086} 3087 3088func (s *NodePool) MarshalJSON() ([]byte, error) { 3089 type NoMethod NodePool 3090 raw := NoMethod(*s) 3091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3092} 3093 3094// NodePoolAutoscaling: NodePoolAutoscaling contains information 3095// required by cluster autoscaler to 3096// adjust the size of the node pool to the current cluster usage. 3097type NodePoolAutoscaling struct { 3098 // Autoprovisioned: Can this node pool be deleted automatically. 3099 Autoprovisioned bool `json:"autoprovisioned,omitempty"` 3100 3101 // Enabled: Is autoscaling enabled for this node pool. 3102 Enabled bool `json:"enabled,omitempty"` 3103 3104 // MaxNodeCount: Maximum number of nodes in the NodePool. Must be >= 3105 // min_node_count. There 3106 // has to enough quota to scale up the cluster. 3107 MaxNodeCount int64 `json:"maxNodeCount,omitempty"` 3108 3109 // MinNodeCount: Minimum number of nodes in the NodePool. Must be >= 1 3110 // and <= 3111 // max_node_count. 3112 MinNodeCount int64 `json:"minNodeCount,omitempty"` 3113 3114 // ForceSendFields is a list of field names (e.g. "Autoprovisioned") to 3115 // unconditionally include in API requests. By default, fields with 3116 // empty values are omitted from API requests. However, any non-pointer, 3117 // non-interface field appearing in ForceSendFields will be sent to the 3118 // server regardless of whether the field is empty or not. This may be 3119 // used to include empty fields in Patch requests. 3120 ForceSendFields []string `json:"-"` 3121 3122 // NullFields is a list of field names (e.g. "Autoprovisioned") to 3123 // include in API requests with the JSON null value. By default, fields 3124 // with empty values are omitted from API requests. However, any field 3125 // with an empty value appearing in NullFields will be sent to the 3126 // server as null. It is an error if a field in this list has a 3127 // non-empty value. This may be used to include null fields in Patch 3128 // requests. 3129 NullFields []string `json:"-"` 3130} 3131 3132func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) { 3133 type NoMethod NodePoolAutoscaling 3134 raw := NoMethod(*s) 3135 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3136} 3137 3138// NodeTaint: Kubernetes taint is comprised of three fields: key, value, 3139// and effect. Effect 3140// can only be one of three types: NoSchedule, PreferNoSchedule or 3141// NoExecute. 3142// 3143// For more information, including usage and the valid values, 3144// see: 3145// https://kubernetes.io/docs/concepts/configuration/taint-and-toler 3146// ation/ 3147type NodeTaint struct { 3148 // Effect: Effect for taint. 3149 // 3150 // Possible values: 3151 // "EFFECT_UNSPECIFIED" - Not set 3152 // "NO_SCHEDULE" - NoSchedule 3153 // "PREFER_NO_SCHEDULE" - PreferNoSchedule 3154 // "NO_EXECUTE" - NoExecute 3155 Effect string `json:"effect,omitempty"` 3156 3157 // Key: Key for taint. 3158 Key string `json:"key,omitempty"` 3159 3160 // Value: Value for taint. 3161 Value string `json:"value,omitempty"` 3162 3163 // ForceSendFields is a list of field names (e.g. "Effect") to 3164 // unconditionally include in API requests. By default, fields with 3165 // empty values are omitted from API requests. However, any non-pointer, 3166 // non-interface field appearing in ForceSendFields will be sent to the 3167 // server regardless of whether the field is empty or not. This may be 3168 // used to include empty fields in Patch requests. 3169 ForceSendFields []string `json:"-"` 3170 3171 // NullFields is a list of field names (e.g. "Effect") to include in API 3172 // requests with the JSON null value. By default, fields with empty 3173 // values are omitted from API requests. However, any field with an 3174 // empty value appearing in NullFields will be sent to the server as 3175 // null. It is an error if a field in this list has a non-empty value. 3176 // This may be used to include null fields in Patch requests. 3177 NullFields []string `json:"-"` 3178} 3179 3180func (s *NodeTaint) MarshalJSON() ([]byte, error) { 3181 type NoMethod NodeTaint 3182 raw := NoMethod(*s) 3183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3184} 3185 3186// Operation: This operation resource represents operations that may 3187// have happened or are 3188// happening on the cluster. All fields are output only. 3189type Operation struct { 3190 // ClusterConditions: Which conditions caused the current cluster state. 3191 ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"` 3192 3193 // Detail: Detailed operation progress, if available. 3194 Detail string `json:"detail,omitempty"` 3195 3196 // EndTime: [Output only] The time the operation completed, 3197 // in 3198 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 3199 EndTime string `json:"endTime,omitempty"` 3200 3201 // Location: [Output only] The name of the Google Compute 3202 // Engine 3203 // [zone](/compute/docs/regions-zones/regions-zones#available) 3204 // or 3205 // [region](/compute/docs/regions-zones/regions-zones#available) in 3206 // which 3207 // the cluster resides. 3208 Location string `json:"location,omitempty"` 3209 3210 // Name: The server-assigned ID for the operation. 3211 Name string `json:"name,omitempty"` 3212 3213 // NodepoolConditions: Which conditions caused the current node pool 3214 // state. 3215 NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"` 3216 3217 // OperationType: The operation type. 3218 // 3219 // Possible values: 3220 // "TYPE_UNSPECIFIED" - Not set. 3221 // "CREATE_CLUSTER" - Cluster create. 3222 // "DELETE_CLUSTER" - Cluster delete. 3223 // "UPGRADE_MASTER" - A master upgrade. 3224 // "UPGRADE_NODES" - A node upgrade. 3225 // "REPAIR_CLUSTER" - Cluster repair. 3226 // "UPDATE_CLUSTER" - Cluster update. 3227 // "CREATE_NODE_POOL" - Node pool create. 3228 // "DELETE_NODE_POOL" - Node pool delete. 3229 // "SET_NODE_POOL_MANAGEMENT" - Set node pool management. 3230 // "AUTO_REPAIR_NODES" - Automatic node pool repair. 3231 // "AUTO_UPGRADE_NODES" - Automatic node upgrade. 3232 // "SET_LABELS" - Set labels. 3233 // "SET_MASTER_AUTH" - Set/generate master auth materials 3234 // "SET_NODE_POOL_SIZE" - Set node pool size. 3235 // "SET_NETWORK_POLICY" - Updates network policy for a cluster. 3236 // "SET_MAINTENANCE_POLICY" - Set the maintenance policy. 3237 OperationType string `json:"operationType,omitempty"` 3238 3239 // Progress: [Output only] Progress information for an operation. 3240 Progress *OperationProgress `json:"progress,omitempty"` 3241 3242 // SelfLink: Server-defined URL for the resource. 3243 SelfLink string `json:"selfLink,omitempty"` 3244 3245 // StartTime: [Output only] The time the operation started, 3246 // in 3247 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 3248 StartTime string `json:"startTime,omitempty"` 3249 3250 // Status: The current status of the operation. 3251 // 3252 // Possible values: 3253 // "STATUS_UNSPECIFIED" - Not set. 3254 // "PENDING" - The operation has been created. 3255 // "RUNNING" - The operation is currently running. 3256 // "DONE" - The operation is done, either cancelled or completed. 3257 // "ABORTING" - The operation is aborting. 3258 Status string `json:"status,omitempty"` 3259 3260 // StatusMessage: If an error has occurred, a textual description of the 3261 // error. 3262 StatusMessage string `json:"statusMessage,omitempty"` 3263 3264 // TargetLink: Server-defined URL for the target of the operation. 3265 TargetLink string `json:"targetLink,omitempty"` 3266 3267 // Zone: The name of the Google Compute 3268 // Engine 3269 // [zone](/compute/docs/zones#available) in which the operation 3270 // is taking place. 3271 // This field is deprecated, use location instead. 3272 Zone string `json:"zone,omitempty"` 3273 3274 // ServerResponse contains the HTTP response code and headers from the 3275 // server. 3276 googleapi.ServerResponse `json:"-"` 3277 3278 // ForceSendFields is a list of field names (e.g. "ClusterConditions") 3279 // to unconditionally include in API requests. By default, fields with 3280 // empty values are omitted from API requests. However, any non-pointer, 3281 // non-interface field appearing in ForceSendFields will be sent to the 3282 // server regardless of whether the field is empty or not. This may be 3283 // used to include empty fields in Patch requests. 3284 ForceSendFields []string `json:"-"` 3285 3286 // NullFields is a list of field names (e.g. "ClusterConditions") to 3287 // include in API requests with the JSON null value. By default, fields 3288 // with empty values are omitted from API requests. However, any field 3289 // with an empty value appearing in NullFields will be sent to the 3290 // server as null. It is an error if a field in this list has a 3291 // non-empty value. This may be used to include null fields in Patch 3292 // requests. 3293 NullFields []string `json:"-"` 3294} 3295 3296func (s *Operation) MarshalJSON() ([]byte, error) { 3297 type NoMethod Operation 3298 raw := NoMethod(*s) 3299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3300} 3301 3302// OperationProgress: Information about operation (or operation stage) 3303// progress. 3304type OperationProgress struct { 3305 // Metrics: Progress metric bundle, for example: 3306 // metrics: [{name: "nodes done", int_value: 15}, 3307 // {name: "nodes total", int_value: 32}] 3308 // or 3309 // metrics: [{name: "progress", double_value: 0.56}, 3310 // {name: "progress scale", double_value: 1.0}] 3311 Metrics []*Metric `json:"metrics,omitempty"` 3312 3313 // Name: A non-parameterized string describing an operation stage. 3314 // Unset for single-stage operations. 3315 Name string `json:"name,omitempty"` 3316 3317 // Stages: Substages of an operation or a stage. 3318 Stages []*OperationProgress `json:"stages,omitempty"` 3319 3320 // Status: Status of an operation stage. 3321 // Unset for single-stage operations. 3322 // 3323 // Possible values: 3324 // "STATUS_UNSPECIFIED" - Not set. 3325 // "PENDING" - The operation has been created. 3326 // "RUNNING" - The operation is currently running. 3327 // "DONE" - The operation is done, either cancelled or completed. 3328 // "ABORTING" - The operation is aborting. 3329 Status string `json:"status,omitempty"` 3330 3331 // ForceSendFields is a list of field names (e.g. "Metrics") to 3332 // unconditionally include in API requests. By default, fields with 3333 // empty values are omitted from API requests. However, any non-pointer, 3334 // non-interface field appearing in ForceSendFields will be sent to the 3335 // server regardless of whether the field is empty or not. This may be 3336 // used to include empty fields in Patch requests. 3337 ForceSendFields []string `json:"-"` 3338 3339 // NullFields is a list of field names (e.g. "Metrics") to include in 3340 // API requests with the JSON null value. By default, fields with empty 3341 // values are omitted from API requests. However, any field with an 3342 // empty value appearing in NullFields will be sent to the server as 3343 // null. It is an error if a field in this list has a non-empty value. 3344 // This may be used to include null fields in Patch requests. 3345 NullFields []string `json:"-"` 3346} 3347 3348func (s *OperationProgress) MarshalJSON() ([]byte, error) { 3349 type NoMethod OperationProgress 3350 raw := NoMethod(*s) 3351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3352} 3353 3354// PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy 3355// feature. 3356type PodSecurityPolicyConfig struct { 3357 // Enabled: Enable the PodSecurityPolicy controller for this cluster. If 3358 // enabled, pods 3359 // must be valid under a PodSecurityPolicy to be created. 3360 Enabled bool `json:"enabled,omitempty"` 3361 3362 // ForceSendFields is a list of field names (e.g. "Enabled") to 3363 // unconditionally include in API requests. By default, fields with 3364 // empty values are omitted from API requests. However, any non-pointer, 3365 // non-interface field appearing in ForceSendFields will be sent to the 3366 // server regardless of whether the field is empty or not. This may be 3367 // used to include empty fields in Patch requests. 3368 ForceSendFields []string `json:"-"` 3369 3370 // NullFields is a list of field names (e.g. "Enabled") to include in 3371 // API requests with the JSON null value. By default, fields with empty 3372 // values are omitted from API requests. However, any field with an 3373 // empty value appearing in NullFields will be sent to the server as 3374 // null. It is an error if a field in this list has a non-empty value. 3375 // This may be used to include null fields in Patch requests. 3376 NullFields []string `json:"-"` 3377} 3378 3379func (s *PodSecurityPolicyConfig) MarshalJSON() ([]byte, error) { 3380 type NoMethod PodSecurityPolicyConfig 3381 raw := NoMethod(*s) 3382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3383} 3384 3385// PrivateClusterConfig: Configuration options for private clusters. 3386type PrivateClusterConfig struct { 3387 // EnablePeeringRouteSharing: Whether to enable route sharing over the 3388 // network peering. 3389 EnablePeeringRouteSharing bool `json:"enablePeeringRouteSharing,omitempty"` 3390 3391 // EnablePrivateEndpoint: Whether the master's internal IP address is 3392 // used as the cluster endpoint. 3393 EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` 3394 3395 // EnablePrivateNodes: Whether nodes have internal IP addresses only. If 3396 // enabled, all nodes are 3397 // given only RFC 1918 private addresses and communicate with the master 3398 // via 3399 // private networking. 3400 EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` 3401 3402 // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the 3403 // hosted master network. This 3404 // range will be used for assigning internal IP addresses to the master 3405 // or 3406 // set of masters, as well as the ILB VIP. This range must not overlap 3407 // with 3408 // any other ranges in use within the cluster's network. 3409 MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` 3410 3411 // PrivateEndpoint: Output only. The internal IP address of this 3412 // cluster's master endpoint. 3413 PrivateEndpoint string `json:"privateEndpoint,omitempty"` 3414 3415 // PublicEndpoint: Output only. The external IP address of this 3416 // cluster's master endpoint. 3417 PublicEndpoint string `json:"publicEndpoint,omitempty"` 3418 3419 // ForceSendFields is a list of field names (e.g. 3420 // "EnablePeeringRouteSharing") to unconditionally include in API 3421 // requests. By default, fields with empty values are omitted from API 3422 // requests. However, any non-pointer, non-interface field appearing in 3423 // ForceSendFields will be sent to the server regardless of whether the 3424 // field is empty or not. This may be used to include empty fields in 3425 // Patch requests. 3426 ForceSendFields []string `json:"-"` 3427 3428 // NullFields is a list of field names (e.g. 3429 // "EnablePeeringRouteSharing") to include in API requests with the JSON 3430 // null value. By default, fields with empty values are omitted from API 3431 // requests. However, any field with an empty value appearing in 3432 // NullFields will be sent to the server as null. It is an error if a 3433 // field in this list has a non-empty value. This may be used to include 3434 // null fields in Patch requests. 3435 NullFields []string `json:"-"` 3436} 3437 3438func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { 3439 type NoMethod PrivateClusterConfig 3440 raw := NoMethod(*s) 3441 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3442} 3443 3444// ResourceLimit: Contains information about amount of some resource in 3445// the cluster. 3446// For memory, value should be in GB. 3447type ResourceLimit struct { 3448 // Maximum: Maximum amount of the resource in the cluster. 3449 Maximum int64 `json:"maximum,omitempty,string"` 3450 3451 // Minimum: Minimum amount of the resource in the cluster. 3452 Minimum int64 `json:"minimum,omitempty,string"` 3453 3454 // ResourceType: Resource name "cpu", "memory" or gpu-specific string. 3455 ResourceType string `json:"resourceType,omitempty"` 3456 3457 // ForceSendFields is a list of field names (e.g. "Maximum") to 3458 // unconditionally include in API requests. By default, fields with 3459 // empty values are omitted from API requests. However, any non-pointer, 3460 // non-interface field appearing in ForceSendFields will be sent to the 3461 // server regardless of whether the field is empty or not. This may be 3462 // used to include empty fields in Patch requests. 3463 ForceSendFields []string `json:"-"` 3464 3465 // NullFields is a list of field names (e.g. "Maximum") to include in 3466 // API requests with the JSON null value. By default, fields with empty 3467 // values are omitted from API requests. However, any field with an 3468 // empty value appearing in NullFields will be sent to the server as 3469 // null. It is an error if a field in this list has a non-empty value. 3470 // This may be used to include null fields in Patch requests. 3471 NullFields []string `json:"-"` 3472} 3473 3474func (s *ResourceLimit) MarshalJSON() ([]byte, error) { 3475 type NoMethod ResourceLimit 3476 raw := NoMethod(*s) 3477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3478} 3479 3480// ResourceUsageExportConfig: Configuration for exporting cluster 3481// resource usages. 3482type ResourceUsageExportConfig struct { 3483 // BigqueryDestination: Configuration to use BigQuery as usage export 3484 // destination. 3485 BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"` 3486 3487 // ConsumptionMeteringConfig: Configuration to enable resource 3488 // consumption metering. 3489 ConsumptionMeteringConfig *ConsumptionMeteringConfig `json:"consumptionMeteringConfig,omitempty"` 3490 3491 // EnableNetworkEgressMetering: Whether to enable network egress 3492 // metering for this cluster. If enabled, a 3493 // daemonset will be created in the cluster to meter network egress 3494 // traffic. 3495 EnableNetworkEgressMetering bool `json:"enableNetworkEgressMetering,omitempty"` 3496 3497 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 3498 // to unconditionally include in API requests. By default, fields with 3499 // empty values are omitted from API requests. However, any non-pointer, 3500 // non-interface field appearing in ForceSendFields will be sent to the 3501 // server regardless of whether the field is empty or not. This may be 3502 // used to include empty fields in Patch requests. 3503 ForceSendFields []string `json:"-"` 3504 3505 // NullFields is a list of field names (e.g. "BigqueryDestination") to 3506 // include in API requests with the JSON null value. By default, fields 3507 // with empty values are omitted from API requests. However, any field 3508 // with an empty value appearing in NullFields will be sent to the 3509 // server as null. It is an error if a field in this list has a 3510 // non-empty value. This may be used to include null fields in Patch 3511 // requests. 3512 NullFields []string `json:"-"` 3513} 3514 3515func (s *ResourceUsageExportConfig) MarshalJSON() ([]byte, error) { 3516 type NoMethod ResourceUsageExportConfig 3517 raw := NoMethod(*s) 3518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3519} 3520 3521// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest 3522// rollbacks the previously Aborted or Failed 3523// NodePool upgrade. This will be an no-op if the last upgrade 3524// successfully 3525// completed. 3526type RollbackNodePoolUpgradeRequest struct { 3527 // ClusterId: Deprecated. The name of the cluster to rollback. 3528 // This field has been deprecated and replaced by the name field. 3529 ClusterId string `json:"clusterId,omitempty"` 3530 3531 // Name: The name (project, location, cluster, node pool id) of the node 3532 // poll to 3533 // rollback upgrade. 3534 // Specified in the format 3535 // 'projects/*/locations/*/clusters/*/nodePools/*'. 3536 Name string `json:"name,omitempty"` 3537 3538 // NodePoolId: Deprecated. The name of the node pool to rollback. 3539 // This field has been deprecated and replaced by the name field. 3540 NodePoolId string `json:"nodePoolId,omitempty"` 3541 3542 // ProjectId: Deprecated. The Google Developers Console [project ID or 3543 // project 3544 // number](https://support.google.com/cloud/answer/6158840). 3545 // This 3546 // field has been deprecated and replaced by the name field. 3547 ProjectId string `json:"projectId,omitempty"` 3548 3549 // Zone: Deprecated. The name of the Google Compute 3550 // Engine 3551 // [zone](/compute/docs/zones#available) in which the 3552 // cluster 3553 // resides. 3554 // This field has been deprecated and replaced by the name field. 3555 Zone string `json:"zone,omitempty"` 3556 3557 // ForceSendFields is a list of field names (e.g. "ClusterId") to 3558 // unconditionally include in API requests. By default, fields with 3559 // empty values are omitted from API requests. However, any non-pointer, 3560 // non-interface field appearing in ForceSendFields will be sent to the 3561 // server regardless of whether the field is empty or not. This may be 3562 // used to include empty fields in Patch requests. 3563 ForceSendFields []string `json:"-"` 3564 3565 // NullFields is a list of field names (e.g. "ClusterId") to include in 3566 // API requests with the JSON null value. By default, fields with empty 3567 // values are omitted from API requests. However, any field with an 3568 // empty value appearing in NullFields will be sent to the server as 3569 // null. It is an error if a field in this list has a non-empty value. 3570 // This may be used to include null fields in Patch requests. 3571 NullFields []string `json:"-"` 3572} 3573 3574func (s *RollbackNodePoolUpgradeRequest) MarshalJSON() ([]byte, error) { 3575 type NoMethod RollbackNodePoolUpgradeRequest 3576 raw := NoMethod(*s) 3577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3578} 3579 3580// SandboxConfig: SandboxConfig contains configurations of the sandbox 3581// to use for the node. 3582type SandboxConfig struct { 3583 // SandboxType: Type of the sandbox to use for the node (e.g. 'gvisor') 3584 SandboxType string `json:"sandboxType,omitempty"` 3585 3586 // ForceSendFields is a list of field names (e.g. "SandboxType") to 3587 // unconditionally include in API requests. By default, fields with 3588 // empty values are omitted from API requests. However, any non-pointer, 3589 // non-interface field appearing in ForceSendFields will be sent to the 3590 // server regardless of whether the field is empty or not. This may be 3591 // used to include empty fields in Patch requests. 3592 ForceSendFields []string `json:"-"` 3593 3594 // NullFields is a list of field names (e.g. "SandboxType") to include 3595 // in API requests with the JSON null value. By default, fields with 3596 // empty values are omitted from API requests. However, any field with 3597 // an empty value appearing in NullFields will be sent to the server as 3598 // null. It is an error if a field in this list has a non-empty value. 3599 // This may be used to include null fields in Patch requests. 3600 NullFields []string `json:"-"` 3601} 3602 3603func (s *SandboxConfig) MarshalJSON() ([]byte, error) { 3604 type NoMethod SandboxConfig 3605 raw := NoMethod(*s) 3606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3607} 3608 3609// ServerConfig: Kubernetes Engine service configuration. 3610type ServerConfig struct { 3611 // DefaultClusterVersion: Version of Kubernetes the service deploys by 3612 // default. 3613 DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` 3614 3615 // DefaultImageType: Default image type. 3616 DefaultImageType string `json:"defaultImageType,omitempty"` 3617 3618 // ValidImageTypes: List of valid image types. 3619 ValidImageTypes []string `json:"validImageTypes,omitempty"` 3620 3621 // ValidMasterVersions: List of valid master versions. 3622 ValidMasterVersions []string `json:"validMasterVersions,omitempty"` 3623 3624 // ValidNodeVersions: List of valid node upgrade target versions. 3625 ValidNodeVersions []string `json:"validNodeVersions,omitempty"` 3626 3627 // ServerResponse contains the HTTP response code and headers from the 3628 // server. 3629 googleapi.ServerResponse `json:"-"` 3630 3631 // ForceSendFields is a list of field names (e.g. 3632 // "DefaultClusterVersion") to unconditionally include in API requests. 3633 // By default, fields with empty values are omitted from API requests. 3634 // However, any non-pointer, non-interface field appearing in 3635 // ForceSendFields will be sent to the server regardless of whether the 3636 // field is empty or not. This may be used to include empty fields in 3637 // Patch requests. 3638 ForceSendFields []string `json:"-"` 3639 3640 // NullFields is a list of field names (e.g. "DefaultClusterVersion") to 3641 // include in API requests with the JSON null value. By default, fields 3642 // with empty values are omitted from API requests. However, any field 3643 // with an empty value appearing in NullFields will be sent to the 3644 // server as null. It is an error if a field in this list has a 3645 // non-empty value. This may be used to include null fields in Patch 3646 // requests. 3647 NullFields []string `json:"-"` 3648} 3649 3650func (s *ServerConfig) MarshalJSON() ([]byte, error) { 3651 type NoMethod ServerConfig 3652 raw := NoMethod(*s) 3653 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3654} 3655 3656// SetAddonsConfigRequest: SetAddonsRequest sets the addons associated 3657// with the cluster. 3658type SetAddonsConfigRequest struct { 3659 // AddonsConfig: The desired configurations for the various addons 3660 // available to run in the 3661 // cluster. 3662 AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` 3663 3664 // ClusterId: Deprecated. The name of the cluster to upgrade. 3665 // This field has been deprecated and replaced by the name field. 3666 ClusterId string `json:"clusterId,omitempty"` 3667 3668 // Name: The name (project, location, cluster) of the cluster to set 3669 // addons. 3670 // Specified in the format 'projects/*/locations/*/clusters/*'. 3671 Name string `json:"name,omitempty"` 3672 3673 // ProjectId: Deprecated. The Google Developers Console [project ID or 3674 // project 3675 // number](https://support.google.com/cloud/answer/6158840). 3676 // This 3677 // field has been deprecated and replaced by the name field. 3678 ProjectId string `json:"projectId,omitempty"` 3679 3680 // Zone: Deprecated. The name of the Google Compute 3681 // Engine 3682 // [zone](/compute/docs/zones#available) in which the 3683 // cluster 3684 // resides. 3685 // This field has been deprecated and replaced by the name field. 3686 Zone string `json:"zone,omitempty"` 3687 3688 // ForceSendFields is a list of field names (e.g. "AddonsConfig") to 3689 // unconditionally include in API requests. By default, fields with 3690 // empty values are omitted from API requests. However, any non-pointer, 3691 // non-interface field appearing in ForceSendFields will be sent to the 3692 // server regardless of whether the field is empty or not. This may be 3693 // used to include empty fields in Patch requests. 3694 ForceSendFields []string `json:"-"` 3695 3696 // NullFields is a list of field names (e.g. "AddonsConfig") to include 3697 // in API requests with the JSON null value. By default, fields with 3698 // empty values are omitted from API requests. However, any field with 3699 // an empty value appearing in NullFields will be sent to the server as 3700 // null. It is an error if a field in this list has a non-empty value. 3701 // This may be used to include null fields in Patch requests. 3702 NullFields []string `json:"-"` 3703} 3704 3705func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { 3706 type NoMethod SetAddonsConfigRequest 3707 raw := NoMethod(*s) 3708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3709} 3710 3711// SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform 3712// labels on a Google Container 3713// Engine cluster, which will in turn set them for Google Compute 3714// Engine 3715// resources used by that cluster 3716type SetLabelsRequest struct { 3717 // ClusterId: Deprecated. The name of the cluster. 3718 // This field has been deprecated and replaced by the name field. 3719 ClusterId string `json:"clusterId,omitempty"` 3720 3721 // LabelFingerprint: The fingerprint of the previous set of labels for 3722 // this resource, 3723 // used to detect conflicts. The fingerprint is initially generated 3724 // by 3725 // Kubernetes Engine and changes after every request to modify or 3726 // update 3727 // labels. You must always provide an up-to-date fingerprint hash 3728 // when 3729 // updating or changing labels. Make a <code>get()</code> request to 3730 // the 3731 // resource to get the latest fingerprint. 3732 LabelFingerprint string `json:"labelFingerprint,omitempty"` 3733 3734 // Name: The name (project, location, cluster id) of the cluster to set 3735 // labels. 3736 // Specified in the format 'projects/*/locations/*/clusters/*'. 3737 Name string `json:"name,omitempty"` 3738 3739 // ProjectId: Deprecated. The Google Developers Console [project ID or 3740 // project 3741 // number](https://developers.google.com/console/help/new/#projec 3742 // tnumber). 3743 // This field has been deprecated and replaced by the name field. 3744 ProjectId string `json:"projectId,omitempty"` 3745 3746 // ResourceLabels: The labels to set for that cluster. 3747 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 3748 3749 // Zone: Deprecated. The name of the Google Compute 3750 // Engine 3751 // [zone](/compute/docs/zones#available) in which the 3752 // cluster 3753 // resides. 3754 // This field has been deprecated and replaced by the name field. 3755 Zone string `json:"zone,omitempty"` 3756 3757 // ForceSendFields is a list of field names (e.g. "ClusterId") to 3758 // unconditionally include in API requests. By default, fields with 3759 // empty values are omitted from API requests. However, any non-pointer, 3760 // non-interface field appearing in ForceSendFields will be sent to the 3761 // server regardless of whether the field is empty or not. This may be 3762 // used to include empty fields in Patch requests. 3763 ForceSendFields []string `json:"-"` 3764 3765 // NullFields is a list of field names (e.g. "ClusterId") to include in 3766 // API requests with the JSON null value. By default, fields with empty 3767 // values are omitted from API requests. However, any field with an 3768 // empty value appearing in NullFields will be sent to the server as 3769 // null. It is an error if a field in this list has a non-empty value. 3770 // This may be used to include null fields in Patch requests. 3771 NullFields []string `json:"-"` 3772} 3773 3774func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { 3775 type NoMethod SetLabelsRequest 3776 raw := NoMethod(*s) 3777 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3778} 3779 3780// SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the 3781// ABAC authorization mechanism for 3782// a cluster. 3783type SetLegacyAbacRequest struct { 3784 // ClusterId: Deprecated. The name of the cluster to update. 3785 // This field has been deprecated and replaced by the name field. 3786 ClusterId string `json:"clusterId,omitempty"` 3787 3788 // Enabled: Whether ABAC authorization will be enabled in the cluster. 3789 Enabled bool `json:"enabled,omitempty"` 3790 3791 // Name: The name (project, location, cluster id) of the cluster to set 3792 // legacy abac. 3793 // Specified in the format 'projects/*/locations/*/clusters/*'. 3794 Name string `json:"name,omitempty"` 3795 3796 // ProjectId: Deprecated. The Google Developers Console [project ID or 3797 // project 3798 // number](https://support.google.com/cloud/answer/6158840). 3799 // This 3800 // field has been deprecated and replaced by the name field. 3801 ProjectId string `json:"projectId,omitempty"` 3802 3803 // Zone: Deprecated. The name of the Google Compute 3804 // Engine 3805 // [zone](/compute/docs/zones#available) in which the 3806 // cluster 3807 // resides. 3808 // This field has been deprecated and replaced by the name field. 3809 Zone string `json:"zone,omitempty"` 3810 3811 // ForceSendFields is a list of field names (e.g. "ClusterId") to 3812 // unconditionally include in API requests. By default, fields with 3813 // empty values are omitted from API requests. However, any non-pointer, 3814 // non-interface field appearing in ForceSendFields will be sent to the 3815 // server regardless of whether the field is empty or not. This may be 3816 // used to include empty fields in Patch requests. 3817 ForceSendFields []string `json:"-"` 3818 3819 // NullFields is a list of field names (e.g. "ClusterId") to include in 3820 // API requests with the JSON null value. By default, fields with empty 3821 // values are omitted from API requests. However, any field with an 3822 // empty value appearing in NullFields will be sent to the server as 3823 // null. It is an error if a field in this list has a non-empty value. 3824 // This may be used to include null fields in Patch requests. 3825 NullFields []string `json:"-"` 3826} 3827 3828func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { 3829 type NoMethod SetLegacyAbacRequest 3830 raw := NoMethod(*s) 3831 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3832} 3833 3834// SetLocationsRequest: SetLocationsRequest sets the locations of the 3835// cluster. 3836type SetLocationsRequest struct { 3837 // ClusterId: Deprecated. The name of the cluster to upgrade. 3838 // This field has been deprecated and replaced by the name field. 3839 ClusterId string `json:"clusterId,omitempty"` 3840 3841 // Locations: The desired list of Google Compute 3842 // Engine 3843 // [zones](/compute/docs/zones#available) in which the cluster's 3844 // nodes 3845 // should be located. Changing the locations a cluster is in will 3846 // result 3847 // in nodes being either created or removed from the cluster, depending 3848 // on 3849 // whether locations are being added or removed. 3850 // 3851 // This list must always include the cluster's primary zone. 3852 Locations []string `json:"locations,omitempty"` 3853 3854 // Name: The name (project, location, cluster) of the cluster to set 3855 // locations. 3856 // Specified in the format 'projects/*/locations/*/clusters/*'. 3857 Name string `json:"name,omitempty"` 3858 3859 // ProjectId: Deprecated. The Google Developers Console [project ID or 3860 // project 3861 // number](https://support.google.com/cloud/answer/6158840). 3862 // This 3863 // field has been deprecated and replaced by the name field. 3864 ProjectId string `json:"projectId,omitempty"` 3865 3866 // Zone: Deprecated. The name of the Google Compute 3867 // Engine 3868 // [zone](/compute/docs/zones#available) in which the 3869 // cluster 3870 // resides. 3871 // This field has been deprecated and replaced by the name field. 3872 Zone string `json:"zone,omitempty"` 3873 3874 // ForceSendFields is a list of field names (e.g. "ClusterId") to 3875 // unconditionally include in API requests. By default, fields with 3876 // empty values are omitted from API requests. However, any non-pointer, 3877 // non-interface field appearing in ForceSendFields will be sent to the 3878 // server regardless of whether the field is empty or not. This may be 3879 // used to include empty fields in Patch requests. 3880 ForceSendFields []string `json:"-"` 3881 3882 // NullFields is a list of field names (e.g. "ClusterId") to include in 3883 // API requests with the JSON null value. By default, fields with empty 3884 // values are omitted from API requests. However, any field with an 3885 // empty value appearing in NullFields will be sent to the server as 3886 // null. It is an error if a field in this list has a non-empty value. 3887 // This may be used to include null fields in Patch requests. 3888 NullFields []string `json:"-"` 3889} 3890 3891func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) { 3892 type NoMethod SetLocationsRequest 3893 raw := NoMethod(*s) 3894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3895} 3896 3897// SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging 3898// service of a cluster. 3899type SetLoggingServiceRequest struct { 3900 // ClusterId: Deprecated. The name of the cluster to upgrade. 3901 // This field has been deprecated and replaced by the name field. 3902 ClusterId string `json:"clusterId,omitempty"` 3903 3904 // LoggingService: The logging service the cluster should use to write 3905 // metrics. 3906 // Currently available options: 3907 // 3908 // * "logging.googleapis.com" - the Google Cloud Logging service 3909 // * "none" - no metrics will be exported from the cluster 3910 LoggingService string `json:"loggingService,omitempty"` 3911 3912 // Name: The name (project, location, cluster) of the cluster to set 3913 // logging. 3914 // Specified in the format 'projects/*/locations/*/clusters/*'. 3915 Name string `json:"name,omitempty"` 3916 3917 // ProjectId: Deprecated. The Google Developers Console [project ID or 3918 // project 3919 // number](https://support.google.com/cloud/answer/6158840). 3920 // This 3921 // field has been deprecated and replaced by the name field. 3922 ProjectId string `json:"projectId,omitempty"` 3923 3924 // Zone: Deprecated. The name of the Google Compute 3925 // Engine 3926 // [zone](/compute/docs/zones#available) in which the 3927 // cluster 3928 // resides. 3929 // This field has been deprecated and replaced by the name field. 3930 Zone string `json:"zone,omitempty"` 3931 3932 // ForceSendFields is a list of field names (e.g. "ClusterId") to 3933 // unconditionally include in API requests. By default, fields with 3934 // empty values are omitted from API requests. However, any non-pointer, 3935 // non-interface field appearing in ForceSendFields will be sent to the 3936 // server regardless of whether the field is empty or not. This may be 3937 // used to include empty fields in Patch requests. 3938 ForceSendFields []string `json:"-"` 3939 3940 // NullFields is a list of field names (e.g. "ClusterId") to include in 3941 // API requests with the JSON null value. By default, fields with empty 3942 // values are omitted from API requests. However, any field with an 3943 // empty value appearing in NullFields will be sent to the server as 3944 // null. It is an error if a field in this list has a non-empty value. 3945 // This may be used to include null fields in Patch requests. 3946 NullFields []string `json:"-"` 3947} 3948 3949func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { 3950 type NoMethod SetLoggingServiceRequest 3951 raw := NoMethod(*s) 3952 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3953} 3954 3955// SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the 3956// maintenance policy for a cluster. 3957type SetMaintenancePolicyRequest struct { 3958 // ClusterId: The name of the cluster to update. 3959 ClusterId string `json:"clusterId,omitempty"` 3960 3961 // MaintenancePolicy: The maintenance policy to be set for the cluster. 3962 // An empty field 3963 // clears the existing maintenance policy. 3964 MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` 3965 3966 // Name: The name (project, location, cluster id) of the cluster to set 3967 // maintenance 3968 // policy. 3969 // Specified in the format 'projects/*/locations/*/clusters/*'. 3970 Name string `json:"name,omitempty"` 3971 3972 // ProjectId: The Google Developers Console [project ID or 3973 // project 3974 // number](https://support.google.com/cloud/answer/6158840). 3975 ProjectId string `json:"projectId,omitempty"` 3976 3977 // Zone: The name of the Google Compute 3978 // Engine 3979 // [zone](/compute/docs/zones#available) in which the cluster 3980 // resides. 3981 Zone string `json:"zone,omitempty"` 3982 3983 // ForceSendFields is a list of field names (e.g. "ClusterId") to 3984 // unconditionally include in API requests. By default, fields with 3985 // empty values are omitted from API requests. However, any non-pointer, 3986 // non-interface field appearing in ForceSendFields will be sent to the 3987 // server regardless of whether the field is empty or not. This may be 3988 // used to include empty fields in Patch requests. 3989 ForceSendFields []string `json:"-"` 3990 3991 // NullFields is a list of field names (e.g. "ClusterId") to include in 3992 // API requests with the JSON null value. By default, fields with empty 3993 // values are omitted from API requests. However, any field with an 3994 // empty value appearing in NullFields will be sent to the server as 3995 // null. It is an error if a field in this list has a non-empty value. 3996 // This may be used to include null fields in Patch requests. 3997 NullFields []string `json:"-"` 3998} 3999 4000func (s *SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) { 4001 type NoMethod SetMaintenancePolicyRequest 4002 raw := NoMethod(*s) 4003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4004} 4005 4006// SetMasterAuthRequest: SetMasterAuthRequest updates the admin password 4007// of a cluster. 4008type SetMasterAuthRequest struct { 4009 // Action: The exact form of action to be taken on the master auth. 4010 // 4011 // Possible values: 4012 // "UNKNOWN" - Operation is unknown and will error out. 4013 // "SET_PASSWORD" - Set the password to a user generated value. 4014 // "GENERATE_PASSWORD" - Generate a new password and set it to that. 4015 // "SET_USERNAME" - Set the username. If an empty username is 4016 // provided, basic authentication 4017 // is disabled for the cluster. If a non-empty username is provided, 4018 // basic 4019 // authentication is enabled, with either a provided password or a 4020 // generated 4021 // one. 4022 Action string `json:"action,omitempty"` 4023 4024 // ClusterId: Deprecated. The name of the cluster to upgrade. 4025 // This field has been deprecated and replaced by the name field. 4026 ClusterId string `json:"clusterId,omitempty"` 4027 4028 // Name: The name (project, location, cluster) of the cluster to set 4029 // auth. 4030 // Specified in the format 'projects/*/locations/*/clusters/*'. 4031 Name string `json:"name,omitempty"` 4032 4033 // ProjectId: Deprecated. The Google Developers Console [project ID or 4034 // project 4035 // number](https://support.google.com/cloud/answer/6158840). 4036 // This 4037 // field has been deprecated and replaced by the name field. 4038 ProjectId string `json:"projectId,omitempty"` 4039 4040 // Update: A description of the update. 4041 Update *MasterAuth `json:"update,omitempty"` 4042 4043 // Zone: Deprecated. The name of the Google Compute 4044 // Engine 4045 // [zone](/compute/docs/zones#available) in which the 4046 // cluster 4047 // resides. 4048 // This field has been deprecated and replaced by the name field. 4049 Zone string `json:"zone,omitempty"` 4050 4051 // ForceSendFields is a list of field names (e.g. "Action") to 4052 // unconditionally include in API requests. By default, fields with 4053 // empty values are omitted from API requests. However, any non-pointer, 4054 // non-interface field appearing in ForceSendFields will be sent to the 4055 // server regardless of whether the field is empty or not. This may be 4056 // used to include empty fields in Patch requests. 4057 ForceSendFields []string `json:"-"` 4058 4059 // NullFields is a list of field names (e.g. "Action") to include in API 4060 // requests with the JSON null value. By default, fields with empty 4061 // values are omitted from API requests. However, any field with an 4062 // empty value appearing in NullFields will be sent to the server as 4063 // null. It is an error if a field in this list has a non-empty value. 4064 // This may be used to include null fields in Patch requests. 4065 NullFields []string `json:"-"` 4066} 4067 4068func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { 4069 type NoMethod SetMasterAuthRequest 4070 raw := NoMethod(*s) 4071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4072} 4073 4074// SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the 4075// monitoring service of a cluster. 4076type SetMonitoringServiceRequest struct { 4077 // ClusterId: Deprecated. The name of the cluster to upgrade. 4078 // This field has been deprecated and replaced by the name field. 4079 ClusterId string `json:"clusterId,omitempty"` 4080 4081 // MonitoringService: The monitoring service the cluster should use to 4082 // write metrics. 4083 // Currently available options: 4084 // 4085 // * "monitoring.googleapis.com" - the Google Cloud Monitoring service 4086 // * "none" - no metrics will be exported from the cluster 4087 MonitoringService string `json:"monitoringService,omitempty"` 4088 4089 // Name: The name (project, location, cluster) of the cluster to set 4090 // monitoring. 4091 // Specified in the format 'projects/*/locations/*/clusters/*'. 4092 Name string `json:"name,omitempty"` 4093 4094 // ProjectId: Deprecated. The Google Developers Console [project ID or 4095 // project 4096 // number](https://support.google.com/cloud/answer/6158840). 4097 // This 4098 // field has been deprecated and replaced by the name field. 4099 ProjectId string `json:"projectId,omitempty"` 4100 4101 // Zone: Deprecated. The name of the Google Compute 4102 // Engine 4103 // [zone](/compute/docs/zones#available) in which the 4104 // cluster 4105 // resides. 4106 // This field has been deprecated and replaced by the name field. 4107 Zone string `json:"zone,omitempty"` 4108 4109 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4110 // unconditionally include in API requests. By default, fields with 4111 // empty values are omitted from API requests. However, any non-pointer, 4112 // non-interface field appearing in ForceSendFields will be sent to the 4113 // server regardless of whether the field is empty or not. This may be 4114 // used to include empty fields in Patch requests. 4115 ForceSendFields []string `json:"-"` 4116 4117 // NullFields is a list of field names (e.g. "ClusterId") to include in 4118 // API requests with the JSON null value. By default, fields with empty 4119 // values are omitted from API requests. However, any field with an 4120 // empty value appearing in NullFields will be sent to the server as 4121 // null. It is an error if a field in this list has a non-empty value. 4122 // This may be used to include null fields in Patch requests. 4123 NullFields []string `json:"-"` 4124} 4125 4126func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { 4127 type NoMethod SetMonitoringServiceRequest 4128 raw := NoMethod(*s) 4129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4130} 4131 4132// SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables 4133// network policy for a cluster. 4134type SetNetworkPolicyRequest struct { 4135 // ClusterId: Deprecated. The name of the cluster. 4136 // This field has been deprecated and replaced by the name field. 4137 ClusterId string `json:"clusterId,omitempty"` 4138 4139 // Name: The name (project, location, cluster id) of the cluster to set 4140 // networking 4141 // policy. Specified in the format 'projects/*/locations/*/clusters/*'. 4142 Name string `json:"name,omitempty"` 4143 4144 // NetworkPolicy: Configuration options for the NetworkPolicy feature. 4145 NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` 4146 4147 // ProjectId: Deprecated. The Google Developers Console [project ID or 4148 // project 4149 // number](https://developers.google.com/console/help/new/#projec 4150 // tnumber). 4151 // This field has been deprecated and replaced by the name field. 4152 ProjectId string `json:"projectId,omitempty"` 4153 4154 // Zone: Deprecated. The name of the Google Compute 4155 // Engine 4156 // [zone](/compute/docs/zones#available) in which the 4157 // cluster 4158 // resides. 4159 // This field has been deprecated and replaced by the name field. 4160 Zone string `json:"zone,omitempty"` 4161 4162 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4163 // unconditionally include in API requests. By default, fields with 4164 // empty values are omitted from API requests. However, any non-pointer, 4165 // non-interface field appearing in ForceSendFields will be sent to the 4166 // server regardless of whether the field is empty or not. This may be 4167 // used to include empty fields in Patch requests. 4168 ForceSendFields []string `json:"-"` 4169 4170 // NullFields is a list of field names (e.g. "ClusterId") to include in 4171 // API requests with the JSON null value. By default, fields with empty 4172 // values are omitted from API requests. However, any field with an 4173 // empty value appearing in NullFields will be sent to the server as 4174 // null. It is an error if a field in this list has a non-empty value. 4175 // This may be used to include null fields in Patch requests. 4176 NullFields []string `json:"-"` 4177} 4178 4179func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { 4180 type NoMethod SetNetworkPolicyRequest 4181 raw := NoMethod(*s) 4182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4183} 4184 4185// SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the 4186// autoscaler settings of a node pool. 4187type SetNodePoolAutoscalingRequest struct { 4188 // Autoscaling: Autoscaling configuration for the node pool. 4189 Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` 4190 4191 // ClusterId: Deprecated. The name of the cluster to upgrade. 4192 // This field has been deprecated and replaced by the name field. 4193 ClusterId string `json:"clusterId,omitempty"` 4194 4195 // Name: The name (project, location, cluster, node pool) of the node 4196 // pool to set 4197 // autoscaler settings. Specified in the 4198 // format 4199 // 'projects/*/locations/*/clusters/*/nodePools/*'. 4200 Name string `json:"name,omitempty"` 4201 4202 // NodePoolId: Deprecated. The name of the node pool to upgrade. 4203 // This field has been deprecated and replaced by the name field. 4204 NodePoolId string `json:"nodePoolId,omitempty"` 4205 4206 // ProjectId: Deprecated. The Google Developers Console [project ID or 4207 // project 4208 // number](https://support.google.com/cloud/answer/6158840). 4209 // This 4210 // field has been deprecated and replaced by the name field. 4211 ProjectId string `json:"projectId,omitempty"` 4212 4213 // Zone: Deprecated. The name of the Google Compute 4214 // Engine 4215 // [zone](/compute/docs/zones#available) in which the 4216 // cluster 4217 // resides. 4218 // This field has been deprecated and replaced by the name field. 4219 Zone string `json:"zone,omitempty"` 4220 4221 // ForceSendFields is a list of field names (e.g. "Autoscaling") to 4222 // unconditionally include in API requests. By default, fields with 4223 // empty values are omitted from API requests. However, any non-pointer, 4224 // non-interface field appearing in ForceSendFields will be sent to the 4225 // server regardless of whether the field is empty or not. This may be 4226 // used to include empty fields in Patch requests. 4227 ForceSendFields []string `json:"-"` 4228 4229 // NullFields is a list of field names (e.g. "Autoscaling") to include 4230 // in API requests with the JSON null value. By default, fields with 4231 // empty values are omitted from API requests. However, any field with 4232 // an empty value appearing in NullFields will be sent to the server as 4233 // null. It is an error if a field in this list has a non-empty value. 4234 // This may be used to include null fields in Patch requests. 4235 NullFields []string `json:"-"` 4236} 4237 4238func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { 4239 type NoMethod SetNodePoolAutoscalingRequest 4240 raw := NoMethod(*s) 4241 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4242} 4243 4244// SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the 4245// node management properties of a node 4246// pool. 4247type SetNodePoolManagementRequest struct { 4248 // ClusterId: Deprecated. The name of the cluster to update. 4249 // This field has been deprecated and replaced by the name field. 4250 ClusterId string `json:"clusterId,omitempty"` 4251 4252 // Management: NodeManagement configuration for the node pool. 4253 Management *NodeManagement `json:"management,omitempty"` 4254 4255 // Name: The name (project, location, cluster, node pool id) of the node 4256 // pool to set 4257 // management properties. Specified in the 4258 // format 4259 // 'projects/*/locations/*/clusters/*/nodePools/*'. 4260 Name string `json:"name,omitempty"` 4261 4262 // NodePoolId: Deprecated. The name of the node pool to update. 4263 // This field has been deprecated and replaced by the name field. 4264 NodePoolId string `json:"nodePoolId,omitempty"` 4265 4266 // ProjectId: Deprecated. The Google Developers Console [project ID or 4267 // project 4268 // number](https://support.google.com/cloud/answer/6158840). 4269 // This 4270 // field has been deprecated and replaced by the name field. 4271 ProjectId string `json:"projectId,omitempty"` 4272 4273 // Zone: Deprecated. The name of the Google Compute 4274 // Engine 4275 // [zone](/compute/docs/zones#available) in which the 4276 // cluster 4277 // resides. 4278 // This field has been deprecated and replaced by the name field. 4279 Zone string `json:"zone,omitempty"` 4280 4281 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4282 // unconditionally include in API requests. By default, fields with 4283 // empty values are omitted from API requests. However, any non-pointer, 4284 // non-interface field appearing in ForceSendFields will be sent to the 4285 // server regardless of whether the field is empty or not. This may be 4286 // used to include empty fields in Patch requests. 4287 ForceSendFields []string `json:"-"` 4288 4289 // NullFields is a list of field names (e.g. "ClusterId") to include in 4290 // API requests with the JSON null value. By default, fields with empty 4291 // values are omitted from API requests. However, any field with an 4292 // empty value appearing in NullFields will be sent to the server as 4293 // null. It is an error if a field in this list has a non-empty value. 4294 // This may be used to include null fields in Patch requests. 4295 NullFields []string `json:"-"` 4296} 4297 4298func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { 4299 type NoMethod SetNodePoolManagementRequest 4300 raw := NoMethod(*s) 4301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4302} 4303 4304// SetNodePoolSizeRequest: SetNodePoolSizeRequest sets the size a 4305// node 4306// pool. 4307type SetNodePoolSizeRequest struct { 4308 // ClusterId: Deprecated. The name of the cluster to update. 4309 // This field has been deprecated and replaced by the name field. 4310 ClusterId string `json:"clusterId,omitempty"` 4311 4312 // Name: The name (project, location, cluster, node pool id) of the node 4313 // pool to set 4314 // size. 4315 // Specified in the format 4316 // 'projects/*/locations/*/clusters/*/nodePools/*'. 4317 Name string `json:"name,omitempty"` 4318 4319 // NodeCount: The desired node count for the pool. 4320 NodeCount int64 `json:"nodeCount,omitempty"` 4321 4322 // NodePoolId: Deprecated. The name of the node pool to update. 4323 // This field has been deprecated and replaced by the name field. 4324 NodePoolId string `json:"nodePoolId,omitempty"` 4325 4326 // ProjectId: Deprecated. The Google Developers Console [project ID or 4327 // project 4328 // number](https://support.google.com/cloud/answer/6158840). 4329 // This 4330 // field has been deprecated and replaced by the name field. 4331 ProjectId string `json:"projectId,omitempty"` 4332 4333 // Zone: Deprecated. The name of the Google Compute 4334 // Engine 4335 // [zone](/compute/docs/zones#available) in which the 4336 // cluster 4337 // resides. 4338 // This field has been deprecated and replaced by the name field. 4339 Zone string `json:"zone,omitempty"` 4340 4341 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4342 // unconditionally include in API requests. By default, fields with 4343 // empty values are omitted from API requests. However, any non-pointer, 4344 // non-interface field appearing in ForceSendFields will be sent to the 4345 // server regardless of whether the field is empty or not. This may be 4346 // used to include empty fields in Patch requests. 4347 ForceSendFields []string `json:"-"` 4348 4349 // NullFields is a list of field names (e.g. "ClusterId") to include in 4350 // API requests with the JSON null value. By default, fields with empty 4351 // values are omitted from API requests. However, any field with an 4352 // empty value appearing in NullFields will be sent to the server as 4353 // null. It is an error if a field in this list has a non-empty value. 4354 // This may be used to include null fields in Patch requests. 4355 NullFields []string `json:"-"` 4356} 4357 4358func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { 4359 type NoMethod SetNodePoolSizeRequest 4360 raw := NoMethod(*s) 4361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4362} 4363 4364// ShieldedInstanceConfig: A set of Shielded Instance options. 4365type ShieldedInstanceConfig struct { 4366 // EnableIntegrityMonitoring: Defines whether the instance has integrity 4367 // monitoring enabled. 4368 // 4369 // Enables monitoring and attestation of the boot integrity of the 4370 // instance. 4371 // The attestation is performed against the integrity policy baseline. 4372 // This 4373 // baseline is initially derived from the implicitly trusted boot image 4374 // when 4375 // the instance is created. 4376 EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` 4377 4378 // EnableSecureBoot: Defines whether the instance has Secure Boot 4379 // enabled. 4380 // 4381 // Secure Boot helps ensure that the system only runs authentic software 4382 // by 4383 // verifying the digital signature of all boot components, and halting 4384 // the 4385 // boot process if signature verification fails. 4386 EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` 4387 4388 // ForceSendFields is a list of field names (e.g. 4389 // "EnableIntegrityMonitoring") to unconditionally include in API 4390 // requests. By default, fields with empty values are omitted from API 4391 // requests. However, any non-pointer, non-interface field appearing in 4392 // ForceSendFields will be sent to the server regardless of whether the 4393 // field is empty or not. This may be used to include empty fields in 4394 // Patch requests. 4395 ForceSendFields []string `json:"-"` 4396 4397 // NullFields is a list of field names (e.g. 4398 // "EnableIntegrityMonitoring") to include in API requests with the JSON 4399 // null value. By default, fields with empty values are omitted from API 4400 // requests. However, any field with an empty value appearing in 4401 // NullFields will be sent to the server as null. It is an error if a 4402 // field in this list has a non-empty value. This may be used to include 4403 // null fields in Patch requests. 4404 NullFields []string `json:"-"` 4405} 4406 4407func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { 4408 type NoMethod ShieldedInstanceConfig 4409 raw := NoMethod(*s) 4410 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4411} 4412 4413// StartIPRotationRequest: StartIPRotationRequest creates a new IP for 4414// the cluster and then performs 4415// a node upgrade on each node pool to point to the new IP. 4416type StartIPRotationRequest struct { 4417 // ClusterId: Deprecated. The name of the cluster. 4418 // This field has been deprecated and replaced by the name field. 4419 ClusterId string `json:"clusterId,omitempty"` 4420 4421 // Name: The name (project, location, cluster id) of the cluster to 4422 // start IP 4423 // rotation. Specified in the format 4424 // 'projects/*/locations/*/clusters/*'. 4425 Name string `json:"name,omitempty"` 4426 4427 // ProjectId: Deprecated. The Google Developers Console [project ID or 4428 // project 4429 // number](https://developers.google.com/console/help/new/#projec 4430 // tnumber). 4431 // This field has been deprecated and replaced by the name field. 4432 ProjectId string `json:"projectId,omitempty"` 4433 4434 // RotateCredentials: Whether to rotate credentials during IP rotation. 4435 RotateCredentials bool `json:"rotateCredentials,omitempty"` 4436 4437 // Zone: Deprecated. The name of the Google Compute 4438 // Engine 4439 // [zone](/compute/docs/zones#available) in which the 4440 // cluster 4441 // resides. 4442 // This field has been deprecated and replaced by the name field. 4443 Zone string `json:"zone,omitempty"` 4444 4445 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4446 // unconditionally include in API requests. By default, fields with 4447 // empty values are omitted from API requests. However, any non-pointer, 4448 // non-interface field appearing in ForceSendFields will be sent to the 4449 // server regardless of whether the field is empty or not. This may be 4450 // used to include empty fields in Patch requests. 4451 ForceSendFields []string `json:"-"` 4452 4453 // NullFields is a list of field names (e.g. "ClusterId") to include in 4454 // API requests with the JSON null value. By default, fields with empty 4455 // values are omitted from API requests. However, any field with an 4456 // empty value appearing in NullFields will be sent to the server as 4457 // null. It is an error if a field in this list has a non-empty value. 4458 // This may be used to include null fields in Patch requests. 4459 NullFields []string `json:"-"` 4460} 4461 4462func (s *StartIPRotationRequest) MarshalJSON() ([]byte, error) { 4463 type NoMethod StartIPRotationRequest 4464 raw := NoMethod(*s) 4465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4466} 4467 4468// StatusCondition: StatusCondition describes why a cluster or a node 4469// pool has a certain status 4470// (e.g., ERROR or DEGRADED). 4471type StatusCondition struct { 4472 // Code: Machine-friendly representation of the condition 4473 // 4474 // Possible values: 4475 // "UNKNOWN" - UNKNOWN indicates a generic condition. 4476 // "GCE_STOCKOUT" - GCE_STOCKOUT indicates a Google Compute Engine 4477 // stockout. 4478 // "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED 4479 // indicates that the user deleted their robot 4480 // service account. 4481 // "GCE_QUOTA_EXCEEDED" - Google Compute Engine quota was exceeded. 4482 // "SET_BY_OPERATOR" - Cluster state was manually changed by an SRE 4483 // due to a system logic error. 4484 // More codes TBA 4485 Code string `json:"code,omitempty"` 4486 4487 // Message: Human-friendly representation of the condition 4488 Message string `json:"message,omitempty"` 4489 4490 // ForceSendFields is a list of field names (e.g. "Code") to 4491 // unconditionally include in API requests. By default, fields with 4492 // empty values are omitted from API requests. However, any non-pointer, 4493 // non-interface field appearing in ForceSendFields will be sent to the 4494 // server regardless of whether the field is empty or not. This may be 4495 // used to include empty fields in Patch requests. 4496 ForceSendFields []string `json:"-"` 4497 4498 // NullFields is a list of field names (e.g. "Code") to include in API 4499 // requests with the JSON null value. By default, fields with empty 4500 // values are omitted from API requests. However, any field with an 4501 // empty value appearing in NullFields will be sent to the server as 4502 // null. It is an error if a field in this list has a non-empty value. 4503 // This may be used to include null fields in Patch requests. 4504 NullFields []string `json:"-"` 4505} 4506 4507func (s *StatusCondition) MarshalJSON() ([]byte, error) { 4508 type NoMethod StatusCondition 4509 raw := NoMethod(*s) 4510 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4511} 4512 4513// TierSettings: Cluster tier settings. 4514type TierSettings struct { 4515 // Tier: Cluster tier. 4516 // 4517 // Possible values: 4518 // "UNSPECIFIED" - UNSPECIFIED is the default value. If this value is 4519 // set during create or 4520 // update, it defaults to the project level tier setting. 4521 // "STANDARD" - Represents the standard tier or base Google Kubernetes 4522 // Engine offering. 4523 // "ADVANCED" - Represents the advanced tier. 4524 Tier string `json:"tier,omitempty"` 4525 4526 // ForceSendFields is a list of field names (e.g. "Tier") to 4527 // unconditionally include in API requests. By default, fields with 4528 // empty values are omitted from API requests. However, any non-pointer, 4529 // non-interface field appearing in ForceSendFields will be sent to the 4530 // server regardless of whether the field is empty or not. This may be 4531 // used to include empty fields in Patch requests. 4532 ForceSendFields []string `json:"-"` 4533 4534 // NullFields is a list of field names (e.g. "Tier") to include in API 4535 // requests with the JSON null value. By default, fields with empty 4536 // values are omitted from API requests. However, any field with an 4537 // empty value appearing in NullFields will be sent to the server as 4538 // null. It is an error if a field in this list has a non-empty value. 4539 // This may be used to include null fields in Patch requests. 4540 NullFields []string `json:"-"` 4541} 4542 4543func (s *TierSettings) MarshalJSON() ([]byte, error) { 4544 type NoMethod TierSettings 4545 raw := NoMethod(*s) 4546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4547} 4548 4549// UpdateClusterRequest: UpdateClusterRequest updates the settings of a 4550// cluster. 4551type UpdateClusterRequest struct { 4552 // ClusterId: Deprecated. The name of the cluster to upgrade. 4553 // This field has been deprecated and replaced by the name field. 4554 ClusterId string `json:"clusterId,omitempty"` 4555 4556 // Name: The name (project, location, cluster) of the cluster to 4557 // update. 4558 // Specified in the format 'projects/*/locations/*/clusters/*'. 4559 Name string `json:"name,omitempty"` 4560 4561 // ProjectId: Deprecated. The Google Developers Console [project ID or 4562 // project 4563 // number](https://support.google.com/cloud/answer/6158840). 4564 // This 4565 // field has been deprecated and replaced by the name field. 4566 ProjectId string `json:"projectId,omitempty"` 4567 4568 // Update: A description of the update. 4569 Update *ClusterUpdate `json:"update,omitempty"` 4570 4571 // Zone: Deprecated. The name of the Google Compute 4572 // Engine 4573 // [zone](/compute/docs/zones#available) in which the 4574 // cluster 4575 // resides. 4576 // This field has been deprecated and replaced by the name field. 4577 Zone string `json:"zone,omitempty"` 4578 4579 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4580 // unconditionally include in API requests. By default, fields with 4581 // empty values are omitted from API requests. However, any non-pointer, 4582 // non-interface field appearing in ForceSendFields will be sent to the 4583 // server regardless of whether the field is empty or not. This may be 4584 // used to include empty fields in Patch requests. 4585 ForceSendFields []string `json:"-"` 4586 4587 // NullFields is a list of field names (e.g. "ClusterId") to include in 4588 // API requests with the JSON null value. By default, fields with empty 4589 // values are omitted from API requests. However, any field with an 4590 // empty value appearing in NullFields will be sent to the server as 4591 // null. It is an error if a field in this list has a non-empty value. 4592 // This may be used to include null fields in Patch requests. 4593 NullFields []string `json:"-"` 4594} 4595 4596func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { 4597 type NoMethod UpdateClusterRequest 4598 raw := NoMethod(*s) 4599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4600} 4601 4602// UpdateMasterRequest: UpdateMasterRequest updates the master of the 4603// cluster. 4604type UpdateMasterRequest struct { 4605 // ClusterId: Deprecated. The name of the cluster to upgrade. 4606 // This field has been deprecated and replaced by the name field. 4607 ClusterId string `json:"clusterId,omitempty"` 4608 4609 // MasterVersion: The Kubernetes version to change the master to. 4610 // 4611 // Users may specify either explicit versions offered by 4612 // Kubernetes Engine or version aliases, which have the following 4613 // behavior: 4614 // 4615 // - "latest": picks the highest valid Kubernetes version 4616 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 4617 // version 4618 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 4619 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 4620 // - "-": picks the default Kubernetes version 4621 MasterVersion string `json:"masterVersion,omitempty"` 4622 4623 // Name: The name (project, location, cluster) of the cluster to 4624 // update. 4625 // Specified in the format 'projects/*/locations/*/clusters/*'. 4626 Name string `json:"name,omitempty"` 4627 4628 // ProjectId: Deprecated. The Google Developers Console [project ID or 4629 // project 4630 // number](https://support.google.com/cloud/answer/6158840). 4631 // This 4632 // field has been deprecated and replaced by the name field. 4633 ProjectId string `json:"projectId,omitempty"` 4634 4635 // Zone: Deprecated. The name of the Google Compute 4636 // Engine 4637 // [zone](/compute/docs/zones#available) in which the 4638 // cluster 4639 // resides. 4640 // This field has been deprecated and replaced by the name field. 4641 Zone string `json:"zone,omitempty"` 4642 4643 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4644 // unconditionally include in API requests. By default, fields with 4645 // empty values are omitted from API requests. However, any non-pointer, 4646 // non-interface field appearing in ForceSendFields will be sent to the 4647 // server regardless of whether the field is empty or not. This may be 4648 // used to include empty fields in Patch requests. 4649 ForceSendFields []string `json:"-"` 4650 4651 // NullFields is a list of field names (e.g. "ClusterId") to include in 4652 // API requests with the JSON null value. By default, fields with empty 4653 // values are omitted from API requests. However, any field with an 4654 // empty value appearing in NullFields will be sent to the server as 4655 // null. It is an error if a field in this list has a non-empty value. 4656 // This may be used to include null fields in Patch requests. 4657 NullFields []string `json:"-"` 4658} 4659 4660func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) { 4661 type NoMethod UpdateMasterRequest 4662 raw := NoMethod(*s) 4663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4664} 4665 4666// UpdateNodePoolRequest: SetNodePoolVersionRequest updates the version 4667// of a node pool. 4668type UpdateNodePoolRequest struct { 4669 // ClusterId: Deprecated. The name of the cluster to upgrade. 4670 // This field has been deprecated and replaced by the name field. 4671 ClusterId string `json:"clusterId,omitempty"` 4672 4673 // ImageType: The desired image type for the node pool. 4674 ImageType string `json:"imageType,omitempty"` 4675 4676 // Locations: The desired list of Google Compute 4677 // Engine 4678 // [zones](/compute/docs/zones#available) in which the node pool's 4679 // nodes 4680 // should be located. Changing the locations for a node pool will 4681 // result 4682 // in nodes being either created or removed from the node pool, 4683 // depending 4684 // on whether locations are being added or removed. 4685 Locations []string `json:"locations,omitempty"` 4686 4687 // Name: The name (project, location, cluster, node pool) of the node 4688 // pool to 4689 // update. Specified in the 4690 // format 4691 // 'projects/*/locations/*/clusters/*/nodePools/*'. 4692 Name string `json:"name,omitempty"` 4693 4694 // NodePoolId: Deprecated. The name of the node pool to upgrade. 4695 // This field has been deprecated and replaced by the name field. 4696 NodePoolId string `json:"nodePoolId,omitempty"` 4697 4698 // NodeVersion: The Kubernetes version to change the nodes to (typically 4699 // an 4700 // upgrade). 4701 // 4702 // Users may specify either explicit versions offered by Kubernetes 4703 // Engine or 4704 // version aliases, which have the following behavior: 4705 // 4706 // - "latest": picks the highest valid Kubernetes version 4707 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 4708 // version 4709 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 4710 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 4711 // - "-": picks the Kubernetes master version 4712 NodeVersion string `json:"nodeVersion,omitempty"` 4713 4714 // ProjectId: Deprecated. The Google Developers Console [project ID or 4715 // project 4716 // number](https://support.google.com/cloud/answer/6158840). 4717 // This 4718 // field has been deprecated and replaced by the name field. 4719 ProjectId string `json:"projectId,omitempty"` 4720 4721 // WorkloadMetadataConfig: The desired image type for the node pool. 4722 WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` 4723 4724 // Zone: Deprecated. The name of the Google Compute 4725 // Engine 4726 // [zone](/compute/docs/zones#available) in which the 4727 // cluster 4728 // resides. 4729 // This field has been deprecated and replaced by the name field. 4730 Zone string `json:"zone,omitempty"` 4731 4732 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4733 // unconditionally include in API requests. By default, fields with 4734 // empty values are omitted from API requests. However, any non-pointer, 4735 // non-interface field appearing in ForceSendFields will be sent to the 4736 // server regardless of whether the field is empty or not. This may be 4737 // used to include empty fields in Patch requests. 4738 ForceSendFields []string `json:"-"` 4739 4740 // NullFields is a list of field names (e.g. "ClusterId") to include in 4741 // API requests with the JSON null value. By default, fields with empty 4742 // values are omitted from API requests. However, any field with an 4743 // empty value appearing in NullFields will be sent to the server as 4744 // null. It is an error if a field in this list has a non-empty value. 4745 // This may be used to include null fields in Patch requests. 4746 NullFields []string `json:"-"` 4747} 4748 4749func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { 4750 type NoMethod UpdateNodePoolRequest 4751 raw := NoMethod(*s) 4752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4753} 4754 4755// UsableSubnetwork: UsableSubnetwork resource returns the subnetwork 4756// name, its associated network 4757// and the primary CIDR range. 4758type UsableSubnetwork struct { 4759 // IpCidrRange: The range of internal addresses that are owned by this 4760 // subnetwork. 4761 IpCidrRange string `json:"ipCidrRange,omitempty"` 4762 4763 // Network: Network Name. 4764 // Example: projects/my-project/global/networks/my-network 4765 Network string `json:"network,omitempty"` 4766 4767 // SecondaryIpRanges: Secondary IP ranges. 4768 SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` 4769 4770 // StatusMessage: A human readable status message representing the 4771 // reasons for cases where 4772 // the caller cannot use the secondary ranges under the subnet. For 4773 // example if 4774 // the secondary_ip_ranges is empty due to a permission issue, an 4775 // insufficient 4776 // permission message will be given by status_message. 4777 StatusMessage string `json:"statusMessage,omitempty"` 4778 4779 // Subnetwork: Subnetwork Name. 4780 // Example: 4781 // projects/my-project/regions/us-central1/subnetworks/my-subnet 4782 Subnetwork string `json:"subnetwork,omitempty"` 4783 4784 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 4785 // unconditionally include in API requests. By default, fields with 4786 // empty values are omitted from API requests. However, any non-pointer, 4787 // non-interface field appearing in ForceSendFields will be sent to the 4788 // server regardless of whether the field is empty or not. This may be 4789 // used to include empty fields in Patch requests. 4790 ForceSendFields []string `json:"-"` 4791 4792 // NullFields is a list of field names (e.g. "IpCidrRange") to include 4793 // in API requests with the JSON null value. By default, fields with 4794 // empty values are omitted from API requests. However, any field with 4795 // an empty value appearing in NullFields will be sent to the server as 4796 // null. It is an error if a field in this list has a non-empty value. 4797 // This may be used to include null fields in Patch requests. 4798 NullFields []string `json:"-"` 4799} 4800 4801func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) { 4802 type NoMethod UsableSubnetwork 4803 raw := NoMethod(*s) 4804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4805} 4806 4807// UsableSubnetworkSecondaryRange: Secondary IP range of a usable 4808// subnetwork. 4809type UsableSubnetworkSecondaryRange struct { 4810 // IpCidrRange: The range of IP addresses belonging to this subnetwork 4811 // secondary range. 4812 IpCidrRange string `json:"ipCidrRange,omitempty"` 4813 4814 // RangeName: The name associated with this subnetwork secondary range, 4815 // used when adding 4816 // an alias IP range to a VM instance. 4817 RangeName string `json:"rangeName,omitempty"` 4818 4819 // Status: This field is to determine the status of the secondary range 4820 // programmably. 4821 // 4822 // Possible values: 4823 // "UNKNOWN" - UNKNOWN is the zero value of the Status enum. It's not 4824 // a valid status. 4825 // "UNUSED" - UNUSED denotes that this range is unclaimed by any 4826 // cluster. 4827 // "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is 4828 // claimed by a cluster for 4829 // services. It cannot be used for other clusters. 4830 // "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range 4831 // was created by the network admin 4832 // and is currently claimed by a cluster for pods. It can only be used 4833 // by 4834 // other clusters as a pod range. 4835 // "IN_USE_MANAGED_POD" - IN_USE_MANAGED_POD denotes this range was 4836 // created by GKE and is claimed 4837 // for pods. It cannot be used for other clusters. 4838 Status string `json:"status,omitempty"` 4839 4840 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 4841 // unconditionally include in API requests. By default, fields with 4842 // empty values are omitted from API requests. However, any non-pointer, 4843 // non-interface field appearing in ForceSendFields will be sent to the 4844 // server regardless of whether the field is empty or not. This may be 4845 // used to include empty fields in Patch requests. 4846 ForceSendFields []string `json:"-"` 4847 4848 // NullFields is a list of field names (e.g. "IpCidrRange") to include 4849 // in API requests with the JSON null value. By default, fields with 4850 // empty values are omitted from API requests. However, any field with 4851 // an empty value appearing in NullFields will be sent to the server as 4852 // null. It is an error if a field in this list has a non-empty value. 4853 // This may be used to include null fields in Patch requests. 4854 NullFields []string `json:"-"` 4855} 4856 4857func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { 4858 type NoMethod UsableSubnetworkSecondaryRange 4859 raw := NoMethod(*s) 4860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4861} 4862 4863// VerticalPodAutoscaling: VerticalPodAutoscaling contains global, 4864// per-cluster information 4865// required by Vertical Pod Autoscaler to automatically adjust 4866// the resources of pods controlled by it. 4867type VerticalPodAutoscaling struct { 4868 // Enabled: Enables vertical pod autoscaling. 4869 Enabled bool `json:"enabled,omitempty"` 4870 4871 // ForceSendFields is a list of field names (e.g. "Enabled") to 4872 // unconditionally include in API requests. By default, fields with 4873 // empty values are omitted from API requests. However, any non-pointer, 4874 // non-interface field appearing in ForceSendFields will be sent to the 4875 // server regardless of whether the field is empty or not. This may be 4876 // used to include empty fields in Patch requests. 4877 ForceSendFields []string `json:"-"` 4878 4879 // NullFields is a list of field names (e.g. "Enabled") to include in 4880 // API requests with the JSON null value. By default, fields with empty 4881 // values are omitted from API requests. However, any field with an 4882 // empty value appearing in NullFields will be sent to the server as 4883 // null. It is an error if a field in this list has a non-empty value. 4884 // This may be used to include null fields in Patch requests. 4885 NullFields []string `json:"-"` 4886} 4887 4888func (s *VerticalPodAutoscaling) MarshalJSON() ([]byte, error) { 4889 type NoMethod VerticalPodAutoscaling 4890 raw := NoMethod(*s) 4891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4892} 4893 4894// WorkloadIdentityConfig: Configuration for the use of Kubernetes 4895// Service Accounts in GCP IAM 4896// policies. 4897type WorkloadIdentityConfig struct { 4898 // IdentityNamespace: IAM Identity Namespace to attach all Kubernetes 4899 // Service Accounts to. 4900 IdentityNamespace string `json:"identityNamespace,omitempty"` 4901 4902 // ForceSendFields is a list of field names (e.g. "IdentityNamespace") 4903 // to unconditionally include in API requests. By default, fields with 4904 // empty values are omitted from API requests. However, any non-pointer, 4905 // non-interface field appearing in ForceSendFields will be sent to the 4906 // server regardless of whether the field is empty or not. This may be 4907 // used to include empty fields in Patch requests. 4908 ForceSendFields []string `json:"-"` 4909 4910 // NullFields is a list of field names (e.g. "IdentityNamespace") to 4911 // include in API requests with the JSON null value. By default, fields 4912 // with empty values are omitted from API requests. However, any field 4913 // with an empty value appearing in NullFields will be sent to the 4914 // server as null. It is an error if a field in this list has a 4915 // non-empty value. This may be used to include null fields in Patch 4916 // requests. 4917 NullFields []string `json:"-"` 4918} 4919 4920func (s *WorkloadIdentityConfig) MarshalJSON() ([]byte, error) { 4921 type NoMethod WorkloadIdentityConfig 4922 raw := NoMethod(*s) 4923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4924} 4925 4926// WorkloadMetadataConfig: WorkloadMetadataConfig defines the metadata 4927// configuration to expose to 4928// workloads on the node pool. 4929type WorkloadMetadataConfig struct { 4930 // NodeMetadata: NodeMetadata is the configuration for how to expose 4931 // metadata to the 4932 // workloads running on the node. 4933 // 4934 // Possible values: 4935 // "UNSPECIFIED" - Not set. 4936 // "SECURE" - Prevent workloads not in hostNetwork from accessing 4937 // certain VM metadata, 4938 // specifically kube-env, which contains Kubelet credentials, and 4939 // the 4940 // instance identity token. 4941 // 4942 // Metadata concealment is a temporary security solution available while 4943 // the 4944 // bootstrapping process for cluster nodes is being redesigned 4945 // with 4946 // significant security improvements. This feature is scheduled to 4947 // be 4948 // deprecated in the future and later removed. 4949 // "EXPOSE" - Expose all VM metadata to pods. 4950 // "GKE_METADATA_SERVER" - Run the GKE Metadata Server on this node. 4951 // The GKE Metadata Server exposes 4952 // a metadata API to workloads that is compatible with the V1 4953 // Compute 4954 // Metadata APIs exposed by the Compute Engine and App Engine 4955 // Metadata 4956 // Servers. This feature can only be enabled if Workload Identity is 4957 // enabled 4958 // at the cluster level. 4959 NodeMetadata string `json:"nodeMetadata,omitempty"` 4960 4961 // ForceSendFields is a list of field names (e.g. "NodeMetadata") to 4962 // unconditionally include in API requests. By default, fields with 4963 // empty values are omitted from API requests. However, any non-pointer, 4964 // non-interface field appearing in ForceSendFields will be sent to the 4965 // server regardless of whether the field is empty or not. This may be 4966 // used to include empty fields in Patch requests. 4967 ForceSendFields []string `json:"-"` 4968 4969 // NullFields is a list of field names (e.g. "NodeMetadata") to include 4970 // in API requests with the JSON null value. By default, fields with 4971 // empty values are omitted from API requests. However, any field with 4972 // an empty value appearing in NullFields will be sent to the server as 4973 // null. It is an error if a field in this list has a non-empty value. 4974 // This may be used to include null fields in Patch requests. 4975 NullFields []string `json:"-"` 4976} 4977 4978func (s *WorkloadMetadataConfig) MarshalJSON() ([]byte, error) { 4979 type NoMethod WorkloadMetadataConfig 4980 raw := NoMethod(*s) 4981 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4982} 4983 4984// method id "container.projects.aggregated.usableSubnetworks.list": 4985 4986type ProjectsAggregatedUsableSubnetworksListCall struct { 4987 s *Service 4988 parent string 4989 urlParams_ gensupport.URLParams 4990 ifNoneMatch_ string 4991 ctx_ context.Context 4992 header_ http.Header 4993} 4994 4995// List: Lists subnetworks that can be used for creating clusters in a 4996// project. 4997func (r *ProjectsAggregatedUsableSubnetworksService) List(parent string) *ProjectsAggregatedUsableSubnetworksListCall { 4998 c := &ProjectsAggregatedUsableSubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4999 c.parent = parent 5000 return c 5001} 5002 5003// Filter sets the optional parameter "filter": Filtering currently only 5004// supports equality on the networkProjectId and must 5005// be in the form: "networkProjectId=[PROJECTID]", where 5006// `networkProjectId` 5007// is the project which owns the listed subnetworks. This defaults to 5008// the 5009// parent project ID. 5010func (c *ProjectsAggregatedUsableSubnetworksListCall) Filter(filter string) *ProjectsAggregatedUsableSubnetworksListCall { 5011 c.urlParams_.Set("filter", filter) 5012 return c 5013} 5014 5015// PageSize sets the optional parameter "pageSize": The max number of 5016// results per page that should be returned. If the number 5017// of available results is larger than `page_size`, a `next_page_token` 5018// is 5019// returned which can be used to get the next page of results in 5020// subsequent 5021// requests. Acceptable values are 0 to 500, inclusive. (Default: 500) 5022func (c *ProjectsAggregatedUsableSubnetworksListCall) PageSize(pageSize int64) *ProjectsAggregatedUsableSubnetworksListCall { 5023 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5024 return c 5025} 5026 5027// PageToken sets the optional parameter "pageToken": Specifies a page 5028// token to use. Set this to the nextPageToken returned by 5029// previous list requests to get the next page of results. 5030func (c *ProjectsAggregatedUsableSubnetworksListCall) PageToken(pageToken string) *ProjectsAggregatedUsableSubnetworksListCall { 5031 c.urlParams_.Set("pageToken", pageToken) 5032 return c 5033} 5034 5035// Fields allows partial responses to be retrieved. See 5036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5037// for more information. 5038func (c *ProjectsAggregatedUsableSubnetworksListCall) Fields(s ...googleapi.Field) *ProjectsAggregatedUsableSubnetworksListCall { 5039 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5040 return c 5041} 5042 5043// IfNoneMatch sets the optional parameter which makes the operation 5044// fail if the object's ETag matches the given value. This is useful for 5045// getting updates only after the object has changed since the last 5046// request. Use googleapi.IsNotModified to check whether the response 5047// error from Do is the result of In-None-Match. 5048func (c *ProjectsAggregatedUsableSubnetworksListCall) IfNoneMatch(entityTag string) *ProjectsAggregatedUsableSubnetworksListCall { 5049 c.ifNoneMatch_ = entityTag 5050 return c 5051} 5052 5053// Context sets the context to be used in this call's Do method. Any 5054// pending HTTP request will be aborted if the provided context is 5055// canceled. 5056func (c *ProjectsAggregatedUsableSubnetworksListCall) Context(ctx context.Context) *ProjectsAggregatedUsableSubnetworksListCall { 5057 c.ctx_ = ctx 5058 return c 5059} 5060 5061// Header returns an http.Header that can be modified by the caller to 5062// add HTTP headers to the request. 5063func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header { 5064 if c.header_ == nil { 5065 c.header_ = make(http.Header) 5066 } 5067 return c.header_ 5068} 5069 5070func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) { 5071 reqHeaders := make(http.Header) 5072 for k, v := range c.header_ { 5073 reqHeaders[k] = v 5074 } 5075 reqHeaders.Set("User-Agent", c.s.userAgent()) 5076 if c.ifNoneMatch_ != "" { 5077 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5078 } 5079 var body io.Reader = nil 5080 c.urlParams_.Set("alt", alt) 5081 c.urlParams_.Set("prettyPrint", "false") 5082 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/aggregated/usableSubnetworks") 5083 urls += "?" + c.urlParams_.Encode() 5084 req, err := http.NewRequest("GET", urls, body) 5085 if err != nil { 5086 return nil, err 5087 } 5088 req.Header = reqHeaders 5089 googleapi.Expand(req.URL, map[string]string{ 5090 "parent": c.parent, 5091 }) 5092 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5093} 5094 5095// Do executes the "container.projects.aggregated.usableSubnetworks.list" call. 5096// Exactly one of *ListUsableSubnetworksResponse or error will be 5097// non-nil. Any non-2xx status code is an error. Response headers are in 5098// either *ListUsableSubnetworksResponse.ServerResponse.Header or (if a 5099// response was returned at all) in error.(*googleapi.Error).Header. Use 5100// googleapi.IsNotModified to check whether the returned error was 5101// because http.StatusNotModified was returned. 5102func (c *ProjectsAggregatedUsableSubnetworksListCall) Do(opts ...googleapi.CallOption) (*ListUsableSubnetworksResponse, error) { 5103 gensupport.SetOptions(c.urlParams_, opts...) 5104 res, err := c.doRequest("json") 5105 if res != nil && res.StatusCode == http.StatusNotModified { 5106 if res.Body != nil { 5107 res.Body.Close() 5108 } 5109 return nil, &googleapi.Error{ 5110 Code: res.StatusCode, 5111 Header: res.Header, 5112 } 5113 } 5114 if err != nil { 5115 return nil, err 5116 } 5117 defer googleapi.CloseBody(res) 5118 if err := googleapi.CheckResponse(res); err != nil { 5119 return nil, err 5120 } 5121 ret := &ListUsableSubnetworksResponse{ 5122 ServerResponse: googleapi.ServerResponse{ 5123 Header: res.Header, 5124 HTTPStatusCode: res.StatusCode, 5125 }, 5126 } 5127 target := &ret 5128 if err := gensupport.DecodeResponse(target, res); err != nil { 5129 return nil, err 5130 } 5131 return ret, nil 5132 // { 5133 // "description": "Lists subnetworks that can be used for creating clusters in a project.", 5134 // "flatPath": "v1beta1/projects/{projectsId}/aggregated/usableSubnetworks", 5135 // "httpMethod": "GET", 5136 // "id": "container.projects.aggregated.usableSubnetworks.list", 5137 // "parameterOrder": [ 5138 // "parent" 5139 // ], 5140 // "parameters": { 5141 // "filter": { 5142 // "description": "Filtering currently only supports equality on the networkProjectId and must\nbe in the form: \"networkProjectId=[PROJECTID]\", where `networkProjectId`\nis the project which owns the listed subnetworks. This defaults to the\nparent project ID.", 5143 // "location": "query", 5144 // "type": "string" 5145 // }, 5146 // "pageSize": { 5147 // "description": "The max number of results per page that should be returned. If the number\nof available results is larger than `page_size`, a `next_page_token` is\nreturned which can be used to get the next page of results in subsequent\nrequests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 5148 // "format": "int32", 5149 // "location": "query", 5150 // "type": "integer" 5151 // }, 5152 // "pageToken": { 5153 // "description": "Specifies a page token to use. Set this to the nextPageToken returned by\nprevious list requests to get the next page of results.", 5154 // "location": "query", 5155 // "type": "string" 5156 // }, 5157 // "parent": { 5158 // "description": "The parent project where subnetworks are usable.\nSpecified in the format 'projects/*'.", 5159 // "location": "path", 5160 // "pattern": "^projects/[^/]+$", 5161 // "required": true, 5162 // "type": "string" 5163 // } 5164 // }, 5165 // "path": "v1beta1/{+parent}/aggregated/usableSubnetworks", 5166 // "response": { 5167 // "$ref": "ListUsableSubnetworksResponse" 5168 // }, 5169 // "scopes": [ 5170 // "https://www.googleapis.com/auth/cloud-platform" 5171 // ] 5172 // } 5173 5174} 5175 5176// Pages invokes f for each page of results. 5177// A non-nil error returned from f will halt the iteration. 5178// The provided context supersedes any context provided to the Context method. 5179func (c *ProjectsAggregatedUsableSubnetworksListCall) Pages(ctx context.Context, f func(*ListUsableSubnetworksResponse) error) error { 5180 c.ctx_ = ctx 5181 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5182 for { 5183 x, err := c.Do() 5184 if err != nil { 5185 return err 5186 } 5187 if err := f(x); err != nil { 5188 return err 5189 } 5190 if x.NextPageToken == "" { 5191 return nil 5192 } 5193 c.PageToken(x.NextPageToken) 5194 } 5195} 5196 5197// method id "container.projects.locations.getServerConfig": 5198 5199type ProjectsLocationsGetServerConfigCall struct { 5200 s *Service 5201 name string 5202 urlParams_ gensupport.URLParams 5203 ifNoneMatch_ string 5204 ctx_ context.Context 5205 header_ http.Header 5206} 5207 5208// GetServerConfig: Returns configuration info about the Google 5209// Kubernetes Engine service. 5210func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { 5211 c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5212 c.name = name 5213 return c 5214} 5215 5216// ProjectId sets the optional parameter "projectId": Deprecated. The 5217// Google Developers Console [project ID or 5218// project 5219// number](https://support.google.com/cloud/answer/6158840). 5220// This 5221// field has been deprecated and replaced by the name field. 5222func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *ProjectsLocationsGetServerConfigCall { 5223 c.urlParams_.Set("projectId", projectId) 5224 return c 5225} 5226 5227// Zone sets the optional parameter "zone": Deprecated. The name of the 5228// Google Compute Engine 5229// [zone](/compute/docs/zones#available) to return operations for. 5230// This field has been deprecated and replaced by the name field. 5231func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall { 5232 c.urlParams_.Set("zone", zone) 5233 return c 5234} 5235 5236// Fields allows partial responses to be retrieved. See 5237// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5238// for more information. 5239func (c *ProjectsLocationsGetServerConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetServerConfigCall { 5240 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5241 return c 5242} 5243 5244// IfNoneMatch sets the optional parameter which makes the operation 5245// fail if the object's ETag matches the given value. This is useful for 5246// getting updates only after the object has changed since the last 5247// request. Use googleapi.IsNotModified to check whether the response 5248// error from Do is the result of In-None-Match. 5249func (c *ProjectsLocationsGetServerConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetServerConfigCall { 5250 c.ifNoneMatch_ = entityTag 5251 return c 5252} 5253 5254// Context sets the context to be used in this call's Do method. Any 5255// pending HTTP request will be aborted if the provided context is 5256// canceled. 5257func (c *ProjectsLocationsGetServerConfigCall) Context(ctx context.Context) *ProjectsLocationsGetServerConfigCall { 5258 c.ctx_ = ctx 5259 return c 5260} 5261 5262// Header returns an http.Header that can be modified by the caller to 5263// add HTTP headers to the request. 5264func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header { 5265 if c.header_ == nil { 5266 c.header_ = make(http.Header) 5267 } 5268 return c.header_ 5269} 5270 5271func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) { 5272 reqHeaders := make(http.Header) 5273 for k, v := range c.header_ { 5274 reqHeaders[k] = v 5275 } 5276 reqHeaders.Set("User-Agent", c.s.userAgent()) 5277 if c.ifNoneMatch_ != "" { 5278 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5279 } 5280 var body io.Reader = nil 5281 c.urlParams_.Set("alt", alt) 5282 c.urlParams_.Set("prettyPrint", "false") 5283 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/serverConfig") 5284 urls += "?" + c.urlParams_.Encode() 5285 req, err := http.NewRequest("GET", urls, body) 5286 if err != nil { 5287 return nil, err 5288 } 5289 req.Header = reqHeaders 5290 googleapi.Expand(req.URL, map[string]string{ 5291 "name": c.name, 5292 }) 5293 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5294} 5295 5296// Do executes the "container.projects.locations.getServerConfig" call. 5297// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx 5298// status code is an error. Response headers are in either 5299// *ServerConfig.ServerResponse.Header or (if a response was returned at 5300// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5301// to check whether the returned error was because 5302// http.StatusNotModified was returned. 5303func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { 5304 gensupport.SetOptions(c.urlParams_, opts...) 5305 res, err := c.doRequest("json") 5306 if res != nil && res.StatusCode == http.StatusNotModified { 5307 if res.Body != nil { 5308 res.Body.Close() 5309 } 5310 return nil, &googleapi.Error{ 5311 Code: res.StatusCode, 5312 Header: res.Header, 5313 } 5314 } 5315 if err != nil { 5316 return nil, err 5317 } 5318 defer googleapi.CloseBody(res) 5319 if err := googleapi.CheckResponse(res); err != nil { 5320 return nil, err 5321 } 5322 ret := &ServerConfig{ 5323 ServerResponse: googleapi.ServerResponse{ 5324 Header: res.Header, 5325 HTTPStatusCode: res.StatusCode, 5326 }, 5327 } 5328 target := &ret 5329 if err := gensupport.DecodeResponse(target, res); err != nil { 5330 return nil, err 5331 } 5332 return ret, nil 5333 // { 5334 // "description": "Returns configuration info about the Google Kubernetes Engine service.", 5335 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", 5336 // "httpMethod": "GET", 5337 // "id": "container.projects.locations.getServerConfig", 5338 // "parameterOrder": [ 5339 // "name" 5340 // ], 5341 // "parameters": { 5342 // "name": { 5343 // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", 5344 // "location": "path", 5345 // "pattern": "^projects/[^/]+/locations/[^/]+$", 5346 // "required": true, 5347 // "type": "string" 5348 // }, 5349 // "projectId": { 5350 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 5351 // "location": "query", 5352 // "type": "string" 5353 // }, 5354 // "zone": { 5355 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", 5356 // "location": "query", 5357 // "type": "string" 5358 // } 5359 // }, 5360 // "path": "v1beta1/{+name}/serverConfig", 5361 // "response": { 5362 // "$ref": "ServerConfig" 5363 // }, 5364 // "scopes": [ 5365 // "https://www.googleapis.com/auth/cloud-platform" 5366 // ] 5367 // } 5368 5369} 5370 5371// method id "container.projects.locations.list": 5372 5373type ProjectsLocationsListCall struct { 5374 s *Service 5375 parent string 5376 urlParams_ gensupport.URLParams 5377 ifNoneMatch_ string 5378 ctx_ context.Context 5379 header_ http.Header 5380} 5381 5382// List: Fetches locations that offer Google Kubernetes Engine. 5383func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall { 5384 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5385 c.parent = parent 5386 return c 5387} 5388 5389// Fields allows partial responses to be retrieved. See 5390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5391// for more information. 5392func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 5393 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5394 return c 5395} 5396 5397// IfNoneMatch sets the optional parameter which makes the operation 5398// fail if the object's ETag matches the given value. This is useful for 5399// getting updates only after the object has changed since the last 5400// request. Use googleapi.IsNotModified to check whether the response 5401// error from Do is the result of In-None-Match. 5402func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 5403 c.ifNoneMatch_ = entityTag 5404 return c 5405} 5406 5407// Context sets the context to be used in this call's Do method. Any 5408// pending HTTP request will be aborted if the provided context is 5409// canceled. 5410func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 5411 c.ctx_ = ctx 5412 return c 5413} 5414 5415// Header returns an http.Header that can be modified by the caller to 5416// add HTTP headers to the request. 5417func (c *ProjectsLocationsListCall) Header() http.Header { 5418 if c.header_ == nil { 5419 c.header_ = make(http.Header) 5420 } 5421 return c.header_ 5422} 5423 5424func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 5425 reqHeaders := make(http.Header) 5426 for k, v := range c.header_ { 5427 reqHeaders[k] = v 5428 } 5429 reqHeaders.Set("User-Agent", c.s.userAgent()) 5430 if c.ifNoneMatch_ != "" { 5431 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5432 } 5433 var body io.Reader = nil 5434 c.urlParams_.Set("alt", alt) 5435 c.urlParams_.Set("prettyPrint", "false") 5436 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/locations") 5437 urls += "?" + c.urlParams_.Encode() 5438 req, err := http.NewRequest("GET", urls, body) 5439 if err != nil { 5440 return nil, err 5441 } 5442 req.Header = reqHeaders 5443 googleapi.Expand(req.URL, map[string]string{ 5444 "parent": c.parent, 5445 }) 5446 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5447} 5448 5449// Do executes the "container.projects.locations.list" call. 5450// Exactly one of *ListLocationsResponse or error will be non-nil. Any 5451// non-2xx status code is an error. Response headers are in either 5452// *ListLocationsResponse.ServerResponse.Header or (if a response was 5453// returned at all) in error.(*googleapi.Error).Header. Use 5454// googleapi.IsNotModified to check whether the returned error was 5455// because http.StatusNotModified was returned. 5456func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 5457 gensupport.SetOptions(c.urlParams_, opts...) 5458 res, err := c.doRequest("json") 5459 if res != nil && res.StatusCode == http.StatusNotModified { 5460 if res.Body != nil { 5461 res.Body.Close() 5462 } 5463 return nil, &googleapi.Error{ 5464 Code: res.StatusCode, 5465 Header: res.Header, 5466 } 5467 } 5468 if err != nil { 5469 return nil, err 5470 } 5471 defer googleapi.CloseBody(res) 5472 if err := googleapi.CheckResponse(res); err != nil { 5473 return nil, err 5474 } 5475 ret := &ListLocationsResponse{ 5476 ServerResponse: googleapi.ServerResponse{ 5477 Header: res.Header, 5478 HTTPStatusCode: res.StatusCode, 5479 }, 5480 } 5481 target := &ret 5482 if err := gensupport.DecodeResponse(target, res); err != nil { 5483 return nil, err 5484 } 5485 return ret, nil 5486 // { 5487 // "description": "Fetches locations that offer Google Kubernetes Engine.", 5488 // "flatPath": "v1beta1/projects/{projectsId}/locations", 5489 // "httpMethod": "GET", 5490 // "id": "container.projects.locations.list", 5491 // "parameterOrder": [ 5492 // "parent" 5493 // ], 5494 // "parameters": { 5495 // "parent": { 5496 // "description": "Contains the name of the resource requested.\nSpecified in the format 'projects/*'.", 5497 // "location": "path", 5498 // "pattern": "^projects/[^/]+$", 5499 // "required": true, 5500 // "type": "string" 5501 // } 5502 // }, 5503 // "path": "v1beta1/{+parent}/locations", 5504 // "response": { 5505 // "$ref": "ListLocationsResponse" 5506 // }, 5507 // "scopes": [ 5508 // "https://www.googleapis.com/auth/cloud-platform" 5509 // ] 5510 // } 5511 5512} 5513 5514// method id "container.projects.locations.clusters.completeIpRotation": 5515 5516type ProjectsLocationsClustersCompleteIpRotationCall struct { 5517 s *Service 5518 name string 5519 completeiprotationrequest *CompleteIPRotationRequest 5520 urlParams_ gensupport.URLParams 5521 ctx_ context.Context 5522 header_ http.Header 5523} 5524 5525// CompleteIpRotation: Completes master IP rotation. 5526func (r *ProjectsLocationsClustersService) CompleteIpRotation(name string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsLocationsClustersCompleteIpRotationCall { 5527 c := &ProjectsLocationsClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5528 c.name = name 5529 c.completeiprotationrequest = completeiprotationrequest 5530 return c 5531} 5532 5533// Fields allows partial responses to be retrieved. See 5534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5535// for more information. 5536func (c *ProjectsLocationsClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCompleteIpRotationCall { 5537 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5538 return c 5539} 5540 5541// Context sets the context to be used in this call's Do method. Any 5542// pending HTTP request will be aborted if the provided context is 5543// canceled. 5544func (c *ProjectsLocationsClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersCompleteIpRotationCall { 5545 c.ctx_ = ctx 5546 return c 5547} 5548 5549// Header returns an http.Header that can be modified by the caller to 5550// add HTTP headers to the request. 5551func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header { 5552 if c.header_ == nil { 5553 c.header_ = make(http.Header) 5554 } 5555 return c.header_ 5556} 5557 5558func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { 5559 reqHeaders := make(http.Header) 5560 for k, v := range c.header_ { 5561 reqHeaders[k] = v 5562 } 5563 reqHeaders.Set("User-Agent", c.s.userAgent()) 5564 var body io.Reader = nil 5565 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) 5566 if err != nil { 5567 return nil, err 5568 } 5569 reqHeaders.Set("Content-Type", "application/json") 5570 c.urlParams_.Set("alt", alt) 5571 c.urlParams_.Set("prettyPrint", "false") 5572 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeIpRotation") 5573 urls += "?" + c.urlParams_.Encode() 5574 req, err := http.NewRequest("POST", urls, body) 5575 if err != nil { 5576 return nil, err 5577 } 5578 req.Header = reqHeaders 5579 googleapi.Expand(req.URL, map[string]string{ 5580 "name": c.name, 5581 }) 5582 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5583} 5584 5585// Do executes the "container.projects.locations.clusters.completeIpRotation" call. 5586// Exactly one of *Operation or error will be non-nil. Any non-2xx 5587// status code is an error. Response headers are in either 5588// *Operation.ServerResponse.Header or (if a response was returned at 5589// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5590// to check whether the returned error was because 5591// http.StatusNotModified was returned. 5592func (c *ProjectsLocationsClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5593 gensupport.SetOptions(c.urlParams_, opts...) 5594 res, err := c.doRequest("json") 5595 if res != nil && res.StatusCode == http.StatusNotModified { 5596 if res.Body != nil { 5597 res.Body.Close() 5598 } 5599 return nil, &googleapi.Error{ 5600 Code: res.StatusCode, 5601 Header: res.Header, 5602 } 5603 } 5604 if err != nil { 5605 return nil, err 5606 } 5607 defer googleapi.CloseBody(res) 5608 if err := googleapi.CheckResponse(res); err != nil { 5609 return nil, err 5610 } 5611 ret := &Operation{ 5612 ServerResponse: googleapi.ServerResponse{ 5613 Header: res.Header, 5614 HTTPStatusCode: res.StatusCode, 5615 }, 5616 } 5617 target := &ret 5618 if err := gensupport.DecodeResponse(target, res); err != nil { 5619 return nil, err 5620 } 5621 return ret, nil 5622 // { 5623 // "description": "Completes master IP rotation.", 5624 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation", 5625 // "httpMethod": "POST", 5626 // "id": "container.projects.locations.clusters.completeIpRotation", 5627 // "parameterOrder": [ 5628 // "name" 5629 // ], 5630 // "parameters": { 5631 // "name": { 5632 // "description": "The name (project, location, cluster id) of the cluster to complete IP\nrotation. Specified in the format 'projects/*/locations/*/clusters/*'.", 5633 // "location": "path", 5634 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 5635 // "required": true, 5636 // "type": "string" 5637 // } 5638 // }, 5639 // "path": "v1beta1/{+name}:completeIpRotation", 5640 // "request": { 5641 // "$ref": "CompleteIPRotationRequest" 5642 // }, 5643 // "response": { 5644 // "$ref": "Operation" 5645 // }, 5646 // "scopes": [ 5647 // "https://www.googleapis.com/auth/cloud-platform" 5648 // ] 5649 // } 5650 5651} 5652 5653// method id "container.projects.locations.clusters.create": 5654 5655type ProjectsLocationsClustersCreateCall struct { 5656 s *Service 5657 parent string 5658 createclusterrequest *CreateClusterRequest 5659 urlParams_ gensupport.URLParams 5660 ctx_ context.Context 5661 header_ http.Header 5662} 5663 5664// Create: Creates a cluster, consisting of the specified number and 5665// type of Google 5666// Compute Engine instances. 5667// 5668// By default, the cluster is created in the project's 5669// [default 5670// network](/compute/docs/networks-and-firewalls#networks). 5671// 5672// One firewall is added for the cluster. After cluster creation, 5673// the Kubelet creates routes for each node to allow the containers 5674// on that node to communicate with all other instances in 5675// the 5676// cluster. 5677// 5678// Finally, an entry is added to the project's global metadata 5679// indicating 5680// which CIDR range the cluster is using. 5681func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { 5682 c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5683 c.parent = parent 5684 c.createclusterrequest = createclusterrequest 5685 return c 5686} 5687 5688// Fields allows partial responses to be retrieved. See 5689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5690// for more information. 5691func (c *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { 5692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5693 return c 5694} 5695 5696// Context sets the context to be used in this call's Do method. Any 5697// pending HTTP request will be aborted if the provided context is 5698// canceled. 5699func (c *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { 5700 c.ctx_ = ctx 5701 return c 5702} 5703 5704// Header returns an http.Header that can be modified by the caller to 5705// add HTTP headers to the request. 5706func (c *ProjectsLocationsClustersCreateCall) Header() http.Header { 5707 if c.header_ == nil { 5708 c.header_ = make(http.Header) 5709 } 5710 return c.header_ 5711} 5712 5713func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) { 5714 reqHeaders := make(http.Header) 5715 for k, v := range c.header_ { 5716 reqHeaders[k] = v 5717 } 5718 reqHeaders.Set("User-Agent", c.s.userAgent()) 5719 var body io.Reader = nil 5720 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) 5721 if err != nil { 5722 return nil, err 5723 } 5724 reqHeaders.Set("Content-Type", "application/json") 5725 c.urlParams_.Set("alt", alt) 5726 c.urlParams_.Set("prettyPrint", "false") 5727 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") 5728 urls += "?" + c.urlParams_.Encode() 5729 req, err := http.NewRequest("POST", urls, body) 5730 if err != nil { 5731 return nil, err 5732 } 5733 req.Header = reqHeaders 5734 googleapi.Expand(req.URL, map[string]string{ 5735 "parent": c.parent, 5736 }) 5737 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5738} 5739 5740// Do executes the "container.projects.locations.clusters.create" call. 5741// Exactly one of *Operation or error will be non-nil. Any non-2xx 5742// status code is an error. Response headers are in either 5743// *Operation.ServerResponse.Header or (if a response was returned at 5744// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5745// to check whether the returned error was because 5746// http.StatusNotModified was returned. 5747func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5748 gensupport.SetOptions(c.urlParams_, opts...) 5749 res, err := c.doRequest("json") 5750 if res != nil && res.StatusCode == http.StatusNotModified { 5751 if res.Body != nil { 5752 res.Body.Close() 5753 } 5754 return nil, &googleapi.Error{ 5755 Code: res.StatusCode, 5756 Header: res.Header, 5757 } 5758 } 5759 if err != nil { 5760 return nil, err 5761 } 5762 defer googleapi.CloseBody(res) 5763 if err := googleapi.CheckResponse(res); err != nil { 5764 return nil, err 5765 } 5766 ret := &Operation{ 5767 ServerResponse: googleapi.ServerResponse{ 5768 Header: res.Header, 5769 HTTPStatusCode: res.StatusCode, 5770 }, 5771 } 5772 target := &ret 5773 if err := gensupport.DecodeResponse(target, res); err != nil { 5774 return nil, err 5775 } 5776 return ret, nil 5777 // { 5778 // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", 5779 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", 5780 // "httpMethod": "POST", 5781 // "id": "container.projects.locations.clusters.create", 5782 // "parameterOrder": [ 5783 // "parent" 5784 // ], 5785 // "parameters": { 5786 // "parent": { 5787 // "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", 5788 // "location": "path", 5789 // "pattern": "^projects/[^/]+/locations/[^/]+$", 5790 // "required": true, 5791 // "type": "string" 5792 // } 5793 // }, 5794 // "path": "v1beta1/{+parent}/clusters", 5795 // "request": { 5796 // "$ref": "CreateClusterRequest" 5797 // }, 5798 // "response": { 5799 // "$ref": "Operation" 5800 // }, 5801 // "scopes": [ 5802 // "https://www.googleapis.com/auth/cloud-platform" 5803 // ] 5804 // } 5805 5806} 5807 5808// method id "container.projects.locations.clusters.delete": 5809 5810type ProjectsLocationsClustersDeleteCall struct { 5811 s *Service 5812 name string 5813 urlParams_ gensupport.URLParams 5814 ctx_ context.Context 5815 header_ http.Header 5816} 5817 5818// Delete: Deletes the cluster, including the Kubernetes endpoint and 5819// all worker 5820// nodes. 5821// 5822// Firewalls and routes that were configured during cluster creation 5823// are also deleted. 5824// 5825// Other Google Compute Engine resources that might be in use by the 5826// cluster, 5827// such as load balancer resources, are not deleted if they weren't 5828// present 5829// when the cluster was initially created. 5830func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { 5831 c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5832 c.name = name 5833 return c 5834} 5835 5836// ClusterId sets the optional parameter "clusterId": Deprecated. The 5837// name of the cluster to delete. 5838// This field has been deprecated and replaced by the name field. 5839func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall { 5840 c.urlParams_.Set("clusterId", clusterId) 5841 return c 5842} 5843 5844// ProjectId sets the optional parameter "projectId": Deprecated. The 5845// Google Developers Console [project ID or 5846// project 5847// number](https://support.google.com/cloud/answer/6158840). 5848// This 5849// field has been deprecated and replaced by the name field. 5850func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersDeleteCall { 5851 c.urlParams_.Set("projectId", projectId) 5852 return c 5853} 5854 5855// Zone sets the optional parameter "zone": Deprecated. The name of the 5856// Google Compute Engine 5857// [zone](/compute/docs/zones#available) in which the 5858// cluster 5859// resides. 5860// This field has been deprecated and replaced by the name field. 5861func (c *ProjectsLocationsClustersDeleteCall) Zone(zone string) *ProjectsLocationsClustersDeleteCall { 5862 c.urlParams_.Set("zone", zone) 5863 return c 5864} 5865 5866// Fields allows partial responses to be retrieved. See 5867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5868// for more information. 5869func (c *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { 5870 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5871 return c 5872} 5873 5874// Context sets the context to be used in this call's Do method. Any 5875// pending HTTP request will be aborted if the provided context is 5876// canceled. 5877func (c *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { 5878 c.ctx_ = ctx 5879 return c 5880} 5881 5882// Header returns an http.Header that can be modified by the caller to 5883// add HTTP headers to the request. 5884func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header { 5885 if c.header_ == nil { 5886 c.header_ = make(http.Header) 5887 } 5888 return c.header_ 5889} 5890 5891func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) { 5892 reqHeaders := make(http.Header) 5893 for k, v := range c.header_ { 5894 reqHeaders[k] = v 5895 } 5896 reqHeaders.Set("User-Agent", c.s.userAgent()) 5897 var body io.Reader = nil 5898 c.urlParams_.Set("alt", alt) 5899 c.urlParams_.Set("prettyPrint", "false") 5900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5901 urls += "?" + c.urlParams_.Encode() 5902 req, err := http.NewRequest("DELETE", urls, body) 5903 if err != nil { 5904 return nil, err 5905 } 5906 req.Header = reqHeaders 5907 googleapi.Expand(req.URL, map[string]string{ 5908 "name": c.name, 5909 }) 5910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5911} 5912 5913// Do executes the "container.projects.locations.clusters.delete" call. 5914// Exactly one of *Operation or error will be non-nil. Any non-2xx 5915// status code is an error. Response headers are in either 5916// *Operation.ServerResponse.Header or (if a response was returned at 5917// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5918// to check whether the returned error was because 5919// http.StatusNotModified was returned. 5920func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5921 gensupport.SetOptions(c.urlParams_, opts...) 5922 res, err := c.doRequest("json") 5923 if res != nil && res.StatusCode == http.StatusNotModified { 5924 if res.Body != nil { 5925 res.Body.Close() 5926 } 5927 return nil, &googleapi.Error{ 5928 Code: res.StatusCode, 5929 Header: res.Header, 5930 } 5931 } 5932 if err != nil { 5933 return nil, err 5934 } 5935 defer googleapi.CloseBody(res) 5936 if err := googleapi.CheckResponse(res); err != nil { 5937 return nil, err 5938 } 5939 ret := &Operation{ 5940 ServerResponse: googleapi.ServerResponse{ 5941 Header: res.Header, 5942 HTTPStatusCode: res.StatusCode, 5943 }, 5944 } 5945 target := &ret 5946 if err := gensupport.DecodeResponse(target, res); err != nil { 5947 return nil, err 5948 } 5949 return ret, nil 5950 // { 5951 // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", 5952 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", 5953 // "httpMethod": "DELETE", 5954 // "id": "container.projects.locations.clusters.delete", 5955 // "parameterOrder": [ 5956 // "name" 5957 // ], 5958 // "parameters": { 5959 // "clusterId": { 5960 // "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", 5961 // "location": "query", 5962 // "type": "string" 5963 // }, 5964 // "name": { 5965 // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 5966 // "location": "path", 5967 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 5968 // "required": true, 5969 // "type": "string" 5970 // }, 5971 // "projectId": { 5972 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 5973 // "location": "query", 5974 // "type": "string" 5975 // }, 5976 // "zone": { 5977 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 5978 // "location": "query", 5979 // "type": "string" 5980 // } 5981 // }, 5982 // "path": "v1beta1/{+name}", 5983 // "response": { 5984 // "$ref": "Operation" 5985 // }, 5986 // "scopes": [ 5987 // "https://www.googleapis.com/auth/cloud-platform" 5988 // ] 5989 // } 5990 5991} 5992 5993// method id "container.projects.locations.clusters.get": 5994 5995type ProjectsLocationsClustersGetCall struct { 5996 s *Service 5997 name string 5998 urlParams_ gensupport.URLParams 5999 ifNoneMatch_ string 6000 ctx_ context.Context 6001 header_ http.Header 6002} 6003 6004// Get: Gets the details for a specific cluster. 6005func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { 6006 c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6007 c.name = name 6008 return c 6009} 6010 6011// ClusterId sets the optional parameter "clusterId": Deprecated. The 6012// name of the cluster to retrieve. 6013// This field has been deprecated and replaced by the name field. 6014func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall { 6015 c.urlParams_.Set("clusterId", clusterId) 6016 return c 6017} 6018 6019// ProjectId sets the optional parameter "projectId": Deprecated. The 6020// Google Developers Console [project ID or 6021// project 6022// number](https://support.google.com/cloud/answer/6158840). 6023// This 6024// field has been deprecated and replaced by the name field. 6025func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *ProjectsLocationsClustersGetCall { 6026 c.urlParams_.Set("projectId", projectId) 6027 return c 6028} 6029 6030// Zone sets the optional parameter "zone": Deprecated. The name of the 6031// Google Compute Engine 6032// [zone](/compute/docs/zones#available) in which the 6033// cluster 6034// resides. 6035// This field has been deprecated and replaced by the name field. 6036func (c *ProjectsLocationsClustersGetCall) Zone(zone string) *ProjectsLocationsClustersGetCall { 6037 c.urlParams_.Set("zone", zone) 6038 return c 6039} 6040 6041// Fields allows partial responses to be retrieved. See 6042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6043// for more information. 6044func (c *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { 6045 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6046 return c 6047} 6048 6049// IfNoneMatch sets the optional parameter which makes the operation 6050// fail if the object's ETag matches the given value. This is useful for 6051// getting updates only after the object has changed since the last 6052// request. Use googleapi.IsNotModified to check whether the response 6053// error from Do is the result of In-None-Match. 6054func (c *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { 6055 c.ifNoneMatch_ = entityTag 6056 return c 6057} 6058 6059// Context sets the context to be used in this call's Do method. Any 6060// pending HTTP request will be aborted if the provided context is 6061// canceled. 6062func (c *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { 6063 c.ctx_ = ctx 6064 return c 6065} 6066 6067// Header returns an http.Header that can be modified by the caller to 6068// add HTTP headers to the request. 6069func (c *ProjectsLocationsClustersGetCall) Header() http.Header { 6070 if c.header_ == nil { 6071 c.header_ = make(http.Header) 6072 } 6073 return c.header_ 6074} 6075 6076func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) { 6077 reqHeaders := make(http.Header) 6078 for k, v := range c.header_ { 6079 reqHeaders[k] = v 6080 } 6081 reqHeaders.Set("User-Agent", c.s.userAgent()) 6082 if c.ifNoneMatch_ != "" { 6083 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6084 } 6085 var body io.Reader = nil 6086 c.urlParams_.Set("alt", alt) 6087 c.urlParams_.Set("prettyPrint", "false") 6088 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6089 urls += "?" + c.urlParams_.Encode() 6090 req, err := http.NewRequest("GET", urls, body) 6091 if err != nil { 6092 return nil, err 6093 } 6094 req.Header = reqHeaders 6095 googleapi.Expand(req.URL, map[string]string{ 6096 "name": c.name, 6097 }) 6098 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6099} 6100 6101// Do executes the "container.projects.locations.clusters.get" call. 6102// Exactly one of *Cluster or error will be non-nil. Any non-2xx status 6103// code is an error. Response headers are in either 6104// *Cluster.ServerResponse.Header or (if a response was returned at all) 6105// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6106// check whether the returned error was because http.StatusNotModified 6107// was returned. 6108func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { 6109 gensupport.SetOptions(c.urlParams_, opts...) 6110 res, err := c.doRequest("json") 6111 if res != nil && res.StatusCode == http.StatusNotModified { 6112 if res.Body != nil { 6113 res.Body.Close() 6114 } 6115 return nil, &googleapi.Error{ 6116 Code: res.StatusCode, 6117 Header: res.Header, 6118 } 6119 } 6120 if err != nil { 6121 return nil, err 6122 } 6123 defer googleapi.CloseBody(res) 6124 if err := googleapi.CheckResponse(res); err != nil { 6125 return nil, err 6126 } 6127 ret := &Cluster{ 6128 ServerResponse: googleapi.ServerResponse{ 6129 Header: res.Header, 6130 HTTPStatusCode: res.StatusCode, 6131 }, 6132 } 6133 target := &ret 6134 if err := gensupport.DecodeResponse(target, res); err != nil { 6135 return nil, err 6136 } 6137 return ret, nil 6138 // { 6139 // "description": "Gets the details for a specific cluster.", 6140 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", 6141 // "httpMethod": "GET", 6142 // "id": "container.projects.locations.clusters.get", 6143 // "parameterOrder": [ 6144 // "name" 6145 // ], 6146 // "parameters": { 6147 // "clusterId": { 6148 // "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", 6149 // "location": "query", 6150 // "type": "string" 6151 // }, 6152 // "name": { 6153 // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 6154 // "location": "path", 6155 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6156 // "required": true, 6157 // "type": "string" 6158 // }, 6159 // "projectId": { 6160 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 6161 // "location": "query", 6162 // "type": "string" 6163 // }, 6164 // "zone": { 6165 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 6166 // "location": "query", 6167 // "type": "string" 6168 // } 6169 // }, 6170 // "path": "v1beta1/{+name}", 6171 // "response": { 6172 // "$ref": "Cluster" 6173 // }, 6174 // "scopes": [ 6175 // "https://www.googleapis.com/auth/cloud-platform" 6176 // ] 6177 // } 6178 6179} 6180 6181// method id "container.projects.locations.clusters.getJwks": 6182 6183type ProjectsLocationsClustersGetJwksCall struct { 6184 s *Service 6185 parent string 6186 urlParams_ gensupport.URLParams 6187 ifNoneMatch_ string 6188 ctx_ context.Context 6189 header_ http.Header 6190} 6191 6192// GetJwks: Gets the public component of the cluster signing keys 6193// in 6194// JSON Web Key format. 6195// This API is not yet intended for general use, and is not available 6196// for all 6197// clusters. 6198func (r *ProjectsLocationsClustersService) GetJwks(parent string) *ProjectsLocationsClustersGetJwksCall { 6199 c := &ProjectsLocationsClustersGetJwksCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6200 c.parent = parent 6201 return c 6202} 6203 6204// Fields allows partial responses to be retrieved. See 6205// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6206// for more information. 6207func (c *ProjectsLocationsClustersGetJwksCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetJwksCall { 6208 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6209 return c 6210} 6211 6212// IfNoneMatch sets the optional parameter which makes the operation 6213// fail if the object's ETag matches the given value. This is useful for 6214// getting updates only after the object has changed since the last 6215// request. Use googleapi.IsNotModified to check whether the response 6216// error from Do is the result of In-None-Match. 6217func (c *ProjectsLocationsClustersGetJwksCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetJwksCall { 6218 c.ifNoneMatch_ = entityTag 6219 return c 6220} 6221 6222// Context sets the context to be used in this call's Do method. Any 6223// pending HTTP request will be aborted if the provided context is 6224// canceled. 6225func (c *ProjectsLocationsClustersGetJwksCall) Context(ctx context.Context) *ProjectsLocationsClustersGetJwksCall { 6226 c.ctx_ = ctx 6227 return c 6228} 6229 6230// Header returns an http.Header that can be modified by the caller to 6231// add HTTP headers to the request. 6232func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { 6233 if c.header_ == nil { 6234 c.header_ = make(http.Header) 6235 } 6236 return c.header_ 6237} 6238 6239func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { 6240 reqHeaders := make(http.Header) 6241 for k, v := range c.header_ { 6242 reqHeaders[k] = v 6243 } 6244 reqHeaders.Set("User-Agent", c.s.userAgent()) 6245 if c.ifNoneMatch_ != "" { 6246 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6247 } 6248 var body io.Reader = nil 6249 c.urlParams_.Set("alt", alt) 6250 c.urlParams_.Set("prettyPrint", "false") 6251 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jwks") 6252 urls += "?" + c.urlParams_.Encode() 6253 req, err := http.NewRequest("GET", urls, body) 6254 if err != nil { 6255 return nil, err 6256 } 6257 req.Header = reqHeaders 6258 googleapi.Expand(req.URL, map[string]string{ 6259 "parent": c.parent, 6260 }) 6261 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6262} 6263 6264// Do executes the "container.projects.locations.clusters.getJwks" call. 6265// Exactly one of *GetJSONWebKeysResponse or error will be non-nil. Any 6266// non-2xx status code is an error. Response headers are in either 6267// *GetJSONWebKeysResponse.ServerResponse.Header or (if a response was 6268// returned at all) in error.(*googleapi.Error).Header. Use 6269// googleapi.IsNotModified to check whether the returned error was 6270// because http.StatusNotModified was returned. 6271func (c *ProjectsLocationsClustersGetJwksCall) Do(opts ...googleapi.CallOption) (*GetJSONWebKeysResponse, error) { 6272 gensupport.SetOptions(c.urlParams_, opts...) 6273 res, err := c.doRequest("json") 6274 if res != nil && res.StatusCode == http.StatusNotModified { 6275 if res.Body != nil { 6276 res.Body.Close() 6277 } 6278 return nil, &googleapi.Error{ 6279 Code: res.StatusCode, 6280 Header: res.Header, 6281 } 6282 } 6283 if err != nil { 6284 return nil, err 6285 } 6286 defer googleapi.CloseBody(res) 6287 if err := googleapi.CheckResponse(res); err != nil { 6288 return nil, err 6289 } 6290 ret := &GetJSONWebKeysResponse{ 6291 ServerResponse: googleapi.ServerResponse{ 6292 Header: res.Header, 6293 HTTPStatusCode: res.StatusCode, 6294 }, 6295 } 6296 target := &ret 6297 if err := gensupport.DecodeResponse(target, res); err != nil { 6298 return nil, err 6299 } 6300 return ret, nil 6301 // { 6302 // "description": "Gets the public component of the cluster signing keys in\nJSON Web Key format.\nThis API is not yet intended for general use, and is not available for all\nclusters.", 6303 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", 6304 // "httpMethod": "GET", 6305 // "id": "container.projects.locations.clusters.getJwks", 6306 // "parameterOrder": [ 6307 // "parent" 6308 // ], 6309 // "parameters": { 6310 // "parent": { 6311 // "description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.", 6312 // "location": "path", 6313 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6314 // "required": true, 6315 // "type": "string" 6316 // } 6317 // }, 6318 // "path": "v1beta1/{+parent}/jwks", 6319 // "response": { 6320 // "$ref": "GetJSONWebKeysResponse" 6321 // } 6322 // } 6323 6324} 6325 6326// method id "container.projects.locations.clusters.list": 6327 6328type ProjectsLocationsClustersListCall struct { 6329 s *Service 6330 parent string 6331 urlParams_ gensupport.URLParams 6332 ifNoneMatch_ string 6333 ctx_ context.Context 6334 header_ http.Header 6335} 6336 6337// List: Lists all clusters owned by a project in either the specified 6338// zone or all 6339// zones. 6340func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { 6341 c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6342 c.parent = parent 6343 return c 6344} 6345 6346// ProjectId sets the optional parameter "projectId": Deprecated. The 6347// Google Developers Console [project ID or 6348// project 6349// number](https://support.google.com/cloud/answer/6158840). 6350// This 6351// field has been deprecated and replaced by the parent field. 6352func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *ProjectsLocationsClustersListCall { 6353 c.urlParams_.Set("projectId", projectId) 6354 return c 6355} 6356 6357// Zone sets the optional parameter "zone": Deprecated. The name of the 6358// Google Compute Engine 6359// [zone](/compute/docs/zones#available) in which the cluster 6360// resides, or "-" for all zones. 6361// This field has been deprecated and replaced by the parent field. 6362func (c *ProjectsLocationsClustersListCall) Zone(zone string) *ProjectsLocationsClustersListCall { 6363 c.urlParams_.Set("zone", zone) 6364 return c 6365} 6366 6367// Fields allows partial responses to be retrieved. See 6368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6369// for more information. 6370func (c *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { 6371 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6372 return c 6373} 6374 6375// IfNoneMatch sets the optional parameter which makes the operation 6376// fail if the object's ETag matches the given value. This is useful for 6377// getting updates only after the object has changed since the last 6378// request. Use googleapi.IsNotModified to check whether the response 6379// error from Do is the result of In-None-Match. 6380func (c *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { 6381 c.ifNoneMatch_ = entityTag 6382 return c 6383} 6384 6385// Context sets the context to be used in this call's Do method. Any 6386// pending HTTP request will be aborted if the provided context is 6387// canceled. 6388func (c *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { 6389 c.ctx_ = ctx 6390 return c 6391} 6392 6393// Header returns an http.Header that can be modified by the caller to 6394// add HTTP headers to the request. 6395func (c *ProjectsLocationsClustersListCall) Header() http.Header { 6396 if c.header_ == nil { 6397 c.header_ = make(http.Header) 6398 } 6399 return c.header_ 6400} 6401 6402func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) { 6403 reqHeaders := make(http.Header) 6404 for k, v := range c.header_ { 6405 reqHeaders[k] = v 6406 } 6407 reqHeaders.Set("User-Agent", c.s.userAgent()) 6408 if c.ifNoneMatch_ != "" { 6409 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6410 } 6411 var body io.Reader = nil 6412 c.urlParams_.Set("alt", alt) 6413 c.urlParams_.Set("prettyPrint", "false") 6414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") 6415 urls += "?" + c.urlParams_.Encode() 6416 req, err := http.NewRequest("GET", urls, body) 6417 if err != nil { 6418 return nil, err 6419 } 6420 req.Header = reqHeaders 6421 googleapi.Expand(req.URL, map[string]string{ 6422 "parent": c.parent, 6423 }) 6424 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6425} 6426 6427// Do executes the "container.projects.locations.clusters.list" call. 6428// Exactly one of *ListClustersResponse or error will be non-nil. Any 6429// non-2xx status code is an error. Response headers are in either 6430// *ListClustersResponse.ServerResponse.Header or (if a response was 6431// returned at all) in error.(*googleapi.Error).Header. Use 6432// googleapi.IsNotModified to check whether the returned error was 6433// because http.StatusNotModified was returned. 6434func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { 6435 gensupport.SetOptions(c.urlParams_, opts...) 6436 res, err := c.doRequest("json") 6437 if res != nil && res.StatusCode == http.StatusNotModified { 6438 if res.Body != nil { 6439 res.Body.Close() 6440 } 6441 return nil, &googleapi.Error{ 6442 Code: res.StatusCode, 6443 Header: res.Header, 6444 } 6445 } 6446 if err != nil { 6447 return nil, err 6448 } 6449 defer googleapi.CloseBody(res) 6450 if err := googleapi.CheckResponse(res); err != nil { 6451 return nil, err 6452 } 6453 ret := &ListClustersResponse{ 6454 ServerResponse: googleapi.ServerResponse{ 6455 Header: res.Header, 6456 HTTPStatusCode: res.StatusCode, 6457 }, 6458 } 6459 target := &ret 6460 if err := gensupport.DecodeResponse(target, res); err != nil { 6461 return nil, err 6462 } 6463 return ret, nil 6464 // { 6465 // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", 6466 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", 6467 // "httpMethod": "GET", 6468 // "id": "container.projects.locations.clusters.list", 6469 // "parameterOrder": [ 6470 // "parent" 6471 // ], 6472 // "parameters": { 6473 // "parent": { 6474 // "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", 6475 // "location": "path", 6476 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6477 // "required": true, 6478 // "type": "string" 6479 // }, 6480 // "projectId": { 6481 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", 6482 // "location": "query", 6483 // "type": "string" 6484 // }, 6485 // "zone": { 6486 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", 6487 // "location": "query", 6488 // "type": "string" 6489 // } 6490 // }, 6491 // "path": "v1beta1/{+parent}/clusters", 6492 // "response": { 6493 // "$ref": "ListClustersResponse" 6494 // }, 6495 // "scopes": [ 6496 // "https://www.googleapis.com/auth/cloud-platform" 6497 // ] 6498 // } 6499 6500} 6501 6502// method id "container.projects.locations.clusters.setAddons": 6503 6504type ProjectsLocationsClustersSetAddonsCall struct { 6505 s *Service 6506 name string 6507 setaddonsconfigrequest *SetAddonsConfigRequest 6508 urlParams_ gensupport.URLParams 6509 ctx_ context.Context 6510 header_ http.Header 6511} 6512 6513// SetAddons: Sets the addons for a specific cluster. 6514func (r *ProjectsLocationsClustersService) SetAddons(name string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsLocationsClustersSetAddonsCall { 6515 c := &ProjectsLocationsClustersSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6516 c.name = name 6517 c.setaddonsconfigrequest = setaddonsconfigrequest 6518 return c 6519} 6520 6521// Fields allows partial responses to be retrieved. See 6522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6523// for more information. 6524func (c *ProjectsLocationsClustersSetAddonsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetAddonsCall { 6525 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6526 return c 6527} 6528 6529// Context sets the context to be used in this call's Do method. Any 6530// pending HTTP request will be aborted if the provided context is 6531// canceled. 6532func (c *ProjectsLocationsClustersSetAddonsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetAddonsCall { 6533 c.ctx_ = ctx 6534 return c 6535} 6536 6537// Header returns an http.Header that can be modified by the caller to 6538// add HTTP headers to the request. 6539func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header { 6540 if c.header_ == nil { 6541 c.header_ = make(http.Header) 6542 } 6543 return c.header_ 6544} 6545 6546func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) { 6547 reqHeaders := make(http.Header) 6548 for k, v := range c.header_ { 6549 reqHeaders[k] = v 6550 } 6551 reqHeaders.Set("User-Agent", c.s.userAgent()) 6552 var body io.Reader = nil 6553 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) 6554 if err != nil { 6555 return nil, err 6556 } 6557 reqHeaders.Set("Content-Type", "application/json") 6558 c.urlParams_.Set("alt", alt) 6559 c.urlParams_.Set("prettyPrint", "false") 6560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAddons") 6561 urls += "?" + c.urlParams_.Encode() 6562 req, err := http.NewRequest("POST", urls, body) 6563 if err != nil { 6564 return nil, err 6565 } 6566 req.Header = reqHeaders 6567 googleapi.Expand(req.URL, map[string]string{ 6568 "name": c.name, 6569 }) 6570 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6571} 6572 6573// Do executes the "container.projects.locations.clusters.setAddons" call. 6574// Exactly one of *Operation or error will be non-nil. Any non-2xx 6575// status code is an error. Response headers are in either 6576// *Operation.ServerResponse.Header or (if a response was returned at 6577// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6578// to check whether the returned error was because 6579// http.StatusNotModified was returned. 6580func (c *ProjectsLocationsClustersSetAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6581 gensupport.SetOptions(c.urlParams_, opts...) 6582 res, err := c.doRequest("json") 6583 if res != nil && res.StatusCode == http.StatusNotModified { 6584 if res.Body != nil { 6585 res.Body.Close() 6586 } 6587 return nil, &googleapi.Error{ 6588 Code: res.StatusCode, 6589 Header: res.Header, 6590 } 6591 } 6592 if err != nil { 6593 return nil, err 6594 } 6595 defer googleapi.CloseBody(res) 6596 if err := googleapi.CheckResponse(res); err != nil { 6597 return nil, err 6598 } 6599 ret := &Operation{ 6600 ServerResponse: googleapi.ServerResponse{ 6601 Header: res.Header, 6602 HTTPStatusCode: res.StatusCode, 6603 }, 6604 } 6605 target := &ret 6606 if err := gensupport.DecodeResponse(target, res); err != nil { 6607 return nil, err 6608 } 6609 return ret, nil 6610 // { 6611 // "description": "Sets the addons for a specific cluster.", 6612 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setAddons", 6613 // "httpMethod": "POST", 6614 // "id": "container.projects.locations.clusters.setAddons", 6615 // "parameterOrder": [ 6616 // "name" 6617 // ], 6618 // "parameters": { 6619 // "name": { 6620 // "description": "The name (project, location, cluster) of the cluster to set addons.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 6621 // "location": "path", 6622 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6623 // "required": true, 6624 // "type": "string" 6625 // } 6626 // }, 6627 // "path": "v1beta1/{+name}:setAddons", 6628 // "request": { 6629 // "$ref": "SetAddonsConfigRequest" 6630 // }, 6631 // "response": { 6632 // "$ref": "Operation" 6633 // }, 6634 // "scopes": [ 6635 // "https://www.googleapis.com/auth/cloud-platform" 6636 // ] 6637 // } 6638 6639} 6640 6641// method id "container.projects.locations.clusters.setLegacyAbac": 6642 6643type ProjectsLocationsClustersSetLegacyAbacCall struct { 6644 s *Service 6645 name string 6646 setlegacyabacrequest *SetLegacyAbacRequest 6647 urlParams_ gensupport.URLParams 6648 ctx_ context.Context 6649 header_ http.Header 6650} 6651 6652// SetLegacyAbac: Enables or disables the ABAC authorization mechanism 6653// on a cluster. 6654func (r *ProjectsLocationsClustersService) SetLegacyAbac(name string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsLocationsClustersSetLegacyAbacCall { 6655 c := &ProjectsLocationsClustersSetLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6656 c.name = name 6657 c.setlegacyabacrequest = setlegacyabacrequest 6658 return c 6659} 6660 6661// Fields allows partial responses to be retrieved. See 6662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6663// for more information. 6664func (c *ProjectsLocationsClustersSetLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLegacyAbacCall { 6665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6666 return c 6667} 6668 6669// Context sets the context to be used in this call's Do method. Any 6670// pending HTTP request will be aborted if the provided context is 6671// canceled. 6672func (c *ProjectsLocationsClustersSetLegacyAbacCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLegacyAbacCall { 6673 c.ctx_ = ctx 6674 return c 6675} 6676 6677// Header returns an http.Header that can be modified by the caller to 6678// add HTTP headers to the request. 6679func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header { 6680 if c.header_ == nil { 6681 c.header_ = make(http.Header) 6682 } 6683 return c.header_ 6684} 6685 6686func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) { 6687 reqHeaders := make(http.Header) 6688 for k, v := range c.header_ { 6689 reqHeaders[k] = v 6690 } 6691 reqHeaders.Set("User-Agent", c.s.userAgent()) 6692 var body io.Reader = nil 6693 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) 6694 if err != nil { 6695 return nil, err 6696 } 6697 reqHeaders.Set("Content-Type", "application/json") 6698 c.urlParams_.Set("alt", alt) 6699 c.urlParams_.Set("prettyPrint", "false") 6700 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLegacyAbac") 6701 urls += "?" + c.urlParams_.Encode() 6702 req, err := http.NewRequest("POST", urls, body) 6703 if err != nil { 6704 return nil, err 6705 } 6706 req.Header = reqHeaders 6707 googleapi.Expand(req.URL, map[string]string{ 6708 "name": c.name, 6709 }) 6710 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6711} 6712 6713// Do executes the "container.projects.locations.clusters.setLegacyAbac" call. 6714// Exactly one of *Operation or error will be non-nil. Any non-2xx 6715// status code is an error. Response headers are in either 6716// *Operation.ServerResponse.Header or (if a response was returned at 6717// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6718// to check whether the returned error was because 6719// http.StatusNotModified was returned. 6720func (c *ProjectsLocationsClustersSetLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6721 gensupport.SetOptions(c.urlParams_, opts...) 6722 res, err := c.doRequest("json") 6723 if res != nil && res.StatusCode == http.StatusNotModified { 6724 if res.Body != nil { 6725 res.Body.Close() 6726 } 6727 return nil, &googleapi.Error{ 6728 Code: res.StatusCode, 6729 Header: res.Header, 6730 } 6731 } 6732 if err != nil { 6733 return nil, err 6734 } 6735 defer googleapi.CloseBody(res) 6736 if err := googleapi.CheckResponse(res); err != nil { 6737 return nil, err 6738 } 6739 ret := &Operation{ 6740 ServerResponse: googleapi.ServerResponse{ 6741 Header: res.Header, 6742 HTTPStatusCode: res.StatusCode, 6743 }, 6744 } 6745 target := &ret 6746 if err := gensupport.DecodeResponse(target, res); err != nil { 6747 return nil, err 6748 } 6749 return ret, nil 6750 // { 6751 // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", 6752 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac", 6753 // "httpMethod": "POST", 6754 // "id": "container.projects.locations.clusters.setLegacyAbac", 6755 // "parameterOrder": [ 6756 // "name" 6757 // ], 6758 // "parameters": { 6759 // "name": { 6760 // "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 6761 // "location": "path", 6762 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6763 // "required": true, 6764 // "type": "string" 6765 // } 6766 // }, 6767 // "path": "v1beta1/{+name}:setLegacyAbac", 6768 // "request": { 6769 // "$ref": "SetLegacyAbacRequest" 6770 // }, 6771 // "response": { 6772 // "$ref": "Operation" 6773 // }, 6774 // "scopes": [ 6775 // "https://www.googleapis.com/auth/cloud-platform" 6776 // ] 6777 // } 6778 6779} 6780 6781// method id "container.projects.locations.clusters.setLocations": 6782 6783type ProjectsLocationsClustersSetLocationsCall struct { 6784 s *Service 6785 name string 6786 setlocationsrequest *SetLocationsRequest 6787 urlParams_ gensupport.URLParams 6788 ctx_ context.Context 6789 header_ http.Header 6790} 6791 6792// SetLocations: Sets the locations for a specific cluster. 6793func (r *ProjectsLocationsClustersService) SetLocations(name string, setlocationsrequest *SetLocationsRequest) *ProjectsLocationsClustersSetLocationsCall { 6794 c := &ProjectsLocationsClustersSetLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6795 c.name = name 6796 c.setlocationsrequest = setlocationsrequest 6797 return c 6798} 6799 6800// Fields allows partial responses to be retrieved. See 6801// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6802// for more information. 6803func (c *ProjectsLocationsClustersSetLocationsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLocationsCall { 6804 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6805 return c 6806} 6807 6808// Context sets the context to be used in this call's Do method. Any 6809// pending HTTP request will be aborted if the provided context is 6810// canceled. 6811func (c *ProjectsLocationsClustersSetLocationsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLocationsCall { 6812 c.ctx_ = ctx 6813 return c 6814} 6815 6816// Header returns an http.Header that can be modified by the caller to 6817// add HTTP headers to the request. 6818func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header { 6819 if c.header_ == nil { 6820 c.header_ = make(http.Header) 6821 } 6822 return c.header_ 6823} 6824 6825func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) { 6826 reqHeaders := make(http.Header) 6827 for k, v := range c.header_ { 6828 reqHeaders[k] = v 6829 } 6830 reqHeaders.Set("User-Agent", c.s.userAgent()) 6831 var body io.Reader = nil 6832 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) 6833 if err != nil { 6834 return nil, err 6835 } 6836 reqHeaders.Set("Content-Type", "application/json") 6837 c.urlParams_.Set("alt", alt) 6838 c.urlParams_.Set("prettyPrint", "false") 6839 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLocations") 6840 urls += "?" + c.urlParams_.Encode() 6841 req, err := http.NewRequest("POST", urls, body) 6842 if err != nil { 6843 return nil, err 6844 } 6845 req.Header = reqHeaders 6846 googleapi.Expand(req.URL, map[string]string{ 6847 "name": c.name, 6848 }) 6849 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6850} 6851 6852// Do executes the "container.projects.locations.clusters.setLocations" call. 6853// Exactly one of *Operation or error will be non-nil. Any non-2xx 6854// status code is an error. Response headers are in either 6855// *Operation.ServerResponse.Header or (if a response was returned at 6856// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6857// to check whether the returned error was because 6858// http.StatusNotModified was returned. 6859func (c *ProjectsLocationsClustersSetLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6860 gensupport.SetOptions(c.urlParams_, opts...) 6861 res, err := c.doRequest("json") 6862 if res != nil && res.StatusCode == http.StatusNotModified { 6863 if res.Body != nil { 6864 res.Body.Close() 6865 } 6866 return nil, &googleapi.Error{ 6867 Code: res.StatusCode, 6868 Header: res.Header, 6869 } 6870 } 6871 if err != nil { 6872 return nil, err 6873 } 6874 defer googleapi.CloseBody(res) 6875 if err := googleapi.CheckResponse(res); err != nil { 6876 return nil, err 6877 } 6878 ret := &Operation{ 6879 ServerResponse: googleapi.ServerResponse{ 6880 Header: res.Header, 6881 HTTPStatusCode: res.StatusCode, 6882 }, 6883 } 6884 target := &ret 6885 if err := gensupport.DecodeResponse(target, res); err != nil { 6886 return nil, err 6887 } 6888 return ret, nil 6889 // { 6890 // "description": "Sets the locations for a specific cluster.", 6891 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLocations", 6892 // "httpMethod": "POST", 6893 // "id": "container.projects.locations.clusters.setLocations", 6894 // "parameterOrder": [ 6895 // "name" 6896 // ], 6897 // "parameters": { 6898 // "name": { 6899 // "description": "The name (project, location, cluster) of the cluster to set locations.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 6900 // "location": "path", 6901 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6902 // "required": true, 6903 // "type": "string" 6904 // } 6905 // }, 6906 // "path": "v1beta1/{+name}:setLocations", 6907 // "request": { 6908 // "$ref": "SetLocationsRequest" 6909 // }, 6910 // "response": { 6911 // "$ref": "Operation" 6912 // }, 6913 // "scopes": [ 6914 // "https://www.googleapis.com/auth/cloud-platform" 6915 // ] 6916 // } 6917 6918} 6919 6920// method id "container.projects.locations.clusters.setLogging": 6921 6922type ProjectsLocationsClustersSetLoggingCall struct { 6923 s *Service 6924 name string 6925 setloggingservicerequest *SetLoggingServiceRequest 6926 urlParams_ gensupport.URLParams 6927 ctx_ context.Context 6928 header_ http.Header 6929} 6930 6931// SetLogging: Sets the logging service for a specific cluster. 6932func (r *ProjectsLocationsClustersService) SetLogging(name string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsLocationsClustersSetLoggingCall { 6933 c := &ProjectsLocationsClustersSetLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6934 c.name = name 6935 c.setloggingservicerequest = setloggingservicerequest 6936 return c 6937} 6938 6939// Fields allows partial responses to be retrieved. See 6940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6941// for more information. 6942func (c *ProjectsLocationsClustersSetLoggingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLoggingCall { 6943 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6944 return c 6945} 6946 6947// Context sets the context to be used in this call's Do method. Any 6948// pending HTTP request will be aborted if the provided context is 6949// canceled. 6950func (c *ProjectsLocationsClustersSetLoggingCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLoggingCall { 6951 c.ctx_ = ctx 6952 return c 6953} 6954 6955// Header returns an http.Header that can be modified by the caller to 6956// add HTTP headers to the request. 6957func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header { 6958 if c.header_ == nil { 6959 c.header_ = make(http.Header) 6960 } 6961 return c.header_ 6962} 6963 6964func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) { 6965 reqHeaders := make(http.Header) 6966 for k, v := range c.header_ { 6967 reqHeaders[k] = v 6968 } 6969 reqHeaders.Set("User-Agent", c.s.userAgent()) 6970 var body io.Reader = nil 6971 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) 6972 if err != nil { 6973 return nil, err 6974 } 6975 reqHeaders.Set("Content-Type", "application/json") 6976 c.urlParams_.Set("alt", alt) 6977 c.urlParams_.Set("prettyPrint", "false") 6978 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLogging") 6979 urls += "?" + c.urlParams_.Encode() 6980 req, err := http.NewRequest("POST", urls, body) 6981 if err != nil { 6982 return nil, err 6983 } 6984 req.Header = reqHeaders 6985 googleapi.Expand(req.URL, map[string]string{ 6986 "name": c.name, 6987 }) 6988 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6989} 6990 6991// Do executes the "container.projects.locations.clusters.setLogging" call. 6992// Exactly one of *Operation or error will be non-nil. Any non-2xx 6993// status code is an error. Response headers are in either 6994// *Operation.ServerResponse.Header or (if a response was returned at 6995// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6996// to check whether the returned error was because 6997// http.StatusNotModified was returned. 6998func (c *ProjectsLocationsClustersSetLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6999 gensupport.SetOptions(c.urlParams_, opts...) 7000 res, err := c.doRequest("json") 7001 if res != nil && res.StatusCode == http.StatusNotModified { 7002 if res.Body != nil { 7003 res.Body.Close() 7004 } 7005 return nil, &googleapi.Error{ 7006 Code: res.StatusCode, 7007 Header: res.Header, 7008 } 7009 } 7010 if err != nil { 7011 return nil, err 7012 } 7013 defer googleapi.CloseBody(res) 7014 if err := googleapi.CheckResponse(res); err != nil { 7015 return nil, err 7016 } 7017 ret := &Operation{ 7018 ServerResponse: googleapi.ServerResponse{ 7019 Header: res.Header, 7020 HTTPStatusCode: res.StatusCode, 7021 }, 7022 } 7023 target := &ret 7024 if err := gensupport.DecodeResponse(target, res); err != nil { 7025 return nil, err 7026 } 7027 return ret, nil 7028 // { 7029 // "description": "Sets the logging service for a specific cluster.", 7030 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLogging", 7031 // "httpMethod": "POST", 7032 // "id": "container.projects.locations.clusters.setLogging", 7033 // "parameterOrder": [ 7034 // "name" 7035 // ], 7036 // "parameters": { 7037 // "name": { 7038 // "description": "The name (project, location, cluster) of the cluster to set logging.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7039 // "location": "path", 7040 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7041 // "required": true, 7042 // "type": "string" 7043 // } 7044 // }, 7045 // "path": "v1beta1/{+name}:setLogging", 7046 // "request": { 7047 // "$ref": "SetLoggingServiceRequest" 7048 // }, 7049 // "response": { 7050 // "$ref": "Operation" 7051 // }, 7052 // "scopes": [ 7053 // "https://www.googleapis.com/auth/cloud-platform" 7054 // ] 7055 // } 7056 7057} 7058 7059// method id "container.projects.locations.clusters.setMaintenancePolicy": 7060 7061type ProjectsLocationsClustersSetMaintenancePolicyCall struct { 7062 s *Service 7063 name string 7064 setmaintenancepolicyrequest *SetMaintenancePolicyRequest 7065 urlParams_ gensupport.URLParams 7066 ctx_ context.Context 7067 header_ http.Header 7068} 7069 7070// SetMaintenancePolicy: Sets the maintenance policy for a cluster. 7071func (r *ProjectsLocationsClustersService) SetMaintenancePolicy(name string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsLocationsClustersSetMaintenancePolicyCall { 7072 c := &ProjectsLocationsClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7073 c.name = name 7074 c.setmaintenancepolicyrequest = setmaintenancepolicyrequest 7075 return c 7076} 7077 7078// Fields allows partial responses to be retrieved. See 7079// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7080// for more information. 7081func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMaintenancePolicyCall { 7082 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7083 return c 7084} 7085 7086// Context sets the context to be used in this call's Do method. Any 7087// pending HTTP request will be aborted if the provided context is 7088// canceled. 7089func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMaintenancePolicyCall { 7090 c.ctx_ = ctx 7091 return c 7092} 7093 7094// Header returns an http.Header that can be modified by the caller to 7095// add HTTP headers to the request. 7096func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header { 7097 if c.header_ == nil { 7098 c.header_ = make(http.Header) 7099 } 7100 return c.header_ 7101} 7102 7103func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { 7104 reqHeaders := make(http.Header) 7105 for k, v := range c.header_ { 7106 reqHeaders[k] = v 7107 } 7108 reqHeaders.Set("User-Agent", c.s.userAgent()) 7109 var body io.Reader = nil 7110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest) 7111 if err != nil { 7112 return nil, err 7113 } 7114 reqHeaders.Set("Content-Type", "application/json") 7115 c.urlParams_.Set("alt", alt) 7116 c.urlParams_.Set("prettyPrint", "false") 7117 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMaintenancePolicy") 7118 urls += "?" + c.urlParams_.Encode() 7119 req, err := http.NewRequest("POST", urls, body) 7120 if err != nil { 7121 return nil, err 7122 } 7123 req.Header = reqHeaders 7124 googleapi.Expand(req.URL, map[string]string{ 7125 "name": c.name, 7126 }) 7127 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7128} 7129 7130// Do executes the "container.projects.locations.clusters.setMaintenancePolicy" call. 7131// Exactly one of *Operation or error will be non-nil. Any non-2xx 7132// status code is an error. Response headers are in either 7133// *Operation.ServerResponse.Header or (if a response was returned at 7134// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7135// to check whether the returned error was because 7136// http.StatusNotModified was returned. 7137func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7138 gensupport.SetOptions(c.urlParams_, opts...) 7139 res, err := c.doRequest("json") 7140 if res != nil && res.StatusCode == http.StatusNotModified { 7141 if res.Body != nil { 7142 res.Body.Close() 7143 } 7144 return nil, &googleapi.Error{ 7145 Code: res.StatusCode, 7146 Header: res.Header, 7147 } 7148 } 7149 if err != nil { 7150 return nil, err 7151 } 7152 defer googleapi.CloseBody(res) 7153 if err := googleapi.CheckResponse(res); err != nil { 7154 return nil, err 7155 } 7156 ret := &Operation{ 7157 ServerResponse: googleapi.ServerResponse{ 7158 Header: res.Header, 7159 HTTPStatusCode: res.StatusCode, 7160 }, 7161 } 7162 target := &ret 7163 if err := gensupport.DecodeResponse(target, res); err != nil { 7164 return nil, err 7165 } 7166 return ret, nil 7167 // { 7168 // "description": "Sets the maintenance policy for a cluster.", 7169 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMaintenancePolicy", 7170 // "httpMethod": "POST", 7171 // "id": "container.projects.locations.clusters.setMaintenancePolicy", 7172 // "parameterOrder": [ 7173 // "name" 7174 // ], 7175 // "parameters": { 7176 // "name": { 7177 // "description": "The name (project, location, cluster id) of the cluster to set maintenance\npolicy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7178 // "location": "path", 7179 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7180 // "required": true, 7181 // "type": "string" 7182 // } 7183 // }, 7184 // "path": "v1beta1/{+name}:setMaintenancePolicy", 7185 // "request": { 7186 // "$ref": "SetMaintenancePolicyRequest" 7187 // }, 7188 // "response": { 7189 // "$ref": "Operation" 7190 // }, 7191 // "scopes": [ 7192 // "https://www.googleapis.com/auth/cloud-platform" 7193 // ] 7194 // } 7195 7196} 7197 7198// method id "container.projects.locations.clusters.setMasterAuth": 7199 7200type ProjectsLocationsClustersSetMasterAuthCall struct { 7201 s *Service 7202 name string 7203 setmasterauthrequest *SetMasterAuthRequest 7204 urlParams_ gensupport.URLParams 7205 ctx_ context.Context 7206 header_ http.Header 7207} 7208 7209// SetMasterAuth: Sets master auth materials. Currently supports 7210// changing the admin password 7211// or a specific cluster, either via password generation or explicitly 7212// setting 7213// the password. 7214func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { 7215 c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7216 c.name = name 7217 c.setmasterauthrequest = setmasterauthrequest 7218 return c 7219} 7220 7221// Fields allows partial responses to be retrieved. See 7222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7223// for more information. 7224func (c *ProjectsLocationsClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMasterAuthCall { 7225 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7226 return c 7227} 7228 7229// Context sets the context to be used in this call's Do method. Any 7230// pending HTTP request will be aborted if the provided context is 7231// canceled. 7232func (c *ProjectsLocationsClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMasterAuthCall { 7233 c.ctx_ = ctx 7234 return c 7235} 7236 7237// Header returns an http.Header that can be modified by the caller to 7238// add HTTP headers to the request. 7239func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header { 7240 if c.header_ == nil { 7241 c.header_ = make(http.Header) 7242 } 7243 return c.header_ 7244} 7245 7246func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { 7247 reqHeaders := make(http.Header) 7248 for k, v := range c.header_ { 7249 reqHeaders[k] = v 7250 } 7251 reqHeaders.Set("User-Agent", c.s.userAgent()) 7252 var body io.Reader = nil 7253 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) 7254 if err != nil { 7255 return nil, err 7256 } 7257 reqHeaders.Set("Content-Type", "application/json") 7258 c.urlParams_.Set("alt", alt) 7259 c.urlParams_.Set("prettyPrint", "false") 7260 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMasterAuth") 7261 urls += "?" + c.urlParams_.Encode() 7262 req, err := http.NewRequest("POST", urls, body) 7263 if err != nil { 7264 return nil, err 7265 } 7266 req.Header = reqHeaders 7267 googleapi.Expand(req.URL, map[string]string{ 7268 "name": c.name, 7269 }) 7270 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7271} 7272 7273// Do executes the "container.projects.locations.clusters.setMasterAuth" call. 7274// Exactly one of *Operation or error will be non-nil. Any non-2xx 7275// status code is an error. Response headers are in either 7276// *Operation.ServerResponse.Header or (if a response was returned at 7277// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7278// to check whether the returned error was because 7279// http.StatusNotModified was returned. 7280func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7281 gensupport.SetOptions(c.urlParams_, opts...) 7282 res, err := c.doRequest("json") 7283 if res != nil && res.StatusCode == http.StatusNotModified { 7284 if res.Body != nil { 7285 res.Body.Close() 7286 } 7287 return nil, &googleapi.Error{ 7288 Code: res.StatusCode, 7289 Header: res.Header, 7290 } 7291 } 7292 if err != nil { 7293 return nil, err 7294 } 7295 defer googleapi.CloseBody(res) 7296 if err := googleapi.CheckResponse(res); err != nil { 7297 return nil, err 7298 } 7299 ret := &Operation{ 7300 ServerResponse: googleapi.ServerResponse{ 7301 Header: res.Header, 7302 HTTPStatusCode: res.StatusCode, 7303 }, 7304 } 7305 target := &ret 7306 if err := gensupport.DecodeResponse(target, res); err != nil { 7307 return nil, err 7308 } 7309 return ret, nil 7310 // { 7311 // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", 7312 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", 7313 // "httpMethod": "POST", 7314 // "id": "container.projects.locations.clusters.setMasterAuth", 7315 // "parameterOrder": [ 7316 // "name" 7317 // ], 7318 // "parameters": { 7319 // "name": { 7320 // "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7321 // "location": "path", 7322 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7323 // "required": true, 7324 // "type": "string" 7325 // } 7326 // }, 7327 // "path": "v1beta1/{+name}:setMasterAuth", 7328 // "request": { 7329 // "$ref": "SetMasterAuthRequest" 7330 // }, 7331 // "response": { 7332 // "$ref": "Operation" 7333 // }, 7334 // "scopes": [ 7335 // "https://www.googleapis.com/auth/cloud-platform" 7336 // ] 7337 // } 7338 7339} 7340 7341// method id "container.projects.locations.clusters.setMonitoring": 7342 7343type ProjectsLocationsClustersSetMonitoringCall struct { 7344 s *Service 7345 name string 7346 setmonitoringservicerequest *SetMonitoringServiceRequest 7347 urlParams_ gensupport.URLParams 7348 ctx_ context.Context 7349 header_ http.Header 7350} 7351 7352// SetMonitoring: Sets the monitoring service for a specific cluster. 7353func (r *ProjectsLocationsClustersService) SetMonitoring(name string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsLocationsClustersSetMonitoringCall { 7354 c := &ProjectsLocationsClustersSetMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7355 c.name = name 7356 c.setmonitoringservicerequest = setmonitoringservicerequest 7357 return c 7358} 7359 7360// Fields allows partial responses to be retrieved. See 7361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7362// for more information. 7363func (c *ProjectsLocationsClustersSetMonitoringCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMonitoringCall { 7364 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7365 return c 7366} 7367 7368// Context sets the context to be used in this call's Do method. Any 7369// pending HTTP request will be aborted if the provided context is 7370// canceled. 7371func (c *ProjectsLocationsClustersSetMonitoringCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMonitoringCall { 7372 c.ctx_ = ctx 7373 return c 7374} 7375 7376// Header returns an http.Header that can be modified by the caller to 7377// add HTTP headers to the request. 7378func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header { 7379 if c.header_ == nil { 7380 c.header_ = make(http.Header) 7381 } 7382 return c.header_ 7383} 7384 7385func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) { 7386 reqHeaders := make(http.Header) 7387 for k, v := range c.header_ { 7388 reqHeaders[k] = v 7389 } 7390 reqHeaders.Set("User-Agent", c.s.userAgent()) 7391 var body io.Reader = nil 7392 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) 7393 if err != nil { 7394 return nil, err 7395 } 7396 reqHeaders.Set("Content-Type", "application/json") 7397 c.urlParams_.Set("alt", alt) 7398 c.urlParams_.Set("prettyPrint", "false") 7399 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMonitoring") 7400 urls += "?" + c.urlParams_.Encode() 7401 req, err := http.NewRequest("POST", urls, body) 7402 if err != nil { 7403 return nil, err 7404 } 7405 req.Header = reqHeaders 7406 googleapi.Expand(req.URL, map[string]string{ 7407 "name": c.name, 7408 }) 7409 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7410} 7411 7412// Do executes the "container.projects.locations.clusters.setMonitoring" call. 7413// Exactly one of *Operation or error will be non-nil. Any non-2xx 7414// status code is an error. Response headers are in either 7415// *Operation.ServerResponse.Header or (if a response was returned at 7416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7417// to check whether the returned error was because 7418// http.StatusNotModified was returned. 7419func (c *ProjectsLocationsClustersSetMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7420 gensupport.SetOptions(c.urlParams_, opts...) 7421 res, err := c.doRequest("json") 7422 if res != nil && res.StatusCode == http.StatusNotModified { 7423 if res.Body != nil { 7424 res.Body.Close() 7425 } 7426 return nil, &googleapi.Error{ 7427 Code: res.StatusCode, 7428 Header: res.Header, 7429 } 7430 } 7431 if err != nil { 7432 return nil, err 7433 } 7434 defer googleapi.CloseBody(res) 7435 if err := googleapi.CheckResponse(res); err != nil { 7436 return nil, err 7437 } 7438 ret := &Operation{ 7439 ServerResponse: googleapi.ServerResponse{ 7440 Header: res.Header, 7441 HTTPStatusCode: res.StatusCode, 7442 }, 7443 } 7444 target := &ret 7445 if err := gensupport.DecodeResponse(target, res); err != nil { 7446 return nil, err 7447 } 7448 return ret, nil 7449 // { 7450 // "description": "Sets the monitoring service for a specific cluster.", 7451 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMonitoring", 7452 // "httpMethod": "POST", 7453 // "id": "container.projects.locations.clusters.setMonitoring", 7454 // "parameterOrder": [ 7455 // "name" 7456 // ], 7457 // "parameters": { 7458 // "name": { 7459 // "description": "The name (project, location, cluster) of the cluster to set monitoring.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7460 // "location": "path", 7461 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7462 // "required": true, 7463 // "type": "string" 7464 // } 7465 // }, 7466 // "path": "v1beta1/{+name}:setMonitoring", 7467 // "request": { 7468 // "$ref": "SetMonitoringServiceRequest" 7469 // }, 7470 // "response": { 7471 // "$ref": "Operation" 7472 // }, 7473 // "scopes": [ 7474 // "https://www.googleapis.com/auth/cloud-platform" 7475 // ] 7476 // } 7477 7478} 7479 7480// method id "container.projects.locations.clusters.setNetworkPolicy": 7481 7482type ProjectsLocationsClustersSetNetworkPolicyCall struct { 7483 s *Service 7484 name string 7485 setnetworkpolicyrequest *SetNetworkPolicyRequest 7486 urlParams_ gensupport.URLParams 7487 ctx_ context.Context 7488 header_ http.Header 7489} 7490 7491// SetNetworkPolicy: Enables or disables Network Policy for a cluster. 7492func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { 7493 c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7494 c.name = name 7495 c.setnetworkpolicyrequest = setnetworkpolicyrequest 7496 return c 7497} 7498 7499// Fields allows partial responses to be retrieved. See 7500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7501// for more information. 7502func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetNetworkPolicyCall { 7503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7504 return c 7505} 7506 7507// Context sets the context to be used in this call's Do method. Any 7508// pending HTTP request will be aborted if the provided context is 7509// canceled. 7510func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetNetworkPolicyCall { 7511 c.ctx_ = ctx 7512 return c 7513} 7514 7515// Header returns an http.Header that can be modified by the caller to 7516// add HTTP headers to the request. 7517func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header { 7518 if c.header_ == nil { 7519 c.header_ = make(http.Header) 7520 } 7521 return c.header_ 7522} 7523 7524func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { 7525 reqHeaders := make(http.Header) 7526 for k, v := range c.header_ { 7527 reqHeaders[k] = v 7528 } 7529 reqHeaders.Set("User-Agent", c.s.userAgent()) 7530 var body io.Reader = nil 7531 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) 7532 if err != nil { 7533 return nil, err 7534 } 7535 reqHeaders.Set("Content-Type", "application/json") 7536 c.urlParams_.Set("alt", alt) 7537 c.urlParams_.Set("prettyPrint", "false") 7538 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setNetworkPolicy") 7539 urls += "?" + c.urlParams_.Encode() 7540 req, err := http.NewRequest("POST", urls, body) 7541 if err != nil { 7542 return nil, err 7543 } 7544 req.Header = reqHeaders 7545 googleapi.Expand(req.URL, map[string]string{ 7546 "name": c.name, 7547 }) 7548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7549} 7550 7551// Do executes the "container.projects.locations.clusters.setNetworkPolicy" call. 7552// Exactly one of *Operation or error will be non-nil. Any non-2xx 7553// status code is an error. Response headers are in either 7554// *Operation.ServerResponse.Header or (if a response was returned at 7555// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7556// to check whether the returned error was because 7557// http.StatusNotModified was returned. 7558func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7559 gensupport.SetOptions(c.urlParams_, opts...) 7560 res, err := c.doRequest("json") 7561 if res != nil && res.StatusCode == http.StatusNotModified { 7562 if res.Body != nil { 7563 res.Body.Close() 7564 } 7565 return nil, &googleapi.Error{ 7566 Code: res.StatusCode, 7567 Header: res.Header, 7568 } 7569 } 7570 if err != nil { 7571 return nil, err 7572 } 7573 defer googleapi.CloseBody(res) 7574 if err := googleapi.CheckResponse(res); err != nil { 7575 return nil, err 7576 } 7577 ret := &Operation{ 7578 ServerResponse: googleapi.ServerResponse{ 7579 Header: res.Header, 7580 HTTPStatusCode: res.StatusCode, 7581 }, 7582 } 7583 target := &ret 7584 if err := gensupport.DecodeResponse(target, res); err != nil { 7585 return nil, err 7586 } 7587 return ret, nil 7588 // { 7589 // "description": "Enables or disables Network Policy for a cluster.", 7590 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", 7591 // "httpMethod": "POST", 7592 // "id": "container.projects.locations.clusters.setNetworkPolicy", 7593 // "parameterOrder": [ 7594 // "name" 7595 // ], 7596 // "parameters": { 7597 // "name": { 7598 // "description": "The name (project, location, cluster id) of the cluster to set networking\npolicy. Specified in the format 'projects/*/locations/*/clusters/*'.", 7599 // "location": "path", 7600 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7601 // "required": true, 7602 // "type": "string" 7603 // } 7604 // }, 7605 // "path": "v1beta1/{+name}:setNetworkPolicy", 7606 // "request": { 7607 // "$ref": "SetNetworkPolicyRequest" 7608 // }, 7609 // "response": { 7610 // "$ref": "Operation" 7611 // }, 7612 // "scopes": [ 7613 // "https://www.googleapis.com/auth/cloud-platform" 7614 // ] 7615 // } 7616 7617} 7618 7619// method id "container.projects.locations.clusters.setResourceLabels": 7620 7621type ProjectsLocationsClustersSetResourceLabelsCall struct { 7622 s *Service 7623 name string 7624 setlabelsrequest *SetLabelsRequest 7625 urlParams_ gensupport.URLParams 7626 ctx_ context.Context 7627 header_ http.Header 7628} 7629 7630// SetResourceLabels: Sets labels on a cluster. 7631func (r *ProjectsLocationsClustersService) SetResourceLabels(name string, setlabelsrequest *SetLabelsRequest) *ProjectsLocationsClustersSetResourceLabelsCall { 7632 c := &ProjectsLocationsClustersSetResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7633 c.name = name 7634 c.setlabelsrequest = setlabelsrequest 7635 return c 7636} 7637 7638// Fields allows partial responses to be retrieved. See 7639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7640// for more information. 7641func (c *ProjectsLocationsClustersSetResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetResourceLabelsCall { 7642 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7643 return c 7644} 7645 7646// Context sets the context to be used in this call's Do method. Any 7647// pending HTTP request will be aborted if the provided context is 7648// canceled. 7649func (c *ProjectsLocationsClustersSetResourceLabelsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetResourceLabelsCall { 7650 c.ctx_ = ctx 7651 return c 7652} 7653 7654// Header returns an http.Header that can be modified by the caller to 7655// add HTTP headers to the request. 7656func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header { 7657 if c.header_ == nil { 7658 c.header_ = make(http.Header) 7659 } 7660 return c.header_ 7661} 7662 7663func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) { 7664 reqHeaders := make(http.Header) 7665 for k, v := range c.header_ { 7666 reqHeaders[k] = v 7667 } 7668 reqHeaders.Set("User-Agent", c.s.userAgent()) 7669 var body io.Reader = nil 7670 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) 7671 if err != nil { 7672 return nil, err 7673 } 7674 reqHeaders.Set("Content-Type", "application/json") 7675 c.urlParams_.Set("alt", alt) 7676 c.urlParams_.Set("prettyPrint", "false") 7677 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setResourceLabels") 7678 urls += "?" + c.urlParams_.Encode() 7679 req, err := http.NewRequest("POST", urls, body) 7680 if err != nil { 7681 return nil, err 7682 } 7683 req.Header = reqHeaders 7684 googleapi.Expand(req.URL, map[string]string{ 7685 "name": c.name, 7686 }) 7687 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7688} 7689 7690// Do executes the "container.projects.locations.clusters.setResourceLabels" call. 7691// Exactly one of *Operation or error will be non-nil. Any non-2xx 7692// status code is an error. Response headers are in either 7693// *Operation.ServerResponse.Header or (if a response was returned at 7694// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7695// to check whether the returned error was because 7696// http.StatusNotModified was returned. 7697func (c *ProjectsLocationsClustersSetResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7698 gensupport.SetOptions(c.urlParams_, opts...) 7699 res, err := c.doRequest("json") 7700 if res != nil && res.StatusCode == http.StatusNotModified { 7701 if res.Body != nil { 7702 res.Body.Close() 7703 } 7704 return nil, &googleapi.Error{ 7705 Code: res.StatusCode, 7706 Header: res.Header, 7707 } 7708 } 7709 if err != nil { 7710 return nil, err 7711 } 7712 defer googleapi.CloseBody(res) 7713 if err := googleapi.CheckResponse(res); err != nil { 7714 return nil, err 7715 } 7716 ret := &Operation{ 7717 ServerResponse: googleapi.ServerResponse{ 7718 Header: res.Header, 7719 HTTPStatusCode: res.StatusCode, 7720 }, 7721 } 7722 target := &ret 7723 if err := gensupport.DecodeResponse(target, res); err != nil { 7724 return nil, err 7725 } 7726 return ret, nil 7727 // { 7728 // "description": "Sets labels on a cluster.", 7729 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels", 7730 // "httpMethod": "POST", 7731 // "id": "container.projects.locations.clusters.setResourceLabels", 7732 // "parameterOrder": [ 7733 // "name" 7734 // ], 7735 // "parameters": { 7736 // "name": { 7737 // "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7738 // "location": "path", 7739 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7740 // "required": true, 7741 // "type": "string" 7742 // } 7743 // }, 7744 // "path": "v1beta1/{+name}:setResourceLabels", 7745 // "request": { 7746 // "$ref": "SetLabelsRequest" 7747 // }, 7748 // "response": { 7749 // "$ref": "Operation" 7750 // }, 7751 // "scopes": [ 7752 // "https://www.googleapis.com/auth/cloud-platform" 7753 // ] 7754 // } 7755 7756} 7757 7758// method id "container.projects.locations.clusters.startIpRotation": 7759 7760type ProjectsLocationsClustersStartIpRotationCall struct { 7761 s *Service 7762 name string 7763 startiprotationrequest *StartIPRotationRequest 7764 urlParams_ gensupport.URLParams 7765 ctx_ context.Context 7766 header_ http.Header 7767} 7768 7769// StartIpRotation: Starts master IP rotation. 7770func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { 7771 c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7772 c.name = name 7773 c.startiprotationrequest = startiprotationrequest 7774 return c 7775} 7776 7777// Fields allows partial responses to be retrieved. See 7778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7779// for more information. 7780func (c *ProjectsLocationsClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersStartIpRotationCall { 7781 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7782 return c 7783} 7784 7785// Context sets the context to be used in this call's Do method. Any 7786// pending HTTP request will be aborted if the provided context is 7787// canceled. 7788func (c *ProjectsLocationsClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersStartIpRotationCall { 7789 c.ctx_ = ctx 7790 return c 7791} 7792 7793// Header returns an http.Header that can be modified by the caller to 7794// add HTTP headers to the request. 7795func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header { 7796 if c.header_ == nil { 7797 c.header_ = make(http.Header) 7798 } 7799 return c.header_ 7800} 7801 7802func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { 7803 reqHeaders := make(http.Header) 7804 for k, v := range c.header_ { 7805 reqHeaders[k] = v 7806 } 7807 reqHeaders.Set("User-Agent", c.s.userAgent()) 7808 var body io.Reader = nil 7809 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) 7810 if err != nil { 7811 return nil, err 7812 } 7813 reqHeaders.Set("Content-Type", "application/json") 7814 c.urlParams_.Set("alt", alt) 7815 c.urlParams_.Set("prettyPrint", "false") 7816 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:startIpRotation") 7817 urls += "?" + c.urlParams_.Encode() 7818 req, err := http.NewRequest("POST", urls, body) 7819 if err != nil { 7820 return nil, err 7821 } 7822 req.Header = reqHeaders 7823 googleapi.Expand(req.URL, map[string]string{ 7824 "name": c.name, 7825 }) 7826 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7827} 7828 7829// Do executes the "container.projects.locations.clusters.startIpRotation" call. 7830// Exactly one of *Operation or error will be non-nil. Any non-2xx 7831// status code is an error. Response headers are in either 7832// *Operation.ServerResponse.Header or (if a response was returned at 7833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7834// to check whether the returned error was because 7835// http.StatusNotModified was returned. 7836func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7837 gensupport.SetOptions(c.urlParams_, opts...) 7838 res, err := c.doRequest("json") 7839 if res != nil && res.StatusCode == http.StatusNotModified { 7840 if res.Body != nil { 7841 res.Body.Close() 7842 } 7843 return nil, &googleapi.Error{ 7844 Code: res.StatusCode, 7845 Header: res.Header, 7846 } 7847 } 7848 if err != nil { 7849 return nil, err 7850 } 7851 defer googleapi.CloseBody(res) 7852 if err := googleapi.CheckResponse(res); err != nil { 7853 return nil, err 7854 } 7855 ret := &Operation{ 7856 ServerResponse: googleapi.ServerResponse{ 7857 Header: res.Header, 7858 HTTPStatusCode: res.StatusCode, 7859 }, 7860 } 7861 target := &ret 7862 if err := gensupport.DecodeResponse(target, res); err != nil { 7863 return nil, err 7864 } 7865 return ret, nil 7866 // { 7867 // "description": "Starts master IP rotation.", 7868 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", 7869 // "httpMethod": "POST", 7870 // "id": "container.projects.locations.clusters.startIpRotation", 7871 // "parameterOrder": [ 7872 // "name" 7873 // ], 7874 // "parameters": { 7875 // "name": { 7876 // "description": "The name (project, location, cluster id) of the cluster to start IP\nrotation. Specified in the format 'projects/*/locations/*/clusters/*'.", 7877 // "location": "path", 7878 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7879 // "required": true, 7880 // "type": "string" 7881 // } 7882 // }, 7883 // "path": "v1beta1/{+name}:startIpRotation", 7884 // "request": { 7885 // "$ref": "StartIPRotationRequest" 7886 // }, 7887 // "response": { 7888 // "$ref": "Operation" 7889 // }, 7890 // "scopes": [ 7891 // "https://www.googleapis.com/auth/cloud-platform" 7892 // ] 7893 // } 7894 7895} 7896 7897// method id "container.projects.locations.clusters.update": 7898 7899type ProjectsLocationsClustersUpdateCall struct { 7900 s *Service 7901 name string 7902 updateclusterrequest *UpdateClusterRequest 7903 urlParams_ gensupport.URLParams 7904 ctx_ context.Context 7905 header_ http.Header 7906} 7907 7908// Update: Updates the settings for a specific cluster. 7909func (r *ProjectsLocationsClustersService) Update(name string, updateclusterrequest *UpdateClusterRequest) *ProjectsLocationsClustersUpdateCall { 7910 c := &ProjectsLocationsClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7911 c.name = name 7912 c.updateclusterrequest = updateclusterrequest 7913 return c 7914} 7915 7916// Fields allows partial responses to be retrieved. See 7917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7918// for more information. 7919func (c *ProjectsLocationsClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateCall { 7920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7921 return c 7922} 7923 7924// Context sets the context to be used in this call's Do method. Any 7925// pending HTTP request will be aborted if the provided context is 7926// canceled. 7927func (c *ProjectsLocationsClustersUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateCall { 7928 c.ctx_ = ctx 7929 return c 7930} 7931 7932// Header returns an http.Header that can be modified by the caller to 7933// add HTTP headers to the request. 7934func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header { 7935 if c.header_ == nil { 7936 c.header_ = make(http.Header) 7937 } 7938 return c.header_ 7939} 7940 7941func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) { 7942 reqHeaders := make(http.Header) 7943 for k, v := range c.header_ { 7944 reqHeaders[k] = v 7945 } 7946 reqHeaders.Set("User-Agent", c.s.userAgent()) 7947 var body io.Reader = nil 7948 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) 7949 if err != nil { 7950 return nil, err 7951 } 7952 reqHeaders.Set("Content-Type", "application/json") 7953 c.urlParams_.Set("alt", alt) 7954 c.urlParams_.Set("prettyPrint", "false") 7955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7956 urls += "?" + c.urlParams_.Encode() 7957 req, err := http.NewRequest("PUT", urls, body) 7958 if err != nil { 7959 return nil, err 7960 } 7961 req.Header = reqHeaders 7962 googleapi.Expand(req.URL, map[string]string{ 7963 "name": c.name, 7964 }) 7965 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7966} 7967 7968// Do executes the "container.projects.locations.clusters.update" call. 7969// Exactly one of *Operation or error will be non-nil. Any non-2xx 7970// status code is an error. Response headers are in either 7971// *Operation.ServerResponse.Header or (if a response was returned at 7972// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7973// to check whether the returned error was because 7974// http.StatusNotModified was returned. 7975func (c *ProjectsLocationsClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7976 gensupport.SetOptions(c.urlParams_, opts...) 7977 res, err := c.doRequest("json") 7978 if res != nil && res.StatusCode == http.StatusNotModified { 7979 if res.Body != nil { 7980 res.Body.Close() 7981 } 7982 return nil, &googleapi.Error{ 7983 Code: res.StatusCode, 7984 Header: res.Header, 7985 } 7986 } 7987 if err != nil { 7988 return nil, err 7989 } 7990 defer googleapi.CloseBody(res) 7991 if err := googleapi.CheckResponse(res); err != nil { 7992 return nil, err 7993 } 7994 ret := &Operation{ 7995 ServerResponse: googleapi.ServerResponse{ 7996 Header: res.Header, 7997 HTTPStatusCode: res.StatusCode, 7998 }, 7999 } 8000 target := &ret 8001 if err := gensupport.DecodeResponse(target, res); err != nil { 8002 return nil, err 8003 } 8004 return ret, nil 8005 // { 8006 // "description": "Updates the settings for a specific cluster.", 8007 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", 8008 // "httpMethod": "PUT", 8009 // "id": "container.projects.locations.clusters.update", 8010 // "parameterOrder": [ 8011 // "name" 8012 // ], 8013 // "parameters": { 8014 // "name": { 8015 // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8016 // "location": "path", 8017 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8018 // "required": true, 8019 // "type": "string" 8020 // } 8021 // }, 8022 // "path": "v1beta1/{+name}", 8023 // "request": { 8024 // "$ref": "UpdateClusterRequest" 8025 // }, 8026 // "response": { 8027 // "$ref": "Operation" 8028 // }, 8029 // "scopes": [ 8030 // "https://www.googleapis.com/auth/cloud-platform" 8031 // ] 8032 // } 8033 8034} 8035 8036// method id "container.projects.locations.clusters.updateMaster": 8037 8038type ProjectsLocationsClustersUpdateMasterCall struct { 8039 s *Service 8040 name string 8041 updatemasterrequest *UpdateMasterRequest 8042 urlParams_ gensupport.URLParams 8043 ctx_ context.Context 8044 header_ http.Header 8045} 8046 8047// UpdateMaster: Updates the master for a specific cluster. 8048func (r *ProjectsLocationsClustersService) UpdateMaster(name string, updatemasterrequest *UpdateMasterRequest) *ProjectsLocationsClustersUpdateMasterCall { 8049 c := &ProjectsLocationsClustersUpdateMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8050 c.name = name 8051 c.updatemasterrequest = updatemasterrequest 8052 return c 8053} 8054 8055// Fields allows partial responses to be retrieved. See 8056// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8057// for more information. 8058func (c *ProjectsLocationsClustersUpdateMasterCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateMasterCall { 8059 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8060 return c 8061} 8062 8063// Context sets the context to be used in this call's Do method. Any 8064// pending HTTP request will be aborted if the provided context is 8065// canceled. 8066func (c *ProjectsLocationsClustersUpdateMasterCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateMasterCall { 8067 c.ctx_ = ctx 8068 return c 8069} 8070 8071// Header returns an http.Header that can be modified by the caller to 8072// add HTTP headers to the request. 8073func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header { 8074 if c.header_ == nil { 8075 c.header_ = make(http.Header) 8076 } 8077 return c.header_ 8078} 8079 8080func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) { 8081 reqHeaders := make(http.Header) 8082 for k, v := range c.header_ { 8083 reqHeaders[k] = v 8084 } 8085 reqHeaders.Set("User-Agent", c.s.userAgent()) 8086 var body io.Reader = nil 8087 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) 8088 if err != nil { 8089 return nil, err 8090 } 8091 reqHeaders.Set("Content-Type", "application/json") 8092 c.urlParams_.Set("alt", alt) 8093 c.urlParams_.Set("prettyPrint", "false") 8094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:updateMaster") 8095 urls += "?" + c.urlParams_.Encode() 8096 req, err := http.NewRequest("POST", urls, body) 8097 if err != nil { 8098 return nil, err 8099 } 8100 req.Header = reqHeaders 8101 googleapi.Expand(req.URL, map[string]string{ 8102 "name": c.name, 8103 }) 8104 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8105} 8106 8107// Do executes the "container.projects.locations.clusters.updateMaster" call. 8108// Exactly one of *Operation or error will be non-nil. Any non-2xx 8109// status code is an error. Response headers are in either 8110// *Operation.ServerResponse.Header or (if a response was returned at 8111// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8112// to check whether the returned error was because 8113// http.StatusNotModified was returned. 8114func (c *ProjectsLocationsClustersUpdateMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8115 gensupport.SetOptions(c.urlParams_, opts...) 8116 res, err := c.doRequest("json") 8117 if res != nil && res.StatusCode == http.StatusNotModified { 8118 if res.Body != nil { 8119 res.Body.Close() 8120 } 8121 return nil, &googleapi.Error{ 8122 Code: res.StatusCode, 8123 Header: res.Header, 8124 } 8125 } 8126 if err != nil { 8127 return nil, err 8128 } 8129 defer googleapi.CloseBody(res) 8130 if err := googleapi.CheckResponse(res); err != nil { 8131 return nil, err 8132 } 8133 ret := &Operation{ 8134 ServerResponse: googleapi.ServerResponse{ 8135 Header: res.Header, 8136 HTTPStatusCode: res.StatusCode, 8137 }, 8138 } 8139 target := &ret 8140 if err := gensupport.DecodeResponse(target, res); err != nil { 8141 return nil, err 8142 } 8143 return ret, nil 8144 // { 8145 // "description": "Updates the master for a specific cluster.", 8146 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:updateMaster", 8147 // "httpMethod": "POST", 8148 // "id": "container.projects.locations.clusters.updateMaster", 8149 // "parameterOrder": [ 8150 // "name" 8151 // ], 8152 // "parameters": { 8153 // "name": { 8154 // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8155 // "location": "path", 8156 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8157 // "required": true, 8158 // "type": "string" 8159 // } 8160 // }, 8161 // "path": "v1beta1/{+name}:updateMaster", 8162 // "request": { 8163 // "$ref": "UpdateMasterRequest" 8164 // }, 8165 // "response": { 8166 // "$ref": "Operation" 8167 // }, 8168 // "scopes": [ 8169 // "https://www.googleapis.com/auth/cloud-platform" 8170 // ] 8171 // } 8172 8173} 8174 8175// method id "container.projects.locations.clusters.nodePools.create": 8176 8177type ProjectsLocationsClustersNodePoolsCreateCall struct { 8178 s *Service 8179 parent string 8180 createnodepoolrequest *CreateNodePoolRequest 8181 urlParams_ gensupport.URLParams 8182 ctx_ context.Context 8183 header_ http.Header 8184} 8185 8186// Create: Creates a node pool for a cluster. 8187func (r *ProjectsLocationsClustersNodePoolsService) Create(parent string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsLocationsClustersNodePoolsCreateCall { 8188 c := &ProjectsLocationsClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8189 c.parent = parent 8190 c.createnodepoolrequest = createnodepoolrequest 8191 return c 8192} 8193 8194// Fields allows partial responses to be retrieved. See 8195// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8196// for more information. 8197func (c *ProjectsLocationsClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCreateCall { 8198 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8199 return c 8200} 8201 8202// Context sets the context to be used in this call's Do method. Any 8203// pending HTTP request will be aborted if the provided context is 8204// canceled. 8205func (c *ProjectsLocationsClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCreateCall { 8206 c.ctx_ = ctx 8207 return c 8208} 8209 8210// Header returns an http.Header that can be modified by the caller to 8211// add HTTP headers to the request. 8212func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header { 8213 if c.header_ == nil { 8214 c.header_ = make(http.Header) 8215 } 8216 return c.header_ 8217} 8218 8219func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { 8220 reqHeaders := make(http.Header) 8221 for k, v := range c.header_ { 8222 reqHeaders[k] = v 8223 } 8224 reqHeaders.Set("User-Agent", c.s.userAgent()) 8225 var body io.Reader = nil 8226 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) 8227 if err != nil { 8228 return nil, err 8229 } 8230 reqHeaders.Set("Content-Type", "application/json") 8231 c.urlParams_.Set("alt", alt) 8232 c.urlParams_.Set("prettyPrint", "false") 8233 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") 8234 urls += "?" + c.urlParams_.Encode() 8235 req, err := http.NewRequest("POST", urls, body) 8236 if err != nil { 8237 return nil, err 8238 } 8239 req.Header = reqHeaders 8240 googleapi.Expand(req.URL, map[string]string{ 8241 "parent": c.parent, 8242 }) 8243 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8244} 8245 8246// Do executes the "container.projects.locations.clusters.nodePools.create" call. 8247// Exactly one of *Operation or error will be non-nil. Any non-2xx 8248// status code is an error. Response headers are in either 8249// *Operation.ServerResponse.Header or (if a response was returned at 8250// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8251// to check whether the returned error was because 8252// http.StatusNotModified was returned. 8253func (c *ProjectsLocationsClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8254 gensupport.SetOptions(c.urlParams_, opts...) 8255 res, err := c.doRequest("json") 8256 if res != nil && res.StatusCode == http.StatusNotModified { 8257 if res.Body != nil { 8258 res.Body.Close() 8259 } 8260 return nil, &googleapi.Error{ 8261 Code: res.StatusCode, 8262 Header: res.Header, 8263 } 8264 } 8265 if err != nil { 8266 return nil, err 8267 } 8268 defer googleapi.CloseBody(res) 8269 if err := googleapi.CheckResponse(res); err != nil { 8270 return nil, err 8271 } 8272 ret := &Operation{ 8273 ServerResponse: googleapi.ServerResponse{ 8274 Header: res.Header, 8275 HTTPStatusCode: res.StatusCode, 8276 }, 8277 } 8278 target := &ret 8279 if err := gensupport.DecodeResponse(target, res); err != nil { 8280 return nil, err 8281 } 8282 return ret, nil 8283 // { 8284 // "description": "Creates a node pool for a cluster.", 8285 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", 8286 // "httpMethod": "POST", 8287 // "id": "container.projects.locations.clusters.nodePools.create", 8288 // "parameterOrder": [ 8289 // "parent" 8290 // ], 8291 // "parameters": { 8292 // "parent": { 8293 // "description": "The parent (project, location, cluster id) where the node pool will be\ncreated. Specified in the format\n'projects/*/locations/*/clusters/*'.", 8294 // "location": "path", 8295 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8296 // "required": true, 8297 // "type": "string" 8298 // } 8299 // }, 8300 // "path": "v1beta1/{+parent}/nodePools", 8301 // "request": { 8302 // "$ref": "CreateNodePoolRequest" 8303 // }, 8304 // "response": { 8305 // "$ref": "Operation" 8306 // }, 8307 // "scopes": [ 8308 // "https://www.googleapis.com/auth/cloud-platform" 8309 // ] 8310 // } 8311 8312} 8313 8314// method id "container.projects.locations.clusters.nodePools.delete": 8315 8316type ProjectsLocationsClustersNodePoolsDeleteCall struct { 8317 s *Service 8318 name string 8319 urlParams_ gensupport.URLParams 8320 ctx_ context.Context 8321 header_ http.Header 8322} 8323 8324// Delete: Deletes a node pool from a cluster. 8325func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *ProjectsLocationsClustersNodePoolsDeleteCall { 8326 c := &ProjectsLocationsClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8327 c.name = name 8328 return c 8329} 8330 8331// ClusterId sets the optional parameter "clusterId": Deprecated. The 8332// name of the cluster. 8333// This field has been deprecated and replaced by the name field. 8334func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 8335 c.urlParams_.Set("clusterId", clusterId) 8336 return c 8337} 8338 8339// NodePoolId sets the optional parameter "nodePoolId": Deprecated. The 8340// name of the node pool to delete. 8341// This field has been deprecated and replaced by the name field. 8342func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 8343 c.urlParams_.Set("nodePoolId", nodePoolId) 8344 return c 8345} 8346 8347// ProjectId sets the optional parameter "projectId": Deprecated. The 8348// Google Developers Console [project ID or 8349// project 8350// number](https://developers.google.com/console/help/new/#projec 8351// tnumber). 8352// This field has been deprecated and replaced by the name field. 8353func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 8354 c.urlParams_.Set("projectId", projectId) 8355 return c 8356} 8357 8358// Zone sets the optional parameter "zone": Deprecated. The name of the 8359// Google Compute Engine 8360// [zone](/compute/docs/zones#available) in which the 8361// cluster 8362// resides. 8363// This field has been deprecated and replaced by the name field. 8364func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsDeleteCall { 8365 c.urlParams_.Set("zone", zone) 8366 return c 8367} 8368 8369// Fields allows partial responses to be retrieved. See 8370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8371// for more information. 8372func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsDeleteCall { 8373 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8374 return c 8375} 8376 8377// Context sets the context to be used in this call's Do method. Any 8378// pending HTTP request will be aborted if the provided context is 8379// canceled. 8380func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsDeleteCall { 8381 c.ctx_ = ctx 8382 return c 8383} 8384 8385// Header returns an http.Header that can be modified by the caller to 8386// add HTTP headers to the request. 8387func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header { 8388 if c.header_ == nil { 8389 c.header_ = make(http.Header) 8390 } 8391 return c.header_ 8392} 8393 8394func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 8395 reqHeaders := make(http.Header) 8396 for k, v := range c.header_ { 8397 reqHeaders[k] = v 8398 } 8399 reqHeaders.Set("User-Agent", c.s.userAgent()) 8400 var body io.Reader = nil 8401 c.urlParams_.Set("alt", alt) 8402 c.urlParams_.Set("prettyPrint", "false") 8403 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8404 urls += "?" + c.urlParams_.Encode() 8405 req, err := http.NewRequest("DELETE", urls, body) 8406 if err != nil { 8407 return nil, err 8408 } 8409 req.Header = reqHeaders 8410 googleapi.Expand(req.URL, map[string]string{ 8411 "name": c.name, 8412 }) 8413 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8414} 8415 8416// Do executes the "container.projects.locations.clusters.nodePools.delete" call. 8417// Exactly one of *Operation or error will be non-nil. Any non-2xx 8418// status code is an error. Response headers are in either 8419// *Operation.ServerResponse.Header or (if a response was returned at 8420// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8421// to check whether the returned error was because 8422// http.StatusNotModified was returned. 8423func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8424 gensupport.SetOptions(c.urlParams_, opts...) 8425 res, err := c.doRequest("json") 8426 if res != nil && res.StatusCode == http.StatusNotModified { 8427 if res.Body != nil { 8428 res.Body.Close() 8429 } 8430 return nil, &googleapi.Error{ 8431 Code: res.StatusCode, 8432 Header: res.Header, 8433 } 8434 } 8435 if err != nil { 8436 return nil, err 8437 } 8438 defer googleapi.CloseBody(res) 8439 if err := googleapi.CheckResponse(res); err != nil { 8440 return nil, err 8441 } 8442 ret := &Operation{ 8443 ServerResponse: googleapi.ServerResponse{ 8444 Header: res.Header, 8445 HTTPStatusCode: res.StatusCode, 8446 }, 8447 } 8448 target := &ret 8449 if err := gensupport.DecodeResponse(target, res); err != nil { 8450 return nil, err 8451 } 8452 return ret, nil 8453 // { 8454 // "description": "Deletes a node pool from a cluster.", 8455 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", 8456 // "httpMethod": "DELETE", 8457 // "id": "container.projects.locations.clusters.nodePools.delete", 8458 // "parameterOrder": [ 8459 // "name" 8460 // ], 8461 // "parameters": { 8462 // "clusterId": { 8463 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 8464 // "location": "query", 8465 // "type": "string" 8466 // }, 8467 // "name": { 8468 // "description": "The name (project, location, cluster, node pool id) of the node pool to\ndelete. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 8469 // "location": "path", 8470 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 8471 // "required": true, 8472 // "type": "string" 8473 // }, 8474 // "nodePoolId": { 8475 // "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", 8476 // "location": "query", 8477 // "type": "string" 8478 // }, 8479 // "projectId": { 8480 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 8481 // "location": "query", 8482 // "type": "string" 8483 // }, 8484 // "zone": { 8485 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 8486 // "location": "query", 8487 // "type": "string" 8488 // } 8489 // }, 8490 // "path": "v1beta1/{+name}", 8491 // "response": { 8492 // "$ref": "Operation" 8493 // }, 8494 // "scopes": [ 8495 // "https://www.googleapis.com/auth/cloud-platform" 8496 // ] 8497 // } 8498 8499} 8500 8501// method id "container.projects.locations.clusters.nodePools.get": 8502 8503type ProjectsLocationsClustersNodePoolsGetCall struct { 8504 s *Service 8505 name string 8506 urlParams_ gensupport.URLParams 8507 ifNoneMatch_ string 8508 ctx_ context.Context 8509 header_ http.Header 8510} 8511 8512// Get: Retrieves the requested node pool. 8513func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { 8514 c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8515 c.name = name 8516 return c 8517} 8518 8519// ClusterId sets the optional parameter "clusterId": Deprecated. The 8520// name of the cluster. 8521// This field has been deprecated and replaced by the name field. 8522func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall { 8523 c.urlParams_.Set("clusterId", clusterId) 8524 return c 8525} 8526 8527// NodePoolId sets the optional parameter "nodePoolId": Deprecated. The 8528// name of the node pool. 8529// This field has been deprecated and replaced by the name field. 8530func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall { 8531 c.urlParams_.Set("nodePoolId", nodePoolId) 8532 return c 8533} 8534 8535// ProjectId sets the optional parameter "projectId": Deprecated. The 8536// Google Developers Console [project ID or 8537// project 8538// number](https://developers.google.com/console/help/new/#projec 8539// tnumber). 8540// This field has been deprecated and replaced by the name field. 8541func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsGetCall { 8542 c.urlParams_.Set("projectId", projectId) 8543 return c 8544} 8545 8546// Zone sets the optional parameter "zone": Deprecated. The name of the 8547// Google Compute Engine 8548// [zone](/compute/docs/zones#available) in which the 8549// cluster 8550// resides. 8551// This field has been deprecated and replaced by the name field. 8552func (c *ProjectsLocationsClustersNodePoolsGetCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsGetCall { 8553 c.urlParams_.Set("zone", zone) 8554 return c 8555} 8556 8557// Fields allows partial responses to be retrieved. See 8558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8559// for more information. 8560func (c *ProjectsLocationsClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsGetCall { 8561 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8562 return c 8563} 8564 8565// IfNoneMatch sets the optional parameter which makes the operation 8566// fail if the object's ETag matches the given value. This is useful for 8567// getting updates only after the object has changed since the last 8568// request. Use googleapi.IsNotModified to check whether the response 8569// error from Do is the result of In-None-Match. 8570func (c *ProjectsLocationsClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsGetCall { 8571 c.ifNoneMatch_ = entityTag 8572 return c 8573} 8574 8575// Context sets the context to be used in this call's Do method. Any 8576// pending HTTP request will be aborted if the provided context is 8577// canceled. 8578func (c *ProjectsLocationsClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsGetCall { 8579 c.ctx_ = ctx 8580 return c 8581} 8582 8583// Header returns an http.Header that can be modified by the caller to 8584// add HTTP headers to the request. 8585func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header { 8586 if c.header_ == nil { 8587 c.header_ = make(http.Header) 8588 } 8589 return c.header_ 8590} 8591 8592func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { 8593 reqHeaders := make(http.Header) 8594 for k, v := range c.header_ { 8595 reqHeaders[k] = v 8596 } 8597 reqHeaders.Set("User-Agent", c.s.userAgent()) 8598 if c.ifNoneMatch_ != "" { 8599 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8600 } 8601 var body io.Reader = nil 8602 c.urlParams_.Set("alt", alt) 8603 c.urlParams_.Set("prettyPrint", "false") 8604 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8605 urls += "?" + c.urlParams_.Encode() 8606 req, err := http.NewRequest("GET", urls, body) 8607 if err != nil { 8608 return nil, err 8609 } 8610 req.Header = reqHeaders 8611 googleapi.Expand(req.URL, map[string]string{ 8612 "name": c.name, 8613 }) 8614 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8615} 8616 8617// Do executes the "container.projects.locations.clusters.nodePools.get" call. 8618// Exactly one of *NodePool or error will be non-nil. Any non-2xx status 8619// code is an error. Response headers are in either 8620// *NodePool.ServerResponse.Header or (if a response was returned at 8621// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8622// to check whether the returned error was because 8623// http.StatusNotModified was returned. 8624func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { 8625 gensupport.SetOptions(c.urlParams_, opts...) 8626 res, err := c.doRequest("json") 8627 if res != nil && res.StatusCode == http.StatusNotModified { 8628 if res.Body != nil { 8629 res.Body.Close() 8630 } 8631 return nil, &googleapi.Error{ 8632 Code: res.StatusCode, 8633 Header: res.Header, 8634 } 8635 } 8636 if err != nil { 8637 return nil, err 8638 } 8639 defer googleapi.CloseBody(res) 8640 if err := googleapi.CheckResponse(res); err != nil { 8641 return nil, err 8642 } 8643 ret := &NodePool{ 8644 ServerResponse: googleapi.ServerResponse{ 8645 Header: res.Header, 8646 HTTPStatusCode: res.StatusCode, 8647 }, 8648 } 8649 target := &ret 8650 if err := gensupport.DecodeResponse(target, res); err != nil { 8651 return nil, err 8652 } 8653 return ret, nil 8654 // { 8655 // "description": "Retrieves the requested node pool.", 8656 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", 8657 // "httpMethod": "GET", 8658 // "id": "container.projects.locations.clusters.nodePools.get", 8659 // "parameterOrder": [ 8660 // "name" 8661 // ], 8662 // "parameters": { 8663 // "clusterId": { 8664 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 8665 // "location": "query", 8666 // "type": "string" 8667 // }, 8668 // "name": { 8669 // "description": "The name (project, location, cluster, node pool id) of the node pool to\nget. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 8670 // "location": "path", 8671 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 8672 // "required": true, 8673 // "type": "string" 8674 // }, 8675 // "nodePoolId": { 8676 // "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", 8677 // "location": "query", 8678 // "type": "string" 8679 // }, 8680 // "projectId": { 8681 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 8682 // "location": "query", 8683 // "type": "string" 8684 // }, 8685 // "zone": { 8686 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 8687 // "location": "query", 8688 // "type": "string" 8689 // } 8690 // }, 8691 // "path": "v1beta1/{+name}", 8692 // "response": { 8693 // "$ref": "NodePool" 8694 // }, 8695 // "scopes": [ 8696 // "https://www.googleapis.com/auth/cloud-platform" 8697 // ] 8698 // } 8699 8700} 8701 8702// method id "container.projects.locations.clusters.nodePools.list": 8703 8704type ProjectsLocationsClustersNodePoolsListCall struct { 8705 s *Service 8706 parent string 8707 urlParams_ gensupport.URLParams 8708 ifNoneMatch_ string 8709 ctx_ context.Context 8710 header_ http.Header 8711} 8712 8713// List: Lists the node pools for a cluster. 8714func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *ProjectsLocationsClustersNodePoolsListCall { 8715 c := &ProjectsLocationsClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8716 c.parent = parent 8717 return c 8718} 8719 8720// ClusterId sets the optional parameter "clusterId": Deprecated. The 8721// name of the cluster. 8722// This field has been deprecated and replaced by the parent field. 8723func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall { 8724 c.urlParams_.Set("clusterId", clusterId) 8725 return c 8726} 8727 8728// ProjectId sets the optional parameter "projectId": Deprecated. The 8729// Google Developers Console [project ID or 8730// project 8731// number](https://developers.google.com/console/help/new/#projec 8732// tnumber). 8733// This field has been deprecated and replaced by the parent field. 8734func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsListCall { 8735 c.urlParams_.Set("projectId", projectId) 8736 return c 8737} 8738 8739// Zone sets the optional parameter "zone": Deprecated. The name of the 8740// Google Compute Engine 8741// [zone](/compute/docs/zones#available) in which the 8742// cluster 8743// resides. 8744// This field has been deprecated and replaced by the parent field. 8745func (c *ProjectsLocationsClustersNodePoolsListCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsListCall { 8746 c.urlParams_.Set("zone", zone) 8747 return c 8748} 8749 8750// Fields allows partial responses to be retrieved. See 8751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8752// for more information. 8753func (c *ProjectsLocationsClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsListCall { 8754 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8755 return c 8756} 8757 8758// IfNoneMatch sets the optional parameter which makes the operation 8759// fail if the object's ETag matches the given value. This is useful for 8760// getting updates only after the object has changed since the last 8761// request. Use googleapi.IsNotModified to check whether the response 8762// error from Do is the result of In-None-Match. 8763func (c *ProjectsLocationsClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsListCall { 8764 c.ifNoneMatch_ = entityTag 8765 return c 8766} 8767 8768// Context sets the context to be used in this call's Do method. Any 8769// pending HTTP request will be aborted if the provided context is 8770// canceled. 8771func (c *ProjectsLocationsClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsListCall { 8772 c.ctx_ = ctx 8773 return c 8774} 8775 8776// Header returns an http.Header that can be modified by the caller to 8777// add HTTP headers to the request. 8778func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header { 8779 if c.header_ == nil { 8780 c.header_ = make(http.Header) 8781 } 8782 return c.header_ 8783} 8784 8785func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { 8786 reqHeaders := make(http.Header) 8787 for k, v := range c.header_ { 8788 reqHeaders[k] = v 8789 } 8790 reqHeaders.Set("User-Agent", c.s.userAgent()) 8791 if c.ifNoneMatch_ != "" { 8792 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8793 } 8794 var body io.Reader = nil 8795 c.urlParams_.Set("alt", alt) 8796 c.urlParams_.Set("prettyPrint", "false") 8797 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") 8798 urls += "?" + c.urlParams_.Encode() 8799 req, err := http.NewRequest("GET", urls, body) 8800 if err != nil { 8801 return nil, err 8802 } 8803 req.Header = reqHeaders 8804 googleapi.Expand(req.URL, map[string]string{ 8805 "parent": c.parent, 8806 }) 8807 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8808} 8809 8810// Do executes the "container.projects.locations.clusters.nodePools.list" call. 8811// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any 8812// non-2xx status code is an error. Response headers are in either 8813// *ListNodePoolsResponse.ServerResponse.Header or (if a response was 8814// returned at all) in error.(*googleapi.Error).Header. Use 8815// googleapi.IsNotModified to check whether the returned error was 8816// because http.StatusNotModified was returned. 8817func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { 8818 gensupport.SetOptions(c.urlParams_, opts...) 8819 res, err := c.doRequest("json") 8820 if res != nil && res.StatusCode == http.StatusNotModified { 8821 if res.Body != nil { 8822 res.Body.Close() 8823 } 8824 return nil, &googleapi.Error{ 8825 Code: res.StatusCode, 8826 Header: res.Header, 8827 } 8828 } 8829 if err != nil { 8830 return nil, err 8831 } 8832 defer googleapi.CloseBody(res) 8833 if err := googleapi.CheckResponse(res); err != nil { 8834 return nil, err 8835 } 8836 ret := &ListNodePoolsResponse{ 8837 ServerResponse: googleapi.ServerResponse{ 8838 Header: res.Header, 8839 HTTPStatusCode: res.StatusCode, 8840 }, 8841 } 8842 target := &ret 8843 if err := gensupport.DecodeResponse(target, res); err != nil { 8844 return nil, err 8845 } 8846 return ret, nil 8847 // { 8848 // "description": "Lists the node pools for a cluster.", 8849 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", 8850 // "httpMethod": "GET", 8851 // "id": "container.projects.locations.clusters.nodePools.list", 8852 // "parameterOrder": [ 8853 // "parent" 8854 // ], 8855 // "parameters": { 8856 // "clusterId": { 8857 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", 8858 // "location": "query", 8859 // "type": "string" 8860 // }, 8861 // "parent": { 8862 // "description": "The parent (project, location, cluster id) where the node pools will be\nlisted. Specified in the format 'projects/*/locations/*/clusters/*'.", 8863 // "location": "path", 8864 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8865 // "required": true, 8866 // "type": "string" 8867 // }, 8868 // "projectId": { 8869 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", 8870 // "location": "query", 8871 // "type": "string" 8872 // }, 8873 // "zone": { 8874 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", 8875 // "location": "query", 8876 // "type": "string" 8877 // } 8878 // }, 8879 // "path": "v1beta1/{+parent}/nodePools", 8880 // "response": { 8881 // "$ref": "ListNodePoolsResponse" 8882 // }, 8883 // "scopes": [ 8884 // "https://www.googleapis.com/auth/cloud-platform" 8885 // ] 8886 // } 8887 8888} 8889 8890// method id "container.projects.locations.clusters.nodePools.rollback": 8891 8892type ProjectsLocationsClustersNodePoolsRollbackCall struct { 8893 s *Service 8894 name string 8895 rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest 8896 urlParams_ gensupport.URLParams 8897 ctx_ context.Context 8898 header_ http.Header 8899} 8900 8901// Rollback: Rolls back a previously Aborted or Failed NodePool 8902// upgrade. 8903// This makes no changes if the last upgrade successfully completed. 8904func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { 8905 c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8906 c.name = name 8907 c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest 8908 return c 8909} 8910 8911// Fields allows partial responses to be retrieved. See 8912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8913// for more information. 8914func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsRollbackCall { 8915 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8916 return c 8917} 8918 8919// Context sets the context to be used in this call's Do method. Any 8920// pending HTTP request will be aborted if the provided context is 8921// canceled. 8922func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsRollbackCall { 8923 c.ctx_ = ctx 8924 return c 8925} 8926 8927// Header returns an http.Header that can be modified by the caller to 8928// add HTTP headers to the request. 8929func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header { 8930 if c.header_ == nil { 8931 c.header_ = make(http.Header) 8932 } 8933 return c.header_ 8934} 8935 8936func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { 8937 reqHeaders := make(http.Header) 8938 for k, v := range c.header_ { 8939 reqHeaders[k] = v 8940 } 8941 reqHeaders.Set("User-Agent", c.s.userAgent()) 8942 var body io.Reader = nil 8943 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) 8944 if err != nil { 8945 return nil, err 8946 } 8947 reqHeaders.Set("Content-Type", "application/json") 8948 c.urlParams_.Set("alt", alt) 8949 c.urlParams_.Set("prettyPrint", "false") 8950 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") 8951 urls += "?" + c.urlParams_.Encode() 8952 req, err := http.NewRequest("POST", urls, body) 8953 if err != nil { 8954 return nil, err 8955 } 8956 req.Header = reqHeaders 8957 googleapi.Expand(req.URL, map[string]string{ 8958 "name": c.name, 8959 }) 8960 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8961} 8962 8963// Do executes the "container.projects.locations.clusters.nodePools.rollback" call. 8964// Exactly one of *Operation or error will be non-nil. Any non-2xx 8965// status code is an error. Response headers are in either 8966// *Operation.ServerResponse.Header or (if a response was returned at 8967// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8968// to check whether the returned error was because 8969// http.StatusNotModified was returned. 8970func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8971 gensupport.SetOptions(c.urlParams_, opts...) 8972 res, err := c.doRequest("json") 8973 if res != nil && res.StatusCode == http.StatusNotModified { 8974 if res.Body != nil { 8975 res.Body.Close() 8976 } 8977 return nil, &googleapi.Error{ 8978 Code: res.StatusCode, 8979 Header: res.Header, 8980 } 8981 } 8982 if err != nil { 8983 return nil, err 8984 } 8985 defer googleapi.CloseBody(res) 8986 if err := googleapi.CheckResponse(res); err != nil { 8987 return nil, err 8988 } 8989 ret := &Operation{ 8990 ServerResponse: googleapi.ServerResponse{ 8991 Header: res.Header, 8992 HTTPStatusCode: res.StatusCode, 8993 }, 8994 } 8995 target := &ret 8996 if err := gensupport.DecodeResponse(target, res); err != nil { 8997 return nil, err 8998 } 8999 return ret, nil 9000 // { 9001 // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", 9002 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", 9003 // "httpMethod": "POST", 9004 // "id": "container.projects.locations.clusters.nodePools.rollback", 9005 // "parameterOrder": [ 9006 // "name" 9007 // ], 9008 // "parameters": { 9009 // "name": { 9010 // "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", 9011 // "location": "path", 9012 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9013 // "required": true, 9014 // "type": "string" 9015 // } 9016 // }, 9017 // "path": "v1beta1/{+name}:rollback", 9018 // "request": { 9019 // "$ref": "RollbackNodePoolUpgradeRequest" 9020 // }, 9021 // "response": { 9022 // "$ref": "Operation" 9023 // }, 9024 // "scopes": [ 9025 // "https://www.googleapis.com/auth/cloud-platform" 9026 // ] 9027 // } 9028 9029} 9030 9031// method id "container.projects.locations.clusters.nodePools.setAutoscaling": 9032 9033type ProjectsLocationsClustersNodePoolsSetAutoscalingCall struct { 9034 s *Service 9035 name string 9036 setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest 9037 urlParams_ gensupport.URLParams 9038 ctx_ context.Context 9039 header_ http.Header 9040} 9041 9042// SetAutoscaling: Sets the autoscaling settings of a specific node 9043// pool. 9044func (r *ProjectsLocationsClustersNodePoolsService) SetAutoscaling(name string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 9045 c := &ProjectsLocationsClustersNodePoolsSetAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9046 c.name = name 9047 c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest 9048 return c 9049} 9050 9051// Fields allows partial responses to be retrieved. See 9052// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9053// for more information. 9054func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 9055 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9056 return c 9057} 9058 9059// Context sets the context to be used in this call's Do method. Any 9060// pending HTTP request will be aborted if the provided context is 9061// canceled. 9062func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 9063 c.ctx_ = ctx 9064 return c 9065} 9066 9067// Header returns an http.Header that can be modified by the caller to 9068// add HTTP headers to the request. 9069func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Header { 9070 if c.header_ == nil { 9071 c.header_ = make(http.Header) 9072 } 9073 return c.header_ 9074} 9075 9076func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) { 9077 reqHeaders := make(http.Header) 9078 for k, v := range c.header_ { 9079 reqHeaders[k] = v 9080 } 9081 reqHeaders.Set("User-Agent", c.s.userAgent()) 9082 var body io.Reader = nil 9083 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) 9084 if err != nil { 9085 return nil, err 9086 } 9087 reqHeaders.Set("Content-Type", "application/json") 9088 c.urlParams_.Set("alt", alt) 9089 c.urlParams_.Set("prettyPrint", "false") 9090 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAutoscaling") 9091 urls += "?" + c.urlParams_.Encode() 9092 req, err := http.NewRequest("POST", urls, body) 9093 if err != nil { 9094 return nil, err 9095 } 9096 req.Header = reqHeaders 9097 googleapi.Expand(req.URL, map[string]string{ 9098 "name": c.name, 9099 }) 9100 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9101} 9102 9103// Do executes the "container.projects.locations.clusters.nodePools.setAutoscaling" call. 9104// Exactly one of *Operation or error will be non-nil. Any non-2xx 9105// status code is an error. Response headers are in either 9106// *Operation.ServerResponse.Header or (if a response was returned at 9107// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9108// to check whether the returned error was because 9109// http.StatusNotModified was returned. 9110func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9111 gensupport.SetOptions(c.urlParams_, opts...) 9112 res, err := c.doRequest("json") 9113 if res != nil && res.StatusCode == http.StatusNotModified { 9114 if res.Body != nil { 9115 res.Body.Close() 9116 } 9117 return nil, &googleapi.Error{ 9118 Code: res.StatusCode, 9119 Header: res.Header, 9120 } 9121 } 9122 if err != nil { 9123 return nil, err 9124 } 9125 defer googleapi.CloseBody(res) 9126 if err := googleapi.CheckResponse(res); err != nil { 9127 return nil, err 9128 } 9129 ret := &Operation{ 9130 ServerResponse: googleapi.ServerResponse{ 9131 Header: res.Header, 9132 HTTPStatusCode: res.StatusCode, 9133 }, 9134 } 9135 target := &ret 9136 if err := gensupport.DecodeResponse(target, res); err != nil { 9137 return nil, err 9138 } 9139 return ret, nil 9140 // { 9141 // "description": "Sets the autoscaling settings of a specific node pool.", 9142 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling", 9143 // "httpMethod": "POST", 9144 // "id": "container.projects.locations.clusters.nodePools.setAutoscaling", 9145 // "parameterOrder": [ 9146 // "name" 9147 // ], 9148 // "parameters": { 9149 // "name": { 9150 // "description": "The name (project, location, cluster, node pool) of the node pool to set\nautoscaler settings. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 9151 // "location": "path", 9152 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9153 // "required": true, 9154 // "type": "string" 9155 // } 9156 // }, 9157 // "path": "v1beta1/{+name}:setAutoscaling", 9158 // "request": { 9159 // "$ref": "SetNodePoolAutoscalingRequest" 9160 // }, 9161 // "response": { 9162 // "$ref": "Operation" 9163 // }, 9164 // "scopes": [ 9165 // "https://www.googleapis.com/auth/cloud-platform" 9166 // ] 9167 // } 9168 9169} 9170 9171// method id "container.projects.locations.clusters.nodePools.setManagement": 9172 9173type ProjectsLocationsClustersNodePoolsSetManagementCall struct { 9174 s *Service 9175 name string 9176 setnodepoolmanagementrequest *SetNodePoolManagementRequest 9177 urlParams_ gensupport.URLParams 9178 ctx_ context.Context 9179 header_ http.Header 9180} 9181 9182// SetManagement: Sets the NodeManagement options for a node pool. 9183func (r *ProjectsLocationsClustersNodePoolsService) SetManagement(name string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsLocationsClustersNodePoolsSetManagementCall { 9184 c := &ProjectsLocationsClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9185 c.name = name 9186 c.setnodepoolmanagementrequest = setnodepoolmanagementrequest 9187 return c 9188} 9189 9190// Fields allows partial responses to be retrieved. See 9191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9192// for more information. 9193func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetManagementCall { 9194 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9195 return c 9196} 9197 9198// Context sets the context to be used in this call's Do method. Any 9199// pending HTTP request will be aborted if the provided context is 9200// canceled. 9201func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetManagementCall { 9202 c.ctx_ = ctx 9203 return c 9204} 9205 9206// Header returns an http.Header that can be modified by the caller to 9207// add HTTP headers to the request. 9208func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Header { 9209 if c.header_ == nil { 9210 c.header_ = make(http.Header) 9211 } 9212 return c.header_ 9213} 9214 9215func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { 9216 reqHeaders := make(http.Header) 9217 for k, v := range c.header_ { 9218 reqHeaders[k] = v 9219 } 9220 reqHeaders.Set("User-Agent", c.s.userAgent()) 9221 var body io.Reader = nil 9222 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) 9223 if err != nil { 9224 return nil, err 9225 } 9226 reqHeaders.Set("Content-Type", "application/json") 9227 c.urlParams_.Set("alt", alt) 9228 c.urlParams_.Set("prettyPrint", "false") 9229 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setManagement") 9230 urls += "?" + c.urlParams_.Encode() 9231 req, err := http.NewRequest("POST", urls, body) 9232 if err != nil { 9233 return nil, err 9234 } 9235 req.Header = reqHeaders 9236 googleapi.Expand(req.URL, map[string]string{ 9237 "name": c.name, 9238 }) 9239 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9240} 9241 9242// Do executes the "container.projects.locations.clusters.nodePools.setManagement" call. 9243// Exactly one of *Operation or error will be non-nil. Any non-2xx 9244// status code is an error. Response headers are in either 9245// *Operation.ServerResponse.Header or (if a response was returned at 9246// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9247// to check whether the returned error was because 9248// http.StatusNotModified was returned. 9249func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9250 gensupport.SetOptions(c.urlParams_, opts...) 9251 res, err := c.doRequest("json") 9252 if res != nil && res.StatusCode == http.StatusNotModified { 9253 if res.Body != nil { 9254 res.Body.Close() 9255 } 9256 return nil, &googleapi.Error{ 9257 Code: res.StatusCode, 9258 Header: res.Header, 9259 } 9260 } 9261 if err != nil { 9262 return nil, err 9263 } 9264 defer googleapi.CloseBody(res) 9265 if err := googleapi.CheckResponse(res); err != nil { 9266 return nil, err 9267 } 9268 ret := &Operation{ 9269 ServerResponse: googleapi.ServerResponse{ 9270 Header: res.Header, 9271 HTTPStatusCode: res.StatusCode, 9272 }, 9273 } 9274 target := &ret 9275 if err := gensupport.DecodeResponse(target, res); err != nil { 9276 return nil, err 9277 } 9278 return ret, nil 9279 // { 9280 // "description": "Sets the NodeManagement options for a node pool.", 9281 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", 9282 // "httpMethod": "POST", 9283 // "id": "container.projects.locations.clusters.nodePools.setManagement", 9284 // "parameterOrder": [ 9285 // "name" 9286 // ], 9287 // "parameters": { 9288 // "name": { 9289 // "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 9290 // "location": "path", 9291 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9292 // "required": true, 9293 // "type": "string" 9294 // } 9295 // }, 9296 // "path": "v1beta1/{+name}:setManagement", 9297 // "request": { 9298 // "$ref": "SetNodePoolManagementRequest" 9299 // }, 9300 // "response": { 9301 // "$ref": "Operation" 9302 // }, 9303 // "scopes": [ 9304 // "https://www.googleapis.com/auth/cloud-platform" 9305 // ] 9306 // } 9307 9308} 9309 9310// method id "container.projects.locations.clusters.nodePools.setSize": 9311 9312type ProjectsLocationsClustersNodePoolsSetSizeCall struct { 9313 s *Service 9314 name string 9315 setnodepoolsizerequest *SetNodePoolSizeRequest 9316 urlParams_ gensupport.URLParams 9317 ctx_ context.Context 9318 header_ http.Header 9319} 9320 9321// SetSize: Sets the size for a specific node pool. 9322func (r *ProjectsLocationsClustersNodePoolsService) SetSize(name string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsLocationsClustersNodePoolsSetSizeCall { 9323 c := &ProjectsLocationsClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9324 c.name = name 9325 c.setnodepoolsizerequest = setnodepoolsizerequest 9326 return c 9327} 9328 9329// Fields allows partial responses to be retrieved. See 9330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9331// for more information. 9332func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetSizeCall { 9333 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9334 return c 9335} 9336 9337// Context sets the context to be used in this call's Do method. Any 9338// pending HTTP request will be aborted if the provided context is 9339// canceled. 9340func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetSizeCall { 9341 c.ctx_ = ctx 9342 return c 9343} 9344 9345// Header returns an http.Header that can be modified by the caller to 9346// add HTTP headers to the request. 9347func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header { 9348 if c.header_ == nil { 9349 c.header_ = make(http.Header) 9350 } 9351 return c.header_ 9352} 9353 9354func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { 9355 reqHeaders := make(http.Header) 9356 for k, v := range c.header_ { 9357 reqHeaders[k] = v 9358 } 9359 reqHeaders.Set("User-Agent", c.s.userAgent()) 9360 var body io.Reader = nil 9361 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) 9362 if err != nil { 9363 return nil, err 9364 } 9365 reqHeaders.Set("Content-Type", "application/json") 9366 c.urlParams_.Set("alt", alt) 9367 c.urlParams_.Set("prettyPrint", "false") 9368 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setSize") 9369 urls += "?" + c.urlParams_.Encode() 9370 req, err := http.NewRequest("POST", urls, body) 9371 if err != nil { 9372 return nil, err 9373 } 9374 req.Header = reqHeaders 9375 googleapi.Expand(req.URL, map[string]string{ 9376 "name": c.name, 9377 }) 9378 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9379} 9380 9381// Do executes the "container.projects.locations.clusters.nodePools.setSize" call. 9382// Exactly one of *Operation or error will be non-nil. Any non-2xx 9383// status code is an error. Response headers are in either 9384// *Operation.ServerResponse.Header or (if a response was returned at 9385// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9386// to check whether the returned error was because 9387// http.StatusNotModified was returned. 9388func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9389 gensupport.SetOptions(c.urlParams_, opts...) 9390 res, err := c.doRequest("json") 9391 if res != nil && res.StatusCode == http.StatusNotModified { 9392 if res.Body != nil { 9393 res.Body.Close() 9394 } 9395 return nil, &googleapi.Error{ 9396 Code: res.StatusCode, 9397 Header: res.Header, 9398 } 9399 } 9400 if err != nil { 9401 return nil, err 9402 } 9403 defer googleapi.CloseBody(res) 9404 if err := googleapi.CheckResponse(res); err != nil { 9405 return nil, err 9406 } 9407 ret := &Operation{ 9408 ServerResponse: googleapi.ServerResponse{ 9409 Header: res.Header, 9410 HTTPStatusCode: res.StatusCode, 9411 }, 9412 } 9413 target := &ret 9414 if err := gensupport.DecodeResponse(target, res); err != nil { 9415 return nil, err 9416 } 9417 return ret, nil 9418 // { 9419 // "description": "Sets the size for a specific node pool.", 9420 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setSize", 9421 // "httpMethod": "POST", 9422 // "id": "container.projects.locations.clusters.nodePools.setSize", 9423 // "parameterOrder": [ 9424 // "name" 9425 // ], 9426 // "parameters": { 9427 // "name": { 9428 // "description": "The name (project, location, cluster, node pool id) of the node pool to set\nsize.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", 9429 // "location": "path", 9430 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9431 // "required": true, 9432 // "type": "string" 9433 // } 9434 // }, 9435 // "path": "v1beta1/{+name}:setSize", 9436 // "request": { 9437 // "$ref": "SetNodePoolSizeRequest" 9438 // }, 9439 // "response": { 9440 // "$ref": "Operation" 9441 // }, 9442 // "scopes": [ 9443 // "https://www.googleapis.com/auth/cloud-platform" 9444 // ] 9445 // } 9446 9447} 9448 9449// method id "container.projects.locations.clusters.nodePools.update": 9450 9451type ProjectsLocationsClustersNodePoolsUpdateCall struct { 9452 s *Service 9453 name string 9454 updatenodepoolrequest *UpdateNodePoolRequest 9455 urlParams_ gensupport.URLParams 9456 ctx_ context.Context 9457 header_ http.Header 9458} 9459 9460// Update: Updates the version and/or image type of a specific node 9461// pool. 9462func (r *ProjectsLocationsClustersNodePoolsService) Update(name string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsLocationsClustersNodePoolsUpdateCall { 9463 c := &ProjectsLocationsClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9464 c.name = name 9465 c.updatenodepoolrequest = updatenodepoolrequest 9466 return c 9467} 9468 9469// Fields allows partial responses to be retrieved. See 9470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9471// for more information. 9472func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsUpdateCall { 9473 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9474 return c 9475} 9476 9477// Context sets the context to be used in this call's Do method. Any 9478// pending HTTP request will be aborted if the provided context is 9479// canceled. 9480func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsUpdateCall { 9481 c.ctx_ = ctx 9482 return c 9483} 9484 9485// Header returns an http.Header that can be modified by the caller to 9486// add HTTP headers to the request. 9487func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header { 9488 if c.header_ == nil { 9489 c.header_ = make(http.Header) 9490 } 9491 return c.header_ 9492} 9493 9494func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { 9495 reqHeaders := make(http.Header) 9496 for k, v := range c.header_ { 9497 reqHeaders[k] = v 9498 } 9499 reqHeaders.Set("User-Agent", c.s.userAgent()) 9500 var body io.Reader = nil 9501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) 9502 if err != nil { 9503 return nil, err 9504 } 9505 reqHeaders.Set("Content-Type", "application/json") 9506 c.urlParams_.Set("alt", alt) 9507 c.urlParams_.Set("prettyPrint", "false") 9508 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9509 urls += "?" + c.urlParams_.Encode() 9510 req, err := http.NewRequest("PUT", urls, body) 9511 if err != nil { 9512 return nil, err 9513 } 9514 req.Header = reqHeaders 9515 googleapi.Expand(req.URL, map[string]string{ 9516 "name": c.name, 9517 }) 9518 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9519} 9520 9521// Do executes the "container.projects.locations.clusters.nodePools.update" call. 9522// Exactly one of *Operation or error will be non-nil. Any non-2xx 9523// status code is an error. Response headers are in either 9524// *Operation.ServerResponse.Header or (if a response was returned at 9525// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9526// to check whether the returned error was because 9527// http.StatusNotModified was returned. 9528func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9529 gensupport.SetOptions(c.urlParams_, opts...) 9530 res, err := c.doRequest("json") 9531 if res != nil && res.StatusCode == http.StatusNotModified { 9532 if res.Body != nil { 9533 res.Body.Close() 9534 } 9535 return nil, &googleapi.Error{ 9536 Code: res.StatusCode, 9537 Header: res.Header, 9538 } 9539 } 9540 if err != nil { 9541 return nil, err 9542 } 9543 defer googleapi.CloseBody(res) 9544 if err := googleapi.CheckResponse(res); err != nil { 9545 return nil, err 9546 } 9547 ret := &Operation{ 9548 ServerResponse: googleapi.ServerResponse{ 9549 Header: res.Header, 9550 HTTPStatusCode: res.StatusCode, 9551 }, 9552 } 9553 target := &ret 9554 if err := gensupport.DecodeResponse(target, res); err != nil { 9555 return nil, err 9556 } 9557 return ret, nil 9558 // { 9559 // "description": "Updates the version and/or image type of a specific node pool.", 9560 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", 9561 // "httpMethod": "PUT", 9562 // "id": "container.projects.locations.clusters.nodePools.update", 9563 // "parameterOrder": [ 9564 // "name" 9565 // ], 9566 // "parameters": { 9567 // "name": { 9568 // "description": "The name (project, location, cluster, node pool) of the node pool to\nupdate. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 9569 // "location": "path", 9570 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9571 // "required": true, 9572 // "type": "string" 9573 // } 9574 // }, 9575 // "path": "v1beta1/{+name}", 9576 // "request": { 9577 // "$ref": "UpdateNodePoolRequest" 9578 // }, 9579 // "response": { 9580 // "$ref": "Operation" 9581 // }, 9582 // "scopes": [ 9583 // "https://www.googleapis.com/auth/cloud-platform" 9584 // ] 9585 // } 9586 9587} 9588 9589// method id "container.projects.locations.clusters.well-known.getOpenid-configuration": 9590 9591type ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall struct { 9592 s *Service 9593 parent string 9594 urlParams_ gensupport.URLParams 9595 ifNoneMatch_ string 9596 ctx_ context.Context 9597 header_ http.Header 9598} 9599 9600// GetOpenidConfiguration: Gets the OIDC discovery document for the 9601// cluster. 9602// See the 9603// [OpenID Connect Discovery 9604// 1.0 9605// specification](https://openid.net/specs/openid-connect-discovery-1 9606// _0.html) 9607// for details. 9608// This API is not yet intended for general use, and is not available 9609// for all 9610// clusters. 9611func (r *ProjectsLocationsClustersWellKnownService) GetOpenidConfiguration(parent string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 9612 c := &ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9613 c.parent = parent 9614 return c 9615} 9616 9617// Fields allows partial responses to be retrieved. See 9618// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9619// for more information. 9620func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 9621 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9622 return c 9623} 9624 9625// IfNoneMatch sets the optional parameter which makes the operation 9626// fail if the object's ETag matches the given value. This is useful for 9627// getting updates only after the object has changed since the last 9628// request. Use googleapi.IsNotModified to check whether the response 9629// error from Do is the result of In-None-Match. 9630func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 9631 c.ifNoneMatch_ = entityTag 9632 return c 9633} 9634 9635// Context sets the context to be used in this call's Do method. Any 9636// pending HTTP request will be aborted if the provided context is 9637// canceled. 9638func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Context(ctx context.Context) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 9639 c.ctx_ = ctx 9640 return c 9641} 9642 9643// Header returns an http.Header that can be modified by the caller to 9644// add HTTP headers to the request. 9645func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() http.Header { 9646 if c.header_ == nil { 9647 c.header_ = make(http.Header) 9648 } 9649 return c.header_ 9650} 9651 9652func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { 9653 reqHeaders := make(http.Header) 9654 for k, v := range c.header_ { 9655 reqHeaders[k] = v 9656 } 9657 reqHeaders.Set("User-Agent", c.s.userAgent()) 9658 if c.ifNoneMatch_ != "" { 9659 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9660 } 9661 var body io.Reader = nil 9662 c.urlParams_.Set("alt", alt) 9663 c.urlParams_.Set("prettyPrint", "false") 9664 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/.well-known/openid-configuration") 9665 urls += "?" + c.urlParams_.Encode() 9666 req, err := http.NewRequest("GET", urls, body) 9667 if err != nil { 9668 return nil, err 9669 } 9670 req.Header = reqHeaders 9671 googleapi.Expand(req.URL, map[string]string{ 9672 "parent": c.parent, 9673 }) 9674 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9675} 9676 9677// Do executes the "container.projects.locations.clusters.well-known.getOpenid-configuration" call. 9678// Exactly one of *GetOpenIDConfigResponse or error will be non-nil. Any 9679// non-2xx status code is an error. Response headers are in either 9680// *GetOpenIDConfigResponse.ServerResponse.Header or (if a response was 9681// returned at all) in error.(*googleapi.Error).Header. Use 9682// googleapi.IsNotModified to check whether the returned error was 9683// because http.StatusNotModified was returned. 9684func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Do(opts ...googleapi.CallOption) (*GetOpenIDConfigResponse, error) { 9685 gensupport.SetOptions(c.urlParams_, opts...) 9686 res, err := c.doRequest("json") 9687 if res != nil && res.StatusCode == http.StatusNotModified { 9688 if res.Body != nil { 9689 res.Body.Close() 9690 } 9691 return nil, &googleapi.Error{ 9692 Code: res.StatusCode, 9693 Header: res.Header, 9694 } 9695 } 9696 if err != nil { 9697 return nil, err 9698 } 9699 defer googleapi.CloseBody(res) 9700 if err := googleapi.CheckResponse(res); err != nil { 9701 return nil, err 9702 } 9703 ret := &GetOpenIDConfigResponse{ 9704 ServerResponse: googleapi.ServerResponse{ 9705 Header: res.Header, 9706 HTTPStatusCode: res.StatusCode, 9707 }, 9708 } 9709 target := &ret 9710 if err := gensupport.DecodeResponse(target, res); err != nil { 9711 return nil, err 9712 } 9713 return ret, nil 9714 // { 9715 // "description": "Gets the OIDC discovery document for the cluster.\nSee the\n[OpenID Connect Discovery 1.0\nspecification](https://openid.net/specs/openid-connect-discovery-1_0.html)\nfor details.\nThis API is not yet intended for general use, and is not available for all\nclusters.", 9716 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", 9717 // "httpMethod": "GET", 9718 // "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", 9719 // "parameterOrder": [ 9720 // "parent" 9721 // ], 9722 // "parameters": { 9723 // "parent": { 9724 // "description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.", 9725 // "location": "path", 9726 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 9727 // "required": true, 9728 // "type": "string" 9729 // } 9730 // }, 9731 // "path": "v1beta1/{+parent}/.well-known/openid-configuration", 9732 // "response": { 9733 // "$ref": "GetOpenIDConfigResponse" 9734 // } 9735 // } 9736 9737} 9738 9739// method id "container.projects.locations.operations.cancel": 9740 9741type ProjectsLocationsOperationsCancelCall struct { 9742 s *Service 9743 name string 9744 canceloperationrequest *CancelOperationRequest 9745 urlParams_ gensupport.URLParams 9746 ctx_ context.Context 9747 header_ http.Header 9748} 9749 9750// Cancel: Cancels the specified operation. 9751func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 9752 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9753 c.name = name 9754 c.canceloperationrequest = canceloperationrequest 9755 return c 9756} 9757 9758// Fields allows partial responses to be retrieved. See 9759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9760// for more information. 9761func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 9762 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9763 return c 9764} 9765 9766// Context sets the context to be used in this call's Do method. Any 9767// pending HTTP request will be aborted if the provided context is 9768// canceled. 9769func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 9770 c.ctx_ = ctx 9771 return c 9772} 9773 9774// Header returns an http.Header that can be modified by the caller to 9775// add HTTP headers to the request. 9776func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 9777 if c.header_ == nil { 9778 c.header_ = make(http.Header) 9779 } 9780 return c.header_ 9781} 9782 9783func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 9784 reqHeaders := make(http.Header) 9785 for k, v := range c.header_ { 9786 reqHeaders[k] = v 9787 } 9788 reqHeaders.Set("User-Agent", c.s.userAgent()) 9789 var body io.Reader = nil 9790 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 9791 if err != nil { 9792 return nil, err 9793 } 9794 reqHeaders.Set("Content-Type", "application/json") 9795 c.urlParams_.Set("alt", alt) 9796 c.urlParams_.Set("prettyPrint", "false") 9797 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") 9798 urls += "?" + c.urlParams_.Encode() 9799 req, err := http.NewRequest("POST", urls, body) 9800 if err != nil { 9801 return nil, err 9802 } 9803 req.Header = reqHeaders 9804 googleapi.Expand(req.URL, map[string]string{ 9805 "name": c.name, 9806 }) 9807 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9808} 9809 9810// Do executes the "container.projects.locations.operations.cancel" call. 9811// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9812// code is an error. Response headers are in either 9813// *Empty.ServerResponse.Header or (if a response was returned at all) 9814// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9815// check whether the returned error was because http.StatusNotModified 9816// was returned. 9817func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9818 gensupport.SetOptions(c.urlParams_, opts...) 9819 res, err := c.doRequest("json") 9820 if res != nil && res.StatusCode == http.StatusNotModified { 9821 if res.Body != nil { 9822 res.Body.Close() 9823 } 9824 return nil, &googleapi.Error{ 9825 Code: res.StatusCode, 9826 Header: res.Header, 9827 } 9828 } 9829 if err != nil { 9830 return nil, err 9831 } 9832 defer googleapi.CloseBody(res) 9833 if err := googleapi.CheckResponse(res); err != nil { 9834 return nil, err 9835 } 9836 ret := &Empty{ 9837 ServerResponse: googleapi.ServerResponse{ 9838 Header: res.Header, 9839 HTTPStatusCode: res.StatusCode, 9840 }, 9841 } 9842 target := &ret 9843 if err := gensupport.DecodeResponse(target, res); err != nil { 9844 return nil, err 9845 } 9846 return ret, nil 9847 // { 9848 // "description": "Cancels the specified operation.", 9849 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 9850 // "httpMethod": "POST", 9851 // "id": "container.projects.locations.operations.cancel", 9852 // "parameterOrder": [ 9853 // "name" 9854 // ], 9855 // "parameters": { 9856 // "name": { 9857 // "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", 9858 // "location": "path", 9859 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 9860 // "required": true, 9861 // "type": "string" 9862 // } 9863 // }, 9864 // "path": "v1beta1/{+name}:cancel", 9865 // "request": { 9866 // "$ref": "CancelOperationRequest" 9867 // }, 9868 // "response": { 9869 // "$ref": "Empty" 9870 // }, 9871 // "scopes": [ 9872 // "https://www.googleapis.com/auth/cloud-platform" 9873 // ] 9874 // } 9875 9876} 9877 9878// method id "container.projects.locations.operations.get": 9879 9880type ProjectsLocationsOperationsGetCall struct { 9881 s *Service 9882 name string 9883 urlParams_ gensupport.URLParams 9884 ifNoneMatch_ string 9885 ctx_ context.Context 9886 header_ http.Header 9887} 9888 9889// Get: Gets the specified operation. 9890func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 9891 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9892 c.name = name 9893 return c 9894} 9895 9896// OperationId sets the optional parameter "operationId": Deprecated. 9897// The server-assigned `name` of the operation. 9898// This field has been deprecated and replaced by the name field. 9899func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall { 9900 c.urlParams_.Set("operationId", operationId) 9901 return c 9902} 9903 9904// ProjectId sets the optional parameter "projectId": Deprecated. The 9905// Google Developers Console [project ID or 9906// project 9907// number](https://support.google.com/cloud/answer/6158840). 9908// This 9909// field has been deprecated and replaced by the name field. 9910func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *ProjectsLocationsOperationsGetCall { 9911 c.urlParams_.Set("projectId", projectId) 9912 return c 9913} 9914 9915// Zone sets the optional parameter "zone": Deprecated. The name of the 9916// Google Compute Engine 9917// [zone](/compute/docs/zones#available) in which the 9918// cluster 9919// resides. 9920// This field has been deprecated and replaced by the name field. 9921func (c *ProjectsLocationsOperationsGetCall) Zone(zone string) *ProjectsLocationsOperationsGetCall { 9922 c.urlParams_.Set("zone", zone) 9923 return c 9924} 9925 9926// Fields allows partial responses to be retrieved. See 9927// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9928// for more information. 9929func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 9930 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9931 return c 9932} 9933 9934// IfNoneMatch sets the optional parameter which makes the operation 9935// fail if the object's ETag matches the given value. This is useful for 9936// getting updates only after the object has changed since the last 9937// request. Use googleapi.IsNotModified to check whether the response 9938// error from Do is the result of In-None-Match. 9939func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 9940 c.ifNoneMatch_ = entityTag 9941 return c 9942} 9943 9944// Context sets the context to be used in this call's Do method. Any 9945// pending HTTP request will be aborted if the provided context is 9946// canceled. 9947func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 9948 c.ctx_ = ctx 9949 return c 9950} 9951 9952// Header returns an http.Header that can be modified by the caller to 9953// add HTTP headers to the request. 9954func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 9955 if c.header_ == nil { 9956 c.header_ = make(http.Header) 9957 } 9958 return c.header_ 9959} 9960 9961func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 9962 reqHeaders := make(http.Header) 9963 for k, v := range c.header_ { 9964 reqHeaders[k] = v 9965 } 9966 reqHeaders.Set("User-Agent", c.s.userAgent()) 9967 if c.ifNoneMatch_ != "" { 9968 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9969 } 9970 var body io.Reader = nil 9971 c.urlParams_.Set("alt", alt) 9972 c.urlParams_.Set("prettyPrint", "false") 9973 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9974 urls += "?" + c.urlParams_.Encode() 9975 req, err := http.NewRequest("GET", urls, body) 9976 if err != nil { 9977 return nil, err 9978 } 9979 req.Header = reqHeaders 9980 googleapi.Expand(req.URL, map[string]string{ 9981 "name": c.name, 9982 }) 9983 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9984} 9985 9986// Do executes the "container.projects.locations.operations.get" call. 9987// Exactly one of *Operation or error will be non-nil. Any non-2xx 9988// status code is an error. Response headers are in either 9989// *Operation.ServerResponse.Header or (if a response was returned at 9990// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9991// to check whether the returned error was because 9992// http.StatusNotModified was returned. 9993func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9994 gensupport.SetOptions(c.urlParams_, opts...) 9995 res, err := c.doRequest("json") 9996 if res != nil && res.StatusCode == http.StatusNotModified { 9997 if res.Body != nil { 9998 res.Body.Close() 9999 } 10000 return nil, &googleapi.Error{ 10001 Code: res.StatusCode, 10002 Header: res.Header, 10003 } 10004 } 10005 if err != nil { 10006 return nil, err 10007 } 10008 defer googleapi.CloseBody(res) 10009 if err := googleapi.CheckResponse(res); err != nil { 10010 return nil, err 10011 } 10012 ret := &Operation{ 10013 ServerResponse: googleapi.ServerResponse{ 10014 Header: res.Header, 10015 HTTPStatusCode: res.StatusCode, 10016 }, 10017 } 10018 target := &ret 10019 if err := gensupport.DecodeResponse(target, res); err != nil { 10020 return nil, err 10021 } 10022 return ret, nil 10023 // { 10024 // "description": "Gets the specified operation.", 10025 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 10026 // "httpMethod": "GET", 10027 // "id": "container.projects.locations.operations.get", 10028 // "parameterOrder": [ 10029 // "name" 10030 // ], 10031 // "parameters": { 10032 // "name": { 10033 // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", 10034 // "location": "path", 10035 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 10036 // "required": true, 10037 // "type": "string" 10038 // }, 10039 // "operationId": { 10040 // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", 10041 // "location": "query", 10042 // "type": "string" 10043 // }, 10044 // "projectId": { 10045 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 10046 // "location": "query", 10047 // "type": "string" 10048 // }, 10049 // "zone": { 10050 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 10051 // "location": "query", 10052 // "type": "string" 10053 // } 10054 // }, 10055 // "path": "v1beta1/{+name}", 10056 // "response": { 10057 // "$ref": "Operation" 10058 // }, 10059 // "scopes": [ 10060 // "https://www.googleapis.com/auth/cloud-platform" 10061 // ] 10062 // } 10063 10064} 10065 10066// method id "container.projects.locations.operations.list": 10067 10068type ProjectsLocationsOperationsListCall struct { 10069 s *Service 10070 parent string 10071 urlParams_ gensupport.URLParams 10072 ifNoneMatch_ string 10073 ctx_ context.Context 10074 header_ http.Header 10075} 10076 10077// List: Lists all operations in a project in the specified zone or all 10078// zones. 10079func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall { 10080 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10081 c.parent = parent 10082 return c 10083} 10084 10085// ProjectId sets the optional parameter "projectId": Deprecated. The 10086// Google Developers Console [project ID or 10087// project 10088// number](https://support.google.com/cloud/answer/6158840). 10089// This 10090// field has been deprecated and replaced by the parent field. 10091func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *ProjectsLocationsOperationsListCall { 10092 c.urlParams_.Set("projectId", projectId) 10093 return c 10094} 10095 10096// Zone sets the optional parameter "zone": Deprecated. The name of the 10097// Google Compute Engine 10098// [zone](/compute/docs/zones#available) to return operations for, or 10099// `-` for 10100// all zones. This field has been deprecated and replaced by the parent 10101// field. 10102func (c *ProjectsLocationsOperationsListCall) Zone(zone string) *ProjectsLocationsOperationsListCall { 10103 c.urlParams_.Set("zone", zone) 10104 return c 10105} 10106 10107// Fields allows partial responses to be retrieved. See 10108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10109// for more information. 10110func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 10111 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10112 return c 10113} 10114 10115// IfNoneMatch sets the optional parameter which makes the operation 10116// fail if the object's ETag matches the given value. This is useful for 10117// getting updates only after the object has changed since the last 10118// request. Use googleapi.IsNotModified to check whether the response 10119// error from Do is the result of In-None-Match. 10120func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 10121 c.ifNoneMatch_ = entityTag 10122 return c 10123} 10124 10125// Context sets the context to be used in this call's Do method. Any 10126// pending HTTP request will be aborted if the provided context is 10127// canceled. 10128func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 10129 c.ctx_ = ctx 10130 return c 10131} 10132 10133// Header returns an http.Header that can be modified by the caller to 10134// add HTTP headers to the request. 10135func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 10136 if c.header_ == nil { 10137 c.header_ = make(http.Header) 10138 } 10139 return c.header_ 10140} 10141 10142func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 10143 reqHeaders := make(http.Header) 10144 for k, v := range c.header_ { 10145 reqHeaders[k] = v 10146 } 10147 reqHeaders.Set("User-Agent", c.s.userAgent()) 10148 if c.ifNoneMatch_ != "" { 10149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10150 } 10151 var body io.Reader = nil 10152 c.urlParams_.Set("alt", alt) 10153 c.urlParams_.Set("prettyPrint", "false") 10154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/operations") 10155 urls += "?" + c.urlParams_.Encode() 10156 req, err := http.NewRequest("GET", urls, body) 10157 if err != nil { 10158 return nil, err 10159 } 10160 req.Header = reqHeaders 10161 googleapi.Expand(req.URL, map[string]string{ 10162 "parent": c.parent, 10163 }) 10164 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10165} 10166 10167// Do executes the "container.projects.locations.operations.list" call. 10168// Exactly one of *ListOperationsResponse or error will be non-nil. Any 10169// non-2xx status code is an error. Response headers are in either 10170// *ListOperationsResponse.ServerResponse.Header or (if a response was 10171// returned at all) in error.(*googleapi.Error).Header. Use 10172// googleapi.IsNotModified to check whether the returned error was 10173// because http.StatusNotModified was returned. 10174func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 10175 gensupport.SetOptions(c.urlParams_, opts...) 10176 res, err := c.doRequest("json") 10177 if res != nil && res.StatusCode == http.StatusNotModified { 10178 if res.Body != nil { 10179 res.Body.Close() 10180 } 10181 return nil, &googleapi.Error{ 10182 Code: res.StatusCode, 10183 Header: res.Header, 10184 } 10185 } 10186 if err != nil { 10187 return nil, err 10188 } 10189 defer googleapi.CloseBody(res) 10190 if err := googleapi.CheckResponse(res); err != nil { 10191 return nil, err 10192 } 10193 ret := &ListOperationsResponse{ 10194 ServerResponse: googleapi.ServerResponse{ 10195 Header: res.Header, 10196 HTTPStatusCode: res.StatusCode, 10197 }, 10198 } 10199 target := &ret 10200 if err := gensupport.DecodeResponse(target, res); err != nil { 10201 return nil, err 10202 } 10203 return ret, nil 10204 // { 10205 // "description": "Lists all operations in a project in the specified zone or all zones.", 10206 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", 10207 // "httpMethod": "GET", 10208 // "id": "container.projects.locations.operations.list", 10209 // "parameterOrder": [ 10210 // "parent" 10211 // ], 10212 // "parameters": { 10213 // "parent": { 10214 // "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", 10215 // "location": "path", 10216 // "pattern": "^projects/[^/]+/locations/[^/]+$", 10217 // "required": true, 10218 // "type": "string" 10219 // }, 10220 // "projectId": { 10221 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", 10222 // "location": "query", 10223 // "type": "string" 10224 // }, 10225 // "zone": { 10226 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", 10227 // "location": "query", 10228 // "type": "string" 10229 // } 10230 // }, 10231 // "path": "v1beta1/{+parent}/operations", 10232 // "response": { 10233 // "$ref": "ListOperationsResponse" 10234 // }, 10235 // "scopes": [ 10236 // "https://www.googleapis.com/auth/cloud-platform" 10237 // ] 10238 // } 10239 10240} 10241 10242// method id "container.projects.zones.getServerconfig": 10243 10244type ProjectsZonesGetServerconfigCall struct { 10245 s *Service 10246 projectId string 10247 zone string 10248 urlParams_ gensupport.URLParams 10249 ifNoneMatch_ string 10250 ctx_ context.Context 10251 header_ http.Header 10252} 10253 10254// GetServerconfig: Returns configuration info about the Google 10255// Kubernetes Engine service. 10256func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { 10257 c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10258 c.projectId = projectId 10259 c.zone = zone 10260 return c 10261} 10262 10263// Name sets the optional parameter "name": The name (project and 10264// location) of the server config to get, 10265// specified in the format 'projects/*/locations/*'. 10266func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { 10267 c.urlParams_.Set("name", name) 10268 return c 10269} 10270 10271// Fields allows partial responses to be retrieved. See 10272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10273// for more information. 10274func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall { 10275 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10276 return c 10277} 10278 10279// IfNoneMatch sets the optional parameter which makes the operation 10280// fail if the object's ETag matches the given value. This is useful for 10281// getting updates only after the object has changed since the last 10282// request. Use googleapi.IsNotModified to check whether the response 10283// error from Do is the result of In-None-Match. 10284func (c *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall { 10285 c.ifNoneMatch_ = entityTag 10286 return c 10287} 10288 10289// Context sets the context to be used in this call's Do method. Any 10290// pending HTTP request will be aborted if the provided context is 10291// canceled. 10292func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall { 10293 c.ctx_ = ctx 10294 return c 10295} 10296 10297// Header returns an http.Header that can be modified by the caller to 10298// add HTTP headers to the request. 10299func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { 10300 if c.header_ == nil { 10301 c.header_ = make(http.Header) 10302 } 10303 return c.header_ 10304} 10305 10306func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { 10307 reqHeaders := make(http.Header) 10308 for k, v := range c.header_ { 10309 reqHeaders[k] = v 10310 } 10311 reqHeaders.Set("User-Agent", c.s.userAgent()) 10312 if c.ifNoneMatch_ != "" { 10313 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10314 } 10315 var body io.Reader = nil 10316 c.urlParams_.Set("alt", alt) 10317 c.urlParams_.Set("prettyPrint", "false") 10318 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/serverconfig") 10319 urls += "?" + c.urlParams_.Encode() 10320 req, err := http.NewRequest("GET", urls, body) 10321 if err != nil { 10322 return nil, err 10323 } 10324 req.Header = reqHeaders 10325 googleapi.Expand(req.URL, map[string]string{ 10326 "projectId": c.projectId, 10327 "zone": c.zone, 10328 }) 10329 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10330} 10331 10332// Do executes the "container.projects.zones.getServerconfig" call. 10333// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx 10334// status code is an error. Response headers are in either 10335// *ServerConfig.ServerResponse.Header or (if a response was returned at 10336// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10337// to check whether the returned error was because 10338// http.StatusNotModified was returned. 10339func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { 10340 gensupport.SetOptions(c.urlParams_, opts...) 10341 res, err := c.doRequest("json") 10342 if res != nil && res.StatusCode == http.StatusNotModified { 10343 if res.Body != nil { 10344 res.Body.Close() 10345 } 10346 return nil, &googleapi.Error{ 10347 Code: res.StatusCode, 10348 Header: res.Header, 10349 } 10350 } 10351 if err != nil { 10352 return nil, err 10353 } 10354 defer googleapi.CloseBody(res) 10355 if err := googleapi.CheckResponse(res); err != nil { 10356 return nil, err 10357 } 10358 ret := &ServerConfig{ 10359 ServerResponse: googleapi.ServerResponse{ 10360 Header: res.Header, 10361 HTTPStatusCode: res.StatusCode, 10362 }, 10363 } 10364 target := &ret 10365 if err := gensupport.DecodeResponse(target, res); err != nil { 10366 return nil, err 10367 } 10368 return ret, nil 10369 // { 10370 // "description": "Returns configuration info about the Google Kubernetes Engine service.", 10371 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", 10372 // "httpMethod": "GET", 10373 // "id": "container.projects.zones.getServerconfig", 10374 // "parameterOrder": [ 10375 // "projectId", 10376 // "zone" 10377 // ], 10378 // "parameters": { 10379 // "name": { 10380 // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", 10381 // "location": "query", 10382 // "type": "string" 10383 // }, 10384 // "projectId": { 10385 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 10386 // "location": "path", 10387 // "required": true, 10388 // "type": "string" 10389 // }, 10390 // "zone": { 10391 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", 10392 // "location": "path", 10393 // "required": true, 10394 // "type": "string" 10395 // } 10396 // }, 10397 // "path": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", 10398 // "response": { 10399 // "$ref": "ServerConfig" 10400 // }, 10401 // "scopes": [ 10402 // "https://www.googleapis.com/auth/cloud-platform" 10403 // ] 10404 // } 10405 10406} 10407 10408// method id "container.projects.zones.clusters.addons": 10409 10410type ProjectsZonesClustersAddonsCall struct { 10411 s *Service 10412 projectId string 10413 zone string 10414 clusterId string 10415 setaddonsconfigrequest *SetAddonsConfigRequest 10416 urlParams_ gensupport.URLParams 10417 ctx_ context.Context 10418 header_ http.Header 10419} 10420 10421// Addons: Sets the addons for a specific cluster. 10422func (r *ProjectsZonesClustersService) Addons(projectId string, zone string, clusterId string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsZonesClustersAddonsCall { 10423 c := &ProjectsZonesClustersAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10424 c.projectId = projectId 10425 c.zone = zone 10426 c.clusterId = clusterId 10427 c.setaddonsconfigrequest = setaddonsconfigrequest 10428 return c 10429} 10430 10431// Fields allows partial responses to be retrieved. See 10432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10433// for more information. 10434func (c *ProjectsZonesClustersAddonsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersAddonsCall { 10435 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10436 return c 10437} 10438 10439// Context sets the context to be used in this call's Do method. Any 10440// pending HTTP request will be aborted if the provided context is 10441// canceled. 10442func (c *ProjectsZonesClustersAddonsCall) Context(ctx context.Context) *ProjectsZonesClustersAddonsCall { 10443 c.ctx_ = ctx 10444 return c 10445} 10446 10447// Header returns an http.Header that can be modified by the caller to 10448// add HTTP headers to the request. 10449func (c *ProjectsZonesClustersAddonsCall) Header() http.Header { 10450 if c.header_ == nil { 10451 c.header_ = make(http.Header) 10452 } 10453 return c.header_ 10454} 10455 10456func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) { 10457 reqHeaders := make(http.Header) 10458 for k, v := range c.header_ { 10459 reqHeaders[k] = v 10460 } 10461 reqHeaders.Set("User-Agent", c.s.userAgent()) 10462 var body io.Reader = nil 10463 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) 10464 if err != nil { 10465 return nil, err 10466 } 10467 reqHeaders.Set("Content-Type", "application/json") 10468 c.urlParams_.Set("alt", alt) 10469 c.urlParams_.Set("prettyPrint", "false") 10470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") 10471 urls += "?" + c.urlParams_.Encode() 10472 req, err := http.NewRequest("POST", urls, body) 10473 if err != nil { 10474 return nil, err 10475 } 10476 req.Header = reqHeaders 10477 googleapi.Expand(req.URL, map[string]string{ 10478 "projectId": c.projectId, 10479 "zone": c.zone, 10480 "clusterId": c.clusterId, 10481 }) 10482 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10483} 10484 10485// Do executes the "container.projects.zones.clusters.addons" call. 10486// Exactly one of *Operation or error will be non-nil. Any non-2xx 10487// status code is an error. Response headers are in either 10488// *Operation.ServerResponse.Header or (if a response was returned at 10489// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10490// to check whether the returned error was because 10491// http.StatusNotModified was returned. 10492func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10493 gensupport.SetOptions(c.urlParams_, opts...) 10494 res, err := c.doRequest("json") 10495 if res != nil && res.StatusCode == http.StatusNotModified { 10496 if res.Body != nil { 10497 res.Body.Close() 10498 } 10499 return nil, &googleapi.Error{ 10500 Code: res.StatusCode, 10501 Header: res.Header, 10502 } 10503 } 10504 if err != nil { 10505 return nil, err 10506 } 10507 defer googleapi.CloseBody(res) 10508 if err := googleapi.CheckResponse(res); err != nil { 10509 return nil, err 10510 } 10511 ret := &Operation{ 10512 ServerResponse: googleapi.ServerResponse{ 10513 Header: res.Header, 10514 HTTPStatusCode: res.StatusCode, 10515 }, 10516 } 10517 target := &ret 10518 if err := gensupport.DecodeResponse(target, res); err != nil { 10519 return nil, err 10520 } 10521 return ret, nil 10522 // { 10523 // "description": "Sets the addons for a specific cluster.", 10524 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", 10525 // "httpMethod": "POST", 10526 // "id": "container.projects.zones.clusters.addons", 10527 // "parameterOrder": [ 10528 // "projectId", 10529 // "zone", 10530 // "clusterId" 10531 // ], 10532 // "parameters": { 10533 // "clusterId": { 10534 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 10535 // "location": "path", 10536 // "required": true, 10537 // "type": "string" 10538 // }, 10539 // "projectId": { 10540 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 10541 // "location": "path", 10542 // "required": true, 10543 // "type": "string" 10544 // }, 10545 // "zone": { 10546 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 10547 // "location": "path", 10548 // "required": true, 10549 // "type": "string" 10550 // } 10551 // }, 10552 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", 10553 // "request": { 10554 // "$ref": "SetAddonsConfigRequest" 10555 // }, 10556 // "response": { 10557 // "$ref": "Operation" 10558 // }, 10559 // "scopes": [ 10560 // "https://www.googleapis.com/auth/cloud-platform" 10561 // ] 10562 // } 10563 10564} 10565 10566// method id "container.projects.zones.clusters.completeIpRotation": 10567 10568type ProjectsZonesClustersCompleteIpRotationCall struct { 10569 s *Service 10570 projectId string 10571 zone string 10572 clusterId string 10573 completeiprotationrequest *CompleteIPRotationRequest 10574 urlParams_ gensupport.URLParams 10575 ctx_ context.Context 10576 header_ http.Header 10577} 10578 10579// CompleteIpRotation: Completes master IP rotation. 10580func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall { 10581 c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10582 c.projectId = projectId 10583 c.zone = zone 10584 c.clusterId = clusterId 10585 c.completeiprotationrequest = completeiprotationrequest 10586 return c 10587} 10588 10589// Fields allows partial responses to be retrieved. See 10590// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10591// for more information. 10592func (c *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall { 10593 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10594 return c 10595} 10596 10597// Context sets the context to be used in this call's Do method. Any 10598// pending HTTP request will be aborted if the provided context is 10599// canceled. 10600func (c *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall { 10601 c.ctx_ = ctx 10602 return c 10603} 10604 10605// Header returns an http.Header that can be modified by the caller to 10606// add HTTP headers to the request. 10607func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { 10608 if c.header_ == nil { 10609 c.header_ = make(http.Header) 10610 } 10611 return c.header_ 10612} 10613 10614func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { 10615 reqHeaders := make(http.Header) 10616 for k, v := range c.header_ { 10617 reqHeaders[k] = v 10618 } 10619 reqHeaders.Set("User-Agent", c.s.userAgent()) 10620 var body io.Reader = nil 10621 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) 10622 if err != nil { 10623 return nil, err 10624 } 10625 reqHeaders.Set("Content-Type", "application/json") 10626 c.urlParams_.Set("alt", alt) 10627 c.urlParams_.Set("prettyPrint", "false") 10628 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") 10629 urls += "?" + c.urlParams_.Encode() 10630 req, err := http.NewRequest("POST", urls, body) 10631 if err != nil { 10632 return nil, err 10633 } 10634 req.Header = reqHeaders 10635 googleapi.Expand(req.URL, map[string]string{ 10636 "projectId": c.projectId, 10637 "zone": c.zone, 10638 "clusterId": c.clusterId, 10639 }) 10640 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10641} 10642 10643// Do executes the "container.projects.zones.clusters.completeIpRotation" call. 10644// Exactly one of *Operation or error will be non-nil. Any non-2xx 10645// status code is an error. Response headers are in either 10646// *Operation.ServerResponse.Header or (if a response was returned at 10647// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10648// to check whether the returned error was because 10649// http.StatusNotModified was returned. 10650func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10651 gensupport.SetOptions(c.urlParams_, opts...) 10652 res, err := c.doRequest("json") 10653 if res != nil && res.StatusCode == http.StatusNotModified { 10654 if res.Body != nil { 10655 res.Body.Close() 10656 } 10657 return nil, &googleapi.Error{ 10658 Code: res.StatusCode, 10659 Header: res.Header, 10660 } 10661 } 10662 if err != nil { 10663 return nil, err 10664 } 10665 defer googleapi.CloseBody(res) 10666 if err := googleapi.CheckResponse(res); err != nil { 10667 return nil, err 10668 } 10669 ret := &Operation{ 10670 ServerResponse: googleapi.ServerResponse{ 10671 Header: res.Header, 10672 HTTPStatusCode: res.StatusCode, 10673 }, 10674 } 10675 target := &ret 10676 if err := gensupport.DecodeResponse(target, res); err != nil { 10677 return nil, err 10678 } 10679 return ret, nil 10680 // { 10681 // "description": "Completes master IP rotation.", 10682 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", 10683 // "httpMethod": "POST", 10684 // "id": "container.projects.zones.clusters.completeIpRotation", 10685 // "parameterOrder": [ 10686 // "projectId", 10687 // "zone", 10688 // "clusterId" 10689 // ], 10690 // "parameters": { 10691 // "clusterId": { 10692 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 10693 // "location": "path", 10694 // "required": true, 10695 // "type": "string" 10696 // }, 10697 // "projectId": { 10698 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 10699 // "location": "path", 10700 // "required": true, 10701 // "type": "string" 10702 // }, 10703 // "zone": { 10704 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 10705 // "location": "path", 10706 // "required": true, 10707 // "type": "string" 10708 // } 10709 // }, 10710 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", 10711 // "request": { 10712 // "$ref": "CompleteIPRotationRequest" 10713 // }, 10714 // "response": { 10715 // "$ref": "Operation" 10716 // }, 10717 // "scopes": [ 10718 // "https://www.googleapis.com/auth/cloud-platform" 10719 // ] 10720 // } 10721 10722} 10723 10724// method id "container.projects.zones.clusters.create": 10725 10726type ProjectsZonesClustersCreateCall struct { 10727 s *Service 10728 projectId string 10729 zone string 10730 createclusterrequest *CreateClusterRequest 10731 urlParams_ gensupport.URLParams 10732 ctx_ context.Context 10733 header_ http.Header 10734} 10735 10736// Create: Creates a cluster, consisting of the specified number and 10737// type of Google 10738// Compute Engine instances. 10739// 10740// By default, the cluster is created in the project's 10741// [default 10742// network](/compute/docs/networks-and-firewalls#networks). 10743// 10744// One firewall is added for the cluster. After cluster creation, 10745// the Kubelet creates routes for each node to allow the containers 10746// on that node to communicate with all other instances in 10747// the 10748// cluster. 10749// 10750// Finally, an entry is added to the project's global metadata 10751// indicating 10752// which CIDR range the cluster is using. 10753func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { 10754 c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10755 c.projectId = projectId 10756 c.zone = zone 10757 c.createclusterrequest = createclusterrequest 10758 return c 10759} 10760 10761// Fields allows partial responses to be retrieved. See 10762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10763// for more information. 10764func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { 10765 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10766 return c 10767} 10768 10769// Context sets the context to be used in this call's Do method. Any 10770// pending HTTP request will be aborted if the provided context is 10771// canceled. 10772func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall { 10773 c.ctx_ = ctx 10774 return c 10775} 10776 10777// Header returns an http.Header that can be modified by the caller to 10778// add HTTP headers to the request. 10779func (c *ProjectsZonesClustersCreateCall) Header() http.Header { 10780 if c.header_ == nil { 10781 c.header_ = make(http.Header) 10782 } 10783 return c.header_ 10784} 10785 10786func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { 10787 reqHeaders := make(http.Header) 10788 for k, v := range c.header_ { 10789 reqHeaders[k] = v 10790 } 10791 reqHeaders.Set("User-Agent", c.s.userAgent()) 10792 var body io.Reader = nil 10793 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) 10794 if err != nil { 10795 return nil, err 10796 } 10797 reqHeaders.Set("Content-Type", "application/json") 10798 c.urlParams_.Set("alt", alt) 10799 c.urlParams_.Set("prettyPrint", "false") 10800 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") 10801 urls += "?" + c.urlParams_.Encode() 10802 req, err := http.NewRequest("POST", urls, body) 10803 if err != nil { 10804 return nil, err 10805 } 10806 req.Header = reqHeaders 10807 googleapi.Expand(req.URL, map[string]string{ 10808 "projectId": c.projectId, 10809 "zone": c.zone, 10810 }) 10811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10812} 10813 10814// Do executes the "container.projects.zones.clusters.create" call. 10815// Exactly one of *Operation or error will be non-nil. Any non-2xx 10816// status code is an error. Response headers are in either 10817// *Operation.ServerResponse.Header or (if a response was returned at 10818// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10819// to check whether the returned error was because 10820// http.StatusNotModified was returned. 10821func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10822 gensupport.SetOptions(c.urlParams_, opts...) 10823 res, err := c.doRequest("json") 10824 if res != nil && res.StatusCode == http.StatusNotModified { 10825 if res.Body != nil { 10826 res.Body.Close() 10827 } 10828 return nil, &googleapi.Error{ 10829 Code: res.StatusCode, 10830 Header: res.Header, 10831 } 10832 } 10833 if err != nil { 10834 return nil, err 10835 } 10836 defer googleapi.CloseBody(res) 10837 if err := googleapi.CheckResponse(res); err != nil { 10838 return nil, err 10839 } 10840 ret := &Operation{ 10841 ServerResponse: googleapi.ServerResponse{ 10842 Header: res.Header, 10843 HTTPStatusCode: res.StatusCode, 10844 }, 10845 } 10846 target := &ret 10847 if err := gensupport.DecodeResponse(target, res); err != nil { 10848 return nil, err 10849 } 10850 return ret, nil 10851 // { 10852 // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.", 10853 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 10854 // "httpMethod": "POST", 10855 // "id": "container.projects.zones.clusters.create", 10856 // "parameterOrder": [ 10857 // "projectId", 10858 // "zone" 10859 // ], 10860 // "parameters": { 10861 // "projectId": { 10862 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", 10863 // "location": "path", 10864 // "required": true, 10865 // "type": "string" 10866 // }, 10867 // "zone": { 10868 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", 10869 // "location": "path", 10870 // "required": true, 10871 // "type": "string" 10872 // } 10873 // }, 10874 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 10875 // "request": { 10876 // "$ref": "CreateClusterRequest" 10877 // }, 10878 // "response": { 10879 // "$ref": "Operation" 10880 // }, 10881 // "scopes": [ 10882 // "https://www.googleapis.com/auth/cloud-platform" 10883 // ] 10884 // } 10885 10886} 10887 10888// method id "container.projects.zones.clusters.delete": 10889 10890type ProjectsZonesClustersDeleteCall struct { 10891 s *Service 10892 projectId string 10893 zone string 10894 clusterId string 10895 urlParams_ gensupport.URLParams 10896 ctx_ context.Context 10897 header_ http.Header 10898} 10899 10900// Delete: Deletes the cluster, including the Kubernetes endpoint and 10901// all worker 10902// nodes. 10903// 10904// Firewalls and routes that were configured during cluster creation 10905// are also deleted. 10906// 10907// Other Google Compute Engine resources that might be in use by the 10908// cluster, 10909// such as load balancer resources, are not deleted if they weren't 10910// present 10911// when the cluster was initially created. 10912func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { 10913 c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10914 c.projectId = projectId 10915 c.zone = zone 10916 c.clusterId = clusterId 10917 return c 10918} 10919 10920// Name sets the optional parameter "name": The name (project, location, 10921// cluster) of the cluster to delete. 10922// Specified in the format 'projects/*/locations/*/clusters/*'. 10923func (c *ProjectsZonesClustersDeleteCall) Name(name string) *ProjectsZonesClustersDeleteCall { 10924 c.urlParams_.Set("name", name) 10925 return c 10926} 10927 10928// Fields allows partial responses to be retrieved. See 10929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10930// for more information. 10931func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { 10932 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10933 return c 10934} 10935 10936// Context sets the context to be used in this call's Do method. Any 10937// pending HTTP request will be aborted if the provided context is 10938// canceled. 10939func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall { 10940 c.ctx_ = ctx 10941 return c 10942} 10943 10944// Header returns an http.Header that can be modified by the caller to 10945// add HTTP headers to the request. 10946func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { 10947 if c.header_ == nil { 10948 c.header_ = make(http.Header) 10949 } 10950 return c.header_ 10951} 10952 10953func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { 10954 reqHeaders := make(http.Header) 10955 for k, v := range c.header_ { 10956 reqHeaders[k] = v 10957 } 10958 reqHeaders.Set("User-Agent", c.s.userAgent()) 10959 var body io.Reader = nil 10960 c.urlParams_.Set("alt", alt) 10961 c.urlParams_.Set("prettyPrint", "false") 10962 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 10963 urls += "?" + c.urlParams_.Encode() 10964 req, err := http.NewRequest("DELETE", urls, body) 10965 if err != nil { 10966 return nil, err 10967 } 10968 req.Header = reqHeaders 10969 googleapi.Expand(req.URL, map[string]string{ 10970 "projectId": c.projectId, 10971 "zone": c.zone, 10972 "clusterId": c.clusterId, 10973 }) 10974 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10975} 10976 10977// Do executes the "container.projects.zones.clusters.delete" call. 10978// Exactly one of *Operation or error will be non-nil. Any non-2xx 10979// status code is an error. Response headers are in either 10980// *Operation.ServerResponse.Header or (if a response was returned at 10981// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10982// to check whether the returned error was because 10983// http.StatusNotModified was returned. 10984func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10985 gensupport.SetOptions(c.urlParams_, opts...) 10986 res, err := c.doRequest("json") 10987 if res != nil && res.StatusCode == http.StatusNotModified { 10988 if res.Body != nil { 10989 res.Body.Close() 10990 } 10991 return nil, &googleapi.Error{ 10992 Code: res.StatusCode, 10993 Header: res.Header, 10994 } 10995 } 10996 if err != nil { 10997 return nil, err 10998 } 10999 defer googleapi.CloseBody(res) 11000 if err := googleapi.CheckResponse(res); err != nil { 11001 return nil, err 11002 } 11003 ret := &Operation{ 11004 ServerResponse: googleapi.ServerResponse{ 11005 Header: res.Header, 11006 HTTPStatusCode: res.StatusCode, 11007 }, 11008 } 11009 target := &ret 11010 if err := gensupport.DecodeResponse(target, res); err != nil { 11011 return nil, err 11012 } 11013 return ret, nil 11014 // { 11015 // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.", 11016 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 11017 // "httpMethod": "DELETE", 11018 // "id": "container.projects.zones.clusters.delete", 11019 // "parameterOrder": [ 11020 // "projectId", 11021 // "zone", 11022 // "clusterId" 11023 // ], 11024 // "parameters": { 11025 // "clusterId": { 11026 // "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", 11027 // "location": "path", 11028 // "required": true, 11029 // "type": "string" 11030 // }, 11031 // "name": { 11032 // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 11033 // "location": "query", 11034 // "type": "string" 11035 // }, 11036 // "projectId": { 11037 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 11038 // "location": "path", 11039 // "required": true, 11040 // "type": "string" 11041 // }, 11042 // "zone": { 11043 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 11044 // "location": "path", 11045 // "required": true, 11046 // "type": "string" 11047 // } 11048 // }, 11049 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 11050 // "response": { 11051 // "$ref": "Operation" 11052 // }, 11053 // "scopes": [ 11054 // "https://www.googleapis.com/auth/cloud-platform" 11055 // ] 11056 // } 11057 11058} 11059 11060// method id "container.projects.zones.clusters.get": 11061 11062type ProjectsZonesClustersGetCall struct { 11063 s *Service 11064 projectId string 11065 zone string 11066 clusterId string 11067 urlParams_ gensupport.URLParams 11068 ifNoneMatch_ string 11069 ctx_ context.Context 11070 header_ http.Header 11071} 11072 11073// Get: Gets the details for a specific cluster. 11074func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { 11075 c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11076 c.projectId = projectId 11077 c.zone = zone 11078 c.clusterId = clusterId 11079 return c 11080} 11081 11082// Name sets the optional parameter "name": The name (project, location, 11083// cluster) of the cluster to retrieve. 11084// Specified in the format 'projects/*/locations/*/clusters/*'. 11085func (c *ProjectsZonesClustersGetCall) Name(name string) *ProjectsZonesClustersGetCall { 11086 c.urlParams_.Set("name", name) 11087 return c 11088} 11089 11090// Fields allows partial responses to be retrieved. See 11091// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11092// for more information. 11093func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { 11094 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11095 return c 11096} 11097 11098// IfNoneMatch sets the optional parameter which makes the operation 11099// fail if the object's ETag matches the given value. This is useful for 11100// getting updates only after the object has changed since the last 11101// request. Use googleapi.IsNotModified to check whether the response 11102// error from Do is the result of In-None-Match. 11103func (c *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall { 11104 c.ifNoneMatch_ = entityTag 11105 return c 11106} 11107 11108// Context sets the context to be used in this call's Do method. Any 11109// pending HTTP request will be aborted if the provided context is 11110// canceled. 11111func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall { 11112 c.ctx_ = ctx 11113 return c 11114} 11115 11116// Header returns an http.Header that can be modified by the caller to 11117// add HTTP headers to the request. 11118func (c *ProjectsZonesClustersGetCall) Header() http.Header { 11119 if c.header_ == nil { 11120 c.header_ = make(http.Header) 11121 } 11122 return c.header_ 11123} 11124 11125func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { 11126 reqHeaders := make(http.Header) 11127 for k, v := range c.header_ { 11128 reqHeaders[k] = v 11129 } 11130 reqHeaders.Set("User-Agent", c.s.userAgent()) 11131 if c.ifNoneMatch_ != "" { 11132 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11133 } 11134 var body io.Reader = nil 11135 c.urlParams_.Set("alt", alt) 11136 c.urlParams_.Set("prettyPrint", "false") 11137 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 11138 urls += "?" + c.urlParams_.Encode() 11139 req, err := http.NewRequest("GET", urls, body) 11140 if err != nil { 11141 return nil, err 11142 } 11143 req.Header = reqHeaders 11144 googleapi.Expand(req.URL, map[string]string{ 11145 "projectId": c.projectId, 11146 "zone": c.zone, 11147 "clusterId": c.clusterId, 11148 }) 11149 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11150} 11151 11152// Do executes the "container.projects.zones.clusters.get" call. 11153// Exactly one of *Cluster or error will be non-nil. Any non-2xx status 11154// code is an error. Response headers are in either 11155// *Cluster.ServerResponse.Header or (if a response was returned at all) 11156// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11157// check whether the returned error was because http.StatusNotModified 11158// was returned. 11159func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { 11160 gensupport.SetOptions(c.urlParams_, opts...) 11161 res, err := c.doRequest("json") 11162 if res != nil && res.StatusCode == http.StatusNotModified { 11163 if res.Body != nil { 11164 res.Body.Close() 11165 } 11166 return nil, &googleapi.Error{ 11167 Code: res.StatusCode, 11168 Header: res.Header, 11169 } 11170 } 11171 if err != nil { 11172 return nil, err 11173 } 11174 defer googleapi.CloseBody(res) 11175 if err := googleapi.CheckResponse(res); err != nil { 11176 return nil, err 11177 } 11178 ret := &Cluster{ 11179 ServerResponse: googleapi.ServerResponse{ 11180 Header: res.Header, 11181 HTTPStatusCode: res.StatusCode, 11182 }, 11183 } 11184 target := &ret 11185 if err := gensupport.DecodeResponse(target, res); err != nil { 11186 return nil, err 11187 } 11188 return ret, nil 11189 // { 11190 // "description": "Gets the details for a specific cluster.", 11191 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 11192 // "httpMethod": "GET", 11193 // "id": "container.projects.zones.clusters.get", 11194 // "parameterOrder": [ 11195 // "projectId", 11196 // "zone", 11197 // "clusterId" 11198 // ], 11199 // "parameters": { 11200 // "clusterId": { 11201 // "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", 11202 // "location": "path", 11203 // "required": true, 11204 // "type": "string" 11205 // }, 11206 // "name": { 11207 // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 11208 // "location": "query", 11209 // "type": "string" 11210 // }, 11211 // "projectId": { 11212 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 11213 // "location": "path", 11214 // "required": true, 11215 // "type": "string" 11216 // }, 11217 // "zone": { 11218 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 11219 // "location": "path", 11220 // "required": true, 11221 // "type": "string" 11222 // } 11223 // }, 11224 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 11225 // "response": { 11226 // "$ref": "Cluster" 11227 // }, 11228 // "scopes": [ 11229 // "https://www.googleapis.com/auth/cloud-platform" 11230 // ] 11231 // } 11232 11233} 11234 11235// method id "container.projects.zones.clusters.legacyAbac": 11236 11237type ProjectsZonesClustersLegacyAbacCall struct { 11238 s *Service 11239 projectId string 11240 zone string 11241 clusterId string 11242 setlegacyabacrequest *SetLegacyAbacRequest 11243 urlParams_ gensupport.URLParams 11244 ctx_ context.Context 11245 header_ http.Header 11246} 11247 11248// LegacyAbac: Enables or disables the ABAC authorization mechanism on a 11249// cluster. 11250func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall { 11251 c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11252 c.projectId = projectId 11253 c.zone = zone 11254 c.clusterId = clusterId 11255 c.setlegacyabacrequest = setlegacyabacrequest 11256 return c 11257} 11258 11259// Fields allows partial responses to be retrieved. See 11260// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11261// for more information. 11262func (c *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall { 11263 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11264 return c 11265} 11266 11267// Context sets the context to be used in this call's Do method. Any 11268// pending HTTP request will be aborted if the provided context is 11269// canceled. 11270func (c *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall { 11271 c.ctx_ = ctx 11272 return c 11273} 11274 11275// Header returns an http.Header that can be modified by the caller to 11276// add HTTP headers to the request. 11277func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { 11278 if c.header_ == nil { 11279 c.header_ = make(http.Header) 11280 } 11281 return c.header_ 11282} 11283 11284func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) { 11285 reqHeaders := make(http.Header) 11286 for k, v := range c.header_ { 11287 reqHeaders[k] = v 11288 } 11289 reqHeaders.Set("User-Agent", c.s.userAgent()) 11290 var body io.Reader = nil 11291 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) 11292 if err != nil { 11293 return nil, err 11294 } 11295 reqHeaders.Set("Content-Type", "application/json") 11296 c.urlParams_.Set("alt", alt) 11297 c.urlParams_.Set("prettyPrint", "false") 11298 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") 11299 urls += "?" + c.urlParams_.Encode() 11300 req, err := http.NewRequest("POST", urls, body) 11301 if err != nil { 11302 return nil, err 11303 } 11304 req.Header = reqHeaders 11305 googleapi.Expand(req.URL, map[string]string{ 11306 "projectId": c.projectId, 11307 "zone": c.zone, 11308 "clusterId": c.clusterId, 11309 }) 11310 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11311} 11312 11313// Do executes the "container.projects.zones.clusters.legacyAbac" call. 11314// Exactly one of *Operation or error will be non-nil. Any non-2xx 11315// status code is an error. Response headers are in either 11316// *Operation.ServerResponse.Header or (if a response was returned at 11317// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11318// to check whether the returned error was because 11319// http.StatusNotModified was returned. 11320func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11321 gensupport.SetOptions(c.urlParams_, opts...) 11322 res, err := c.doRequest("json") 11323 if res != nil && res.StatusCode == http.StatusNotModified { 11324 if res.Body != nil { 11325 res.Body.Close() 11326 } 11327 return nil, &googleapi.Error{ 11328 Code: res.StatusCode, 11329 Header: res.Header, 11330 } 11331 } 11332 if err != nil { 11333 return nil, err 11334 } 11335 defer googleapi.CloseBody(res) 11336 if err := googleapi.CheckResponse(res); err != nil { 11337 return nil, err 11338 } 11339 ret := &Operation{ 11340 ServerResponse: googleapi.ServerResponse{ 11341 Header: res.Header, 11342 HTTPStatusCode: res.StatusCode, 11343 }, 11344 } 11345 target := &ret 11346 if err := gensupport.DecodeResponse(target, res); err != nil { 11347 return nil, err 11348 } 11349 return ret, nil 11350 // { 11351 // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", 11352 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", 11353 // "httpMethod": "POST", 11354 // "id": "container.projects.zones.clusters.legacyAbac", 11355 // "parameterOrder": [ 11356 // "projectId", 11357 // "zone", 11358 // "clusterId" 11359 // ], 11360 // "parameters": { 11361 // "clusterId": { 11362 // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", 11363 // "location": "path", 11364 // "required": true, 11365 // "type": "string" 11366 // }, 11367 // "projectId": { 11368 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 11369 // "location": "path", 11370 // "required": true, 11371 // "type": "string" 11372 // }, 11373 // "zone": { 11374 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 11375 // "location": "path", 11376 // "required": true, 11377 // "type": "string" 11378 // } 11379 // }, 11380 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", 11381 // "request": { 11382 // "$ref": "SetLegacyAbacRequest" 11383 // }, 11384 // "response": { 11385 // "$ref": "Operation" 11386 // }, 11387 // "scopes": [ 11388 // "https://www.googleapis.com/auth/cloud-platform" 11389 // ] 11390 // } 11391 11392} 11393 11394// method id "container.projects.zones.clusters.list": 11395 11396type ProjectsZonesClustersListCall struct { 11397 s *Service 11398 projectId string 11399 zone string 11400 urlParams_ gensupport.URLParams 11401 ifNoneMatch_ string 11402 ctx_ context.Context 11403 header_ http.Header 11404} 11405 11406// List: Lists all clusters owned by a project in either the specified 11407// zone or all 11408// zones. 11409func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall { 11410 c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11411 c.projectId = projectId 11412 c.zone = zone 11413 return c 11414} 11415 11416// Parent sets the optional parameter "parent": The parent (project and 11417// location) where the clusters will be listed. 11418// Specified in the format 'projects/*/locations/*'. 11419// Location "-" matches all zones and all regions. 11420func (c *ProjectsZonesClustersListCall) Parent(parent string) *ProjectsZonesClustersListCall { 11421 c.urlParams_.Set("parent", parent) 11422 return c 11423} 11424 11425// Fields allows partial responses to be retrieved. See 11426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11427// for more information. 11428func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { 11429 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11430 return c 11431} 11432 11433// IfNoneMatch sets the optional parameter which makes the operation 11434// fail if the object's ETag matches the given value. This is useful for 11435// getting updates only after the object has changed since the last 11436// request. Use googleapi.IsNotModified to check whether the response 11437// error from Do is the result of In-None-Match. 11438func (c *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall { 11439 c.ifNoneMatch_ = entityTag 11440 return c 11441} 11442 11443// Context sets the context to be used in this call's Do method. Any 11444// pending HTTP request will be aborted if the provided context is 11445// canceled. 11446func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall { 11447 c.ctx_ = ctx 11448 return c 11449} 11450 11451// Header returns an http.Header that can be modified by the caller to 11452// add HTTP headers to the request. 11453func (c *ProjectsZonesClustersListCall) Header() http.Header { 11454 if c.header_ == nil { 11455 c.header_ = make(http.Header) 11456 } 11457 return c.header_ 11458} 11459 11460func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { 11461 reqHeaders := make(http.Header) 11462 for k, v := range c.header_ { 11463 reqHeaders[k] = v 11464 } 11465 reqHeaders.Set("User-Agent", c.s.userAgent()) 11466 if c.ifNoneMatch_ != "" { 11467 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11468 } 11469 var body io.Reader = nil 11470 c.urlParams_.Set("alt", alt) 11471 c.urlParams_.Set("prettyPrint", "false") 11472 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") 11473 urls += "?" + c.urlParams_.Encode() 11474 req, err := http.NewRequest("GET", urls, body) 11475 if err != nil { 11476 return nil, err 11477 } 11478 req.Header = reqHeaders 11479 googleapi.Expand(req.URL, map[string]string{ 11480 "projectId": c.projectId, 11481 "zone": c.zone, 11482 }) 11483 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11484} 11485 11486// Do executes the "container.projects.zones.clusters.list" call. 11487// Exactly one of *ListClustersResponse or error will be non-nil. Any 11488// non-2xx status code is an error. Response headers are in either 11489// *ListClustersResponse.ServerResponse.Header or (if a response was 11490// returned at all) in error.(*googleapi.Error).Header. Use 11491// googleapi.IsNotModified to check whether the returned error was 11492// because http.StatusNotModified was returned. 11493func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { 11494 gensupport.SetOptions(c.urlParams_, opts...) 11495 res, err := c.doRequest("json") 11496 if res != nil && res.StatusCode == http.StatusNotModified { 11497 if res.Body != nil { 11498 res.Body.Close() 11499 } 11500 return nil, &googleapi.Error{ 11501 Code: res.StatusCode, 11502 Header: res.Header, 11503 } 11504 } 11505 if err != nil { 11506 return nil, err 11507 } 11508 defer googleapi.CloseBody(res) 11509 if err := googleapi.CheckResponse(res); err != nil { 11510 return nil, err 11511 } 11512 ret := &ListClustersResponse{ 11513 ServerResponse: googleapi.ServerResponse{ 11514 Header: res.Header, 11515 HTTPStatusCode: res.StatusCode, 11516 }, 11517 } 11518 target := &ret 11519 if err := gensupport.DecodeResponse(target, res); err != nil { 11520 return nil, err 11521 } 11522 return ret, nil 11523 // { 11524 // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", 11525 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 11526 // "httpMethod": "GET", 11527 // "id": "container.projects.zones.clusters.list", 11528 // "parameterOrder": [ 11529 // "projectId", 11530 // "zone" 11531 // ], 11532 // "parameters": { 11533 // "parent": { 11534 // "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", 11535 // "location": "query", 11536 // "type": "string" 11537 // }, 11538 // "projectId": { 11539 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", 11540 // "location": "path", 11541 // "required": true, 11542 // "type": "string" 11543 // }, 11544 // "zone": { 11545 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", 11546 // "location": "path", 11547 // "required": true, 11548 // "type": "string" 11549 // } 11550 // }, 11551 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 11552 // "response": { 11553 // "$ref": "ListClustersResponse" 11554 // }, 11555 // "scopes": [ 11556 // "https://www.googleapis.com/auth/cloud-platform" 11557 // ] 11558 // } 11559 11560} 11561 11562// method id "container.projects.zones.clusters.locations": 11563 11564type ProjectsZonesClustersLocationsCall struct { 11565 s *Service 11566 projectId string 11567 zone string 11568 clusterId string 11569 setlocationsrequest *SetLocationsRequest 11570 urlParams_ gensupport.URLParams 11571 ctx_ context.Context 11572 header_ http.Header 11573} 11574 11575// Locations: Sets the locations for a specific cluster. 11576func (r *ProjectsZonesClustersService) Locations(projectId string, zone string, clusterId string, setlocationsrequest *SetLocationsRequest) *ProjectsZonesClustersLocationsCall { 11577 c := &ProjectsZonesClustersLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11578 c.projectId = projectId 11579 c.zone = zone 11580 c.clusterId = clusterId 11581 c.setlocationsrequest = setlocationsrequest 11582 return c 11583} 11584 11585// Fields allows partial responses to be retrieved. See 11586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11587// for more information. 11588func (c *ProjectsZonesClustersLocationsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLocationsCall { 11589 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11590 return c 11591} 11592 11593// Context sets the context to be used in this call's Do method. Any 11594// pending HTTP request will be aborted if the provided context is 11595// canceled. 11596func (c *ProjectsZonesClustersLocationsCall) Context(ctx context.Context) *ProjectsZonesClustersLocationsCall { 11597 c.ctx_ = ctx 11598 return c 11599} 11600 11601// Header returns an http.Header that can be modified by the caller to 11602// add HTTP headers to the request. 11603func (c *ProjectsZonesClustersLocationsCall) Header() http.Header { 11604 if c.header_ == nil { 11605 c.header_ = make(http.Header) 11606 } 11607 return c.header_ 11608} 11609 11610func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) { 11611 reqHeaders := make(http.Header) 11612 for k, v := range c.header_ { 11613 reqHeaders[k] = v 11614 } 11615 reqHeaders.Set("User-Agent", c.s.userAgent()) 11616 var body io.Reader = nil 11617 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) 11618 if err != nil { 11619 return nil, err 11620 } 11621 reqHeaders.Set("Content-Type", "application/json") 11622 c.urlParams_.Set("alt", alt) 11623 c.urlParams_.Set("prettyPrint", "false") 11624 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") 11625 urls += "?" + c.urlParams_.Encode() 11626 req, err := http.NewRequest("POST", urls, body) 11627 if err != nil { 11628 return nil, err 11629 } 11630 req.Header = reqHeaders 11631 googleapi.Expand(req.URL, map[string]string{ 11632 "projectId": c.projectId, 11633 "zone": c.zone, 11634 "clusterId": c.clusterId, 11635 }) 11636 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11637} 11638 11639// Do executes the "container.projects.zones.clusters.locations" call. 11640// Exactly one of *Operation or error will be non-nil. Any non-2xx 11641// status code is an error. Response headers are in either 11642// *Operation.ServerResponse.Header or (if a response was returned at 11643// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11644// to check whether the returned error was because 11645// http.StatusNotModified was returned. 11646func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11647 gensupport.SetOptions(c.urlParams_, opts...) 11648 res, err := c.doRequest("json") 11649 if res != nil && res.StatusCode == http.StatusNotModified { 11650 if res.Body != nil { 11651 res.Body.Close() 11652 } 11653 return nil, &googleapi.Error{ 11654 Code: res.StatusCode, 11655 Header: res.Header, 11656 } 11657 } 11658 if err != nil { 11659 return nil, err 11660 } 11661 defer googleapi.CloseBody(res) 11662 if err := googleapi.CheckResponse(res); err != nil { 11663 return nil, err 11664 } 11665 ret := &Operation{ 11666 ServerResponse: googleapi.ServerResponse{ 11667 Header: res.Header, 11668 HTTPStatusCode: res.StatusCode, 11669 }, 11670 } 11671 target := &ret 11672 if err := gensupport.DecodeResponse(target, res); err != nil { 11673 return nil, err 11674 } 11675 return ret, nil 11676 // { 11677 // "description": "Sets the locations for a specific cluster.", 11678 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", 11679 // "httpMethod": "POST", 11680 // "id": "container.projects.zones.clusters.locations", 11681 // "parameterOrder": [ 11682 // "projectId", 11683 // "zone", 11684 // "clusterId" 11685 // ], 11686 // "parameters": { 11687 // "clusterId": { 11688 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 11689 // "location": "path", 11690 // "required": true, 11691 // "type": "string" 11692 // }, 11693 // "projectId": { 11694 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 11695 // "location": "path", 11696 // "required": true, 11697 // "type": "string" 11698 // }, 11699 // "zone": { 11700 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 11701 // "location": "path", 11702 // "required": true, 11703 // "type": "string" 11704 // } 11705 // }, 11706 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", 11707 // "request": { 11708 // "$ref": "SetLocationsRequest" 11709 // }, 11710 // "response": { 11711 // "$ref": "Operation" 11712 // }, 11713 // "scopes": [ 11714 // "https://www.googleapis.com/auth/cloud-platform" 11715 // ] 11716 // } 11717 11718} 11719 11720// method id "container.projects.zones.clusters.logging": 11721 11722type ProjectsZonesClustersLoggingCall struct { 11723 s *Service 11724 projectId string 11725 zone string 11726 clusterId string 11727 setloggingservicerequest *SetLoggingServiceRequest 11728 urlParams_ gensupport.URLParams 11729 ctx_ context.Context 11730 header_ http.Header 11731} 11732 11733// Logging: Sets the logging service for a specific cluster. 11734func (r *ProjectsZonesClustersService) Logging(projectId string, zone string, clusterId string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsZonesClustersLoggingCall { 11735 c := &ProjectsZonesClustersLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11736 c.projectId = projectId 11737 c.zone = zone 11738 c.clusterId = clusterId 11739 c.setloggingservicerequest = setloggingservicerequest 11740 return c 11741} 11742 11743// Fields allows partial responses to be retrieved. See 11744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11745// for more information. 11746func (c *ProjectsZonesClustersLoggingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLoggingCall { 11747 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11748 return c 11749} 11750 11751// Context sets the context to be used in this call's Do method. Any 11752// pending HTTP request will be aborted if the provided context is 11753// canceled. 11754func (c *ProjectsZonesClustersLoggingCall) Context(ctx context.Context) *ProjectsZonesClustersLoggingCall { 11755 c.ctx_ = ctx 11756 return c 11757} 11758 11759// Header returns an http.Header that can be modified by the caller to 11760// add HTTP headers to the request. 11761func (c *ProjectsZonesClustersLoggingCall) Header() http.Header { 11762 if c.header_ == nil { 11763 c.header_ = make(http.Header) 11764 } 11765 return c.header_ 11766} 11767 11768func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) { 11769 reqHeaders := make(http.Header) 11770 for k, v := range c.header_ { 11771 reqHeaders[k] = v 11772 } 11773 reqHeaders.Set("User-Agent", c.s.userAgent()) 11774 var body io.Reader = nil 11775 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) 11776 if err != nil { 11777 return nil, err 11778 } 11779 reqHeaders.Set("Content-Type", "application/json") 11780 c.urlParams_.Set("alt", alt) 11781 c.urlParams_.Set("prettyPrint", "false") 11782 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") 11783 urls += "?" + c.urlParams_.Encode() 11784 req, err := http.NewRequest("POST", urls, body) 11785 if err != nil { 11786 return nil, err 11787 } 11788 req.Header = reqHeaders 11789 googleapi.Expand(req.URL, map[string]string{ 11790 "projectId": c.projectId, 11791 "zone": c.zone, 11792 "clusterId": c.clusterId, 11793 }) 11794 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11795} 11796 11797// Do executes the "container.projects.zones.clusters.logging" call. 11798// Exactly one of *Operation or error will be non-nil. Any non-2xx 11799// status code is an error. Response headers are in either 11800// *Operation.ServerResponse.Header or (if a response was returned at 11801// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11802// to check whether the returned error was because 11803// http.StatusNotModified was returned. 11804func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11805 gensupport.SetOptions(c.urlParams_, opts...) 11806 res, err := c.doRequest("json") 11807 if res != nil && res.StatusCode == http.StatusNotModified { 11808 if res.Body != nil { 11809 res.Body.Close() 11810 } 11811 return nil, &googleapi.Error{ 11812 Code: res.StatusCode, 11813 Header: res.Header, 11814 } 11815 } 11816 if err != nil { 11817 return nil, err 11818 } 11819 defer googleapi.CloseBody(res) 11820 if err := googleapi.CheckResponse(res); err != nil { 11821 return nil, err 11822 } 11823 ret := &Operation{ 11824 ServerResponse: googleapi.ServerResponse{ 11825 Header: res.Header, 11826 HTTPStatusCode: res.StatusCode, 11827 }, 11828 } 11829 target := &ret 11830 if err := gensupport.DecodeResponse(target, res); err != nil { 11831 return nil, err 11832 } 11833 return ret, nil 11834 // { 11835 // "description": "Sets the logging service for a specific cluster.", 11836 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", 11837 // "httpMethod": "POST", 11838 // "id": "container.projects.zones.clusters.logging", 11839 // "parameterOrder": [ 11840 // "projectId", 11841 // "zone", 11842 // "clusterId" 11843 // ], 11844 // "parameters": { 11845 // "clusterId": { 11846 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 11847 // "location": "path", 11848 // "required": true, 11849 // "type": "string" 11850 // }, 11851 // "projectId": { 11852 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 11853 // "location": "path", 11854 // "required": true, 11855 // "type": "string" 11856 // }, 11857 // "zone": { 11858 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 11859 // "location": "path", 11860 // "required": true, 11861 // "type": "string" 11862 // } 11863 // }, 11864 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", 11865 // "request": { 11866 // "$ref": "SetLoggingServiceRequest" 11867 // }, 11868 // "response": { 11869 // "$ref": "Operation" 11870 // }, 11871 // "scopes": [ 11872 // "https://www.googleapis.com/auth/cloud-platform" 11873 // ] 11874 // } 11875 11876} 11877 11878// method id "container.projects.zones.clusters.master": 11879 11880type ProjectsZonesClustersMasterCall struct { 11881 s *Service 11882 projectId string 11883 zone string 11884 clusterId string 11885 updatemasterrequest *UpdateMasterRequest 11886 urlParams_ gensupport.URLParams 11887 ctx_ context.Context 11888 header_ http.Header 11889} 11890 11891// Master: Updates the master for a specific cluster. 11892func (r *ProjectsZonesClustersService) Master(projectId string, zone string, clusterId string, updatemasterrequest *UpdateMasterRequest) *ProjectsZonesClustersMasterCall { 11893 c := &ProjectsZonesClustersMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11894 c.projectId = projectId 11895 c.zone = zone 11896 c.clusterId = clusterId 11897 c.updatemasterrequest = updatemasterrequest 11898 return c 11899} 11900 11901// Fields allows partial responses to be retrieved. See 11902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11903// for more information. 11904func (c *ProjectsZonesClustersMasterCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMasterCall { 11905 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11906 return c 11907} 11908 11909// Context sets the context to be used in this call's Do method. Any 11910// pending HTTP request will be aborted if the provided context is 11911// canceled. 11912func (c *ProjectsZonesClustersMasterCall) Context(ctx context.Context) *ProjectsZonesClustersMasterCall { 11913 c.ctx_ = ctx 11914 return c 11915} 11916 11917// Header returns an http.Header that can be modified by the caller to 11918// add HTTP headers to the request. 11919func (c *ProjectsZonesClustersMasterCall) Header() http.Header { 11920 if c.header_ == nil { 11921 c.header_ = make(http.Header) 11922 } 11923 return c.header_ 11924} 11925 11926func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) { 11927 reqHeaders := make(http.Header) 11928 for k, v := range c.header_ { 11929 reqHeaders[k] = v 11930 } 11931 reqHeaders.Set("User-Agent", c.s.userAgent()) 11932 var body io.Reader = nil 11933 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) 11934 if err != nil { 11935 return nil, err 11936 } 11937 reqHeaders.Set("Content-Type", "application/json") 11938 c.urlParams_.Set("alt", alt) 11939 c.urlParams_.Set("prettyPrint", "false") 11940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") 11941 urls += "?" + c.urlParams_.Encode() 11942 req, err := http.NewRequest("POST", urls, body) 11943 if err != nil { 11944 return nil, err 11945 } 11946 req.Header = reqHeaders 11947 googleapi.Expand(req.URL, map[string]string{ 11948 "projectId": c.projectId, 11949 "zone": c.zone, 11950 "clusterId": c.clusterId, 11951 }) 11952 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11953} 11954 11955// Do executes the "container.projects.zones.clusters.master" call. 11956// Exactly one of *Operation or error will be non-nil. Any non-2xx 11957// status code is an error. Response headers are in either 11958// *Operation.ServerResponse.Header or (if a response was returned at 11959// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11960// to check whether the returned error was because 11961// http.StatusNotModified was returned. 11962func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11963 gensupport.SetOptions(c.urlParams_, opts...) 11964 res, err := c.doRequest("json") 11965 if res != nil && res.StatusCode == http.StatusNotModified { 11966 if res.Body != nil { 11967 res.Body.Close() 11968 } 11969 return nil, &googleapi.Error{ 11970 Code: res.StatusCode, 11971 Header: res.Header, 11972 } 11973 } 11974 if err != nil { 11975 return nil, err 11976 } 11977 defer googleapi.CloseBody(res) 11978 if err := googleapi.CheckResponse(res); err != nil { 11979 return nil, err 11980 } 11981 ret := &Operation{ 11982 ServerResponse: googleapi.ServerResponse{ 11983 Header: res.Header, 11984 HTTPStatusCode: res.StatusCode, 11985 }, 11986 } 11987 target := &ret 11988 if err := gensupport.DecodeResponse(target, res); err != nil { 11989 return nil, err 11990 } 11991 return ret, nil 11992 // { 11993 // "description": "Updates the master for a specific cluster.", 11994 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", 11995 // "httpMethod": "POST", 11996 // "id": "container.projects.zones.clusters.master", 11997 // "parameterOrder": [ 11998 // "projectId", 11999 // "zone", 12000 // "clusterId" 12001 // ], 12002 // "parameters": { 12003 // "clusterId": { 12004 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 12005 // "location": "path", 12006 // "required": true, 12007 // "type": "string" 12008 // }, 12009 // "projectId": { 12010 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 12011 // "location": "path", 12012 // "required": true, 12013 // "type": "string" 12014 // }, 12015 // "zone": { 12016 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 12017 // "location": "path", 12018 // "required": true, 12019 // "type": "string" 12020 // } 12021 // }, 12022 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", 12023 // "request": { 12024 // "$ref": "UpdateMasterRequest" 12025 // }, 12026 // "response": { 12027 // "$ref": "Operation" 12028 // }, 12029 // "scopes": [ 12030 // "https://www.googleapis.com/auth/cloud-platform" 12031 // ] 12032 // } 12033 12034} 12035 12036// method id "container.projects.zones.clusters.monitoring": 12037 12038type ProjectsZonesClustersMonitoringCall struct { 12039 s *Service 12040 projectId string 12041 zone string 12042 clusterId string 12043 setmonitoringservicerequest *SetMonitoringServiceRequest 12044 urlParams_ gensupport.URLParams 12045 ctx_ context.Context 12046 header_ http.Header 12047} 12048 12049// Monitoring: Sets the monitoring service for a specific cluster. 12050func (r *ProjectsZonesClustersService) Monitoring(projectId string, zone string, clusterId string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsZonesClustersMonitoringCall { 12051 c := &ProjectsZonesClustersMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12052 c.projectId = projectId 12053 c.zone = zone 12054 c.clusterId = clusterId 12055 c.setmonitoringservicerequest = setmonitoringservicerequest 12056 return c 12057} 12058 12059// Fields allows partial responses to be retrieved. See 12060// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12061// for more information. 12062func (c *ProjectsZonesClustersMonitoringCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMonitoringCall { 12063 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12064 return c 12065} 12066 12067// Context sets the context to be used in this call's Do method. Any 12068// pending HTTP request will be aborted if the provided context is 12069// canceled. 12070func (c *ProjectsZonesClustersMonitoringCall) Context(ctx context.Context) *ProjectsZonesClustersMonitoringCall { 12071 c.ctx_ = ctx 12072 return c 12073} 12074 12075// Header returns an http.Header that can be modified by the caller to 12076// add HTTP headers to the request. 12077func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header { 12078 if c.header_ == nil { 12079 c.header_ = make(http.Header) 12080 } 12081 return c.header_ 12082} 12083 12084func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) { 12085 reqHeaders := make(http.Header) 12086 for k, v := range c.header_ { 12087 reqHeaders[k] = v 12088 } 12089 reqHeaders.Set("User-Agent", c.s.userAgent()) 12090 var body io.Reader = nil 12091 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) 12092 if err != nil { 12093 return nil, err 12094 } 12095 reqHeaders.Set("Content-Type", "application/json") 12096 c.urlParams_.Set("alt", alt) 12097 c.urlParams_.Set("prettyPrint", "false") 12098 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") 12099 urls += "?" + c.urlParams_.Encode() 12100 req, err := http.NewRequest("POST", urls, body) 12101 if err != nil { 12102 return nil, err 12103 } 12104 req.Header = reqHeaders 12105 googleapi.Expand(req.URL, map[string]string{ 12106 "projectId": c.projectId, 12107 "zone": c.zone, 12108 "clusterId": c.clusterId, 12109 }) 12110 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12111} 12112 12113// Do executes the "container.projects.zones.clusters.monitoring" call. 12114// Exactly one of *Operation or error will be non-nil. Any non-2xx 12115// status code is an error. Response headers are in either 12116// *Operation.ServerResponse.Header or (if a response was returned at 12117// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12118// to check whether the returned error was because 12119// http.StatusNotModified was returned. 12120func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12121 gensupport.SetOptions(c.urlParams_, opts...) 12122 res, err := c.doRequest("json") 12123 if res != nil && res.StatusCode == http.StatusNotModified { 12124 if res.Body != nil { 12125 res.Body.Close() 12126 } 12127 return nil, &googleapi.Error{ 12128 Code: res.StatusCode, 12129 Header: res.Header, 12130 } 12131 } 12132 if err != nil { 12133 return nil, err 12134 } 12135 defer googleapi.CloseBody(res) 12136 if err := googleapi.CheckResponse(res); err != nil { 12137 return nil, err 12138 } 12139 ret := &Operation{ 12140 ServerResponse: googleapi.ServerResponse{ 12141 Header: res.Header, 12142 HTTPStatusCode: res.StatusCode, 12143 }, 12144 } 12145 target := &ret 12146 if err := gensupport.DecodeResponse(target, res); err != nil { 12147 return nil, err 12148 } 12149 return ret, nil 12150 // { 12151 // "description": "Sets the monitoring service for a specific cluster.", 12152 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", 12153 // "httpMethod": "POST", 12154 // "id": "container.projects.zones.clusters.monitoring", 12155 // "parameterOrder": [ 12156 // "projectId", 12157 // "zone", 12158 // "clusterId" 12159 // ], 12160 // "parameters": { 12161 // "clusterId": { 12162 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 12163 // "location": "path", 12164 // "required": true, 12165 // "type": "string" 12166 // }, 12167 // "projectId": { 12168 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 12169 // "location": "path", 12170 // "required": true, 12171 // "type": "string" 12172 // }, 12173 // "zone": { 12174 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 12175 // "location": "path", 12176 // "required": true, 12177 // "type": "string" 12178 // } 12179 // }, 12180 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", 12181 // "request": { 12182 // "$ref": "SetMonitoringServiceRequest" 12183 // }, 12184 // "response": { 12185 // "$ref": "Operation" 12186 // }, 12187 // "scopes": [ 12188 // "https://www.googleapis.com/auth/cloud-platform" 12189 // ] 12190 // } 12191 12192} 12193 12194// method id "container.projects.zones.clusters.resourceLabels": 12195 12196type ProjectsZonesClustersResourceLabelsCall struct { 12197 s *Service 12198 projectId string 12199 zone string 12200 clusterId string 12201 setlabelsrequest *SetLabelsRequest 12202 urlParams_ gensupport.URLParams 12203 ctx_ context.Context 12204 header_ http.Header 12205} 12206 12207// ResourceLabels: Sets labels on a cluster. 12208func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall { 12209 c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12210 c.projectId = projectId 12211 c.zone = zone 12212 c.clusterId = clusterId 12213 c.setlabelsrequest = setlabelsrequest 12214 return c 12215} 12216 12217// Fields allows partial responses to be retrieved. See 12218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12219// for more information. 12220func (c *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall { 12221 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12222 return c 12223} 12224 12225// Context sets the context to be used in this call's Do method. Any 12226// pending HTTP request will be aborted if the provided context is 12227// canceled. 12228func (c *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall { 12229 c.ctx_ = ctx 12230 return c 12231} 12232 12233// Header returns an http.Header that can be modified by the caller to 12234// add HTTP headers to the request. 12235func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { 12236 if c.header_ == nil { 12237 c.header_ = make(http.Header) 12238 } 12239 return c.header_ 12240} 12241 12242func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) { 12243 reqHeaders := make(http.Header) 12244 for k, v := range c.header_ { 12245 reqHeaders[k] = v 12246 } 12247 reqHeaders.Set("User-Agent", c.s.userAgent()) 12248 var body io.Reader = nil 12249 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) 12250 if err != nil { 12251 return nil, err 12252 } 12253 reqHeaders.Set("Content-Type", "application/json") 12254 c.urlParams_.Set("alt", alt) 12255 c.urlParams_.Set("prettyPrint", "false") 12256 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") 12257 urls += "?" + c.urlParams_.Encode() 12258 req, err := http.NewRequest("POST", urls, body) 12259 if err != nil { 12260 return nil, err 12261 } 12262 req.Header = reqHeaders 12263 googleapi.Expand(req.URL, map[string]string{ 12264 "projectId": c.projectId, 12265 "zone": c.zone, 12266 "clusterId": c.clusterId, 12267 }) 12268 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12269} 12270 12271// Do executes the "container.projects.zones.clusters.resourceLabels" call. 12272// Exactly one of *Operation or error will be non-nil. Any non-2xx 12273// status code is an error. Response headers are in either 12274// *Operation.ServerResponse.Header or (if a response was returned at 12275// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12276// to check whether the returned error was because 12277// http.StatusNotModified was returned. 12278func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12279 gensupport.SetOptions(c.urlParams_, opts...) 12280 res, err := c.doRequest("json") 12281 if res != nil && res.StatusCode == http.StatusNotModified { 12282 if res.Body != nil { 12283 res.Body.Close() 12284 } 12285 return nil, &googleapi.Error{ 12286 Code: res.StatusCode, 12287 Header: res.Header, 12288 } 12289 } 12290 if err != nil { 12291 return nil, err 12292 } 12293 defer googleapi.CloseBody(res) 12294 if err := googleapi.CheckResponse(res); err != nil { 12295 return nil, err 12296 } 12297 ret := &Operation{ 12298 ServerResponse: googleapi.ServerResponse{ 12299 Header: res.Header, 12300 HTTPStatusCode: res.StatusCode, 12301 }, 12302 } 12303 target := &ret 12304 if err := gensupport.DecodeResponse(target, res); err != nil { 12305 return nil, err 12306 } 12307 return ret, nil 12308 // { 12309 // "description": "Sets labels on a cluster.", 12310 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", 12311 // "httpMethod": "POST", 12312 // "id": "container.projects.zones.clusters.resourceLabels", 12313 // "parameterOrder": [ 12314 // "projectId", 12315 // "zone", 12316 // "clusterId" 12317 // ], 12318 // "parameters": { 12319 // "clusterId": { 12320 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 12321 // "location": "path", 12322 // "required": true, 12323 // "type": "string" 12324 // }, 12325 // "projectId": { 12326 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 12327 // "location": "path", 12328 // "required": true, 12329 // "type": "string" 12330 // }, 12331 // "zone": { 12332 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 12333 // "location": "path", 12334 // "required": true, 12335 // "type": "string" 12336 // } 12337 // }, 12338 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", 12339 // "request": { 12340 // "$ref": "SetLabelsRequest" 12341 // }, 12342 // "response": { 12343 // "$ref": "Operation" 12344 // }, 12345 // "scopes": [ 12346 // "https://www.googleapis.com/auth/cloud-platform" 12347 // ] 12348 // } 12349 12350} 12351 12352// method id "container.projects.zones.clusters.setMaintenancePolicy": 12353 12354type ProjectsZonesClustersSetMaintenancePolicyCall struct { 12355 s *Service 12356 projectId string 12357 zone string 12358 clusterId string 12359 setmaintenancepolicyrequest *SetMaintenancePolicyRequest 12360 urlParams_ gensupport.URLParams 12361 ctx_ context.Context 12362 header_ http.Header 12363} 12364 12365// SetMaintenancePolicy: Sets the maintenance policy for a cluster. 12366func (r *ProjectsZonesClustersService) SetMaintenancePolicy(projectId string, zone string, clusterId string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsZonesClustersSetMaintenancePolicyCall { 12367 c := &ProjectsZonesClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12368 c.projectId = projectId 12369 c.zone = zone 12370 c.clusterId = clusterId 12371 c.setmaintenancepolicyrequest = setmaintenancepolicyrequest 12372 return c 12373} 12374 12375// Fields allows partial responses to be retrieved. See 12376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12377// for more information. 12378func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMaintenancePolicyCall { 12379 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12380 return c 12381} 12382 12383// Context sets the context to be used in this call's Do method. Any 12384// pending HTTP request will be aborted if the provided context is 12385// canceled. 12386func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetMaintenancePolicyCall { 12387 c.ctx_ = ctx 12388 return c 12389} 12390 12391// Header returns an http.Header that can be modified by the caller to 12392// add HTTP headers to the request. 12393func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header { 12394 if c.header_ == nil { 12395 c.header_ = make(http.Header) 12396 } 12397 return c.header_ 12398} 12399 12400func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { 12401 reqHeaders := make(http.Header) 12402 for k, v := range c.header_ { 12403 reqHeaders[k] = v 12404 } 12405 reqHeaders.Set("User-Agent", c.s.userAgent()) 12406 var body io.Reader = nil 12407 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest) 12408 if err != nil { 12409 return nil, err 12410 } 12411 reqHeaders.Set("Content-Type", "application/json") 12412 c.urlParams_.Set("alt", alt) 12413 c.urlParams_.Set("prettyPrint", "false") 12414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") 12415 urls += "?" + c.urlParams_.Encode() 12416 req, err := http.NewRequest("POST", urls, body) 12417 if err != nil { 12418 return nil, err 12419 } 12420 req.Header = reqHeaders 12421 googleapi.Expand(req.URL, map[string]string{ 12422 "projectId": c.projectId, 12423 "zone": c.zone, 12424 "clusterId": c.clusterId, 12425 }) 12426 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12427} 12428 12429// Do executes the "container.projects.zones.clusters.setMaintenancePolicy" call. 12430// Exactly one of *Operation or error will be non-nil. Any non-2xx 12431// status code is an error. Response headers are in either 12432// *Operation.ServerResponse.Header or (if a response was returned at 12433// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12434// to check whether the returned error was because 12435// http.StatusNotModified was returned. 12436func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12437 gensupport.SetOptions(c.urlParams_, opts...) 12438 res, err := c.doRequest("json") 12439 if res != nil && res.StatusCode == http.StatusNotModified { 12440 if res.Body != nil { 12441 res.Body.Close() 12442 } 12443 return nil, &googleapi.Error{ 12444 Code: res.StatusCode, 12445 Header: res.Header, 12446 } 12447 } 12448 if err != nil { 12449 return nil, err 12450 } 12451 defer googleapi.CloseBody(res) 12452 if err := googleapi.CheckResponse(res); err != nil { 12453 return nil, err 12454 } 12455 ret := &Operation{ 12456 ServerResponse: googleapi.ServerResponse{ 12457 Header: res.Header, 12458 HTTPStatusCode: res.StatusCode, 12459 }, 12460 } 12461 target := &ret 12462 if err := gensupport.DecodeResponse(target, res); err != nil { 12463 return nil, err 12464 } 12465 return ret, nil 12466 // { 12467 // "description": "Sets the maintenance policy for a cluster.", 12468 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", 12469 // "httpMethod": "POST", 12470 // "id": "container.projects.zones.clusters.setMaintenancePolicy", 12471 // "parameterOrder": [ 12472 // "projectId", 12473 // "zone", 12474 // "clusterId" 12475 // ], 12476 // "parameters": { 12477 // "clusterId": { 12478 // "description": "The name of the cluster to update.", 12479 // "location": "path", 12480 // "required": true, 12481 // "type": "string" 12482 // }, 12483 // "projectId": { 12484 // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", 12485 // "location": "path", 12486 // "required": true, 12487 // "type": "string" 12488 // }, 12489 // "zone": { 12490 // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", 12491 // "location": "path", 12492 // "required": true, 12493 // "type": "string" 12494 // } 12495 // }, 12496 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", 12497 // "request": { 12498 // "$ref": "SetMaintenancePolicyRequest" 12499 // }, 12500 // "response": { 12501 // "$ref": "Operation" 12502 // }, 12503 // "scopes": [ 12504 // "https://www.googleapis.com/auth/cloud-platform" 12505 // ] 12506 // } 12507 12508} 12509 12510// method id "container.projects.zones.clusters.setMasterAuth": 12511 12512type ProjectsZonesClustersSetMasterAuthCall struct { 12513 s *Service 12514 projectId string 12515 zone string 12516 clusterId string 12517 setmasterauthrequest *SetMasterAuthRequest 12518 urlParams_ gensupport.URLParams 12519 ctx_ context.Context 12520 header_ http.Header 12521} 12522 12523// SetMasterAuth: Sets master auth materials. Currently supports 12524// changing the admin password 12525// or a specific cluster, either via password generation or explicitly 12526// setting 12527// the password. 12528func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { 12529 c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12530 c.projectId = projectId 12531 c.zone = zone 12532 c.clusterId = clusterId 12533 c.setmasterauthrequest = setmasterauthrequest 12534 return c 12535} 12536 12537// Fields allows partial responses to be retrieved. See 12538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12539// for more information. 12540func (c *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall { 12541 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12542 return c 12543} 12544 12545// Context sets the context to be used in this call's Do method. Any 12546// pending HTTP request will be aborted if the provided context is 12547// canceled. 12548func (c *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall { 12549 c.ctx_ = ctx 12550 return c 12551} 12552 12553// Header returns an http.Header that can be modified by the caller to 12554// add HTTP headers to the request. 12555func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { 12556 if c.header_ == nil { 12557 c.header_ = make(http.Header) 12558 } 12559 return c.header_ 12560} 12561 12562func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { 12563 reqHeaders := make(http.Header) 12564 for k, v := range c.header_ { 12565 reqHeaders[k] = v 12566 } 12567 reqHeaders.Set("User-Agent", c.s.userAgent()) 12568 var body io.Reader = nil 12569 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) 12570 if err != nil { 12571 return nil, err 12572 } 12573 reqHeaders.Set("Content-Type", "application/json") 12574 c.urlParams_.Set("alt", alt) 12575 c.urlParams_.Set("prettyPrint", "false") 12576 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") 12577 urls += "?" + c.urlParams_.Encode() 12578 req, err := http.NewRequest("POST", urls, body) 12579 if err != nil { 12580 return nil, err 12581 } 12582 req.Header = reqHeaders 12583 googleapi.Expand(req.URL, map[string]string{ 12584 "projectId": c.projectId, 12585 "zone": c.zone, 12586 "clusterId": c.clusterId, 12587 }) 12588 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12589} 12590 12591// Do executes the "container.projects.zones.clusters.setMasterAuth" call. 12592// Exactly one of *Operation or error will be non-nil. Any non-2xx 12593// status code is an error. Response headers are in either 12594// *Operation.ServerResponse.Header or (if a response was returned at 12595// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12596// to check whether the returned error was because 12597// http.StatusNotModified was returned. 12598func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12599 gensupport.SetOptions(c.urlParams_, opts...) 12600 res, err := c.doRequest("json") 12601 if res != nil && res.StatusCode == http.StatusNotModified { 12602 if res.Body != nil { 12603 res.Body.Close() 12604 } 12605 return nil, &googleapi.Error{ 12606 Code: res.StatusCode, 12607 Header: res.Header, 12608 } 12609 } 12610 if err != nil { 12611 return nil, err 12612 } 12613 defer googleapi.CloseBody(res) 12614 if err := googleapi.CheckResponse(res); err != nil { 12615 return nil, err 12616 } 12617 ret := &Operation{ 12618 ServerResponse: googleapi.ServerResponse{ 12619 Header: res.Header, 12620 HTTPStatusCode: res.StatusCode, 12621 }, 12622 } 12623 target := &ret 12624 if err := gensupport.DecodeResponse(target, res); err != nil { 12625 return nil, err 12626 } 12627 return ret, nil 12628 // { 12629 // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", 12630 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", 12631 // "httpMethod": "POST", 12632 // "id": "container.projects.zones.clusters.setMasterAuth", 12633 // "parameterOrder": [ 12634 // "projectId", 12635 // "zone", 12636 // "clusterId" 12637 // ], 12638 // "parameters": { 12639 // "clusterId": { 12640 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 12641 // "location": "path", 12642 // "required": true, 12643 // "type": "string" 12644 // }, 12645 // "projectId": { 12646 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 12647 // "location": "path", 12648 // "required": true, 12649 // "type": "string" 12650 // }, 12651 // "zone": { 12652 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 12653 // "location": "path", 12654 // "required": true, 12655 // "type": "string" 12656 // } 12657 // }, 12658 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", 12659 // "request": { 12660 // "$ref": "SetMasterAuthRequest" 12661 // }, 12662 // "response": { 12663 // "$ref": "Operation" 12664 // }, 12665 // "scopes": [ 12666 // "https://www.googleapis.com/auth/cloud-platform" 12667 // ] 12668 // } 12669 12670} 12671 12672// method id "container.projects.zones.clusters.setNetworkPolicy": 12673 12674type ProjectsZonesClustersSetNetworkPolicyCall struct { 12675 s *Service 12676 projectId string 12677 zone string 12678 clusterId string 12679 setnetworkpolicyrequest *SetNetworkPolicyRequest 12680 urlParams_ gensupport.URLParams 12681 ctx_ context.Context 12682 header_ http.Header 12683} 12684 12685// SetNetworkPolicy: Enables or disables Network Policy for a cluster. 12686func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { 12687 c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12688 c.projectId = projectId 12689 c.zone = zone 12690 c.clusterId = clusterId 12691 c.setnetworkpolicyrequest = setnetworkpolicyrequest 12692 return c 12693} 12694 12695// Fields allows partial responses to be retrieved. See 12696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12697// for more information. 12698func (c *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall { 12699 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12700 return c 12701} 12702 12703// Context sets the context to be used in this call's Do method. Any 12704// pending HTTP request will be aborted if the provided context is 12705// canceled. 12706func (c *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall { 12707 c.ctx_ = ctx 12708 return c 12709} 12710 12711// Header returns an http.Header that can be modified by the caller to 12712// add HTTP headers to the request. 12713func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { 12714 if c.header_ == nil { 12715 c.header_ = make(http.Header) 12716 } 12717 return c.header_ 12718} 12719 12720func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { 12721 reqHeaders := make(http.Header) 12722 for k, v := range c.header_ { 12723 reqHeaders[k] = v 12724 } 12725 reqHeaders.Set("User-Agent", c.s.userAgent()) 12726 var body io.Reader = nil 12727 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) 12728 if err != nil { 12729 return nil, err 12730 } 12731 reqHeaders.Set("Content-Type", "application/json") 12732 c.urlParams_.Set("alt", alt) 12733 c.urlParams_.Set("prettyPrint", "false") 12734 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") 12735 urls += "?" + c.urlParams_.Encode() 12736 req, err := http.NewRequest("POST", urls, body) 12737 if err != nil { 12738 return nil, err 12739 } 12740 req.Header = reqHeaders 12741 googleapi.Expand(req.URL, map[string]string{ 12742 "projectId": c.projectId, 12743 "zone": c.zone, 12744 "clusterId": c.clusterId, 12745 }) 12746 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12747} 12748 12749// Do executes the "container.projects.zones.clusters.setNetworkPolicy" call. 12750// Exactly one of *Operation or error will be non-nil. Any non-2xx 12751// status code is an error. Response headers are in either 12752// *Operation.ServerResponse.Header or (if a response was returned at 12753// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12754// to check whether the returned error was because 12755// http.StatusNotModified was returned. 12756func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12757 gensupport.SetOptions(c.urlParams_, opts...) 12758 res, err := c.doRequest("json") 12759 if res != nil && res.StatusCode == http.StatusNotModified { 12760 if res.Body != nil { 12761 res.Body.Close() 12762 } 12763 return nil, &googleapi.Error{ 12764 Code: res.StatusCode, 12765 Header: res.Header, 12766 } 12767 } 12768 if err != nil { 12769 return nil, err 12770 } 12771 defer googleapi.CloseBody(res) 12772 if err := googleapi.CheckResponse(res); err != nil { 12773 return nil, err 12774 } 12775 ret := &Operation{ 12776 ServerResponse: googleapi.ServerResponse{ 12777 Header: res.Header, 12778 HTTPStatusCode: res.StatusCode, 12779 }, 12780 } 12781 target := &ret 12782 if err := gensupport.DecodeResponse(target, res); err != nil { 12783 return nil, err 12784 } 12785 return ret, nil 12786 // { 12787 // "description": "Enables or disables Network Policy for a cluster.", 12788 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", 12789 // "httpMethod": "POST", 12790 // "id": "container.projects.zones.clusters.setNetworkPolicy", 12791 // "parameterOrder": [ 12792 // "projectId", 12793 // "zone", 12794 // "clusterId" 12795 // ], 12796 // "parameters": { 12797 // "clusterId": { 12798 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 12799 // "location": "path", 12800 // "required": true, 12801 // "type": "string" 12802 // }, 12803 // "projectId": { 12804 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 12805 // "location": "path", 12806 // "required": true, 12807 // "type": "string" 12808 // }, 12809 // "zone": { 12810 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 12811 // "location": "path", 12812 // "required": true, 12813 // "type": "string" 12814 // } 12815 // }, 12816 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", 12817 // "request": { 12818 // "$ref": "SetNetworkPolicyRequest" 12819 // }, 12820 // "response": { 12821 // "$ref": "Operation" 12822 // }, 12823 // "scopes": [ 12824 // "https://www.googleapis.com/auth/cloud-platform" 12825 // ] 12826 // } 12827 12828} 12829 12830// method id "container.projects.zones.clusters.startIpRotation": 12831 12832type ProjectsZonesClustersStartIpRotationCall struct { 12833 s *Service 12834 projectId string 12835 zone string 12836 clusterId string 12837 startiprotationrequest *StartIPRotationRequest 12838 urlParams_ gensupport.URLParams 12839 ctx_ context.Context 12840 header_ http.Header 12841} 12842 12843// StartIpRotation: Starts master IP rotation. 12844func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { 12845 c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12846 c.projectId = projectId 12847 c.zone = zone 12848 c.clusterId = clusterId 12849 c.startiprotationrequest = startiprotationrequest 12850 return c 12851} 12852 12853// Fields allows partial responses to be retrieved. See 12854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12855// for more information. 12856func (c *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall { 12857 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12858 return c 12859} 12860 12861// Context sets the context to be used in this call's Do method. Any 12862// pending HTTP request will be aborted if the provided context is 12863// canceled. 12864func (c *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall { 12865 c.ctx_ = ctx 12866 return c 12867} 12868 12869// Header returns an http.Header that can be modified by the caller to 12870// add HTTP headers to the request. 12871func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { 12872 if c.header_ == nil { 12873 c.header_ = make(http.Header) 12874 } 12875 return c.header_ 12876} 12877 12878func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { 12879 reqHeaders := make(http.Header) 12880 for k, v := range c.header_ { 12881 reqHeaders[k] = v 12882 } 12883 reqHeaders.Set("User-Agent", c.s.userAgent()) 12884 var body io.Reader = nil 12885 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) 12886 if err != nil { 12887 return nil, err 12888 } 12889 reqHeaders.Set("Content-Type", "application/json") 12890 c.urlParams_.Set("alt", alt) 12891 c.urlParams_.Set("prettyPrint", "false") 12892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") 12893 urls += "?" + c.urlParams_.Encode() 12894 req, err := http.NewRequest("POST", urls, body) 12895 if err != nil { 12896 return nil, err 12897 } 12898 req.Header = reqHeaders 12899 googleapi.Expand(req.URL, map[string]string{ 12900 "projectId": c.projectId, 12901 "zone": c.zone, 12902 "clusterId": c.clusterId, 12903 }) 12904 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12905} 12906 12907// Do executes the "container.projects.zones.clusters.startIpRotation" call. 12908// Exactly one of *Operation or error will be non-nil. Any non-2xx 12909// status code is an error. Response headers are in either 12910// *Operation.ServerResponse.Header or (if a response was returned at 12911// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12912// to check whether the returned error was because 12913// http.StatusNotModified was returned. 12914func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12915 gensupport.SetOptions(c.urlParams_, opts...) 12916 res, err := c.doRequest("json") 12917 if res != nil && res.StatusCode == http.StatusNotModified { 12918 if res.Body != nil { 12919 res.Body.Close() 12920 } 12921 return nil, &googleapi.Error{ 12922 Code: res.StatusCode, 12923 Header: res.Header, 12924 } 12925 } 12926 if err != nil { 12927 return nil, err 12928 } 12929 defer googleapi.CloseBody(res) 12930 if err := googleapi.CheckResponse(res); err != nil { 12931 return nil, err 12932 } 12933 ret := &Operation{ 12934 ServerResponse: googleapi.ServerResponse{ 12935 Header: res.Header, 12936 HTTPStatusCode: res.StatusCode, 12937 }, 12938 } 12939 target := &ret 12940 if err := gensupport.DecodeResponse(target, res); err != nil { 12941 return nil, err 12942 } 12943 return ret, nil 12944 // { 12945 // "description": "Starts master IP rotation.", 12946 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", 12947 // "httpMethod": "POST", 12948 // "id": "container.projects.zones.clusters.startIpRotation", 12949 // "parameterOrder": [ 12950 // "projectId", 12951 // "zone", 12952 // "clusterId" 12953 // ], 12954 // "parameters": { 12955 // "clusterId": { 12956 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 12957 // "location": "path", 12958 // "required": true, 12959 // "type": "string" 12960 // }, 12961 // "projectId": { 12962 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 12963 // "location": "path", 12964 // "required": true, 12965 // "type": "string" 12966 // }, 12967 // "zone": { 12968 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 12969 // "location": "path", 12970 // "required": true, 12971 // "type": "string" 12972 // } 12973 // }, 12974 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", 12975 // "request": { 12976 // "$ref": "StartIPRotationRequest" 12977 // }, 12978 // "response": { 12979 // "$ref": "Operation" 12980 // }, 12981 // "scopes": [ 12982 // "https://www.googleapis.com/auth/cloud-platform" 12983 // ] 12984 // } 12985 12986} 12987 12988// method id "container.projects.zones.clusters.update": 12989 12990type ProjectsZonesClustersUpdateCall struct { 12991 s *Service 12992 projectId string 12993 zone string 12994 clusterId string 12995 updateclusterrequest *UpdateClusterRequest 12996 urlParams_ gensupport.URLParams 12997 ctx_ context.Context 12998 header_ http.Header 12999} 13000 13001// Update: Updates the settings for a specific cluster. 13002func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall { 13003 c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13004 c.projectId = projectId 13005 c.zone = zone 13006 c.clusterId = clusterId 13007 c.updateclusterrequest = updateclusterrequest 13008 return c 13009} 13010 13011// Fields allows partial responses to be retrieved. See 13012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13013// for more information. 13014func (c *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall { 13015 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13016 return c 13017} 13018 13019// Context sets the context to be used in this call's Do method. Any 13020// pending HTTP request will be aborted if the provided context is 13021// canceled. 13022func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall { 13023 c.ctx_ = ctx 13024 return c 13025} 13026 13027// Header returns an http.Header that can be modified by the caller to 13028// add HTTP headers to the request. 13029func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { 13030 if c.header_ == nil { 13031 c.header_ = make(http.Header) 13032 } 13033 return c.header_ 13034} 13035 13036func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { 13037 reqHeaders := make(http.Header) 13038 for k, v := range c.header_ { 13039 reqHeaders[k] = v 13040 } 13041 reqHeaders.Set("User-Agent", c.s.userAgent()) 13042 var body io.Reader = nil 13043 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) 13044 if err != nil { 13045 return nil, err 13046 } 13047 reqHeaders.Set("Content-Type", "application/json") 13048 c.urlParams_.Set("alt", alt) 13049 c.urlParams_.Set("prettyPrint", "false") 13050 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 13051 urls += "?" + c.urlParams_.Encode() 13052 req, err := http.NewRequest("PUT", urls, body) 13053 if err != nil { 13054 return nil, err 13055 } 13056 req.Header = reqHeaders 13057 googleapi.Expand(req.URL, map[string]string{ 13058 "projectId": c.projectId, 13059 "zone": c.zone, 13060 "clusterId": c.clusterId, 13061 }) 13062 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13063} 13064 13065// Do executes the "container.projects.zones.clusters.update" call. 13066// Exactly one of *Operation or error will be non-nil. Any non-2xx 13067// status code is an error. Response headers are in either 13068// *Operation.ServerResponse.Header or (if a response was returned at 13069// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13070// to check whether the returned error was because 13071// http.StatusNotModified was returned. 13072func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13073 gensupport.SetOptions(c.urlParams_, opts...) 13074 res, err := c.doRequest("json") 13075 if res != nil && res.StatusCode == http.StatusNotModified { 13076 if res.Body != nil { 13077 res.Body.Close() 13078 } 13079 return nil, &googleapi.Error{ 13080 Code: res.StatusCode, 13081 Header: res.Header, 13082 } 13083 } 13084 if err != nil { 13085 return nil, err 13086 } 13087 defer googleapi.CloseBody(res) 13088 if err := googleapi.CheckResponse(res); err != nil { 13089 return nil, err 13090 } 13091 ret := &Operation{ 13092 ServerResponse: googleapi.ServerResponse{ 13093 Header: res.Header, 13094 HTTPStatusCode: res.StatusCode, 13095 }, 13096 } 13097 target := &ret 13098 if err := gensupport.DecodeResponse(target, res); err != nil { 13099 return nil, err 13100 } 13101 return ret, nil 13102 // { 13103 // "description": "Updates the settings for a specific cluster.", 13104 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 13105 // "httpMethod": "PUT", 13106 // "id": "container.projects.zones.clusters.update", 13107 // "parameterOrder": [ 13108 // "projectId", 13109 // "zone", 13110 // "clusterId" 13111 // ], 13112 // "parameters": { 13113 // "clusterId": { 13114 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 13115 // "location": "path", 13116 // "required": true, 13117 // "type": "string" 13118 // }, 13119 // "projectId": { 13120 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 13121 // "location": "path", 13122 // "required": true, 13123 // "type": "string" 13124 // }, 13125 // "zone": { 13126 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 13127 // "location": "path", 13128 // "required": true, 13129 // "type": "string" 13130 // } 13131 // }, 13132 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 13133 // "request": { 13134 // "$ref": "UpdateClusterRequest" 13135 // }, 13136 // "response": { 13137 // "$ref": "Operation" 13138 // }, 13139 // "scopes": [ 13140 // "https://www.googleapis.com/auth/cloud-platform" 13141 // ] 13142 // } 13143 13144} 13145 13146// method id "container.projects.zones.clusters.nodePools.autoscaling": 13147 13148type ProjectsZonesClustersNodePoolsAutoscalingCall struct { 13149 s *Service 13150 projectId string 13151 zone string 13152 clusterId string 13153 nodePoolId string 13154 setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest 13155 urlParams_ gensupport.URLParams 13156 ctx_ context.Context 13157 header_ http.Header 13158} 13159 13160// Autoscaling: Sets the autoscaling settings of a specific node pool. 13161func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall { 13162 c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13163 c.projectId = projectId 13164 c.zone = zone 13165 c.clusterId = clusterId 13166 c.nodePoolId = nodePoolId 13167 c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest 13168 return c 13169} 13170 13171// Fields allows partial responses to be retrieved. See 13172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13173// for more information. 13174func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsAutoscalingCall { 13175 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13176 return c 13177} 13178 13179// Context sets the context to be used in this call's Do method. Any 13180// pending HTTP request will be aborted if the provided context is 13181// canceled. 13182func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsAutoscalingCall { 13183 c.ctx_ = ctx 13184 return c 13185} 13186 13187// Header returns an http.Header that can be modified by the caller to 13188// add HTTP headers to the request. 13189func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header { 13190 if c.header_ == nil { 13191 c.header_ = make(http.Header) 13192 } 13193 return c.header_ 13194} 13195 13196func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) { 13197 reqHeaders := make(http.Header) 13198 for k, v := range c.header_ { 13199 reqHeaders[k] = v 13200 } 13201 reqHeaders.Set("User-Agent", c.s.userAgent()) 13202 var body io.Reader = nil 13203 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) 13204 if err != nil { 13205 return nil, err 13206 } 13207 reqHeaders.Set("Content-Type", "application/json") 13208 c.urlParams_.Set("alt", alt) 13209 c.urlParams_.Set("prettyPrint", "false") 13210 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") 13211 urls += "?" + c.urlParams_.Encode() 13212 req, err := http.NewRequest("POST", urls, body) 13213 if err != nil { 13214 return nil, err 13215 } 13216 req.Header = reqHeaders 13217 googleapi.Expand(req.URL, map[string]string{ 13218 "projectId": c.projectId, 13219 "zone": c.zone, 13220 "clusterId": c.clusterId, 13221 "nodePoolId": c.nodePoolId, 13222 }) 13223 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13224} 13225 13226// Do executes the "container.projects.zones.clusters.nodePools.autoscaling" call. 13227// Exactly one of *Operation or error will be non-nil. Any non-2xx 13228// status code is an error. Response headers are in either 13229// *Operation.ServerResponse.Header or (if a response was returned at 13230// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13231// to check whether the returned error was because 13232// http.StatusNotModified was returned. 13233func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13234 gensupport.SetOptions(c.urlParams_, opts...) 13235 res, err := c.doRequest("json") 13236 if res != nil && res.StatusCode == http.StatusNotModified { 13237 if res.Body != nil { 13238 res.Body.Close() 13239 } 13240 return nil, &googleapi.Error{ 13241 Code: res.StatusCode, 13242 Header: res.Header, 13243 } 13244 } 13245 if err != nil { 13246 return nil, err 13247 } 13248 defer googleapi.CloseBody(res) 13249 if err := googleapi.CheckResponse(res); err != nil { 13250 return nil, err 13251 } 13252 ret := &Operation{ 13253 ServerResponse: googleapi.ServerResponse{ 13254 Header: res.Header, 13255 HTTPStatusCode: res.StatusCode, 13256 }, 13257 } 13258 target := &ret 13259 if err := gensupport.DecodeResponse(target, res); err != nil { 13260 return nil, err 13261 } 13262 return ret, nil 13263 // { 13264 // "description": "Sets the autoscaling settings of a specific node pool.", 13265 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", 13266 // "httpMethod": "POST", 13267 // "id": "container.projects.zones.clusters.nodePools.autoscaling", 13268 // "parameterOrder": [ 13269 // "projectId", 13270 // "zone", 13271 // "clusterId", 13272 // "nodePoolId" 13273 // ], 13274 // "parameters": { 13275 // "clusterId": { 13276 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 13277 // "location": "path", 13278 // "required": true, 13279 // "type": "string" 13280 // }, 13281 // "nodePoolId": { 13282 // "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", 13283 // "location": "path", 13284 // "required": true, 13285 // "type": "string" 13286 // }, 13287 // "projectId": { 13288 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 13289 // "location": "path", 13290 // "required": true, 13291 // "type": "string" 13292 // }, 13293 // "zone": { 13294 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 13295 // "location": "path", 13296 // "required": true, 13297 // "type": "string" 13298 // } 13299 // }, 13300 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", 13301 // "request": { 13302 // "$ref": "SetNodePoolAutoscalingRequest" 13303 // }, 13304 // "response": { 13305 // "$ref": "Operation" 13306 // }, 13307 // "scopes": [ 13308 // "https://www.googleapis.com/auth/cloud-platform" 13309 // ] 13310 // } 13311 13312} 13313 13314// method id "container.projects.zones.clusters.nodePools.create": 13315 13316type ProjectsZonesClustersNodePoolsCreateCall struct { 13317 s *Service 13318 projectId string 13319 zone string 13320 clusterId string 13321 createnodepoolrequest *CreateNodePoolRequest 13322 urlParams_ gensupport.URLParams 13323 ctx_ context.Context 13324 header_ http.Header 13325} 13326 13327// Create: Creates a node pool for a cluster. 13328func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall { 13329 c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13330 c.projectId = projectId 13331 c.zone = zone 13332 c.clusterId = clusterId 13333 c.createnodepoolrequest = createnodepoolrequest 13334 return c 13335} 13336 13337// Fields allows partial responses to be retrieved. See 13338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13339// for more information. 13340func (c *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall { 13341 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13342 return c 13343} 13344 13345// Context sets the context to be used in this call's Do method. Any 13346// pending HTTP request will be aborted if the provided context is 13347// canceled. 13348func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { 13349 c.ctx_ = ctx 13350 return c 13351} 13352 13353// Header returns an http.Header that can be modified by the caller to 13354// add HTTP headers to the request. 13355func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { 13356 if c.header_ == nil { 13357 c.header_ = make(http.Header) 13358 } 13359 return c.header_ 13360} 13361 13362func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { 13363 reqHeaders := make(http.Header) 13364 for k, v := range c.header_ { 13365 reqHeaders[k] = v 13366 } 13367 reqHeaders.Set("User-Agent", c.s.userAgent()) 13368 var body io.Reader = nil 13369 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) 13370 if err != nil { 13371 return nil, err 13372 } 13373 reqHeaders.Set("Content-Type", "application/json") 13374 c.urlParams_.Set("alt", alt) 13375 c.urlParams_.Set("prettyPrint", "false") 13376 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") 13377 urls += "?" + c.urlParams_.Encode() 13378 req, err := http.NewRequest("POST", urls, body) 13379 if err != nil { 13380 return nil, err 13381 } 13382 req.Header = reqHeaders 13383 googleapi.Expand(req.URL, map[string]string{ 13384 "projectId": c.projectId, 13385 "zone": c.zone, 13386 "clusterId": c.clusterId, 13387 }) 13388 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13389} 13390 13391// Do executes the "container.projects.zones.clusters.nodePools.create" call. 13392// Exactly one of *Operation or error will be non-nil. Any non-2xx 13393// status code is an error. Response headers are in either 13394// *Operation.ServerResponse.Header or (if a response was returned at 13395// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13396// to check whether the returned error was because 13397// http.StatusNotModified was returned. 13398func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13399 gensupport.SetOptions(c.urlParams_, opts...) 13400 res, err := c.doRequest("json") 13401 if res != nil && res.StatusCode == http.StatusNotModified { 13402 if res.Body != nil { 13403 res.Body.Close() 13404 } 13405 return nil, &googleapi.Error{ 13406 Code: res.StatusCode, 13407 Header: res.Header, 13408 } 13409 } 13410 if err != nil { 13411 return nil, err 13412 } 13413 defer googleapi.CloseBody(res) 13414 if err := googleapi.CheckResponse(res); err != nil { 13415 return nil, err 13416 } 13417 ret := &Operation{ 13418 ServerResponse: googleapi.ServerResponse{ 13419 Header: res.Header, 13420 HTTPStatusCode: res.StatusCode, 13421 }, 13422 } 13423 target := &ret 13424 if err := gensupport.DecodeResponse(target, res); err != nil { 13425 return nil, err 13426 } 13427 return ret, nil 13428 // { 13429 // "description": "Creates a node pool for a cluster.", 13430 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 13431 // "httpMethod": "POST", 13432 // "id": "container.projects.zones.clusters.nodePools.create", 13433 // "parameterOrder": [ 13434 // "projectId", 13435 // "zone", 13436 // "clusterId" 13437 // ], 13438 // "parameters": { 13439 // "clusterId": { 13440 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", 13441 // "location": "path", 13442 // "required": true, 13443 // "type": "string" 13444 // }, 13445 // "projectId": { 13446 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", 13447 // "location": "path", 13448 // "required": true, 13449 // "type": "string" 13450 // }, 13451 // "zone": { 13452 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", 13453 // "location": "path", 13454 // "required": true, 13455 // "type": "string" 13456 // } 13457 // }, 13458 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 13459 // "request": { 13460 // "$ref": "CreateNodePoolRequest" 13461 // }, 13462 // "response": { 13463 // "$ref": "Operation" 13464 // }, 13465 // "scopes": [ 13466 // "https://www.googleapis.com/auth/cloud-platform" 13467 // ] 13468 // } 13469 13470} 13471 13472// method id "container.projects.zones.clusters.nodePools.delete": 13473 13474type ProjectsZonesClustersNodePoolsDeleteCall struct { 13475 s *Service 13476 projectId string 13477 zone string 13478 clusterId string 13479 nodePoolId string 13480 urlParams_ gensupport.URLParams 13481 ctx_ context.Context 13482 header_ http.Header 13483} 13484 13485// Delete: Deletes a node pool from a cluster. 13486func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall { 13487 c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13488 c.projectId = projectId 13489 c.zone = zone 13490 c.clusterId = clusterId 13491 c.nodePoolId = nodePoolId 13492 return c 13493} 13494 13495// Name sets the optional parameter "name": The name (project, location, 13496// cluster, node pool id) of the node pool to 13497// delete. Specified in the 13498// format 13499// 'projects/*/locations/*/clusters/*/nodePools/*'. 13500func (c *ProjectsZonesClustersNodePoolsDeleteCall) Name(name string) *ProjectsZonesClustersNodePoolsDeleteCall { 13501 c.urlParams_.Set("name", name) 13502 return c 13503} 13504 13505// Fields allows partial responses to be retrieved. See 13506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13507// for more information. 13508func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall { 13509 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13510 return c 13511} 13512 13513// Context sets the context to be used in this call's Do method. Any 13514// pending HTTP request will be aborted if the provided context is 13515// canceled. 13516func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { 13517 c.ctx_ = ctx 13518 return c 13519} 13520 13521// Header returns an http.Header that can be modified by the caller to 13522// add HTTP headers to the request. 13523func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { 13524 if c.header_ == nil { 13525 c.header_ = make(http.Header) 13526 } 13527 return c.header_ 13528} 13529 13530func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 13531 reqHeaders := make(http.Header) 13532 for k, v := range c.header_ { 13533 reqHeaders[k] = v 13534 } 13535 reqHeaders.Set("User-Agent", c.s.userAgent()) 13536 var body io.Reader = nil 13537 c.urlParams_.Set("alt", alt) 13538 c.urlParams_.Set("prettyPrint", "false") 13539 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") 13540 urls += "?" + c.urlParams_.Encode() 13541 req, err := http.NewRequest("DELETE", urls, body) 13542 if err != nil { 13543 return nil, err 13544 } 13545 req.Header = reqHeaders 13546 googleapi.Expand(req.URL, map[string]string{ 13547 "projectId": c.projectId, 13548 "zone": c.zone, 13549 "clusterId": c.clusterId, 13550 "nodePoolId": c.nodePoolId, 13551 }) 13552 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13553} 13554 13555// Do executes the "container.projects.zones.clusters.nodePools.delete" call. 13556// Exactly one of *Operation or error will be non-nil. Any non-2xx 13557// status code is an error. Response headers are in either 13558// *Operation.ServerResponse.Header or (if a response was returned at 13559// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13560// to check whether the returned error was because 13561// http.StatusNotModified was returned. 13562func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13563 gensupport.SetOptions(c.urlParams_, opts...) 13564 res, err := c.doRequest("json") 13565 if res != nil && res.StatusCode == http.StatusNotModified { 13566 if res.Body != nil { 13567 res.Body.Close() 13568 } 13569 return nil, &googleapi.Error{ 13570 Code: res.StatusCode, 13571 Header: res.Header, 13572 } 13573 } 13574 if err != nil { 13575 return nil, err 13576 } 13577 defer googleapi.CloseBody(res) 13578 if err := googleapi.CheckResponse(res); err != nil { 13579 return nil, err 13580 } 13581 ret := &Operation{ 13582 ServerResponse: googleapi.ServerResponse{ 13583 Header: res.Header, 13584 HTTPStatusCode: res.StatusCode, 13585 }, 13586 } 13587 target := &ret 13588 if err := gensupport.DecodeResponse(target, res); err != nil { 13589 return nil, err 13590 } 13591 return ret, nil 13592 // { 13593 // "description": "Deletes a node pool from a cluster.", 13594 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 13595 // "httpMethod": "DELETE", 13596 // "id": "container.projects.zones.clusters.nodePools.delete", 13597 // "parameterOrder": [ 13598 // "projectId", 13599 // "zone", 13600 // "clusterId", 13601 // "nodePoolId" 13602 // ], 13603 // "parameters": { 13604 // "clusterId": { 13605 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 13606 // "location": "path", 13607 // "required": true, 13608 // "type": "string" 13609 // }, 13610 // "name": { 13611 // "description": "The name (project, location, cluster, node pool id) of the node pool to\ndelete. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 13612 // "location": "query", 13613 // "type": "string" 13614 // }, 13615 // "nodePoolId": { 13616 // "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", 13617 // "location": "path", 13618 // "required": true, 13619 // "type": "string" 13620 // }, 13621 // "projectId": { 13622 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 13623 // "location": "path", 13624 // "required": true, 13625 // "type": "string" 13626 // }, 13627 // "zone": { 13628 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 13629 // "location": "path", 13630 // "required": true, 13631 // "type": "string" 13632 // } 13633 // }, 13634 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 13635 // "response": { 13636 // "$ref": "Operation" 13637 // }, 13638 // "scopes": [ 13639 // "https://www.googleapis.com/auth/cloud-platform" 13640 // ] 13641 // } 13642 13643} 13644 13645// method id "container.projects.zones.clusters.nodePools.get": 13646 13647type ProjectsZonesClustersNodePoolsGetCall struct { 13648 s *Service 13649 projectId string 13650 zone string 13651 clusterId string 13652 nodePoolId string 13653 urlParams_ gensupport.URLParams 13654 ifNoneMatch_ string 13655 ctx_ context.Context 13656 header_ http.Header 13657} 13658 13659// Get: Retrieves the requested node pool. 13660func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { 13661 c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13662 c.projectId = projectId 13663 c.zone = zone 13664 c.clusterId = clusterId 13665 c.nodePoolId = nodePoolId 13666 return c 13667} 13668 13669// Name sets the optional parameter "name": The name (project, location, 13670// cluster, node pool id) of the node pool to 13671// get. Specified in the 13672// format 13673// 'projects/*/locations/*/clusters/*/nodePools/*'. 13674func (c *ProjectsZonesClustersNodePoolsGetCall) Name(name string) *ProjectsZonesClustersNodePoolsGetCall { 13675 c.urlParams_.Set("name", name) 13676 return c 13677} 13678 13679// Fields allows partial responses to be retrieved. See 13680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13681// for more information. 13682func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { 13683 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13684 return c 13685} 13686 13687// IfNoneMatch sets the optional parameter which makes the operation 13688// fail if the object's ETag matches the given value. This is useful for 13689// getting updates only after the object has changed since the last 13690// request. Use googleapi.IsNotModified to check whether the response 13691// error from Do is the result of In-None-Match. 13692func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { 13693 c.ifNoneMatch_ = entityTag 13694 return c 13695} 13696 13697// Context sets the context to be used in this call's Do method. Any 13698// pending HTTP request will be aborted if the provided context is 13699// canceled. 13700func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { 13701 c.ctx_ = ctx 13702 return c 13703} 13704 13705// Header returns an http.Header that can be modified by the caller to 13706// add HTTP headers to the request. 13707func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { 13708 if c.header_ == nil { 13709 c.header_ = make(http.Header) 13710 } 13711 return c.header_ 13712} 13713 13714func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { 13715 reqHeaders := make(http.Header) 13716 for k, v := range c.header_ { 13717 reqHeaders[k] = v 13718 } 13719 reqHeaders.Set("User-Agent", c.s.userAgent()) 13720 if c.ifNoneMatch_ != "" { 13721 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13722 } 13723 var body io.Reader = nil 13724 c.urlParams_.Set("alt", alt) 13725 c.urlParams_.Set("prettyPrint", "false") 13726 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") 13727 urls += "?" + c.urlParams_.Encode() 13728 req, err := http.NewRequest("GET", urls, body) 13729 if err != nil { 13730 return nil, err 13731 } 13732 req.Header = reqHeaders 13733 googleapi.Expand(req.URL, map[string]string{ 13734 "projectId": c.projectId, 13735 "zone": c.zone, 13736 "clusterId": c.clusterId, 13737 "nodePoolId": c.nodePoolId, 13738 }) 13739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13740} 13741 13742// Do executes the "container.projects.zones.clusters.nodePools.get" call. 13743// Exactly one of *NodePool or error will be non-nil. Any non-2xx status 13744// code is an error. Response headers are in either 13745// *NodePool.ServerResponse.Header or (if a response was returned at 13746// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13747// to check whether the returned error was because 13748// http.StatusNotModified was returned. 13749func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { 13750 gensupport.SetOptions(c.urlParams_, opts...) 13751 res, err := c.doRequest("json") 13752 if res != nil && res.StatusCode == http.StatusNotModified { 13753 if res.Body != nil { 13754 res.Body.Close() 13755 } 13756 return nil, &googleapi.Error{ 13757 Code: res.StatusCode, 13758 Header: res.Header, 13759 } 13760 } 13761 if err != nil { 13762 return nil, err 13763 } 13764 defer googleapi.CloseBody(res) 13765 if err := googleapi.CheckResponse(res); err != nil { 13766 return nil, err 13767 } 13768 ret := &NodePool{ 13769 ServerResponse: googleapi.ServerResponse{ 13770 Header: res.Header, 13771 HTTPStatusCode: res.StatusCode, 13772 }, 13773 } 13774 target := &ret 13775 if err := gensupport.DecodeResponse(target, res); err != nil { 13776 return nil, err 13777 } 13778 return ret, nil 13779 // { 13780 // "description": "Retrieves the requested node pool.", 13781 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 13782 // "httpMethod": "GET", 13783 // "id": "container.projects.zones.clusters.nodePools.get", 13784 // "parameterOrder": [ 13785 // "projectId", 13786 // "zone", 13787 // "clusterId", 13788 // "nodePoolId" 13789 // ], 13790 // "parameters": { 13791 // "clusterId": { 13792 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 13793 // "location": "path", 13794 // "required": true, 13795 // "type": "string" 13796 // }, 13797 // "name": { 13798 // "description": "The name (project, location, cluster, node pool id) of the node pool to\nget. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 13799 // "location": "query", 13800 // "type": "string" 13801 // }, 13802 // "nodePoolId": { 13803 // "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", 13804 // "location": "path", 13805 // "required": true, 13806 // "type": "string" 13807 // }, 13808 // "projectId": { 13809 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", 13810 // "location": "path", 13811 // "required": true, 13812 // "type": "string" 13813 // }, 13814 // "zone": { 13815 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 13816 // "location": "path", 13817 // "required": true, 13818 // "type": "string" 13819 // } 13820 // }, 13821 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 13822 // "response": { 13823 // "$ref": "NodePool" 13824 // }, 13825 // "scopes": [ 13826 // "https://www.googleapis.com/auth/cloud-platform" 13827 // ] 13828 // } 13829 13830} 13831 13832// method id "container.projects.zones.clusters.nodePools.list": 13833 13834type ProjectsZonesClustersNodePoolsListCall struct { 13835 s *Service 13836 projectId string 13837 zone string 13838 clusterId string 13839 urlParams_ gensupport.URLParams 13840 ifNoneMatch_ string 13841 ctx_ context.Context 13842 header_ http.Header 13843} 13844 13845// List: Lists the node pools for a cluster. 13846func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall { 13847 c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13848 c.projectId = projectId 13849 c.zone = zone 13850 c.clusterId = clusterId 13851 return c 13852} 13853 13854// Parent sets the optional parameter "parent": The parent (project, 13855// location, cluster id) where the node pools will be 13856// listed. Specified in the format 'projects/*/locations/*/clusters/*'. 13857func (c *ProjectsZonesClustersNodePoolsListCall) Parent(parent string) *ProjectsZonesClustersNodePoolsListCall { 13858 c.urlParams_.Set("parent", parent) 13859 return c 13860} 13861 13862// Fields allows partial responses to be retrieved. See 13863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13864// for more information. 13865func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { 13866 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13867 return c 13868} 13869 13870// IfNoneMatch sets the optional parameter which makes the operation 13871// fail if the object's ETag matches the given value. This is useful for 13872// getting updates only after the object has changed since the last 13873// request. Use googleapi.IsNotModified to check whether the response 13874// error from Do is the result of In-None-Match. 13875func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { 13876 c.ifNoneMatch_ = entityTag 13877 return c 13878} 13879 13880// Context sets the context to be used in this call's Do method. Any 13881// pending HTTP request will be aborted if the provided context is 13882// canceled. 13883func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { 13884 c.ctx_ = ctx 13885 return c 13886} 13887 13888// Header returns an http.Header that can be modified by the caller to 13889// add HTTP headers to the request. 13890func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { 13891 if c.header_ == nil { 13892 c.header_ = make(http.Header) 13893 } 13894 return c.header_ 13895} 13896 13897func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { 13898 reqHeaders := make(http.Header) 13899 for k, v := range c.header_ { 13900 reqHeaders[k] = v 13901 } 13902 reqHeaders.Set("User-Agent", c.s.userAgent()) 13903 if c.ifNoneMatch_ != "" { 13904 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13905 } 13906 var body io.Reader = nil 13907 c.urlParams_.Set("alt", alt) 13908 c.urlParams_.Set("prettyPrint", "false") 13909 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") 13910 urls += "?" + c.urlParams_.Encode() 13911 req, err := http.NewRequest("GET", urls, body) 13912 if err != nil { 13913 return nil, err 13914 } 13915 req.Header = reqHeaders 13916 googleapi.Expand(req.URL, map[string]string{ 13917 "projectId": c.projectId, 13918 "zone": c.zone, 13919 "clusterId": c.clusterId, 13920 }) 13921 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13922} 13923 13924// Do executes the "container.projects.zones.clusters.nodePools.list" call. 13925// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any 13926// non-2xx status code is an error. Response headers are in either 13927// *ListNodePoolsResponse.ServerResponse.Header or (if a response was 13928// returned at all) in error.(*googleapi.Error).Header. Use 13929// googleapi.IsNotModified to check whether the returned error was 13930// because http.StatusNotModified was returned. 13931func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { 13932 gensupport.SetOptions(c.urlParams_, opts...) 13933 res, err := c.doRequest("json") 13934 if res != nil && res.StatusCode == http.StatusNotModified { 13935 if res.Body != nil { 13936 res.Body.Close() 13937 } 13938 return nil, &googleapi.Error{ 13939 Code: res.StatusCode, 13940 Header: res.Header, 13941 } 13942 } 13943 if err != nil { 13944 return nil, err 13945 } 13946 defer googleapi.CloseBody(res) 13947 if err := googleapi.CheckResponse(res); err != nil { 13948 return nil, err 13949 } 13950 ret := &ListNodePoolsResponse{ 13951 ServerResponse: googleapi.ServerResponse{ 13952 Header: res.Header, 13953 HTTPStatusCode: res.StatusCode, 13954 }, 13955 } 13956 target := &ret 13957 if err := gensupport.DecodeResponse(target, res); err != nil { 13958 return nil, err 13959 } 13960 return ret, nil 13961 // { 13962 // "description": "Lists the node pools for a cluster.", 13963 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 13964 // "httpMethod": "GET", 13965 // "id": "container.projects.zones.clusters.nodePools.list", 13966 // "parameterOrder": [ 13967 // "projectId", 13968 // "zone", 13969 // "clusterId" 13970 // ], 13971 // "parameters": { 13972 // "clusterId": { 13973 // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", 13974 // "location": "path", 13975 // "required": true, 13976 // "type": "string" 13977 // }, 13978 // "parent": { 13979 // "description": "The parent (project, location, cluster id) where the node pools will be\nlisted. Specified in the format 'projects/*/locations/*/clusters/*'.", 13980 // "location": "query", 13981 // "type": "string" 13982 // }, 13983 // "projectId": { 13984 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", 13985 // "location": "path", 13986 // "required": true, 13987 // "type": "string" 13988 // }, 13989 // "zone": { 13990 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", 13991 // "location": "path", 13992 // "required": true, 13993 // "type": "string" 13994 // } 13995 // }, 13996 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 13997 // "response": { 13998 // "$ref": "ListNodePoolsResponse" 13999 // }, 14000 // "scopes": [ 14001 // "https://www.googleapis.com/auth/cloud-platform" 14002 // ] 14003 // } 14004 14005} 14006 14007// method id "container.projects.zones.clusters.nodePools.rollback": 14008 14009type ProjectsZonesClustersNodePoolsRollbackCall struct { 14010 s *Service 14011 projectId string 14012 zone string 14013 clusterId string 14014 nodePoolId string 14015 rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest 14016 urlParams_ gensupport.URLParams 14017 ctx_ context.Context 14018 header_ http.Header 14019} 14020 14021// Rollback: Rolls back a previously Aborted or Failed NodePool 14022// upgrade. 14023// This makes no changes if the last upgrade successfully completed. 14024func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { 14025 c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14026 c.projectId = projectId 14027 c.zone = zone 14028 c.clusterId = clusterId 14029 c.nodePoolId = nodePoolId 14030 c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest 14031 return c 14032} 14033 14034// Fields allows partial responses to be retrieved. See 14035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14036// for more information. 14037func (c *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall { 14038 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14039 return c 14040} 14041 14042// Context sets the context to be used in this call's Do method. Any 14043// pending HTTP request will be aborted if the provided context is 14044// canceled. 14045func (c *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall { 14046 c.ctx_ = ctx 14047 return c 14048} 14049 14050// Header returns an http.Header that can be modified by the caller to 14051// add HTTP headers to the request. 14052func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { 14053 if c.header_ == nil { 14054 c.header_ = make(http.Header) 14055 } 14056 return c.header_ 14057} 14058 14059func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { 14060 reqHeaders := make(http.Header) 14061 for k, v := range c.header_ { 14062 reqHeaders[k] = v 14063 } 14064 reqHeaders.Set("User-Agent", c.s.userAgent()) 14065 var body io.Reader = nil 14066 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) 14067 if err != nil { 14068 return nil, err 14069 } 14070 reqHeaders.Set("Content-Type", "application/json") 14071 c.urlParams_.Set("alt", alt) 14072 c.urlParams_.Set("prettyPrint", "false") 14073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") 14074 urls += "?" + c.urlParams_.Encode() 14075 req, err := http.NewRequest("POST", urls, body) 14076 if err != nil { 14077 return nil, err 14078 } 14079 req.Header = reqHeaders 14080 googleapi.Expand(req.URL, map[string]string{ 14081 "projectId": c.projectId, 14082 "zone": c.zone, 14083 "clusterId": c.clusterId, 14084 "nodePoolId": c.nodePoolId, 14085 }) 14086 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14087} 14088 14089// Do executes the "container.projects.zones.clusters.nodePools.rollback" call. 14090// Exactly one of *Operation or error will be non-nil. Any non-2xx 14091// status code is an error. Response headers are in either 14092// *Operation.ServerResponse.Header or (if a response was returned at 14093// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14094// to check whether the returned error was because 14095// http.StatusNotModified was returned. 14096func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14097 gensupport.SetOptions(c.urlParams_, opts...) 14098 res, err := c.doRequest("json") 14099 if res != nil && res.StatusCode == http.StatusNotModified { 14100 if res.Body != nil { 14101 res.Body.Close() 14102 } 14103 return nil, &googleapi.Error{ 14104 Code: res.StatusCode, 14105 Header: res.Header, 14106 } 14107 } 14108 if err != nil { 14109 return nil, err 14110 } 14111 defer googleapi.CloseBody(res) 14112 if err := googleapi.CheckResponse(res); err != nil { 14113 return nil, err 14114 } 14115 ret := &Operation{ 14116 ServerResponse: googleapi.ServerResponse{ 14117 Header: res.Header, 14118 HTTPStatusCode: res.StatusCode, 14119 }, 14120 } 14121 target := &ret 14122 if err := gensupport.DecodeResponse(target, res); err != nil { 14123 return nil, err 14124 } 14125 return ret, nil 14126 // { 14127 // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", 14128 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", 14129 // "httpMethod": "POST", 14130 // "id": "container.projects.zones.clusters.nodePools.rollback", 14131 // "parameterOrder": [ 14132 // "projectId", 14133 // "zone", 14134 // "clusterId", 14135 // "nodePoolId" 14136 // ], 14137 // "parameters": { 14138 // "clusterId": { 14139 // "description": "Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", 14140 // "location": "path", 14141 // "required": true, 14142 // "type": "string" 14143 // }, 14144 // "nodePoolId": { 14145 // "description": "Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", 14146 // "location": "path", 14147 // "required": true, 14148 // "type": "string" 14149 // }, 14150 // "projectId": { 14151 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 14152 // "location": "path", 14153 // "required": true, 14154 // "type": "string" 14155 // }, 14156 // "zone": { 14157 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 14158 // "location": "path", 14159 // "required": true, 14160 // "type": "string" 14161 // } 14162 // }, 14163 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", 14164 // "request": { 14165 // "$ref": "RollbackNodePoolUpgradeRequest" 14166 // }, 14167 // "response": { 14168 // "$ref": "Operation" 14169 // }, 14170 // "scopes": [ 14171 // "https://www.googleapis.com/auth/cloud-platform" 14172 // ] 14173 // } 14174 14175} 14176 14177// method id "container.projects.zones.clusters.nodePools.setManagement": 14178 14179type ProjectsZonesClustersNodePoolsSetManagementCall struct { 14180 s *Service 14181 projectId string 14182 zone string 14183 clusterId string 14184 nodePoolId string 14185 setnodepoolmanagementrequest *SetNodePoolManagementRequest 14186 urlParams_ gensupport.URLParams 14187 ctx_ context.Context 14188 header_ http.Header 14189} 14190 14191// SetManagement: Sets the NodeManagement options for a node pool. 14192func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall { 14193 c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14194 c.projectId = projectId 14195 c.zone = zone 14196 c.clusterId = clusterId 14197 c.nodePoolId = nodePoolId 14198 c.setnodepoolmanagementrequest = setnodepoolmanagementrequest 14199 return c 14200} 14201 14202// Fields allows partial responses to be retrieved. See 14203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14204// for more information. 14205func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall { 14206 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14207 return c 14208} 14209 14210// Context sets the context to be used in this call's Do method. Any 14211// pending HTTP request will be aborted if the provided context is 14212// canceled. 14213func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall { 14214 c.ctx_ = ctx 14215 return c 14216} 14217 14218// Header returns an http.Header that can be modified by the caller to 14219// add HTTP headers to the request. 14220func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { 14221 if c.header_ == nil { 14222 c.header_ = make(http.Header) 14223 } 14224 return c.header_ 14225} 14226 14227func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { 14228 reqHeaders := make(http.Header) 14229 for k, v := range c.header_ { 14230 reqHeaders[k] = v 14231 } 14232 reqHeaders.Set("User-Agent", c.s.userAgent()) 14233 var body io.Reader = nil 14234 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) 14235 if err != nil { 14236 return nil, err 14237 } 14238 reqHeaders.Set("Content-Type", "application/json") 14239 c.urlParams_.Set("alt", alt) 14240 c.urlParams_.Set("prettyPrint", "false") 14241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") 14242 urls += "?" + c.urlParams_.Encode() 14243 req, err := http.NewRequest("POST", urls, body) 14244 if err != nil { 14245 return nil, err 14246 } 14247 req.Header = reqHeaders 14248 googleapi.Expand(req.URL, map[string]string{ 14249 "projectId": c.projectId, 14250 "zone": c.zone, 14251 "clusterId": c.clusterId, 14252 "nodePoolId": c.nodePoolId, 14253 }) 14254 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14255} 14256 14257// Do executes the "container.projects.zones.clusters.nodePools.setManagement" call. 14258// Exactly one of *Operation or error will be non-nil. Any non-2xx 14259// status code is an error. Response headers are in either 14260// *Operation.ServerResponse.Header or (if a response was returned at 14261// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14262// to check whether the returned error was because 14263// http.StatusNotModified was returned. 14264func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14265 gensupport.SetOptions(c.urlParams_, opts...) 14266 res, err := c.doRequest("json") 14267 if res != nil && res.StatusCode == http.StatusNotModified { 14268 if res.Body != nil { 14269 res.Body.Close() 14270 } 14271 return nil, &googleapi.Error{ 14272 Code: res.StatusCode, 14273 Header: res.Header, 14274 } 14275 } 14276 if err != nil { 14277 return nil, err 14278 } 14279 defer googleapi.CloseBody(res) 14280 if err := googleapi.CheckResponse(res); err != nil { 14281 return nil, err 14282 } 14283 ret := &Operation{ 14284 ServerResponse: googleapi.ServerResponse{ 14285 Header: res.Header, 14286 HTTPStatusCode: res.StatusCode, 14287 }, 14288 } 14289 target := &ret 14290 if err := gensupport.DecodeResponse(target, res); err != nil { 14291 return nil, err 14292 } 14293 return ret, nil 14294 // { 14295 // "description": "Sets the NodeManagement options for a node pool.", 14296 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", 14297 // "httpMethod": "POST", 14298 // "id": "container.projects.zones.clusters.nodePools.setManagement", 14299 // "parameterOrder": [ 14300 // "projectId", 14301 // "zone", 14302 // "clusterId", 14303 // "nodePoolId" 14304 // ], 14305 // "parameters": { 14306 // "clusterId": { 14307 // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", 14308 // "location": "path", 14309 // "required": true, 14310 // "type": "string" 14311 // }, 14312 // "nodePoolId": { 14313 // "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", 14314 // "location": "path", 14315 // "required": true, 14316 // "type": "string" 14317 // }, 14318 // "projectId": { 14319 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 14320 // "location": "path", 14321 // "required": true, 14322 // "type": "string" 14323 // }, 14324 // "zone": { 14325 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 14326 // "location": "path", 14327 // "required": true, 14328 // "type": "string" 14329 // } 14330 // }, 14331 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", 14332 // "request": { 14333 // "$ref": "SetNodePoolManagementRequest" 14334 // }, 14335 // "response": { 14336 // "$ref": "Operation" 14337 // }, 14338 // "scopes": [ 14339 // "https://www.googleapis.com/auth/cloud-platform" 14340 // ] 14341 // } 14342 14343} 14344 14345// method id "container.projects.zones.clusters.nodePools.setSize": 14346 14347type ProjectsZonesClustersNodePoolsSetSizeCall struct { 14348 s *Service 14349 projectId string 14350 zone string 14351 clusterId string 14352 nodePoolId string 14353 setnodepoolsizerequest *SetNodePoolSizeRequest 14354 urlParams_ gensupport.URLParams 14355 ctx_ context.Context 14356 header_ http.Header 14357} 14358 14359// SetSize: Sets the size for a specific node pool. 14360func (r *ProjectsZonesClustersNodePoolsService) SetSize(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsZonesClustersNodePoolsSetSizeCall { 14361 c := &ProjectsZonesClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14362 c.projectId = projectId 14363 c.zone = zone 14364 c.clusterId = clusterId 14365 c.nodePoolId = nodePoolId 14366 c.setnodepoolsizerequest = setnodepoolsizerequest 14367 return c 14368} 14369 14370// Fields allows partial responses to be retrieved. See 14371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14372// for more information. 14373func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetSizeCall { 14374 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14375 return c 14376} 14377 14378// Context sets the context to be used in this call's Do method. Any 14379// pending HTTP request will be aborted if the provided context is 14380// canceled. 14381func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetSizeCall { 14382 c.ctx_ = ctx 14383 return c 14384} 14385 14386// Header returns an http.Header that can be modified by the caller to 14387// add HTTP headers to the request. 14388func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header { 14389 if c.header_ == nil { 14390 c.header_ = make(http.Header) 14391 } 14392 return c.header_ 14393} 14394 14395func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { 14396 reqHeaders := make(http.Header) 14397 for k, v := range c.header_ { 14398 reqHeaders[k] = v 14399 } 14400 reqHeaders.Set("User-Agent", c.s.userAgent()) 14401 var body io.Reader = nil 14402 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) 14403 if err != nil { 14404 return nil, err 14405 } 14406 reqHeaders.Set("Content-Type", "application/json") 14407 c.urlParams_.Set("alt", alt) 14408 c.urlParams_.Set("prettyPrint", "false") 14409 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") 14410 urls += "?" + c.urlParams_.Encode() 14411 req, err := http.NewRequest("POST", urls, body) 14412 if err != nil { 14413 return nil, err 14414 } 14415 req.Header = reqHeaders 14416 googleapi.Expand(req.URL, map[string]string{ 14417 "projectId": c.projectId, 14418 "zone": c.zone, 14419 "clusterId": c.clusterId, 14420 "nodePoolId": c.nodePoolId, 14421 }) 14422 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14423} 14424 14425// Do executes the "container.projects.zones.clusters.nodePools.setSize" call. 14426// Exactly one of *Operation or error will be non-nil. Any non-2xx 14427// status code is an error. Response headers are in either 14428// *Operation.ServerResponse.Header or (if a response was returned at 14429// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14430// to check whether the returned error was because 14431// http.StatusNotModified was returned. 14432func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14433 gensupport.SetOptions(c.urlParams_, opts...) 14434 res, err := c.doRequest("json") 14435 if res != nil && res.StatusCode == http.StatusNotModified { 14436 if res.Body != nil { 14437 res.Body.Close() 14438 } 14439 return nil, &googleapi.Error{ 14440 Code: res.StatusCode, 14441 Header: res.Header, 14442 } 14443 } 14444 if err != nil { 14445 return nil, err 14446 } 14447 defer googleapi.CloseBody(res) 14448 if err := googleapi.CheckResponse(res); err != nil { 14449 return nil, err 14450 } 14451 ret := &Operation{ 14452 ServerResponse: googleapi.ServerResponse{ 14453 Header: res.Header, 14454 HTTPStatusCode: res.StatusCode, 14455 }, 14456 } 14457 target := &ret 14458 if err := gensupport.DecodeResponse(target, res); err != nil { 14459 return nil, err 14460 } 14461 return ret, nil 14462 // { 14463 // "description": "Sets the size for a specific node pool.", 14464 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", 14465 // "httpMethod": "POST", 14466 // "id": "container.projects.zones.clusters.nodePools.setSize", 14467 // "parameterOrder": [ 14468 // "projectId", 14469 // "zone", 14470 // "clusterId", 14471 // "nodePoolId" 14472 // ], 14473 // "parameters": { 14474 // "clusterId": { 14475 // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", 14476 // "location": "path", 14477 // "required": true, 14478 // "type": "string" 14479 // }, 14480 // "nodePoolId": { 14481 // "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", 14482 // "location": "path", 14483 // "required": true, 14484 // "type": "string" 14485 // }, 14486 // "projectId": { 14487 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 14488 // "location": "path", 14489 // "required": true, 14490 // "type": "string" 14491 // }, 14492 // "zone": { 14493 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 14494 // "location": "path", 14495 // "required": true, 14496 // "type": "string" 14497 // } 14498 // }, 14499 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", 14500 // "request": { 14501 // "$ref": "SetNodePoolSizeRequest" 14502 // }, 14503 // "response": { 14504 // "$ref": "Operation" 14505 // }, 14506 // "scopes": [ 14507 // "https://www.googleapis.com/auth/cloud-platform" 14508 // ] 14509 // } 14510 14511} 14512 14513// method id "container.projects.zones.clusters.nodePools.update": 14514 14515type ProjectsZonesClustersNodePoolsUpdateCall struct { 14516 s *Service 14517 projectId string 14518 zone string 14519 clusterId string 14520 nodePoolId string 14521 updatenodepoolrequest *UpdateNodePoolRequest 14522 urlParams_ gensupport.URLParams 14523 ctx_ context.Context 14524 header_ http.Header 14525} 14526 14527// Update: Updates the version and/or image type of a specific node 14528// pool. 14529func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall { 14530 c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14531 c.projectId = projectId 14532 c.zone = zone 14533 c.clusterId = clusterId 14534 c.nodePoolId = nodePoolId 14535 c.updatenodepoolrequest = updatenodepoolrequest 14536 return c 14537} 14538 14539// Fields allows partial responses to be retrieved. See 14540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14541// for more information. 14542func (c *ProjectsZonesClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsUpdateCall { 14543 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14544 return c 14545} 14546 14547// Context sets the context to be used in this call's Do method. Any 14548// pending HTTP request will be aborted if the provided context is 14549// canceled. 14550func (c *ProjectsZonesClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsUpdateCall { 14551 c.ctx_ = ctx 14552 return c 14553} 14554 14555// Header returns an http.Header that can be modified by the caller to 14556// add HTTP headers to the request. 14557func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header { 14558 if c.header_ == nil { 14559 c.header_ = make(http.Header) 14560 } 14561 return c.header_ 14562} 14563 14564func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { 14565 reqHeaders := make(http.Header) 14566 for k, v := range c.header_ { 14567 reqHeaders[k] = v 14568 } 14569 reqHeaders.Set("User-Agent", c.s.userAgent()) 14570 var body io.Reader = nil 14571 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) 14572 if err != nil { 14573 return nil, err 14574 } 14575 reqHeaders.Set("Content-Type", "application/json") 14576 c.urlParams_.Set("alt", alt) 14577 c.urlParams_.Set("prettyPrint", "false") 14578 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") 14579 urls += "?" + c.urlParams_.Encode() 14580 req, err := http.NewRequest("POST", urls, body) 14581 if err != nil { 14582 return nil, err 14583 } 14584 req.Header = reqHeaders 14585 googleapi.Expand(req.URL, map[string]string{ 14586 "projectId": c.projectId, 14587 "zone": c.zone, 14588 "clusterId": c.clusterId, 14589 "nodePoolId": c.nodePoolId, 14590 }) 14591 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14592} 14593 14594// Do executes the "container.projects.zones.clusters.nodePools.update" call. 14595// Exactly one of *Operation or error will be non-nil. Any non-2xx 14596// status code is an error. Response headers are in either 14597// *Operation.ServerResponse.Header or (if a response was returned at 14598// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14599// to check whether the returned error was because 14600// http.StatusNotModified was returned. 14601func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14602 gensupport.SetOptions(c.urlParams_, opts...) 14603 res, err := c.doRequest("json") 14604 if res != nil && res.StatusCode == http.StatusNotModified { 14605 if res.Body != nil { 14606 res.Body.Close() 14607 } 14608 return nil, &googleapi.Error{ 14609 Code: res.StatusCode, 14610 Header: res.Header, 14611 } 14612 } 14613 if err != nil { 14614 return nil, err 14615 } 14616 defer googleapi.CloseBody(res) 14617 if err := googleapi.CheckResponse(res); err != nil { 14618 return nil, err 14619 } 14620 ret := &Operation{ 14621 ServerResponse: googleapi.ServerResponse{ 14622 Header: res.Header, 14623 HTTPStatusCode: res.StatusCode, 14624 }, 14625 } 14626 target := &ret 14627 if err := gensupport.DecodeResponse(target, res); err != nil { 14628 return nil, err 14629 } 14630 return ret, nil 14631 // { 14632 // "description": "Updates the version and/or image type of a specific node pool.", 14633 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", 14634 // "httpMethod": "POST", 14635 // "id": "container.projects.zones.clusters.nodePools.update", 14636 // "parameterOrder": [ 14637 // "projectId", 14638 // "zone", 14639 // "clusterId", 14640 // "nodePoolId" 14641 // ], 14642 // "parameters": { 14643 // "clusterId": { 14644 // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 14645 // "location": "path", 14646 // "required": true, 14647 // "type": "string" 14648 // }, 14649 // "nodePoolId": { 14650 // "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", 14651 // "location": "path", 14652 // "required": true, 14653 // "type": "string" 14654 // }, 14655 // "projectId": { 14656 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 14657 // "location": "path", 14658 // "required": true, 14659 // "type": "string" 14660 // }, 14661 // "zone": { 14662 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 14663 // "location": "path", 14664 // "required": true, 14665 // "type": "string" 14666 // } 14667 // }, 14668 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", 14669 // "request": { 14670 // "$ref": "UpdateNodePoolRequest" 14671 // }, 14672 // "response": { 14673 // "$ref": "Operation" 14674 // }, 14675 // "scopes": [ 14676 // "https://www.googleapis.com/auth/cloud-platform" 14677 // ] 14678 // } 14679 14680} 14681 14682// method id "container.projects.zones.operations.cancel": 14683 14684type ProjectsZonesOperationsCancelCall struct { 14685 s *Service 14686 projectId string 14687 zone string 14688 operationId string 14689 canceloperationrequest *CancelOperationRequest 14690 urlParams_ gensupport.URLParams 14691 ctx_ context.Context 14692 header_ http.Header 14693} 14694 14695// Cancel: Cancels the specified operation. 14696func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall { 14697 c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14698 c.projectId = projectId 14699 c.zone = zone 14700 c.operationId = operationId 14701 c.canceloperationrequest = canceloperationrequest 14702 return c 14703} 14704 14705// Fields allows partial responses to be retrieved. See 14706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14707// for more information. 14708func (c *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall { 14709 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14710 return c 14711} 14712 14713// Context sets the context to be used in this call's Do method. Any 14714// pending HTTP request will be aborted if the provided context is 14715// canceled. 14716func (c *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall { 14717 c.ctx_ = ctx 14718 return c 14719} 14720 14721// Header returns an http.Header that can be modified by the caller to 14722// add HTTP headers to the request. 14723func (c *ProjectsZonesOperationsCancelCall) Header() http.Header { 14724 if c.header_ == nil { 14725 c.header_ = make(http.Header) 14726 } 14727 return c.header_ 14728} 14729 14730func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 14731 reqHeaders := make(http.Header) 14732 for k, v := range c.header_ { 14733 reqHeaders[k] = v 14734 } 14735 reqHeaders.Set("User-Agent", c.s.userAgent()) 14736 var body io.Reader = nil 14737 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 14738 if err != nil { 14739 return nil, err 14740 } 14741 reqHeaders.Set("Content-Type", "application/json") 14742 c.urlParams_.Set("alt", alt) 14743 c.urlParams_.Set("prettyPrint", "false") 14744 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") 14745 urls += "?" + c.urlParams_.Encode() 14746 req, err := http.NewRequest("POST", urls, body) 14747 if err != nil { 14748 return nil, err 14749 } 14750 req.Header = reqHeaders 14751 googleapi.Expand(req.URL, map[string]string{ 14752 "projectId": c.projectId, 14753 "zone": c.zone, 14754 "operationId": c.operationId, 14755 }) 14756 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14757} 14758 14759// Do executes the "container.projects.zones.operations.cancel" call. 14760// Exactly one of *Empty or error will be non-nil. Any non-2xx status 14761// code is an error. Response headers are in either 14762// *Empty.ServerResponse.Header or (if a response was returned at all) 14763// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14764// check whether the returned error was because http.StatusNotModified 14765// was returned. 14766func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 14767 gensupport.SetOptions(c.urlParams_, opts...) 14768 res, err := c.doRequest("json") 14769 if res != nil && res.StatusCode == http.StatusNotModified { 14770 if res.Body != nil { 14771 res.Body.Close() 14772 } 14773 return nil, &googleapi.Error{ 14774 Code: res.StatusCode, 14775 Header: res.Header, 14776 } 14777 } 14778 if err != nil { 14779 return nil, err 14780 } 14781 defer googleapi.CloseBody(res) 14782 if err := googleapi.CheckResponse(res); err != nil { 14783 return nil, err 14784 } 14785 ret := &Empty{ 14786 ServerResponse: googleapi.ServerResponse{ 14787 Header: res.Header, 14788 HTTPStatusCode: res.StatusCode, 14789 }, 14790 } 14791 target := &ret 14792 if err := gensupport.DecodeResponse(target, res); err != nil { 14793 return nil, err 14794 } 14795 return ret, nil 14796 // { 14797 // "description": "Cancels the specified operation.", 14798 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", 14799 // "httpMethod": "POST", 14800 // "id": "container.projects.zones.operations.cancel", 14801 // "parameterOrder": [ 14802 // "projectId", 14803 // "zone", 14804 // "operationId" 14805 // ], 14806 // "parameters": { 14807 // "operationId": { 14808 // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", 14809 // "location": "path", 14810 // "required": true, 14811 // "type": "string" 14812 // }, 14813 // "projectId": { 14814 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 14815 // "location": "path", 14816 // "required": true, 14817 // "type": "string" 14818 // }, 14819 // "zone": { 14820 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", 14821 // "location": "path", 14822 // "required": true, 14823 // "type": "string" 14824 // } 14825 // }, 14826 // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", 14827 // "request": { 14828 // "$ref": "CancelOperationRequest" 14829 // }, 14830 // "response": { 14831 // "$ref": "Empty" 14832 // }, 14833 // "scopes": [ 14834 // "https://www.googleapis.com/auth/cloud-platform" 14835 // ] 14836 // } 14837 14838} 14839 14840// method id "container.projects.zones.operations.get": 14841 14842type ProjectsZonesOperationsGetCall struct { 14843 s *Service 14844 projectId string 14845 zone string 14846 operationId string 14847 urlParams_ gensupport.URLParams 14848 ifNoneMatch_ string 14849 ctx_ context.Context 14850 header_ http.Header 14851} 14852 14853// Get: Gets the specified operation. 14854func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall { 14855 c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14856 c.projectId = projectId 14857 c.zone = zone 14858 c.operationId = operationId 14859 return c 14860} 14861 14862// Name sets the optional parameter "name": The name (project, location, 14863// operation id) of the operation to get. 14864// Specified in the format 'projects/*/locations/*/operations/*'. 14865func (c *ProjectsZonesOperationsGetCall) Name(name string) *ProjectsZonesOperationsGetCall { 14866 c.urlParams_.Set("name", name) 14867 return c 14868} 14869 14870// Fields allows partial responses to be retrieved. See 14871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14872// for more information. 14873func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { 14874 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14875 return c 14876} 14877 14878// IfNoneMatch sets the optional parameter which makes the operation 14879// fail if the object's ETag matches the given value. This is useful for 14880// getting updates only after the object has changed since the last 14881// request. Use googleapi.IsNotModified to check whether the response 14882// error from Do is the result of In-None-Match. 14883func (c *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall { 14884 c.ifNoneMatch_ = entityTag 14885 return c 14886} 14887 14888// Context sets the context to be used in this call's Do method. Any 14889// pending HTTP request will be aborted if the provided context is 14890// canceled. 14891func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall { 14892 c.ctx_ = ctx 14893 return c 14894} 14895 14896// Header returns an http.Header that can be modified by the caller to 14897// add HTTP headers to the request. 14898func (c *ProjectsZonesOperationsGetCall) Header() http.Header { 14899 if c.header_ == nil { 14900 c.header_ = make(http.Header) 14901 } 14902 return c.header_ 14903} 14904 14905func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { 14906 reqHeaders := make(http.Header) 14907 for k, v := range c.header_ { 14908 reqHeaders[k] = v 14909 } 14910 reqHeaders.Set("User-Agent", c.s.userAgent()) 14911 if c.ifNoneMatch_ != "" { 14912 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14913 } 14914 var body io.Reader = nil 14915 c.urlParams_.Set("alt", alt) 14916 c.urlParams_.Set("prettyPrint", "false") 14917 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}") 14918 urls += "?" + c.urlParams_.Encode() 14919 req, err := http.NewRequest("GET", urls, body) 14920 if err != nil { 14921 return nil, err 14922 } 14923 req.Header = reqHeaders 14924 googleapi.Expand(req.URL, map[string]string{ 14925 "projectId": c.projectId, 14926 "zone": c.zone, 14927 "operationId": c.operationId, 14928 }) 14929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14930} 14931 14932// Do executes the "container.projects.zones.operations.get" call. 14933// Exactly one of *Operation or error will be non-nil. Any non-2xx 14934// status code is an error. Response headers are in either 14935// *Operation.ServerResponse.Header or (if a response was returned at 14936// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14937// to check whether the returned error was because 14938// http.StatusNotModified was returned. 14939func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14940 gensupport.SetOptions(c.urlParams_, opts...) 14941 res, err := c.doRequest("json") 14942 if res != nil && res.StatusCode == http.StatusNotModified { 14943 if res.Body != nil { 14944 res.Body.Close() 14945 } 14946 return nil, &googleapi.Error{ 14947 Code: res.StatusCode, 14948 Header: res.Header, 14949 } 14950 } 14951 if err != nil { 14952 return nil, err 14953 } 14954 defer googleapi.CloseBody(res) 14955 if err := googleapi.CheckResponse(res); err != nil { 14956 return nil, err 14957 } 14958 ret := &Operation{ 14959 ServerResponse: googleapi.ServerResponse{ 14960 Header: res.Header, 14961 HTTPStatusCode: res.StatusCode, 14962 }, 14963 } 14964 target := &ret 14965 if err := gensupport.DecodeResponse(target, res); err != nil { 14966 return nil, err 14967 } 14968 return ret, nil 14969 // { 14970 // "description": "Gets the specified operation.", 14971 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", 14972 // "httpMethod": "GET", 14973 // "id": "container.projects.zones.operations.get", 14974 // "parameterOrder": [ 14975 // "projectId", 14976 // "zone", 14977 // "operationId" 14978 // ], 14979 // "parameters": { 14980 // "name": { 14981 // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", 14982 // "location": "query", 14983 // "type": "string" 14984 // }, 14985 // "operationId": { 14986 // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", 14987 // "location": "path", 14988 // "required": true, 14989 // "type": "string" 14990 // }, 14991 // "projectId": { 14992 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", 14993 // "location": "path", 14994 // "required": true, 14995 // "type": "string" 14996 // }, 14997 // "zone": { 14998 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", 14999 // "location": "path", 15000 // "required": true, 15001 // "type": "string" 15002 // } 15003 // }, 15004 // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", 15005 // "response": { 15006 // "$ref": "Operation" 15007 // }, 15008 // "scopes": [ 15009 // "https://www.googleapis.com/auth/cloud-platform" 15010 // ] 15011 // } 15012 15013} 15014 15015// method id "container.projects.zones.operations.list": 15016 15017type ProjectsZonesOperationsListCall struct { 15018 s *Service 15019 projectId string 15020 zone string 15021 urlParams_ gensupport.URLParams 15022 ifNoneMatch_ string 15023 ctx_ context.Context 15024 header_ http.Header 15025} 15026 15027// List: Lists all operations in a project in the specified zone or all 15028// zones. 15029func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { 15030 c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15031 c.projectId = projectId 15032 c.zone = zone 15033 return c 15034} 15035 15036// Parent sets the optional parameter "parent": The parent (project and 15037// location) where the operations will be listed. 15038// Specified in the format 'projects/*/locations/*'. 15039// Location "-" matches all zones and all regions. 15040func (c *ProjectsZonesOperationsListCall) Parent(parent string) *ProjectsZonesOperationsListCall { 15041 c.urlParams_.Set("parent", parent) 15042 return c 15043} 15044 15045// Fields allows partial responses to be retrieved. See 15046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15047// for more information. 15048func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { 15049 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15050 return c 15051} 15052 15053// IfNoneMatch sets the optional parameter which makes the operation 15054// fail if the object's ETag matches the given value. This is useful for 15055// getting updates only after the object has changed since the last 15056// request. Use googleapi.IsNotModified to check whether the response 15057// error from Do is the result of In-None-Match. 15058func (c *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall { 15059 c.ifNoneMatch_ = entityTag 15060 return c 15061} 15062 15063// Context sets the context to be used in this call's Do method. Any 15064// pending HTTP request will be aborted if the provided context is 15065// canceled. 15066func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall { 15067 c.ctx_ = ctx 15068 return c 15069} 15070 15071// Header returns an http.Header that can be modified by the caller to 15072// add HTTP headers to the request. 15073func (c *ProjectsZonesOperationsListCall) Header() http.Header { 15074 if c.header_ == nil { 15075 c.header_ = make(http.Header) 15076 } 15077 return c.header_ 15078} 15079 15080func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { 15081 reqHeaders := make(http.Header) 15082 for k, v := range c.header_ { 15083 reqHeaders[k] = v 15084 } 15085 reqHeaders.Set("User-Agent", c.s.userAgent()) 15086 if c.ifNoneMatch_ != "" { 15087 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15088 } 15089 var body io.Reader = nil 15090 c.urlParams_.Set("alt", alt) 15091 c.urlParams_.Set("prettyPrint", "false") 15092 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations") 15093 urls += "?" + c.urlParams_.Encode() 15094 req, err := http.NewRequest("GET", urls, body) 15095 if err != nil { 15096 return nil, err 15097 } 15098 req.Header = reqHeaders 15099 googleapi.Expand(req.URL, map[string]string{ 15100 "projectId": c.projectId, 15101 "zone": c.zone, 15102 }) 15103 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15104} 15105 15106// Do executes the "container.projects.zones.operations.list" call. 15107// Exactly one of *ListOperationsResponse or error will be non-nil. Any 15108// non-2xx status code is an error. Response headers are in either 15109// *ListOperationsResponse.ServerResponse.Header or (if a response was 15110// returned at all) in error.(*googleapi.Error).Header. Use 15111// googleapi.IsNotModified to check whether the returned error was 15112// because http.StatusNotModified was returned. 15113func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 15114 gensupport.SetOptions(c.urlParams_, opts...) 15115 res, err := c.doRequest("json") 15116 if res != nil && res.StatusCode == http.StatusNotModified { 15117 if res.Body != nil { 15118 res.Body.Close() 15119 } 15120 return nil, &googleapi.Error{ 15121 Code: res.StatusCode, 15122 Header: res.Header, 15123 } 15124 } 15125 if err != nil { 15126 return nil, err 15127 } 15128 defer googleapi.CloseBody(res) 15129 if err := googleapi.CheckResponse(res); err != nil { 15130 return nil, err 15131 } 15132 ret := &ListOperationsResponse{ 15133 ServerResponse: googleapi.ServerResponse{ 15134 Header: res.Header, 15135 HTTPStatusCode: res.StatusCode, 15136 }, 15137 } 15138 target := &ret 15139 if err := gensupport.DecodeResponse(target, res); err != nil { 15140 return nil, err 15141 } 15142 return ret, nil 15143 // { 15144 // "description": "Lists all operations in a project in the specified zone or all zones.", 15145 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations", 15146 // "httpMethod": "GET", 15147 // "id": "container.projects.zones.operations.list", 15148 // "parameterOrder": [ 15149 // "projectId", 15150 // "zone" 15151 // ], 15152 // "parameters": { 15153 // "parent": { 15154 // "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", 15155 // "location": "query", 15156 // "type": "string" 15157 // }, 15158 // "projectId": { 15159 // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", 15160 // "location": "path", 15161 // "required": true, 15162 // "type": "string" 15163 // }, 15164 // "zone": { 15165 // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", 15166 // "location": "path", 15167 // "required": true, 15168 // "type": "string" 15169 // } 15170 // }, 15171 // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations", 15172 // "response": { 15173 // "$ref": "ListOperationsResponse" 15174 // }, 15175 // "scopes": [ 15176 // "https://www.googleapis.com/auth/cloud-platform" 15177 // ] 15178 // } 15179 15180} 15181