1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package 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 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "container:v1beta1" 75const apiName = "container" 76const apiVersion = "v1beta1" 77const basePath = "https://container.googleapis.com/" 78 79// OAuth2 scopes used by this API. 80const ( 81 // View and manage your data across Google Cloud Platform services 82 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 83) 84 85// NewService creates a new Service. 86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 87 scopesOption := option.WithScopes( 88 "https://www.googleapis.com/auth/cloud-platform", 89 ) 90 // NOTE: prepend, so we don't override user-specified scopes. 91 opts = append([]option.ClientOption{scopesOption}, opts...) 92 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 93 client, endpoint, err := htransport.NewClient(ctx, opts...) 94 if err != nil { 95 return nil, err 96 } 97 s, err := New(client) 98 if err != nil { 99 return nil, err 100 } 101 if endpoint != "" { 102 s.BasePath = endpoint 103 } 104 return s, nil 105} 106 107// New creates a new Service. It uses the provided http.Client for requests. 108// 109// Deprecated: please use NewService instead. 110// To provide a custom HTTP client, use option.WithHTTPClient. 111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 112func New(client *http.Client) (*Service, error) { 113 if client == nil { 114 return nil, errors.New("client is nil") 115 } 116 s := &Service{client: client, BasePath: basePath} 117 s.Projects = NewProjectsService(s) 118 return s, nil 119} 120 121type Service struct { 122 client *http.Client 123 BasePath string // API endpoint base URL 124 UserAgent string // optional additional User-Agent fragment 125 126 Projects *ProjectsService 127} 128 129func (s *Service) userAgent() string { 130 if s.UserAgent == "" { 131 return googleapi.UserAgent 132 } 133 return googleapi.UserAgent + " " + s.UserAgent 134} 135 136func NewProjectsService(s *Service) *ProjectsService { 137 rs := &ProjectsService{s: s} 138 rs.Aggregated = NewProjectsAggregatedService(s) 139 rs.Locations = NewProjectsLocationsService(s) 140 rs.Zones = NewProjectsZonesService(s) 141 return rs 142} 143 144type ProjectsService struct { 145 s *Service 146 147 Aggregated *ProjectsAggregatedService 148 149 Locations *ProjectsLocationsService 150 151 Zones *ProjectsZonesService 152} 153 154func NewProjectsAggregatedService(s *Service) *ProjectsAggregatedService { 155 rs := &ProjectsAggregatedService{s: s} 156 rs.UsableSubnetworks = NewProjectsAggregatedUsableSubnetworksService(s) 157 return rs 158} 159 160type ProjectsAggregatedService struct { 161 s *Service 162 163 UsableSubnetworks *ProjectsAggregatedUsableSubnetworksService 164} 165 166func NewProjectsAggregatedUsableSubnetworksService(s *Service) *ProjectsAggregatedUsableSubnetworksService { 167 rs := &ProjectsAggregatedUsableSubnetworksService{s: s} 168 return rs 169} 170 171type ProjectsAggregatedUsableSubnetworksService struct { 172 s *Service 173} 174 175func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 176 rs := &ProjectsLocationsService{s: s} 177 rs.Clusters = NewProjectsLocationsClustersService(s) 178 rs.Operations = NewProjectsLocationsOperationsService(s) 179 return rs 180} 181 182type ProjectsLocationsService struct { 183 s *Service 184 185 Clusters *ProjectsLocationsClustersService 186 187 Operations *ProjectsLocationsOperationsService 188} 189 190func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { 191 rs := &ProjectsLocationsClustersService{s: s} 192 rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) 193 rs.WellKnown = NewProjectsLocationsClustersWellKnownService(s) 194 return rs 195} 196 197type ProjectsLocationsClustersService struct { 198 s *Service 199 200 NodePools *ProjectsLocationsClustersNodePoolsService 201 202 WellKnown *ProjectsLocationsClustersWellKnownService 203} 204 205func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { 206 rs := &ProjectsLocationsClustersNodePoolsService{s: s} 207 return rs 208} 209 210type ProjectsLocationsClustersNodePoolsService struct { 211 s *Service 212} 213 214func NewProjectsLocationsClustersWellKnownService(s *Service) *ProjectsLocationsClustersWellKnownService { 215 rs := &ProjectsLocationsClustersWellKnownService{s: s} 216 return rs 217} 218 219type ProjectsLocationsClustersWellKnownService struct { 220 s *Service 221} 222 223func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 224 rs := &ProjectsLocationsOperationsService{s: s} 225 return rs 226} 227 228type ProjectsLocationsOperationsService struct { 229 s *Service 230} 231 232func NewProjectsZonesService(s *Service) *ProjectsZonesService { 233 rs := &ProjectsZonesService{s: s} 234 rs.Clusters = NewProjectsZonesClustersService(s) 235 rs.Operations = NewProjectsZonesOperationsService(s) 236 return rs 237} 238 239type ProjectsZonesService struct { 240 s *Service 241 242 Clusters *ProjectsZonesClustersService 243 244 Operations *ProjectsZonesOperationsService 245} 246 247func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { 248 rs := &ProjectsZonesClustersService{s: s} 249 rs.NodePools = NewProjectsZonesClustersNodePoolsService(s) 250 return rs 251} 252 253type ProjectsZonesClustersService struct { 254 s *Service 255 256 NodePools *ProjectsZonesClustersNodePoolsService 257} 258 259func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService { 260 rs := &ProjectsZonesClustersNodePoolsService{s: s} 261 return rs 262} 263 264type ProjectsZonesClustersNodePoolsService struct { 265 s *Service 266} 267 268func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { 269 rs := &ProjectsZonesOperationsService{s: s} 270 return rs 271} 272 273type ProjectsZonesOperationsService struct { 274 s *Service 275} 276 277// AcceleratorConfig: AcceleratorConfig represents a Hardware 278// Accelerator request. 279type AcceleratorConfig struct { 280 // AcceleratorCount: The number of the accelerator cards exposed to an 281 // instance. 282 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` 283 284 // AcceleratorType: The accelerator type resource name. List of 285 // supported 286 // accelerators 287 // [here](https://cloud.google.com/compute/docs/gpus) 288 AcceleratorType string `json:"acceleratorType,omitempty"` 289 290 // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to 291 // unconditionally include in API requests. By default, fields with 292 // empty values are omitted from API requests. However, any non-pointer, 293 // non-interface field appearing in ForceSendFields will be sent to the 294 // server regardless of whether the field is empty or not. This may be 295 // used to include empty fields in Patch requests. 296 ForceSendFields []string `json:"-"` 297 298 // NullFields is a list of field names (e.g. "AcceleratorCount") to 299 // include in API requests with the JSON null value. By default, fields 300 // with empty values are omitted from API requests. However, any field 301 // with an empty value appearing in NullFields will be sent to the 302 // server as null. It is an error if a field in this list has a 303 // non-empty value. This may be used to include null fields in Patch 304 // requests. 305 NullFields []string `json:"-"` 306} 307 308func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { 309 type NoMethod AcceleratorConfig 310 raw := NoMethod(*s) 311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 312} 313 314// AddonsConfig: Configuration for the addons that can be automatically 315// spun up in the 316// cluster, enabling additional functionality. 317type AddonsConfig struct { 318 // CloudRunConfig: Configuration for the Cloud Run addon. The 319 // `IstioConfig` addon must be 320 // enabled in order to enable Cloud Run addon. This option can only be 321 // enabled 322 // at cluster creation time. 323 CloudRunConfig *CloudRunConfig `json:"cloudRunConfig,omitempty"` 324 325 // ConfigConnectorConfig: Configuration for the ConfigConnector add-on, 326 // a Kubernetes 327 // extension to manage hosted GCP services through the Kubernetes API 328 ConfigConnectorConfig *ConfigConnectorConfig `json:"configConnectorConfig,omitempty"` 329 330 // DnsCacheConfig: Configuration for NodeLocalDNS, a dns cache running 331 // on cluster nodes 332 DnsCacheConfig *DnsCacheConfig `json:"dnsCacheConfig,omitempty"` 333 334 // GcePersistentDiskCsiDriverConfig: Configuration for the Compute 335 // Engine Persistent Disk CSI driver. 336 GcePersistentDiskCsiDriverConfig *GcePersistentDiskCsiDriverConfig `json:"gcePersistentDiskCsiDriverConfig,omitempty"` 337 338 // HorizontalPodAutoscaling: Configuration for the horizontal pod 339 // autoscaling feature, which 340 // increases or decreases the number of replica pods a replication 341 // controller 342 // has based on the resource usage of the existing pods. 343 HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"` 344 345 // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing 346 // controller addon, which 347 // makes it easy to set up HTTP load balancers for services in a 348 // cluster. 349 HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` 350 351 // IstioConfig: Configuration for Istio, an open platform to connect, 352 // manage, and secure 353 // microservices. 354 IstioConfig *IstioConfig `json:"istioConfig,omitempty"` 355 356 // KalmConfig: Configuration for the KALM addon, which manages the 357 // lifecycle of k8s 358 // applications. 359 KalmConfig *KalmConfig `json:"kalmConfig,omitempty"` 360 361 // KubernetesDashboard: Configuration for the Kubernetes Dashboard. 362 // This addon is deprecated, and will be disabled in 1.15. It is 363 // recommended 364 // to use the Cloud Console to manage and monitor your Kubernetes 365 // clusters, 366 // workloads and applications. For more information, 367 // see: 368 // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboar 369 // ds 370 KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` 371 372 // NetworkPolicyConfig: Configuration for NetworkPolicy. This only 373 // tracks whether the addon 374 // is enabled or not on the Master, it does not track whether network 375 // policy 376 // is enabled for the nodes. 377 NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` 378 379 // ForceSendFields is a list of field names (e.g. "CloudRunConfig") to 380 // unconditionally include in API requests. By default, fields with 381 // empty values are omitted from API requests. However, any non-pointer, 382 // non-interface field appearing in ForceSendFields will be sent to the 383 // server regardless of whether the field is empty or not. This may be 384 // used to include empty fields in Patch requests. 385 ForceSendFields []string `json:"-"` 386 387 // NullFields is a list of field names (e.g. "CloudRunConfig") to 388 // include in API requests with the JSON null value. By default, fields 389 // with empty values are omitted from API requests. However, any field 390 // with an empty value appearing in NullFields will be sent to the 391 // server as null. It is an error if a field in this list has a 392 // non-empty value. This may be used to include null fields in Patch 393 // requests. 394 NullFields []string `json:"-"` 395} 396 397func (s *AddonsConfig) MarshalJSON() ([]byte, error) { 398 type NoMethod AddonsConfig 399 raw := NoMethod(*s) 400 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 401} 402 403// AuthenticatorGroupsConfig: Configuration for returning group 404// information from authenticators. 405type AuthenticatorGroupsConfig struct { 406 // Enabled: Whether this cluster should return group membership 407 // lookups 408 // during authentication using a group of security groups. 409 Enabled bool `json:"enabled,omitempty"` 410 411 // SecurityGroup: The name of the security group-of-groups to be used. 412 // Only relevant 413 // if enabled = true. 414 SecurityGroup string `json:"securityGroup,omitempty"` 415 416 // ForceSendFields is a list of field names (e.g. "Enabled") to 417 // unconditionally include in API requests. By default, fields with 418 // empty values are omitted from API requests. However, any non-pointer, 419 // non-interface field appearing in ForceSendFields will be sent to the 420 // server regardless of whether the field is empty or not. This may be 421 // used to include empty fields in Patch requests. 422 ForceSendFields []string `json:"-"` 423 424 // NullFields is a list of field names (e.g. "Enabled") to include in 425 // API requests with the JSON null value. By default, fields with empty 426 // values are omitted from API requests. However, any field with an 427 // empty value appearing in NullFields will be sent to the server as 428 // null. It is an error if a field in this list has a non-empty value. 429 // This may be used to include null fields in Patch requests. 430 NullFields []string `json:"-"` 431} 432 433func (s *AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { 434 type NoMethod AuthenticatorGroupsConfig 435 raw := NoMethod(*s) 436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 437} 438 439// AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for 440// the user to control how 441// the Auto Upgrades will proceed. 442type AutoUpgradeOptions struct { 443 // AutoUpgradeStartTime: [Output only] This field is set when upgrades 444 // are about to commence 445 // with the approximate start time for the upgrades, 446 // in 447 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 448 AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` 449 450 // Description: [Output only] This field is set when upgrades are about 451 // to commence 452 // with the description of the upgrade. 453 Description string `json:"description,omitempty"` 454 455 // ForceSendFields is a list of field names (e.g. 456 // "AutoUpgradeStartTime") to unconditionally include in API requests. 457 // By default, fields with empty values are omitted from API requests. 458 // However, any non-pointer, non-interface field appearing in 459 // ForceSendFields will be sent to the server regardless of whether the 460 // field is empty or not. This may be used to include empty fields in 461 // Patch requests. 462 ForceSendFields []string `json:"-"` 463 464 // NullFields is a list of field names (e.g. "AutoUpgradeStartTime") to 465 // include in API requests with the JSON null value. By default, fields 466 // with empty values are omitted from API requests. However, any field 467 // with an empty value appearing in NullFields will be sent to the 468 // server as null. It is an error if a field in this list has a 469 // non-empty value. This may be used to include null fields in Patch 470 // requests. 471 NullFields []string `json:"-"` 472} 473 474func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { 475 type NoMethod AutoUpgradeOptions 476 raw := NoMethod(*s) 477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 478} 479 480// AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults 481// contains defaults for a node pool created 482// by NAP. 483type AutoprovisioningNodePoolDefaults struct { 484 // Management: Specifies the node management options for NAP created 485 // node-pools. 486 Management *NodeManagement `json:"management,omitempty"` 487 488 // MinCpuPlatform: Minimum CPU platform to be used for NAP created node 489 // pools. 490 // The instance may be scheduled on the specified or newer CPU 491 // platform. 492 // Applicable values are the friendly names of CPU platforms, such 493 // as 494 // <code>minCpuPlatform: "Intel Haswell"</code> 495 // or 496 // <code>minCpuPlatform: "Intel Sandy Bridge"</code>. For 497 // more 498 // information, read [how to specify min 499 // CPU 500 // platform](https://cloud.google.com/compute/docs/instances/specify- 501 // min-cpu-platform) 502 // To unset the min cpu platform field pass "automatic" as field value. 503 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 504 505 // OauthScopes: Scopes that are used by NAP when creating node pools. If 506 // oauth_scopes are 507 // specified, service_account should be empty. 508 OauthScopes []string `json:"oauthScopes,omitempty"` 509 510 // ServiceAccount: The Google Cloud Platform Service Account to be used 511 // by the node VMs. If 512 // service_account is specified, scopes should be empty. 513 ServiceAccount string `json:"serviceAccount,omitempty"` 514 515 // UpgradeSettings: Specifies the upgrade settings for NAP created node 516 // pools 517 UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` 518 519 // ForceSendFields is a list of field names (e.g. "Management") to 520 // unconditionally include in API requests. By default, fields with 521 // empty values are omitted from API requests. However, any non-pointer, 522 // non-interface field appearing in ForceSendFields will be sent to the 523 // server regardless of whether the field is empty or not. This may be 524 // used to include empty fields in Patch requests. 525 ForceSendFields []string `json:"-"` 526 527 // NullFields is a list of field names (e.g. "Management") to include in 528 // API requests with the JSON null value. By default, fields with empty 529 // values are omitted from API requests. However, any field with an 530 // empty value appearing in NullFields will be sent to the server as 531 // null. It is an error if a field in this list has a non-empty value. 532 // This may be used to include null fields in Patch requests. 533 NullFields []string `json:"-"` 534} 535 536func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { 537 type NoMethod AutoprovisioningNodePoolDefaults 538 raw := NoMethod(*s) 539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 540} 541 542// AvailableVersion: AvailableVersion is an additional Kubernetes 543// versions offered 544// to users who subscribed to the release channel. 545type AvailableVersion struct { 546 // Reason: Reason for availability. 547 Reason string `json:"reason,omitempty"` 548 549 // Version: Kubernetes version. 550 Version string `json:"version,omitempty"` 551 552 // ForceSendFields is a list of field names (e.g. "Reason") to 553 // unconditionally include in API requests. By default, fields with 554 // empty values are omitted from API requests. However, any non-pointer, 555 // non-interface field appearing in ForceSendFields will be sent to the 556 // server regardless of whether the field is empty or not. This may be 557 // used to include empty fields in Patch requests. 558 ForceSendFields []string `json:"-"` 559 560 // NullFields is a list of field names (e.g. "Reason") to include in API 561 // requests with the JSON null value. By default, fields with empty 562 // values are omitted from API requests. However, any field with an 563 // empty value appearing in NullFields will be sent to the server as 564 // null. It is an error if a field in this list has a non-empty value. 565 // This may be used to include null fields in Patch requests. 566 NullFields []string `json:"-"` 567} 568 569func (s *AvailableVersion) MarshalJSON() ([]byte, error) { 570 type NoMethod AvailableVersion 571 raw := NoMethod(*s) 572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 573} 574 575// BigQueryDestination: Parameters for using BigQuery as the destination 576// of resource usage export. 577type BigQueryDestination struct { 578 // DatasetId: The ID of a BigQuery Dataset. 579 DatasetId string `json:"datasetId,omitempty"` 580 581 // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") to include in 590 // API 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 *BigQueryDestination) MarshalJSON() ([]byte, error) { 599 type NoMethod BigQueryDestination 600 raw := NoMethod(*s) 601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 602} 603 604// BinaryAuthorization: Configuration for Binary Authorization. 605type BinaryAuthorization struct { 606 // Enabled: Enable Binary Authorization for this cluster. If enabled, 607 // all container 608 // images will be validated by Google Binauthz. 609 Enabled bool `json:"enabled,omitempty"` 610 611 // ForceSendFields is a list of field names (e.g. "Enabled") to 612 // unconditionally include in API requests. By default, fields with 613 // empty values are omitted from API requests. However, any non-pointer, 614 // non-interface field appearing in ForceSendFields will be sent to the 615 // server regardless of whether the field is empty or not. This may be 616 // used to include empty fields in Patch requests. 617 ForceSendFields []string `json:"-"` 618 619 // NullFields is a list of field names (e.g. "Enabled") to include in 620 // API requests with the JSON null value. By default, fields with empty 621 // values are omitted from API requests. However, any field with an 622 // empty value appearing in NullFields will be sent to the server as 623 // null. It is an error if a field in this list has a non-empty value. 624 // This may be used to include null fields in Patch requests. 625 NullFields []string `json:"-"` 626} 627 628func (s *BinaryAuthorization) MarshalJSON() ([]byte, error) { 629 type NoMethod BinaryAuthorization 630 raw := NoMethod(*s) 631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 632} 633 634// CancelOperationRequest: CancelOperationRequest cancels a single 635// operation. 636type CancelOperationRequest struct { 637 // Name: The name (project, location, operation id) of the operation to 638 // cancel. 639 // Specified in the format 'projects/*/locations/*/operations/*'. 640 Name string `json:"name,omitempty"` 641 642 // OperationId: Required. Deprecated. The server-assigned `name` of the 643 // operation. 644 // This field has been deprecated and replaced by the name field. 645 OperationId string `json:"operationId,omitempty"` 646 647 // ProjectId: Required. Deprecated. The Google Developers Console 648 // [project ID or 649 // project 650 // number](https://support.google.com/cloud/answer/6158840). 651 // This 652 // field has been deprecated and replaced by the name field. 653 ProjectId string `json:"projectId,omitempty"` 654 655 // Zone: Required. Deprecated. The name of the Google Compute 656 // Engine 657 // [zone](https://cloud.google.com/compute/docs/zones#available) in 658 // which the 659 // operation resides. This field has been deprecated and replaced by the 660 // name 661 // field. 662 Zone string `json:"zone,omitempty"` 663 664 // ForceSendFields is a list of field names (e.g. "Name") to 665 // unconditionally include in API requests. By default, fields with 666 // empty values are omitted from API requests. However, any non-pointer, 667 // non-interface field appearing in ForceSendFields will be sent to the 668 // server regardless of whether the field is empty or not. This may be 669 // used to include empty fields in Patch requests. 670 ForceSendFields []string `json:"-"` 671 672 // NullFields is a list of field names (e.g. "Name") to include in API 673 // requests with the JSON null value. By default, fields with empty 674 // values are omitted from API requests. However, any field with an 675 // empty value appearing in NullFields will be sent to the server as 676 // null. It is an error if a field in this list has a non-empty value. 677 // This may be used to include null fields in Patch requests. 678 NullFields []string `json:"-"` 679} 680 681func (s *CancelOperationRequest) MarshalJSON() ([]byte, error) { 682 type NoMethod CancelOperationRequest 683 raw := NoMethod(*s) 684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 685} 686 687// CidrBlock: CidrBlock contains an optional name and one CIDR block. 688type CidrBlock struct { 689 // CidrBlock: cidr_block must be specified in CIDR notation. 690 CidrBlock string `json:"cidrBlock,omitempty"` 691 692 // DisplayName: display_name is an optional field for users to identify 693 // CIDR blocks. 694 DisplayName string `json:"displayName,omitempty"` 695 696 // ForceSendFields is a list of field names (e.g. "CidrBlock") to 697 // unconditionally include in API requests. By default, fields with 698 // empty values are omitted from API requests. However, any non-pointer, 699 // non-interface field appearing in ForceSendFields will be sent to the 700 // server regardless of whether the field is empty or not. This may be 701 // used to include empty fields in Patch requests. 702 ForceSendFields []string `json:"-"` 703 704 // NullFields is a list of field names (e.g. "CidrBlock") to include in 705 // API requests with the JSON null value. By default, fields with empty 706 // values are omitted from API requests. However, any field with an 707 // empty value appearing in NullFields will be sent to the server as 708 // null. It is an error if a field in this list has a non-empty value. 709 // This may be used to include null fields in Patch requests. 710 NullFields []string `json:"-"` 711} 712 713func (s *CidrBlock) MarshalJSON() ([]byte, error) { 714 type NoMethod CidrBlock 715 raw := NoMethod(*s) 716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 717} 718 719// ClientCertificateConfig: Configuration for client certificates on the 720// cluster. 721type ClientCertificateConfig struct { 722 // IssueClientCertificate: Issue a client certificate. 723 IssueClientCertificate bool `json:"issueClientCertificate,omitempty"` 724 725 // ForceSendFields is a list of field names (e.g. 726 // "IssueClientCertificate") to unconditionally include in API requests. 727 // By default, fields with empty values are omitted from API requests. 728 // However, any non-pointer, non-interface field appearing in 729 // ForceSendFields will be sent to the server regardless of whether the 730 // field is empty or not. This may be used to include empty fields in 731 // Patch requests. 732 ForceSendFields []string `json:"-"` 733 734 // NullFields is a list of field names (e.g. "IssueClientCertificate") 735 // to include in API requests with the JSON null value. By default, 736 // fields with empty values are omitted from API requests. However, any 737 // field with an empty value appearing in NullFields will be sent to the 738 // server as null. It is an error if a field in this list has a 739 // non-empty value. This may be used to include null fields in Patch 740 // requests. 741 NullFields []string `json:"-"` 742} 743 744func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { 745 type NoMethod ClientCertificateConfig 746 raw := NoMethod(*s) 747 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 748} 749 750// CloudRunConfig: Configuration options for the Cloud Run feature. 751type CloudRunConfig struct { 752 // Disabled: Whether Cloud Run addon is enabled for this cluster. 753 Disabled bool `json:"disabled,omitempty"` 754 755 // ForceSendFields is a list of field names (e.g. "Disabled") to 756 // unconditionally include in API requests. By default, fields with 757 // empty values are omitted from API requests. However, any non-pointer, 758 // non-interface field appearing in ForceSendFields will be sent to the 759 // server regardless of whether the field is empty or not. This may be 760 // used to include empty fields in Patch requests. 761 ForceSendFields []string `json:"-"` 762 763 // NullFields is a list of field names (e.g. "Disabled") to include in 764 // API requests with the JSON null value. By default, fields with empty 765 // values are omitted from API requests. However, any field with an 766 // empty value appearing in NullFields will be sent to the server as 767 // null. It is an error if a field in this list has a non-empty value. 768 // This may be used to include null fields in Patch requests. 769 NullFields []string `json:"-"` 770} 771 772func (s *CloudRunConfig) MarshalJSON() ([]byte, error) { 773 type NoMethod CloudRunConfig 774 raw := NoMethod(*s) 775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 776} 777 778// Cluster: A Google Kubernetes Engine cluster. 779type Cluster struct { 780 // AddonsConfig: Configurations for the various addons available to run 781 // in the cluster. 782 AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` 783 784 // AuthenticatorGroupsConfig: Configuration controlling RBAC group 785 // membership information. 786 AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"authenticatorGroupsConfig,omitempty"` 787 788 // Autoscaling: Cluster-level autoscaling configuration. 789 Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"` 790 791 // BinaryAuthorization: Configuration for Binary Authorization. 792 BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` 793 794 // ClusterIpv4Cidr: The IP address range of the container pods in this 795 // cluster, 796 // in 797 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 798 // 799 // notation (e.g. `10.96.0.0/14`). Leave blank to have 800 // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. 801 ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` 802 803 // ClusterTelemetry: Telemetry integration for the cluster. 804 ClusterTelemetry *ClusterTelemetry `json:"clusterTelemetry,omitempty"` 805 806 // Conditions: Which conditions caused the current cluster state. 807 Conditions []*StatusCondition `json:"conditions,omitempty"` 808 809 // CreateTime: [Output only] The time the cluster was created, 810 // in 811 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 812 CreateTime string `json:"createTime,omitempty"` 813 814 // CurrentMasterVersion: [Output only] The current software version of 815 // the master endpoint. 816 CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` 817 818 // CurrentNodeCount: [Output only] The number of nodes currently in the 819 // cluster. Deprecated. 820 // Call Kubernetes API directly to retrieve node information. 821 CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` 822 823 // CurrentNodeVersion: [Output only] Deprecated, 824 // use 825 // [NodePool.version](https://cloud.google.com/kubernetes-engine/docs 826 // /reference/rest/v1beta1/projects.locations.clusters.nodePools) 827 // instead 828 // . The current version of the node software components. 829 // If they are currently at multiple versions because they're in the 830 // process 831 // of being upgraded, this reflects the minimum version of all nodes. 832 CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` 833 834 // DatabaseEncryption: Configuration of etcd encryption. 835 DatabaseEncryption *DatabaseEncryption `json:"databaseEncryption,omitempty"` 836 837 // DefaultMaxPodsConstraint: The default constraint on the maximum 838 // number of pods that can be run 839 // simultaneously on a node in the node pool of this cluster. Only 840 // honored 841 // if cluster created with IP Alias support. 842 DefaultMaxPodsConstraint *MaxPodsConstraint `json:"defaultMaxPodsConstraint,omitempty"` 843 844 // Description: An optional description of this cluster. 845 Description string `json:"description,omitempty"` 846 847 // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this 848 // cluster. This includes alpha 849 // API groups (e.g. v1beta1) and features that may not be production 850 // ready in 851 // the kubernetes version of the master and nodes. 852 // The cluster has no SLA for uptime and master/node upgrades are 853 // disabled. 854 // Alpha enabled clusters are automatically deleted thirty days 855 // after 856 // creation. 857 EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` 858 859 // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. 860 // This field is deprecated, use tpu_config.enabled instead. 861 EnableTpu bool `json:"enableTpu,omitempty"` 862 863 // Endpoint: [Output only] The IP address of this cluster's master 864 // endpoint. 865 // The endpoint can be accessed from the internet 866 // at 867 // `https://username:password@endpoint/`. 868 // 869 // See the `masterAuth` property of this resource for username 870 // and 871 // password information. 872 Endpoint string `json:"endpoint,omitempty"` 873 874 // ExpireTime: [Output only] The time the cluster will be 875 // automatically 876 // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text 877 // format. 878 ExpireTime string `json:"expireTime,omitempty"` 879 880 // InitialClusterVersion: The initial Kubernetes version for this 881 // cluster. Valid versions are those 882 // found in validMasterVersions returned by getServerConfig. The 883 // version can 884 // be upgraded over time; such upgrades are reflected 885 // in 886 // currentMasterVersion and currentNodeVersion. 887 // 888 // Users may specify either explicit versions offered by 889 // Kubernetes Engine or version aliases, which have the following 890 // behavior: 891 // 892 // - "latest": picks the highest valid Kubernetes version 893 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 894 // version 895 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 896 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 897 // - "","-": picks the default Kubernetes version 898 InitialClusterVersion string `json:"initialClusterVersion,omitempty"` 899 900 // InitialNodeCount: The number of nodes to create in this cluster. You 901 // must ensure that your 902 // Compute Engine <a href="/compute/docs/resource-quotas">resource 903 // quota</a> 904 // is sufficient for this number of instances. You must also have 905 // available 906 // firewall and routes quota. 907 // For requests, this field should only be used in lieu of a 908 // "node_pool" object, since this configuration (along with 909 // the 910 // "node_config") will be used to create a "NodePool" object with 911 // an 912 // auto-generated name. Do not use this and a node_pool at the same 913 // time. 914 // 915 // This field is deprecated, use node_pool.initial_node_count instead. 916 InitialNodeCount int64 `json:"initialNodeCount,omitempty"` 917 918 // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls. 919 InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` 920 921 // IpAllocationPolicy: Configuration for cluster IP allocation. 922 IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` 923 924 // LabelFingerprint: The fingerprint of the set of labels for this 925 // cluster. 926 LabelFingerprint string `json:"labelFingerprint,omitempty"` 927 928 // LegacyAbac: Configuration for the legacy ABAC authorization mode. 929 LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` 930 931 // Location: [Output only] The name of the Google Compute 932 // Engine 933 // [zone](https://cloud.google.com/compute/docs/regions-zones/regi 934 // ons-zones#available) 935 // or 936 // [region](https://cloud.google.com/compute/docs 937 // /regions-zones/regions-zones#available) 938 // in which the cluster resides. 939 Location string `json:"location,omitempty"` 940 941 // Locations: The list of Google Compute 942 // Engine 943 // [zones](https://cloud.google.com/compute/docs/zones#available) in 944 // which the 945 // cluster's nodes should be located. 946 Locations []string `json:"locations,omitempty"` 947 948 // LoggingService: The logging service the cluster should use to write 949 // logs. 950 // Currently available options: 951 // 952 // * `logging.googleapis.com/kubernetes` - The Cloud Logging 953 // service with a Kubernetes-native resource model 954 // * `logging.googleapis.com` - The legacy Cloud Logging service (no 955 // longer 956 // available as of GKE 1.15). 957 // * `none` - no logs will be exported from the cluster. 958 // 959 // If left as an empty string,`logging.googleapis.com/kubernetes` will 960 // be 961 // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. 962 LoggingService string `json:"loggingService,omitempty"` 963 964 // MaintenancePolicy: Configure the maintenance policy for this cluster. 965 MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` 966 967 // MasterAuth: The authentication information for accessing the master 968 // endpoint. 969 // If unspecified, the defaults are used: 970 // For clusters before v1.12, if master_auth is unspecified, `username` 971 // will 972 // be set to "admin", a random password will be generated, and a 973 // client 974 // certificate will be issued. 975 MasterAuth *MasterAuth `json:"masterAuth,omitempty"` 976 977 // MasterAuthorizedNetworksConfig: The configuration options for master 978 // authorized networks feature. 979 MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"` 980 981 // MasterIpv4CidrBlock: The IP prefix in CIDR notation to use for the 982 // hosted master network. 983 // This prefix will be used for assigning private IP addresses to 984 // the 985 // master or set of masters, as well as the ILB VIP. 986 // This field is deprecated, 987 // use 988 // private_cluster_config.master_ipv4_cidr_block instead. 989 MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` 990 991 // MonitoringService: The monitoring service the cluster should use to 992 // write metrics. 993 // Currently available options: 994 // 995 // * "monitoring.googleapis.com/kubernetes" - The Cloud 996 // Monitoring 997 // service with a Kubernetes-native resource model 998 // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service 999 // (no 1000 // longer available as of GKE 1.15). 1001 // * `none` - No metrics will be exported from the cluster. 1002 // 1003 // If left as an empty string,`monitoring.googleapis.com/kubernetes` 1004 // will be 1005 // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier 1006 // versions. 1007 MonitoringService string `json:"monitoringService,omitempty"` 1008 1009 // Name: The name of this cluster. The name must be unique within this 1010 // project 1011 // and location (e.g. zone or region), and can be up to 40 characters 1012 // with 1013 // the following restrictions: 1014 // 1015 // * Lowercase letters, numbers, and hyphens only. 1016 // * Must start with a letter. 1017 // * Must end with a number or a letter. 1018 Name string `json:"name,omitempty"` 1019 1020 // Network: The name of the Google Compute 1021 // Engine 1022 // [network](https://cloud.google.com/compute/docs/networks-and-fi 1023 // rewalls#networks) 1024 // to which the cluster is connected. If left unspecified, the 1025 // `default` 1026 // network will be used. On output this shows the network ID instead of 1027 // the 1028 // name. 1029 Network string `json:"network,omitempty"` 1030 1031 // NetworkConfig: Configuration for cluster networking. 1032 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` 1033 1034 // NetworkPolicy: Configuration options for the NetworkPolicy feature. 1035 NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` 1036 1037 // NodeConfig: Parameters used in creating the cluster's nodes. 1038 // For requests, this field should only be used in lieu of a 1039 // "node_pool" object, since this configuration (along with 1040 // the 1041 // "initial_node_count") will be used to create a "NodePool" object with 1042 // an 1043 // auto-generated name. Do not use this and a node_pool at the same 1044 // time. 1045 // For responses, this field will be populated with the node 1046 // configuration of 1047 // the first node pool. (For configuration of each node pool, 1048 // see 1049 // `node_pool.config`) 1050 // 1051 // If unspecified, the defaults are used. 1052 // This field is deprecated, use node_pool.config instead. 1053 NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` 1054 1055 // NodeIpv4CidrSize: [Output only] The size of the address space on each 1056 // node for hosting 1057 // containers. This is provisioned from within the 1058 // `container_ipv4_cidr` 1059 // range. This field will only be set when cluster is in route-based 1060 // network 1061 // mode. 1062 NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` 1063 1064 // NodePools: The node pools associated with this cluster. 1065 // This field should not be set if "node_config" or "initial_node_count" 1066 // are 1067 // specified. 1068 NodePools []*NodePool `json:"nodePools,omitempty"` 1069 1070 // PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy 1071 // feature. 1072 PodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"podSecurityPolicyConfig,omitempty"` 1073 1074 // PrivateCluster: If this is a private cluster setup. Private clusters 1075 // are clusters that, by 1076 // default have no external IP addresses on the nodes and where nodes 1077 // and the 1078 // master communicate over private IP addresses. 1079 // This field is deprecated, use 1080 // private_cluster_config.enable_private_nodes 1081 // instead. 1082 PrivateCluster bool `json:"privateCluster,omitempty"` 1083 1084 // PrivateClusterConfig: Configuration for private cluster. 1085 PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` 1086 1087 // ReleaseChannel: Release channel configuration. 1088 ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` 1089 1090 // ResourceLabels: The resource labels for the cluster to use to 1091 // annotate any related 1092 // Google Compute Engine resources. 1093 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 1094 1095 // ResourceUsageExportConfig: Configuration for exporting resource 1096 // usages. Resource usage export is 1097 // disabled when this config unspecified. 1098 ResourceUsageExportConfig *ResourceUsageExportConfig `json:"resourceUsageExportConfig,omitempty"` 1099 1100 // SelfLink: [Output only] Server-defined URL for the resource. 1101 SelfLink string `json:"selfLink,omitempty"` 1102 1103 // ServicesIpv4Cidr: [Output only] The IP address range of the 1104 // Kubernetes services in 1105 // this cluster, 1106 // in 1107 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1108 // 1109 // notation (e.g. `1.2.3.4/29`). Service addresses are 1110 // typically put in the last `/16` from the container CIDR. 1111 ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` 1112 1113 // ShieldedNodes: Shielded Nodes configuration. 1114 ShieldedNodes *ShieldedNodes `json:"shieldedNodes,omitempty"` 1115 1116 // Status: [Output only] The current status of this cluster. 1117 // 1118 // Possible values: 1119 // "STATUS_UNSPECIFIED" - Not set. 1120 // "PROVISIONING" - The PROVISIONING state indicates the cluster is 1121 // being created. 1122 // "RUNNING" - The RUNNING state indicates the cluster has been 1123 // created and is fully 1124 // usable. 1125 // "RECONCILING" - The RECONCILING state indicates that some work is 1126 // actively being done on 1127 // the cluster, such as upgrading the master or node software. Details 1128 // can 1129 // be found in the `statusMessage` field. 1130 // "STOPPING" - The STOPPING state indicates the cluster is being 1131 // deleted. 1132 // "ERROR" - The ERROR state indicates the cluster may be unusable. 1133 // Details 1134 // can be found in the `statusMessage` field. 1135 // "DEGRADED" - The DEGRADED state indicates the cluster requires user 1136 // action to restore 1137 // full functionality. Details can be found in the `statusMessage` 1138 // field. 1139 Status string `json:"status,omitempty"` 1140 1141 // StatusMessage: [Output only] Additional information about the current 1142 // status of this 1143 // cluster, if available. 1144 StatusMessage string `json:"statusMessage,omitempty"` 1145 1146 // Subnetwork: The name of the Google Compute 1147 // Engine 1148 // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) 1149 // to which 1150 // the cluster is connected. On output this shows the subnetwork ID 1151 // instead of 1152 // the name. 1153 Subnetwork string `json:"subnetwork,omitempty"` 1154 1155 // TpuConfig: Configuration for Cloud TPU support; 1156 TpuConfig *TpuConfig `json:"tpuConfig,omitempty"` 1157 1158 // TpuIpv4CidrBlock: [Output only] The IP address range of the Cloud 1159 // TPUs in this cluster, 1160 // in 1161 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1162 // 1163 // notation (e.g. `1.2.3.4/29`). 1164 TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` 1165 1166 // VerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling 1167 // configuration. 1168 VerticalPodAutoscaling *VerticalPodAutoscaling `json:"verticalPodAutoscaling,omitempty"` 1169 1170 // WorkloadIdentityConfig: Configuration for the use of Kubernetes 1171 // Service Accounts in GCP IAM 1172 // policies. 1173 WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` 1174 1175 // Zone: [Output only] The name of the Google Compute 1176 // Engine 1177 // [zone](https://cloud.google.com/compute/docs/zones#available) in 1178 // which the 1179 // cluster resides. This field is deprecated, use location instead. 1180 Zone string `json:"zone,omitempty"` 1181 1182 // ServerResponse contains the HTTP response code and headers from the 1183 // server. 1184 googleapi.ServerResponse `json:"-"` 1185 1186 // ForceSendFields is a list of field names (e.g. "AddonsConfig") to 1187 // unconditionally include in API requests. By default, fields with 1188 // empty values are omitted from API requests. However, any non-pointer, 1189 // non-interface field appearing in ForceSendFields will be sent to the 1190 // server regardless of whether the field is empty or not. This may be 1191 // used to include empty fields in Patch requests. 1192 ForceSendFields []string `json:"-"` 1193 1194 // NullFields is a list of field names (e.g. "AddonsConfig") to include 1195 // in API requests with the JSON null value. By default, fields with 1196 // empty values are omitted from API requests. However, any field with 1197 // an empty value appearing in NullFields will be sent to the server as 1198 // null. It is an error if a field in this list has a non-empty value. 1199 // This may be used to include null fields in Patch requests. 1200 NullFields []string `json:"-"` 1201} 1202 1203func (s *Cluster) MarshalJSON() ([]byte, error) { 1204 type NoMethod Cluster 1205 raw := NoMethod(*s) 1206 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1207} 1208 1209// ClusterAutoscaling: ClusterAutoscaling contains global, per-cluster 1210// information 1211// required by Cluster Autoscaler to automatically adjust 1212// the size of the cluster and create/delete 1213// node pools based on the current needs. 1214type ClusterAutoscaling struct { 1215 // AutoprovisioningLocations: The list of Google Compute 1216 // Engine 1217 // [zones](https://cloud.google.com/compute/docs/zones#available) in 1218 // which the 1219 // NodePool's nodes can be created by NAP. 1220 AutoprovisioningLocations []string `json:"autoprovisioningLocations,omitempty"` 1221 1222 // AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults 1223 // contains defaults for a node pool 1224 // created by NAP. 1225 AutoprovisioningNodePoolDefaults *AutoprovisioningNodePoolDefaults `json:"autoprovisioningNodePoolDefaults,omitempty"` 1226 1227 // AutoscalingProfile: Defines autoscaling behaviour. 1228 // 1229 // Possible values: 1230 // "PROFILE_UNSPECIFIED" - No change to autoscaling configuration. 1231 // "OPTIMIZE_UTILIZATION" - Prioritize optimizing utilization of 1232 // resources. 1233 // "BALANCED" - Use default (balanced) autoscaling configuration. 1234 AutoscalingProfile string `json:"autoscalingProfile,omitempty"` 1235 1236 // EnableNodeAutoprovisioning: Enables automatic node pool creation and 1237 // deletion. 1238 EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` 1239 1240 // ResourceLimits: Contains global constraints regarding minimum and 1241 // maximum 1242 // amount of resources in the cluster. 1243 ResourceLimits []*ResourceLimit `json:"resourceLimits,omitempty"` 1244 1245 // ForceSendFields is a list of field names (e.g. 1246 // "AutoprovisioningLocations") to unconditionally include in API 1247 // requests. By default, fields with empty values are omitted from API 1248 // requests. However, any non-pointer, non-interface field appearing in 1249 // ForceSendFields will be sent to the server regardless of whether the 1250 // field is empty or not. This may be used to include empty fields in 1251 // Patch requests. 1252 ForceSendFields []string `json:"-"` 1253 1254 // NullFields is a list of field names (e.g. 1255 // "AutoprovisioningLocations") to include in API requests with the JSON 1256 // null value. By default, fields with empty values are omitted from API 1257 // requests. However, any field with an empty value appearing in 1258 // NullFields will be sent to the server as null. It is an error if a 1259 // field in this list has a non-empty value. This may be used to include 1260 // null fields in Patch requests. 1261 NullFields []string `json:"-"` 1262} 1263 1264func (s *ClusterAutoscaling) MarshalJSON() ([]byte, error) { 1265 type NoMethod ClusterAutoscaling 1266 raw := NoMethod(*s) 1267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1268} 1269 1270// ClusterTelemetry: Telemetry integration for the cluster. 1271type ClusterTelemetry struct { 1272 // Type: Type of the integration. 1273 // 1274 // Possible values: 1275 // "UNSPECIFIED" - Not set. 1276 // "DISABLED" - Monitoring integration is disabled. 1277 // "ENABLED" - Monitoring integration is enabled. 1278 // "SYSTEM_ONLY" - Only system components are monitored and logged. 1279 Type string `json:"type,omitempty"` 1280 1281 // ForceSendFields is a list of field names (e.g. "Type") to 1282 // 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. "Type") to include in API 1290 // requests with the JSON null value. By default, fields with empty 1291 // values are omitted from API requests. However, any field with an 1292 // empty value appearing in NullFields will be sent to the server as 1293 // null. It is an error if a field in this list has a non-empty value. 1294 // This may be used to include null fields in Patch requests. 1295 NullFields []string `json:"-"` 1296} 1297 1298func (s *ClusterTelemetry) MarshalJSON() ([]byte, error) { 1299 type NoMethod ClusterTelemetry 1300 raw := NoMethod(*s) 1301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1302} 1303 1304// ClusterUpdate: ClusterUpdate describes an update to the cluster. 1305// Exactly one update can 1306// be applied to a cluster with each request, so at most one field can 1307// be 1308// provided. 1309type ClusterUpdate struct { 1310 // DesiredAddonsConfig: Configurations for the various addons available 1311 // to run in the cluster. 1312 DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` 1313 1314 // DesiredBinaryAuthorization: The desired configuration options for the 1315 // Binary Authorization feature. 1316 DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"` 1317 1318 // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. 1319 DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` 1320 1321 // DesiredClusterTelemetry: The desired telemetry integration for the 1322 // cluster. 1323 DesiredClusterTelemetry *ClusterTelemetry `json:"desiredClusterTelemetry,omitempty"` 1324 1325 // DesiredDatabaseEncryption: Configuration of etcd encryption. 1326 DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` 1327 1328 // DesiredImageType: The desired image type for the node pool. 1329 // NOTE: Set the "desired_node_pool" field as well. 1330 DesiredImageType string `json:"desiredImageType,omitempty"` 1331 1332 // DesiredIntraNodeVisibilityConfig: The desired config of Intra-node 1333 // visibility. 1334 DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"` 1335 1336 // DesiredLocations: The desired list of Google Compute 1337 // Engine 1338 // [zones](https://cloud.google.com/compute/docs/zones#available) in 1339 // which the 1340 // cluster's nodes should be located. Changing the locations a cluster 1341 // is in 1342 // will result in nodes being either created or removed from the 1343 // cluster, 1344 // depending on whether locations are being added or removed. 1345 // 1346 // This list must always include the cluster's primary zone. 1347 DesiredLocations []string `json:"desiredLocations,omitempty"` 1348 1349 // DesiredLoggingService: The logging service the cluster should use to 1350 // write logs. 1351 // Currently available options: 1352 // 1353 // * `logging.googleapis.com/kubernetes` - The Cloud Logging 1354 // service with a Kubernetes-native resource model 1355 // * `logging.googleapis.com` - The legacy Cloud Logging service (no 1356 // longer 1357 // available as of GKE 1.15). 1358 // * `none` - no logs will be exported from the cluster. 1359 // 1360 // If left as an empty string,`logging.googleapis.com/kubernetes` will 1361 // be 1362 // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. 1363 DesiredLoggingService string `json:"desiredLoggingService,omitempty"` 1364 1365 // DesiredMasterAuthorizedNetworksConfig: The desired configuration 1366 // options for master authorized networks feature. 1367 DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` 1368 1369 // DesiredMasterVersion: The Kubernetes version to change the master to. 1370 // The only valid value is the 1371 // latest supported version. 1372 // 1373 // Users may specify either explicit versions offered by 1374 // Kubernetes Engine or version aliases, which have the following 1375 // behavior: 1376 // 1377 // - "latest": picks the highest valid Kubernetes version 1378 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 1379 // version 1380 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 1381 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 1382 // - "-": picks the default Kubernetes version 1383 DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` 1384 1385 // DesiredMonitoringService: The monitoring service the cluster should 1386 // use to write metrics. 1387 // Currently available options: 1388 // 1389 // * "monitoring.googleapis.com/kubernetes" - The Cloud 1390 // Monitoring 1391 // service with a Kubernetes-native resource model 1392 // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service 1393 // (no 1394 // longer available as of GKE 1.15). 1395 // * `none` - No metrics will be exported from the cluster. 1396 // 1397 // If left as an empty string,`monitoring.googleapis.com/kubernetes` 1398 // will be 1399 // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier 1400 // versions. 1401 DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` 1402 1403 // DesiredNodePoolAutoscaling: Autoscaler configuration for the node 1404 // pool specified in 1405 // desired_node_pool_id. If there is only one pool in the 1406 // cluster and desired_node_pool_id is not provided then 1407 // the change applies to that single node pool. 1408 DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"` 1409 1410 // DesiredNodePoolId: The node pool to be upgraded. This field is 1411 // mandatory if 1412 // "desired_node_version", 1413 // "desired_image_family", 1414 // "desired_node_pool_autoscaling", or 1415 // "desired_workload_metadata_config" 1416 // is specified and there is more than one node pool on the cluster. 1417 DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` 1418 1419 // DesiredNodeVersion: The Kubernetes version to change the nodes to 1420 // (typically an 1421 // upgrade). 1422 // 1423 // Users may specify either explicit versions offered by 1424 // Kubernetes Engine or version aliases, which have the following 1425 // behavior: 1426 // 1427 // - "latest": picks the highest valid Kubernetes version 1428 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 1429 // version 1430 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 1431 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 1432 // - "-": picks the Kubernetes master version 1433 DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` 1434 1435 // DesiredPodSecurityPolicyConfig: The desired configuration options for 1436 // the PodSecurityPolicy feature. 1437 DesiredPodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"desiredPodSecurityPolicyConfig,omitempty"` 1438 1439 // DesiredPrivateClusterConfig: The desired private cluster 1440 // configuration. 1441 DesiredPrivateClusterConfig *PrivateClusterConfig `json:"desiredPrivateClusterConfig,omitempty"` 1442 1443 // DesiredReleaseChannel: The desired release channel configuration. 1444 DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` 1445 1446 // DesiredResourceUsageExportConfig: The desired configuration for 1447 // exporting resource usage. 1448 DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"` 1449 1450 // DesiredShieldedNodes: Configuration for Shielded Nodes. 1451 DesiredShieldedNodes *ShieldedNodes `json:"desiredShieldedNodes,omitempty"` 1452 1453 // DesiredTpuConfig: The desired Cloud TPU configuration. 1454 DesiredTpuConfig *TpuConfig `json:"desiredTpuConfig,omitempty"` 1455 1456 // DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling 1457 // configuration. 1458 DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"` 1459 1460 // DesiredWorkloadIdentityConfig: Configuration for Workload Identity. 1461 DesiredWorkloadIdentityConfig *WorkloadIdentityConfig `json:"desiredWorkloadIdentityConfig,omitempty"` 1462 1463 // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig") 1464 // to unconditionally include in API requests. By default, fields with 1465 // empty values are omitted from API requests. However, any non-pointer, 1466 // non-interface field appearing in ForceSendFields will be sent to the 1467 // server regardless of whether the field is empty or not. This may be 1468 // used to include empty fields in Patch requests. 1469 ForceSendFields []string `json:"-"` 1470 1471 // NullFields is a list of field names (e.g. "DesiredAddonsConfig") to 1472 // include in API requests with the JSON null value. By default, fields 1473 // with empty values are omitted from API requests. However, any field 1474 // with an empty value appearing in NullFields will be sent to the 1475 // server as null. It is an error if a field in this list has a 1476 // non-empty value. This may be used to include null fields in Patch 1477 // requests. 1478 NullFields []string `json:"-"` 1479} 1480 1481func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { 1482 type NoMethod ClusterUpdate 1483 raw := NoMethod(*s) 1484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1485} 1486 1487// CompleteIPRotationRequest: CompleteIPRotationRequest moves the 1488// cluster master back into single-IP mode. 1489type CompleteIPRotationRequest struct { 1490 // ClusterId: Required. Deprecated. The name of the cluster. 1491 // This field has been deprecated and replaced by the name field. 1492 ClusterId string `json:"clusterId,omitempty"` 1493 1494 // Name: The name (project, location, cluster id) of the cluster to 1495 // complete IP 1496 // rotation. Specified in the format 1497 // 'projects/*/locations/*/clusters/*'. 1498 Name string `json:"name,omitempty"` 1499 1500 // ProjectId: Required. Deprecated. The Google Developers Console 1501 // [project ID or 1502 // project 1503 // number](https://developers.google.com/console/help/new/#projec 1504 // tnumber). 1505 // This field has been deprecated and replaced by the name field. 1506 ProjectId string `json:"projectId,omitempty"` 1507 1508 // Zone: Required. Deprecated. The name of the Google Compute 1509 // Engine 1510 // [zone](https://cloud.google.com/compute/docs/zones#available) in 1511 // which the 1512 // cluster resides. This field has been deprecated and replaced by the 1513 // name 1514 // field. 1515 Zone string `json:"zone,omitempty"` 1516 1517 // ForceSendFields is a list of field names (e.g. "ClusterId") to 1518 // unconditionally include in API requests. By default, fields with 1519 // empty values are omitted from API requests. However, any non-pointer, 1520 // non-interface field appearing in ForceSendFields will be sent to the 1521 // server regardless of whether the field is empty or not. This may be 1522 // used to include empty fields in Patch requests. 1523 ForceSendFields []string `json:"-"` 1524 1525 // NullFields is a list of field names (e.g. "ClusterId") to include in 1526 // API requests with the JSON null value. By default, fields with empty 1527 // values are omitted from API requests. However, any field with an 1528 // empty value appearing in NullFields will be sent to the server as 1529 // null. It is an error if a field in this list has a non-empty value. 1530 // This may be used to include null fields in Patch requests. 1531 NullFields []string `json:"-"` 1532} 1533 1534func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { 1535 type NoMethod CompleteIPRotationRequest 1536 raw := NoMethod(*s) 1537 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1538} 1539 1540// ConfigConnectorConfig: Configuration options for the Config Connector 1541// add-on. 1542type ConfigConnectorConfig struct { 1543 // Enabled: Whether Cloud Connector is enabled for this cluster. 1544 Enabled bool `json:"enabled,omitempty"` 1545 1546 // ForceSendFields is a list of field names (e.g. "Enabled") to 1547 // unconditionally include in API requests. By default, fields with 1548 // empty values are omitted from API requests. However, any non-pointer, 1549 // non-interface field appearing in ForceSendFields will be sent to the 1550 // server regardless of whether the field is empty or not. This may be 1551 // used to include empty fields in Patch requests. 1552 ForceSendFields []string `json:"-"` 1553 1554 // NullFields is a list of field names (e.g. "Enabled") to include in 1555 // API requests with the JSON null value. By default, fields with empty 1556 // values are omitted from API requests. However, any field with an 1557 // empty value appearing in NullFields will be sent to the server as 1558 // null. It is an error if a field in this list has a non-empty value. 1559 // This may be used to include null fields in Patch requests. 1560 NullFields []string `json:"-"` 1561} 1562 1563func (s *ConfigConnectorConfig) MarshalJSON() ([]byte, error) { 1564 type NoMethod ConfigConnectorConfig 1565 raw := NoMethod(*s) 1566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1567} 1568 1569// ConsumptionMeteringConfig: Parameters for controlling consumption 1570// metering. 1571type ConsumptionMeteringConfig struct { 1572 // Enabled: Whether to enable consumption metering for this cluster. If 1573 // enabled, a 1574 // second BigQuery table will be created to hold resource 1575 // consumption 1576 // records. 1577 Enabled bool `json:"enabled,omitempty"` 1578 1579 // ForceSendFields is a list of field names (e.g. "Enabled") to 1580 // unconditionally include in API requests. By default, fields with 1581 // empty values are omitted from API requests. However, any non-pointer, 1582 // non-interface field appearing in ForceSendFields will be sent to the 1583 // server regardless of whether the field is empty or not. This may be 1584 // used to include empty fields in Patch requests. 1585 ForceSendFields []string `json:"-"` 1586 1587 // NullFields is a list of field names (e.g. "Enabled") to include in 1588 // API requests with the JSON null value. By default, fields with empty 1589 // values are omitted from API requests. However, any field with an 1590 // empty value appearing in NullFields will be sent to the server as 1591 // null. It is an error if a field in this list has a non-empty value. 1592 // This may be used to include null fields in Patch requests. 1593 NullFields []string `json:"-"` 1594} 1595 1596func (s *ConsumptionMeteringConfig) MarshalJSON() ([]byte, error) { 1597 type NoMethod ConsumptionMeteringConfig 1598 raw := NoMethod(*s) 1599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1600} 1601 1602// CreateClusterRequest: CreateClusterRequest creates a cluster. 1603type CreateClusterRequest struct { 1604 // Cluster: Required. A 1605 // [cluster 1606 // resource](https://cloud.google.com/container-engine/reference 1607 // /rest/v1beta1/projects.zones.clusters) 1608 Cluster *Cluster `json:"cluster,omitempty"` 1609 1610 // Parent: The parent (project and location) where the cluster will be 1611 // created. 1612 // Specified in the format 'projects/*/locations/*'. 1613 Parent string `json:"parent,omitempty"` 1614 1615 // ProjectId: Required. Deprecated. The Google Developers Console 1616 // [project ID or 1617 // project 1618 // number](https://support.google.com/cloud/answer/6158840). 1619 // This 1620 // field has been deprecated and replaced by the parent field. 1621 ProjectId string `json:"projectId,omitempty"` 1622 1623 // Zone: Required. Deprecated. The name of the Google Compute 1624 // Engine 1625 // [zone](https://cloud.google.com/compute/docs/zones#available) in 1626 // which the 1627 // cluster resides. This field has been deprecated and replaced by the 1628 // parent 1629 // field. 1630 Zone string `json:"zone,omitempty"` 1631 1632 // ForceSendFields is a list of field names (e.g. "Cluster") to 1633 // unconditionally include in API requests. By default, fields with 1634 // empty values are omitted from API requests. However, any non-pointer, 1635 // non-interface field appearing in ForceSendFields will be sent to the 1636 // server regardless of whether the field is empty or not. This may be 1637 // used to include empty fields in Patch requests. 1638 ForceSendFields []string `json:"-"` 1639 1640 // NullFields is a list of field names (e.g. "Cluster") to include in 1641 // API requests with the JSON null value. By default, fields with empty 1642 // values are omitted from API requests. However, any field with an 1643 // empty value appearing in NullFields will be sent to the server as 1644 // null. It is an error if a field in this list has a non-empty value. 1645 // This may be used to include null fields in Patch requests. 1646 NullFields []string `json:"-"` 1647} 1648 1649func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { 1650 type NoMethod CreateClusterRequest 1651 raw := NoMethod(*s) 1652 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1653} 1654 1655// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for 1656// a cluster. 1657type CreateNodePoolRequest struct { 1658 // ClusterId: Required. Deprecated. The name of the cluster. 1659 // This field has been deprecated and replaced by the parent field. 1660 ClusterId string `json:"clusterId,omitempty"` 1661 1662 // NodePool: Required. The node pool to create. 1663 NodePool *NodePool `json:"nodePool,omitempty"` 1664 1665 // Parent: The parent (project, location, cluster id) where the node 1666 // pool will be 1667 // created. Specified in the format 1668 // 'projects/*/locations/*/clusters/*'. 1669 Parent string `json:"parent,omitempty"` 1670 1671 // ProjectId: Required. Deprecated. The Google Developers Console 1672 // [project ID or 1673 // project 1674 // number](https://developers.google.com/console/help/new/#projec 1675 // tnumber). 1676 // This field has been deprecated and replaced by the parent field. 1677 ProjectId string `json:"projectId,omitempty"` 1678 1679 // Zone: Required. Deprecated. The name of the Google Compute 1680 // Engine 1681 // [zone](https://cloud.google.com/compute/docs/zones#available) in 1682 // which the 1683 // cluster resides. This field has been deprecated and replaced by the 1684 // parent 1685 // field. 1686 Zone string `json:"zone,omitempty"` 1687 1688 // ForceSendFields is a list of field names (e.g. "ClusterId") to 1689 // unconditionally include in API requests. By default, fields with 1690 // empty values are omitted from API requests. However, any non-pointer, 1691 // non-interface field appearing in ForceSendFields will be sent to the 1692 // server regardless of whether the field is empty or not. This may be 1693 // used to include empty fields in Patch requests. 1694 ForceSendFields []string `json:"-"` 1695 1696 // NullFields is a list of field names (e.g. "ClusterId") to include in 1697 // API requests with the JSON null value. By default, fields with empty 1698 // values are omitted from API requests. However, any field with an 1699 // empty value appearing in NullFields will be sent to the server as 1700 // null. It is an error if a field in this list has a non-empty value. 1701 // This may be used to include null fields in Patch requests. 1702 NullFields []string `json:"-"` 1703} 1704 1705func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { 1706 type NoMethod CreateNodePoolRequest 1707 raw := NoMethod(*s) 1708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1709} 1710 1711// DailyMaintenanceWindow: Time window specified for daily maintenance 1712// operations. 1713type DailyMaintenanceWindow struct { 1714 // Duration: [Output only] Duration of the time window, automatically 1715 // chosen to be 1716 // smallest possible in the given scenario. 1717 Duration string `json:"duration,omitempty"` 1718 1719 // StartTime: Time within the maintenance window to start the 1720 // maintenance operations. 1721 // It must be in format "HH:MM", where HH : [00-23] and MM : [00-59] 1722 // GMT. 1723 StartTime string `json:"startTime,omitempty"` 1724 1725 // ForceSendFields is a list of field names (e.g. "Duration") to 1726 // unconditionally include in API requests. By default, fields with 1727 // empty values are omitted from API requests. However, any non-pointer, 1728 // non-interface field appearing in ForceSendFields will be sent to the 1729 // server regardless of whether the field is empty or not. This may be 1730 // used to include empty fields in Patch requests. 1731 ForceSendFields []string `json:"-"` 1732 1733 // NullFields is a list of field names (e.g. "Duration") to include in 1734 // API requests with the JSON null value. By default, fields with empty 1735 // values are omitted from API requests. However, any field with an 1736 // empty value appearing in NullFields will be sent to the server as 1737 // null. It is an error if a field in this list has a non-empty value. 1738 // This may be used to include null fields in Patch requests. 1739 NullFields []string `json:"-"` 1740} 1741 1742func (s *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) { 1743 type NoMethod DailyMaintenanceWindow 1744 raw := NoMethod(*s) 1745 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1746} 1747 1748// DatabaseEncryption: Configuration of etcd encryption. 1749type DatabaseEncryption struct { 1750 // KeyName: Name of CloudKMS key to use for the encryption of secrets in 1751 // etcd. 1752 // Ex. 1753 // projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-ke 1754 // y 1755 KeyName string `json:"keyName,omitempty"` 1756 1757 // State: Denotes the state of etcd encryption. 1758 // 1759 // Possible values: 1760 // "UNKNOWN" - Should never be set 1761 // "ENCRYPTED" - Secrets in etcd are encrypted. 1762 // "DECRYPTED" - Secrets in etcd are stored in plain text (at etcd 1763 // level) - this is 1764 // unrelated to Compute Engine level full disk encryption. 1765 State string `json:"state,omitempty"` 1766 1767 // ForceSendFields is a list of field names (e.g. "KeyName") to 1768 // unconditionally include in API requests. By default, fields with 1769 // empty values are omitted from API requests. However, any non-pointer, 1770 // non-interface field appearing in ForceSendFields will be sent to the 1771 // server regardless of whether the field is empty or not. This may be 1772 // used to include empty fields in Patch requests. 1773 ForceSendFields []string `json:"-"` 1774 1775 // NullFields is a list of field names (e.g. "KeyName") to include in 1776 // API requests with the JSON null value. By default, fields with empty 1777 // values are omitted from API requests. However, any field with an 1778 // empty value appearing in NullFields will be sent to the server as 1779 // null. It is an error if a field in this list has a non-empty value. 1780 // This may be used to include null fields in Patch requests. 1781 NullFields []string `json:"-"` 1782} 1783 1784func (s *DatabaseEncryption) MarshalJSON() ([]byte, error) { 1785 type NoMethod DatabaseEncryption 1786 raw := NoMethod(*s) 1787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1788} 1789 1790// DnsCacheConfig: Configuration for NodeLocal DNSCache 1791type DnsCacheConfig struct { 1792 // Enabled: Whether NodeLocal DNSCache is enabled for this cluster. 1793 Enabled bool `json:"enabled,omitempty"` 1794 1795 // ForceSendFields is a list of field names (e.g. "Enabled") to 1796 // unconditionally include in API requests. By default, fields with 1797 // empty values are omitted from API requests. However, any non-pointer, 1798 // non-interface field appearing in ForceSendFields will be sent to the 1799 // server regardless of whether the field is empty or not. This may be 1800 // used to include empty fields in Patch requests. 1801 ForceSendFields []string `json:"-"` 1802 1803 // NullFields is a list of field names (e.g. "Enabled") to include in 1804 // API requests with the JSON null value. By default, fields with empty 1805 // values are omitted from API requests. However, any field with an 1806 // empty value appearing in NullFields will be sent to the server as 1807 // null. It is an error if a field in this list has a non-empty value. 1808 // This may be used to include null fields in Patch requests. 1809 NullFields []string `json:"-"` 1810} 1811 1812func (s *DnsCacheConfig) MarshalJSON() ([]byte, error) { 1813 type NoMethod DnsCacheConfig 1814 raw := NoMethod(*s) 1815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1816} 1817 1818// Empty: A generic empty message that you can re-use to avoid defining 1819// duplicated 1820// empty messages in your APIs. A typical example is to use it as the 1821// request 1822// or the response type of an API method. For instance: 1823// 1824// service Foo { 1825// rpc Bar(google.protobuf.Empty) returns 1826// (google.protobuf.Empty); 1827// } 1828// 1829// The JSON representation for `Empty` is empty JSON object `{}`. 1830type Empty struct { 1831 // ServerResponse contains the HTTP response code and headers from the 1832 // server. 1833 googleapi.ServerResponse `json:"-"` 1834} 1835 1836// GcePersistentDiskCsiDriverConfig: Configuration for the Compute 1837// Engine PD CSI driver. This option can only be 1838// enabled at cluster creation time. 1839type GcePersistentDiskCsiDriverConfig struct { 1840 // Enabled: Whether the Compute Engine PD CSI driver is enabled for this 1841 // cluster. 1842 Enabled bool `json:"enabled,omitempty"` 1843 1844 // ForceSendFields is a list of field names (e.g. "Enabled") to 1845 // unconditionally include in API requests. By default, fields with 1846 // empty values are omitted from API requests. However, any non-pointer, 1847 // non-interface field appearing in ForceSendFields will be sent to the 1848 // server regardless of whether the field is empty or not. This may be 1849 // used to include empty fields in Patch requests. 1850 ForceSendFields []string `json:"-"` 1851 1852 // NullFields is a list of field names (e.g. "Enabled") to include in 1853 // API requests with the JSON null value. By default, fields with empty 1854 // values are omitted from API requests. However, any field with an 1855 // empty value appearing in NullFields will be sent to the server as 1856 // null. It is an error if a field in this list has a non-empty value. 1857 // This may be used to include null fields in Patch requests. 1858 NullFields []string `json:"-"` 1859} 1860 1861func (s *GcePersistentDiskCsiDriverConfig) MarshalJSON() ([]byte, error) { 1862 type NoMethod GcePersistentDiskCsiDriverConfig 1863 raw := NoMethod(*s) 1864 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1865} 1866 1867// GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web 1868// Key Set as specififed in rfc 7517 1869type GetJSONWebKeysResponse struct { 1870 // CacheHeader: OnePlatform automatically extracts this field and uses 1871 // it to set the HTTP 1872 // Cache-Control header. 1873 CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` 1874 1875 // Keys: The public component of the keys used by the cluster to sign 1876 // token 1877 // requests. 1878 Keys []*Jwk `json:"keys,omitempty"` 1879 1880 // ServerResponse contains the HTTP response code and headers from the 1881 // server. 1882 googleapi.ServerResponse `json:"-"` 1883 1884 // ForceSendFields is a list of field names (e.g. "CacheHeader") to 1885 // unconditionally include in API requests. By default, fields with 1886 // empty values are omitted from API requests. However, any non-pointer, 1887 // non-interface field appearing in ForceSendFields will be sent to the 1888 // server regardless of whether the field is empty or not. This may be 1889 // used to include empty fields in Patch requests. 1890 ForceSendFields []string `json:"-"` 1891 1892 // NullFields is a list of field names (e.g. "CacheHeader") to include 1893 // in API requests with the JSON null value. By default, fields with 1894 // empty values are omitted from API requests. However, any field with 1895 // an empty value appearing in NullFields will be sent to the server as 1896 // null. It is an error if a field in this list has a non-empty value. 1897 // This may be used to include null fields in Patch requests. 1898 NullFields []string `json:"-"` 1899} 1900 1901func (s *GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { 1902 type NoMethod GetJSONWebKeysResponse 1903 raw := NoMethod(*s) 1904 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1905} 1906 1907// GetOpenIDConfigResponse: GetOpenIDConfigResponse is an OIDC discovery 1908// document for the cluster. 1909// See the OpenID Connect Discovery 1.0 specification for details. 1910type GetOpenIDConfigResponse struct { 1911 // CacheHeader: OnePlatform automatically extracts this field and uses 1912 // it to set the HTTP 1913 // Cache-Control header. 1914 CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` 1915 1916 // ClaimsSupported: Supported claims. 1917 ClaimsSupported []string `json:"claims_supported,omitempty"` 1918 1919 // GrantTypes: Supported grant types. 1920 GrantTypes []string `json:"grant_types,omitempty"` 1921 1922 // IdTokenSigningAlgValuesSupported: supported ID Token signing 1923 // Algorithms. 1924 IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` 1925 1926 // Issuer: OIDC Issuer. 1927 Issuer string `json:"issuer,omitempty"` 1928 1929 // JwksUri: JSON Web Key uri. 1930 JwksUri string `json:"jwks_uri,omitempty"` 1931 1932 // ResponseTypesSupported: Supported response types. 1933 ResponseTypesSupported []string `json:"response_types_supported,omitempty"` 1934 1935 // SubjectTypesSupported: Supported subject types. 1936 SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` 1937 1938 // ServerResponse contains the HTTP response code and headers from the 1939 // server. 1940 googleapi.ServerResponse `json:"-"` 1941 1942 // ForceSendFields is a list of field names (e.g. "CacheHeader") to 1943 // unconditionally include in API requests. By default, fields with 1944 // empty values are omitted from API requests. However, any non-pointer, 1945 // non-interface field appearing in ForceSendFields will be sent to the 1946 // server regardless of whether the field is empty or not. This may be 1947 // used to include empty fields in Patch requests. 1948 ForceSendFields []string `json:"-"` 1949 1950 // NullFields is a list of field names (e.g. "CacheHeader") to include 1951 // in API requests with the JSON null value. By default, fields with 1952 // empty values are omitted from API requests. However, any field with 1953 // an empty value appearing in NullFields will be sent to the server as 1954 // null. It is an error if a field in this list has a non-empty value. 1955 // This may be used to include null fields in Patch requests. 1956 NullFields []string `json:"-"` 1957} 1958 1959func (s *GetOpenIDConfigResponse) MarshalJSON() ([]byte, error) { 1960 type NoMethod GetOpenIDConfigResponse 1961 raw := NoMethod(*s) 1962 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1963} 1964 1965// HorizontalPodAutoscaling: Configuration options for the horizontal 1966// pod autoscaling feature, which 1967// increases or decreases the number of replica pods a replication 1968// controller 1969// has based on the resource usage of the existing pods. 1970type HorizontalPodAutoscaling struct { 1971 // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled 1972 // in the cluster. 1973 // When enabled, it ensures that metrics are collected into 1974 // Stackdriver 1975 // Monitoring. 1976 Disabled bool `json:"disabled,omitempty"` 1977 1978 // ForceSendFields is a list of field names (e.g. "Disabled") to 1979 // unconditionally include in API requests. By default, fields with 1980 // empty values are omitted from API requests. However, any non-pointer, 1981 // non-interface field appearing in ForceSendFields will be sent to the 1982 // server regardless of whether the field is empty or not. This may be 1983 // used to include empty fields in Patch requests. 1984 ForceSendFields []string `json:"-"` 1985 1986 // NullFields is a list of field names (e.g. "Disabled") to include in 1987 // API requests with the JSON null value. By default, fields with empty 1988 // values are omitted from API requests. However, any field with an 1989 // empty value appearing in NullFields will be sent to the server as 1990 // null. It is an error if a field in this list has a non-empty value. 1991 // This may be used to include null fields in Patch requests. 1992 NullFields []string `json:"-"` 1993} 1994 1995func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { 1996 type NoMethod HorizontalPodAutoscaling 1997 raw := NoMethod(*s) 1998 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1999} 2000 2001// HttpCacheControlResponseHeader: RFC-2616: cache control support 2002type HttpCacheControlResponseHeader struct { 2003 // Age: 14.6 response cache age, in seconds since the response is 2004 // generated 2005 Age int64 `json:"age,omitempty,string"` 2006 2007 // Directive: 14.9 request and response directives 2008 Directive string `json:"directive,omitempty"` 2009 2010 // Expires: 14.21 response cache expires, in RFC 1123 date format 2011 Expires string `json:"expires,omitempty"` 2012 2013 // ForceSendFields is a list of field names (e.g. "Age") to 2014 // unconditionally include in API requests. By default, fields with 2015 // empty values are omitted from API requests. However, any non-pointer, 2016 // non-interface field appearing in ForceSendFields will be sent to the 2017 // server regardless of whether the field is empty or not. This may be 2018 // used to include empty fields in Patch requests. 2019 ForceSendFields []string `json:"-"` 2020 2021 // NullFields is a list of field names (e.g. "Age") to include in API 2022 // requests with the JSON null value. By default, fields with empty 2023 // values are omitted from API requests. However, any field with an 2024 // empty value appearing in NullFields will be sent to the server as 2025 // null. It is an error if a field in this list has a non-empty value. 2026 // This may be used to include null fields in Patch requests. 2027 NullFields []string `json:"-"` 2028} 2029 2030func (s *HttpCacheControlResponseHeader) MarshalJSON() ([]byte, error) { 2031 type NoMethod HttpCacheControlResponseHeader 2032 raw := NoMethod(*s) 2033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2034} 2035 2036// HttpLoadBalancing: Configuration options for the HTTP (L7) load 2037// balancing controller addon, 2038// which makes it easy to set up HTTP load balancers for services in a 2039// cluster. 2040type HttpLoadBalancing struct { 2041 // Disabled: Whether the HTTP Load Balancing controller is enabled in 2042 // the cluster. 2043 // When enabled, it runs a small pod in the cluster that manages the 2044 // load 2045 // balancers. 2046 Disabled bool `json:"disabled,omitempty"` 2047 2048 // ForceSendFields is a list of field names (e.g. "Disabled") to 2049 // unconditionally include in API requests. By default, fields with 2050 // empty values are omitted from API requests. However, any non-pointer, 2051 // non-interface field appearing in ForceSendFields will be sent to the 2052 // server regardless of whether the field is empty or not. This may be 2053 // used to include empty fields in Patch requests. 2054 ForceSendFields []string `json:"-"` 2055 2056 // NullFields is a list of field names (e.g. "Disabled") to include in 2057 // API requests with the JSON null value. By default, fields with empty 2058 // values are omitted from API requests. However, any field with an 2059 // empty value appearing in NullFields will be sent to the server as 2060 // null. It is an error if a field in this list has a non-empty value. 2061 // This may be used to include null fields in Patch requests. 2062 NullFields []string `json:"-"` 2063} 2064 2065func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { 2066 type NoMethod HttpLoadBalancing 2067 raw := NoMethod(*s) 2068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2069} 2070 2071// IPAllocationPolicy: Configuration for controlling how IPs are 2072// allocated in the cluster. 2073type IPAllocationPolicy struct { 2074 // AllowRouteOverlap: If true, allow allocation of cluster CIDR ranges 2075 // that overlap with certain 2076 // kinds of network routes. By default we do not allow cluster CIDR 2077 // ranges to 2078 // intersect with any user declared routes. With allow_route_overlap == 2079 // true, 2080 // we allow overlapping with CIDR ranges that are larger than the 2081 // cluster CIDR 2082 // range. 2083 // 2084 // If this field is set to true, then cluster and services CIDRs must 2085 // be 2086 // fully-specified (e.g. `10.96.0.0/14`, but not `/14`), which means: 2087 // 1) When `use_ip_aliases` is true, `cluster_ipv4_cidr_block` and 2088 // `services_ipv4_cidr_block` must be fully-specified. 2089 // 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse 2090 // be 2091 // fully-specified. 2092 AllowRouteOverlap bool `json:"allowRouteOverlap,omitempty"` 2093 2094 // ClusterIpv4Cidr: This field is deprecated, use 2095 // cluster_ipv4_cidr_block. 2096 ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` 2097 2098 // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs. 2099 // If this field is set, then 2100 // `cluster.cluster_ipv4_cidr` must be left blank. 2101 // 2102 // This field is only applicable when `use_ip_aliases` is true. 2103 // 2104 // Set to blank to have a range chosen with the default size. 2105 // 2106 // Set to /netmask (e.g. `/14`) to have a range chosen with a 2107 // specific 2108 // netmask. 2109 // 2110 // Set to 2111 // a 2112 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 2113 // 2114 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 2115 // (e.g. 2116 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 2117 // range 2118 // to use. 2119 ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` 2120 2121 // ClusterSecondaryRangeName: The name of the secondary range to be used 2122 // for the cluster CIDR 2123 // block. The secondary range will be used for pod IP 2124 // addresses. This must be an existing secondary range associated 2125 // with the cluster subnetwork. 2126 // 2127 // This field is only applicable with use_ip_aliases 2128 // and 2129 // create_subnetwork is false. 2130 ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` 2131 2132 // CreateSubnetwork: Whether a new subnetwork will be created 2133 // automatically for the cluster. 2134 // 2135 // This field is only applicable when `use_ip_aliases` is true. 2136 CreateSubnetwork bool `json:"createSubnetwork,omitempty"` 2137 2138 // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block. 2139 NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` 2140 2141 // NodeIpv4CidrBlock: The IP address range of the instance IPs in this 2142 // cluster. 2143 // 2144 // This is applicable only if `create_subnetwork` is true. 2145 // 2146 // Set to blank to have a range chosen with the default size. 2147 // 2148 // Set to /netmask (e.g. `/14`) to have a range chosen with a 2149 // specific 2150 // netmask. 2151 // 2152 // Set to 2153 // a 2154 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 2155 // 2156 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 2157 // (e.g. 2158 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 2159 // range 2160 // to use. 2161 NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"` 2162 2163 // ServicesIpv4Cidr: This field is deprecated, use 2164 // services_ipv4_cidr_block. 2165 ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` 2166 2167 // ServicesIpv4CidrBlock: The IP address range of the services IPs in 2168 // this cluster. If blank, a range 2169 // will be automatically chosen with the default size. 2170 // 2171 // This field is only applicable when `use_ip_aliases` is true. 2172 // 2173 // Set to blank to have a range chosen with the default size. 2174 // 2175 // Set to /netmask (e.g. `/14`) to have a range chosen with a 2176 // specific 2177 // netmask. 2178 // 2179 // Set to 2180 // a 2181 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 2182 // 2183 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 2184 // (e.g. 2185 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 2186 // range 2187 // to use. 2188 ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` 2189 2190 // ServicesSecondaryRangeName: The name of the secondary range to be 2191 // used as for the services 2192 // CIDR block. The secondary range will be used for service 2193 // ClusterIPs. This must be an existing secondary range associated 2194 // with the cluster subnetwork. 2195 // 2196 // This field is only applicable with use_ip_aliases 2197 // and 2198 // create_subnetwork is false. 2199 ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` 2200 2201 // SubnetworkName: A custom subnetwork name to be used if 2202 // `create_subnetwork` is true. If 2203 // this field is empty, then an automatic name will be chosen for the 2204 // new 2205 // subnetwork. 2206 SubnetworkName string `json:"subnetworkName,omitempty"` 2207 2208 // TpuIpv4CidrBlock: The IP address range of the Cloud TPUs in this 2209 // cluster. If unspecified, a 2210 // range will be automatically chosen with the default size. 2211 // 2212 // This field is only applicable when `use_ip_aliases` is true. 2213 // 2214 // If unspecified, the range will use the default size. 2215 // 2216 // Set to /netmask (e.g. `/14`) to have a range chosen with a 2217 // specific 2218 // netmask. 2219 // 2220 // Set to 2221 // a 2222 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 2223 // 2224 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks 2225 // (e.g. 2226 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific 2227 // range 2228 // to use. 2229 // This field is deprecated, use cluster.tpu_config.ipv4_cidr_block 2230 // instead. 2231 TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` 2232 2233 // UseIpAliases: Whether alias IPs will be used for pod IPs in the 2234 // cluster. 2235 // This is used in conjunction with use_routes. It cannot 2236 // be true if use_routes is true. If both use_ip_aliases and use_routes 2237 // are 2238 // false, then the server picks the default IP allocation mode 2239 UseIpAliases bool `json:"useIpAliases,omitempty"` 2240 2241 // UseRoutes: Whether routes will be used for pod IPs in the 2242 // cluster. 2243 // This is used in conjunction with use_ip_aliases. It cannot be true 2244 // if 2245 // use_ip_aliases is true. If both use_ip_aliases and use_routes are 2246 // false, 2247 // then the server picks the default IP allocation mode 2248 UseRoutes bool `json:"useRoutes,omitempty"` 2249 2250 // ForceSendFields is a list of field names (e.g. "AllowRouteOverlap") 2251 // to unconditionally include in API requests. By default, fields with 2252 // empty values are omitted from API requests. However, any non-pointer, 2253 // non-interface field appearing in ForceSendFields will be sent to the 2254 // server regardless of whether the field is empty or not. This may be 2255 // used to include empty fields in Patch requests. 2256 ForceSendFields []string `json:"-"` 2257 2258 // NullFields is a list of field names (e.g. "AllowRouteOverlap") to 2259 // include in API requests with the JSON null value. By default, fields 2260 // with empty values are omitted from API requests. However, any field 2261 // with an empty value appearing in NullFields will be sent to the 2262 // server as null. It is an error if a field in this list has a 2263 // non-empty value. This may be used to include null fields in Patch 2264 // requests. 2265 NullFields []string `json:"-"` 2266} 2267 2268func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { 2269 type NoMethod IPAllocationPolicy 2270 raw := NoMethod(*s) 2271 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2272} 2273 2274// IntraNodeVisibilityConfig: IntraNodeVisibilityConfig contains the 2275// desired config of the intra-node 2276// visibility on this cluster. 2277type IntraNodeVisibilityConfig struct { 2278 // Enabled: Enables intra node visibility for this cluster. 2279 Enabled bool `json:"enabled,omitempty"` 2280 2281 // ForceSendFields is a list of field names (e.g. "Enabled") to 2282 // unconditionally include in API requests. By default, fields with 2283 // empty values are omitted from API requests. However, any non-pointer, 2284 // non-interface field appearing in ForceSendFields will be sent to the 2285 // server regardless of whether the field is empty or not. This may be 2286 // used to include empty fields in Patch requests. 2287 ForceSendFields []string `json:"-"` 2288 2289 // NullFields is a list of field names (e.g. "Enabled") to include in 2290 // API requests with the JSON null value. By default, fields with empty 2291 // values are omitted from API requests. However, any field with an 2292 // empty value appearing in NullFields will be sent to the server as 2293 // null. It is an error if a field in this list has a non-empty value. 2294 // This may be used to include null fields in Patch requests. 2295 NullFields []string `json:"-"` 2296} 2297 2298func (s *IntraNodeVisibilityConfig) MarshalJSON() ([]byte, error) { 2299 type NoMethod IntraNodeVisibilityConfig 2300 raw := NoMethod(*s) 2301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2302} 2303 2304// IstioConfig: Configuration options for Istio addon. 2305type IstioConfig struct { 2306 // Auth: The specified Istio auth mode, either none, or mutual TLS. 2307 // 2308 // Possible values: 2309 // "AUTH_NONE" - auth not enabled 2310 // "AUTH_MUTUAL_TLS" - auth mutual TLS enabled 2311 Auth string `json:"auth,omitempty"` 2312 2313 // Disabled: Whether Istio is enabled for this cluster. 2314 Disabled bool `json:"disabled,omitempty"` 2315 2316 // ForceSendFields is a list of field names (e.g. "Auth") to 2317 // unconditionally include in API requests. By default, fields with 2318 // empty values are omitted from API requests. However, any non-pointer, 2319 // non-interface field appearing in ForceSendFields will be sent to the 2320 // server regardless of whether the field is empty or not. This may be 2321 // used to include empty fields in Patch requests. 2322 ForceSendFields []string `json:"-"` 2323 2324 // NullFields is a list of field names (e.g. "Auth") to include in API 2325 // requests with the JSON null value. By default, fields with empty 2326 // values are omitted from API requests. However, any field with an 2327 // empty value appearing in NullFields will be sent to the server as 2328 // null. It is an error if a field in this list has a non-empty value. 2329 // This may be used to include null fields in Patch requests. 2330 NullFields []string `json:"-"` 2331} 2332 2333func (s *IstioConfig) MarshalJSON() ([]byte, error) { 2334 type NoMethod IstioConfig 2335 raw := NoMethod(*s) 2336 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2337} 2338 2339// Jwk: Jwk is a JSON Web Key as specified in RFC 7517 2340type Jwk struct { 2341 // Alg: Algorithm. 2342 Alg string `json:"alg,omitempty"` 2343 2344 // Crv: Used for ECDSA keys. 2345 Crv string `json:"crv,omitempty"` 2346 2347 // E: Used for RSA keys. 2348 E string `json:"e,omitempty"` 2349 2350 // Kid: Key ID. 2351 Kid string `json:"kid,omitempty"` 2352 2353 // Kty: Key Type. 2354 Kty string `json:"kty,omitempty"` 2355 2356 // N: Used for RSA keys. 2357 N string `json:"n,omitempty"` 2358 2359 // Use: Permitted uses for the public keys. 2360 Use string `json:"use,omitempty"` 2361 2362 // X: Used for ECDSA keys. 2363 X string `json:"x,omitempty"` 2364 2365 // Y: Used for ECDSA keys. 2366 Y string `json:"y,omitempty"` 2367 2368 // ForceSendFields is a list of field names (e.g. "Alg") to 2369 // unconditionally include in API requests. By default, fields with 2370 // empty values are omitted from API requests. However, any non-pointer, 2371 // non-interface field appearing in ForceSendFields will be sent to the 2372 // server regardless of whether the field is empty or not. This may be 2373 // used to include empty fields in Patch requests. 2374 ForceSendFields []string `json:"-"` 2375 2376 // NullFields is a list of field names (e.g. "Alg") to include in API 2377 // requests with the JSON null value. By default, fields with empty 2378 // values are omitted from API requests. However, any field with an 2379 // empty value appearing in NullFields will be sent to the server as 2380 // null. It is an error if a field in this list has a non-empty value. 2381 // This may be used to include null fields in Patch requests. 2382 NullFields []string `json:"-"` 2383} 2384 2385func (s *Jwk) MarshalJSON() ([]byte, error) { 2386 type NoMethod Jwk 2387 raw := NoMethod(*s) 2388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2389} 2390 2391// KalmConfig: Configuration options for the KALM addon. 2392type KalmConfig struct { 2393 // Enabled: Whether KALM is enabled for this cluster. 2394 Enabled bool `json:"enabled,omitempty"` 2395 2396 // ForceSendFields is a list of field names (e.g. "Enabled") to 2397 // unconditionally include in API requests. By default, fields with 2398 // empty values are omitted from API requests. However, any non-pointer, 2399 // non-interface field appearing in ForceSendFields will be sent to the 2400 // server regardless of whether the field is empty or not. This may be 2401 // used to include empty fields in Patch requests. 2402 ForceSendFields []string `json:"-"` 2403 2404 // NullFields is a list of field names (e.g. "Enabled") to include in 2405 // API requests with the JSON null value. By default, fields with empty 2406 // values are omitted from API requests. However, any field with an 2407 // empty value appearing in NullFields will be sent to the server as 2408 // null. It is an error if a field in this list has a non-empty value. 2409 // This may be used to include null fields in Patch requests. 2410 NullFields []string `json:"-"` 2411} 2412 2413func (s *KalmConfig) MarshalJSON() ([]byte, error) { 2414 type NoMethod KalmConfig 2415 raw := NoMethod(*s) 2416 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2417} 2418 2419// KubernetesDashboard: Configuration for the Kubernetes Dashboard. 2420type KubernetesDashboard struct { 2421 // Disabled: Whether the Kubernetes Dashboard is enabled for this 2422 // cluster. 2423 Disabled bool `json:"disabled,omitempty"` 2424 2425 // ForceSendFields is a list of field names (e.g. "Disabled") to 2426 // unconditionally include in API requests. By default, fields with 2427 // empty values are omitted from API requests. However, any non-pointer, 2428 // non-interface field appearing in ForceSendFields will be sent to the 2429 // server regardless of whether the field is empty or not. This may be 2430 // used to include empty fields in Patch requests. 2431 ForceSendFields []string `json:"-"` 2432 2433 // NullFields is a list of field names (e.g. "Disabled") to include in 2434 // API requests with the JSON null value. By default, fields with empty 2435 // values are omitted from API requests. However, any field with an 2436 // empty value appearing in NullFields will be sent to the server as 2437 // null. It is an error if a field in this list has a non-empty value. 2438 // This may be used to include null fields in Patch requests. 2439 NullFields []string `json:"-"` 2440} 2441 2442func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) { 2443 type NoMethod KubernetesDashboard 2444 raw := NoMethod(*s) 2445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2446} 2447 2448// LegacyAbac: Configuration for the legacy Attribute Based Access 2449// Control authorization 2450// mode. 2451type LegacyAbac struct { 2452 // Enabled: Whether the ABAC authorizer is enabled for this cluster. 2453 // When enabled, 2454 // identities in the system, including service accounts, nodes, 2455 // and 2456 // controllers, will have statically granted permissions beyond 2457 // those 2458 // provided by the RBAC configuration or IAM. 2459 Enabled bool `json:"enabled,omitempty"` 2460 2461 // ForceSendFields is a list of field names (e.g. "Enabled") to 2462 // unconditionally include in API requests. By default, fields with 2463 // empty values are omitted from API requests. However, any non-pointer, 2464 // non-interface field appearing in ForceSendFields will be sent to the 2465 // server regardless of whether the field is empty or not. This may be 2466 // used to include empty fields in Patch requests. 2467 ForceSendFields []string `json:"-"` 2468 2469 // NullFields is a list of field names (e.g. "Enabled") to include in 2470 // API requests with the JSON null value. By default, fields with empty 2471 // values are omitted from API requests. However, any field with an 2472 // empty value appearing in NullFields will be sent to the server as 2473 // null. It is an error if a field in this list has a non-empty value. 2474 // This may be used to include null fields in Patch requests. 2475 NullFields []string `json:"-"` 2476} 2477 2478func (s *LegacyAbac) MarshalJSON() ([]byte, error) { 2479 type NoMethod LegacyAbac 2480 raw := NoMethod(*s) 2481 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2482} 2483 2484// ListClustersResponse: ListClustersResponse is the result of 2485// ListClustersRequest. 2486type ListClustersResponse struct { 2487 // Clusters: A list of clusters in the project in the specified zone, 2488 // or 2489 // across all ones. 2490 Clusters []*Cluster `json:"clusters,omitempty"` 2491 2492 // MissingZones: If any zones are listed here, the list of clusters 2493 // returned 2494 // may be missing those zones. 2495 MissingZones []string `json:"missingZones,omitempty"` 2496 2497 // ServerResponse contains the HTTP response code and headers from the 2498 // server. 2499 googleapi.ServerResponse `json:"-"` 2500 2501 // ForceSendFields is a list of field names (e.g. "Clusters") to 2502 // unconditionally include in API requests. By default, fields with 2503 // empty values are omitted from API requests. However, any non-pointer, 2504 // non-interface field appearing in ForceSendFields will be sent to the 2505 // server regardless of whether the field is empty or not. This may be 2506 // used to include empty fields in Patch requests. 2507 ForceSendFields []string `json:"-"` 2508 2509 // NullFields is a list of field names (e.g. "Clusters") to include in 2510 // API requests with the JSON null value. By default, fields with empty 2511 // values are omitted from API requests. However, any field with an 2512 // empty value appearing in NullFields will be sent to the server as 2513 // null. It is an error if a field in this list has a non-empty value. 2514 // This may be used to include null fields in Patch requests. 2515 NullFields []string `json:"-"` 2516} 2517 2518func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { 2519 type NoMethod ListClustersResponse 2520 raw := NoMethod(*s) 2521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2522} 2523 2524// ListLocationsResponse: ListLocationsResponse returns the list of all 2525// GKE locations and their 2526// recommendation state. 2527type ListLocationsResponse struct { 2528 // Locations: A full list of GKE locations. 2529 Locations []*Location `json:"locations,omitempty"` 2530 2531 // NextPageToken: Only return ListLocationsResponse that occur after the 2532 // page_token. This 2533 // value should be populated from the 2534 // ListLocationsResponse.next_page_token if 2535 // that response token was set (which happens when listing more 2536 // Locations than 2537 // fit in a single ListLocationsResponse). 2538 NextPageToken string `json:"nextPageToken,omitempty"` 2539 2540 // ServerResponse contains the HTTP response code and headers from the 2541 // server. 2542 googleapi.ServerResponse `json:"-"` 2543 2544 // ForceSendFields is a list of field names (e.g. "Locations") to 2545 // unconditionally include in API requests. By default, fields with 2546 // empty values are omitted from API requests. However, any non-pointer, 2547 // non-interface field appearing in ForceSendFields will be sent to the 2548 // server regardless of whether the field is empty or not. This may be 2549 // used to include empty fields in Patch requests. 2550 ForceSendFields []string `json:"-"` 2551 2552 // NullFields is a list of field names (e.g. "Locations") to include in 2553 // API requests with the JSON null value. By default, fields with empty 2554 // values are omitted from API requests. However, any field with an 2555 // empty value appearing in NullFields will be sent to the server as 2556 // null. It is an error if a field in this list has a non-empty value. 2557 // This may be used to include null fields in Patch requests. 2558 NullFields []string `json:"-"` 2559} 2560 2561func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2562 type NoMethod ListLocationsResponse 2563 raw := NoMethod(*s) 2564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2565} 2566 2567// ListNodePoolsResponse: ListNodePoolsResponse is the result of 2568// ListNodePoolsRequest. 2569type ListNodePoolsResponse struct { 2570 // NodePools: A list of node pools for a cluster. 2571 NodePools []*NodePool `json:"nodePools,omitempty"` 2572 2573 // ServerResponse contains the HTTP response code and headers from the 2574 // server. 2575 googleapi.ServerResponse `json:"-"` 2576 2577 // ForceSendFields is a list of field names (e.g. "NodePools") 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. "NodePools") to include in 2586 // API requests with the JSON null value. By default, fields with empty 2587 // values are omitted from API requests. However, any field with an 2588 // 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 *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { 2595 type NoMethod ListNodePoolsResponse 2596 raw := NoMethod(*s) 2597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2598} 2599 2600// ListOperationsResponse: ListOperationsResponse is the result of 2601// ListOperationsRequest. 2602type ListOperationsResponse struct { 2603 // MissingZones: If any zones are listed here, the list of operations 2604 // returned 2605 // may be missing the operations from those zones. 2606 MissingZones []string `json:"missingZones,omitempty"` 2607 2608 // Operations: A list of operations in the project in the specified 2609 // zone. 2610 Operations []*Operation `json:"operations,omitempty"` 2611 2612 // ServerResponse contains the HTTP response code and headers from the 2613 // server. 2614 googleapi.ServerResponse `json:"-"` 2615 2616 // ForceSendFields is a list of field names (e.g. "MissingZones") to 2617 // unconditionally include in API requests. By default, fields with 2618 // empty values are omitted from API requests. However, any non-pointer, 2619 // non-interface field appearing in ForceSendFields will be sent to the 2620 // server regardless of whether the field is empty or not. This may be 2621 // used to include empty fields in Patch requests. 2622 ForceSendFields []string `json:"-"` 2623 2624 // NullFields is a list of field names (e.g. "MissingZones") to include 2625 // in API requests with the JSON null value. By default, fields with 2626 // empty values are omitted from API requests. However, any field with 2627 // an empty value appearing in NullFields will be sent to the server as 2628 // null. It is an error if a field in this list has a non-empty value. 2629 // This may be used to include null fields in Patch requests. 2630 NullFields []string `json:"-"` 2631} 2632 2633func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2634 type NoMethod ListOperationsResponse 2635 raw := NoMethod(*s) 2636 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2637} 2638 2639// ListUsableSubnetworksResponse: ListUsableSubnetworksResponse is the 2640// response of 2641// ListUsableSubnetworksRequest. 2642type ListUsableSubnetworksResponse struct { 2643 // NextPageToken: This token allows you to get the next page of results 2644 // for list requests. 2645 // If the number of results is larger than `page_size`, use 2646 // the 2647 // `next_page_token` as a value for the query parameter `page_token` in 2648 // the 2649 // next request. The value will become empty when there are no more 2650 // pages. 2651 NextPageToken string `json:"nextPageToken,omitempty"` 2652 2653 // Subnetworks: A list of usable subnetworks in the specified network 2654 // project. 2655 Subnetworks []*UsableSubnetwork `json:"subnetworks,omitempty"` 2656 2657 // ServerResponse contains the HTTP response code and headers from the 2658 // server. 2659 googleapi.ServerResponse `json:"-"` 2660 2661 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2662 // unconditionally include in API requests. By default, fields with 2663 // empty values are omitted from API requests. However, any non-pointer, 2664 // non-interface field appearing in ForceSendFields will be sent to the 2665 // server regardless of whether the field is empty or not. This may be 2666 // used to include empty fields in Patch requests. 2667 ForceSendFields []string `json:"-"` 2668 2669 // NullFields is a list of field names (e.g. "NextPageToken") to include 2670 // in API requests with the JSON null value. By default, fields with 2671 // empty values are omitted from API requests. However, any field with 2672 // an empty value appearing in NullFields will be sent to the server as 2673 // null. It is an error if a field in this list has a non-empty value. 2674 // This may be used to include null fields in Patch requests. 2675 NullFields []string `json:"-"` 2676} 2677 2678func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { 2679 type NoMethod ListUsableSubnetworksResponse 2680 raw := NoMethod(*s) 2681 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2682} 2683 2684// Location: Location returns the location name, and if the location is 2685// recommended 2686// for GKE cluster scheduling. 2687type Location struct { 2688 // Name: Contains the name of the resource requested. 2689 // Specified in the format 'projects/*/locations/*'. 2690 Name string `json:"name,omitempty"` 2691 2692 // Recommended: Whether the location is recomended for GKE cluster 2693 // scheduling. 2694 Recommended bool `json:"recommended,omitempty"` 2695 2696 // Type: Contains the type of location this Location is for. 2697 // Regional or Zonal. 2698 // 2699 // Possible values: 2700 // "LOCATION_TYPE_UNSPECIFIED" - LOCATION_TYPE_UNSPECIFIED means the 2701 // location type was not determined. 2702 // "ZONE" - A GKE Location where Zonal clusters can be created. 2703 // "REGION" - A GKE Location where Regional clusters can be created. 2704 Type string `json:"type,omitempty"` 2705 2706 // ForceSendFields is a list of field names (e.g. "Name") to 2707 // unconditionally include in API requests. By default, fields with 2708 // empty values are omitted from API requests. However, any non-pointer, 2709 // non-interface field appearing in ForceSendFields will be sent to the 2710 // server regardless of whether the field is empty or not. This may be 2711 // used to include empty fields in Patch requests. 2712 ForceSendFields []string `json:"-"` 2713 2714 // NullFields is a list of field names (e.g. "Name") to include in API 2715 // requests with the JSON null value. By default, fields with empty 2716 // values are omitted from API requests. However, any field with an 2717 // empty value appearing in NullFields will be sent to the server as 2718 // null. It is an error if a field in this list has a non-empty value. 2719 // This may be used to include null fields in Patch requests. 2720 NullFields []string `json:"-"` 2721} 2722 2723func (s *Location) MarshalJSON() ([]byte, error) { 2724 type NoMethod Location 2725 raw := NoMethod(*s) 2726 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2727} 2728 2729// MaintenancePolicy: MaintenancePolicy defines the maintenance policy 2730// to be used for the cluster. 2731type MaintenancePolicy struct { 2732 // ResourceVersion: A hash identifying the version of this policy, so 2733 // that updates to fields of 2734 // the policy won't accidentally undo intermediate changes (and so that 2735 // users 2736 // of the API unaware of some fields won't accidentally remove other 2737 // fields). 2738 // Make a <code>get()</code> request to the cluster to get the 2739 // current 2740 // resource version and include it with requests to set the policy. 2741 ResourceVersion string `json:"resourceVersion,omitempty"` 2742 2743 // Window: Specifies the maintenance window in which maintenance may be 2744 // performed. 2745 Window *MaintenanceWindow `json:"window,omitempty"` 2746 2747 // ForceSendFields is a list of field names (e.g. "ResourceVersion") to 2748 // unconditionally include in API requests. By default, fields with 2749 // empty values are omitted from API requests. However, any non-pointer, 2750 // non-interface field appearing in ForceSendFields will be sent to the 2751 // server regardless of whether the field is empty or not. This may be 2752 // used to include empty fields in Patch requests. 2753 ForceSendFields []string `json:"-"` 2754 2755 // NullFields is a list of field names (e.g. "ResourceVersion") to 2756 // include in API requests with the JSON null value. By default, fields 2757 // with empty values are omitted from API requests. However, any field 2758 // with an empty value appearing in NullFields will be sent to the 2759 // server as null. It is an error if a field in this list has a 2760 // non-empty value. This may be used to include null fields in Patch 2761 // requests. 2762 NullFields []string `json:"-"` 2763} 2764 2765func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { 2766 type NoMethod MaintenancePolicy 2767 raw := NoMethod(*s) 2768 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2769} 2770 2771// MaintenanceWindow: MaintenanceWindow defines the maintenance window 2772// to be used for the cluster. 2773type MaintenanceWindow struct { 2774 // DailyMaintenanceWindow: DailyMaintenanceWindow specifies a daily 2775 // maintenance operation window. 2776 DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"` 2777 2778 // MaintenanceExclusions: Exceptions to maintenance window. 2779 // Non-emergency maintenance should not 2780 // occur in these windows. 2781 MaintenanceExclusions map[string]TimeWindow `json:"maintenanceExclusions,omitempty"` 2782 2783 // RecurringWindow: RecurringWindow specifies some number of recurring 2784 // time periods for 2785 // maintenance to occur. The time windows may be overlapping. If 2786 // no 2787 // maintenance windows are set, maintenance can occur at any time. 2788 RecurringWindow *RecurringTimeWindow `json:"recurringWindow,omitempty"` 2789 2790 // ForceSendFields is a list of field names (e.g. 2791 // "DailyMaintenanceWindow") to unconditionally include in API requests. 2792 // By default, fields with empty values are omitted from API requests. 2793 // However, any non-pointer, non-interface field appearing in 2794 // ForceSendFields will be sent to the server regardless of whether the 2795 // field is empty or not. This may be used to include empty fields in 2796 // Patch requests. 2797 ForceSendFields []string `json:"-"` 2798 2799 // NullFields is a list of field names (e.g. "DailyMaintenanceWindow") 2800 // to include in API requests with the JSON null value. By default, 2801 // fields with empty values are omitted from API requests. However, any 2802 // field with an empty value appearing in NullFields will be sent to the 2803 // server as null. It is an error if a field in this list has a 2804 // non-empty value. This may be used to include null fields in Patch 2805 // requests. 2806 NullFields []string `json:"-"` 2807} 2808 2809func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { 2810 type NoMethod MaintenanceWindow 2811 raw := NoMethod(*s) 2812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2813} 2814 2815// MasterAuth: The authentication information for accessing the master 2816// endpoint. 2817// Authentication can be done using HTTP basic auth or using 2818// client 2819// certificates. 2820type MasterAuth struct { 2821 // ClientCertificate: [Output only] Base64-encoded public certificate 2822 // used by clients to 2823 // authenticate to the cluster endpoint. 2824 ClientCertificate string `json:"clientCertificate,omitempty"` 2825 2826 // ClientCertificateConfig: Configuration for client certificate 2827 // authentication on the cluster. For 2828 // clusters before v1.12, if no configuration is specified, a 2829 // client 2830 // certificate is issued. 2831 ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` 2832 2833 // ClientKey: [Output only] Base64-encoded private key used by clients 2834 // to authenticate 2835 // to the cluster endpoint. 2836 ClientKey string `json:"clientKey,omitempty"` 2837 2838 ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` 2839 2840 // Password: The password to use for HTTP basic authentication to the 2841 // master endpoint. 2842 // Because the master endpoint is open to the Internet, you should 2843 // create a 2844 // strong password. If a password is provided for cluster creation, 2845 // username 2846 // must be non-empty. 2847 Password string `json:"password,omitempty"` 2848 2849 // Username: The username to use for HTTP basic authentication to the 2850 // master endpoint. 2851 // For clusters v1.6.0 and later, basic authentication can be disabled 2852 // by 2853 // leaving username unspecified (or setting it to the empty string). 2854 Username string `json:"username,omitempty"` 2855 2856 // ForceSendFields is a list of field names (e.g. "ClientCertificate") 2857 // to unconditionally include in API requests. By default, fields with 2858 // empty values are omitted from API requests. However, any non-pointer, 2859 // non-interface field appearing in ForceSendFields will be sent to the 2860 // server regardless of whether the field is empty or not. This may be 2861 // used to include empty fields in Patch requests. 2862 ForceSendFields []string `json:"-"` 2863 2864 // NullFields is a list of field names (e.g. "ClientCertificate") to 2865 // include in API requests with the JSON null value. By default, fields 2866 // with empty values are omitted from API requests. However, any field 2867 // with an empty value appearing in NullFields will be sent to the 2868 // server as null. It is an error if a field in this list has a 2869 // non-empty value. This may be used to include null fields in Patch 2870 // requests. 2871 NullFields []string `json:"-"` 2872} 2873 2874func (s *MasterAuth) MarshalJSON() ([]byte, error) { 2875 type NoMethod MasterAuth 2876 raw := NoMethod(*s) 2877 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2878} 2879 2880// MasterAuthorizedNetworksConfig: Configuration options for the master 2881// authorized networks feature. Enabled 2882// master authorized networks will disallow all external traffic to 2883// access 2884// Kubernetes master through HTTPS except traffic from the given CIDR 2885// blocks, 2886// Google Compute Engine Public IPs and Google Prod IPs. 2887type MasterAuthorizedNetworksConfig struct { 2888 // CidrBlocks: cidr_blocks define up to 10 external networks that could 2889 // access 2890 // Kubernetes master through HTTPS. 2891 CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"` 2892 2893 // Enabled: Whether or not master authorized networks is enabled. 2894 Enabled bool `json:"enabled,omitempty"` 2895 2896 // ForceSendFields is a list of field names (e.g. "CidrBlocks") to 2897 // unconditionally include in API requests. By default, fields with 2898 // empty values are omitted from API requests. However, any non-pointer, 2899 // non-interface field appearing in ForceSendFields will be sent to the 2900 // server regardless of whether the field is empty or not. This may be 2901 // used to include empty fields in Patch requests. 2902 ForceSendFields []string `json:"-"` 2903 2904 // NullFields is a list of field names (e.g. "CidrBlocks") to include in 2905 // API requests with the JSON null value. By default, fields with empty 2906 // values are omitted from API requests. However, any field with an 2907 // empty value appearing in NullFields will be sent to the server as 2908 // null. It is an error if a field in this list has a non-empty value. 2909 // This may be used to include null fields in Patch requests. 2910 NullFields []string `json:"-"` 2911} 2912 2913func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { 2914 type NoMethod MasterAuthorizedNetworksConfig 2915 raw := NoMethod(*s) 2916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2917} 2918 2919// MaxPodsConstraint: Constraints applied to pods. 2920type MaxPodsConstraint struct { 2921 // MaxPodsPerNode: Constraint enforced on the max num of pods per node. 2922 MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"` 2923 2924 // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to 2925 // unconditionally include in API requests. By default, fields with 2926 // empty values are omitted from API requests. However, any non-pointer, 2927 // non-interface field appearing in ForceSendFields will be sent to the 2928 // server regardless of whether the field is empty or not. This may be 2929 // used to include empty fields in Patch requests. 2930 ForceSendFields []string `json:"-"` 2931 2932 // NullFields is a list of field names (e.g. "MaxPodsPerNode") to 2933 // include in API requests with the JSON null value. By default, fields 2934 // with empty values are omitted from API requests. However, any field 2935 // with an empty value appearing in NullFields will be sent to the 2936 // server as null. It is an error if a field in this list has a 2937 // non-empty value. This may be used to include null fields in Patch 2938 // requests. 2939 NullFields []string `json:"-"` 2940} 2941 2942func (s *MaxPodsConstraint) MarshalJSON() ([]byte, error) { 2943 type NoMethod MaxPodsConstraint 2944 raw := NoMethod(*s) 2945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2946} 2947 2948// Metric: Progress metric is (string, int|float|string) pair. 2949type Metric struct { 2950 // DoubleValue: For metrics with floating point value. 2951 DoubleValue float64 `json:"doubleValue,omitempty"` 2952 2953 // IntValue: For metrics with integer value. 2954 IntValue int64 `json:"intValue,omitempty,string"` 2955 2956 // Name: Required. Metric name, e.g., "nodes total", "percent done". 2957 Name string `json:"name,omitempty"` 2958 2959 // StringValue: For metrics with custom values (ratios, visual progress, 2960 // etc.). 2961 StringValue string `json:"stringValue,omitempty"` 2962 2963 // ForceSendFields is a list of field names (e.g. "DoubleValue") to 2964 // unconditionally include in API requests. By default, fields with 2965 // empty values are omitted from API requests. However, any non-pointer, 2966 // non-interface field appearing in ForceSendFields will be sent to the 2967 // server regardless of whether the field is empty or not. This may be 2968 // used to include empty fields in Patch requests. 2969 ForceSendFields []string `json:"-"` 2970 2971 // NullFields is a list of field names (e.g. "DoubleValue") to include 2972 // in API requests with the JSON null value. By default, fields with 2973 // empty values are omitted from API requests. However, any field with 2974 // an empty value appearing in NullFields will be sent to the server as 2975 // null. It is an error if a field in this list has a non-empty value. 2976 // This may be used to include null fields in Patch requests. 2977 NullFields []string `json:"-"` 2978} 2979 2980func (s *Metric) MarshalJSON() ([]byte, error) { 2981 type NoMethod Metric 2982 raw := NoMethod(*s) 2983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2984} 2985 2986func (s *Metric) UnmarshalJSON(data []byte) error { 2987 type NoMethod Metric 2988 var s1 struct { 2989 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` 2990 *NoMethod 2991 } 2992 s1.NoMethod = (*NoMethod)(s) 2993 if err := json.Unmarshal(data, &s1); err != nil { 2994 return err 2995 } 2996 s.DoubleValue = float64(s1.DoubleValue) 2997 return nil 2998} 2999 3000// NetworkConfig: NetworkConfig reports the relative names of network & 3001// subnetwork. 3002type NetworkConfig struct { 3003 // EnableIntraNodeVisibility: Whether Intra-node visibility is enabled 3004 // for this cluster. 3005 // This makes same node pod to pod traffic visible for VPC network. 3006 EnableIntraNodeVisibility bool `json:"enableIntraNodeVisibility,omitempty"` 3007 3008 // Network: Output only. The relative name of the Google Compute 3009 // Engine 3010 // network(https://cloud.google.com/compute/docs/networks-and-fire 3011 // walls#networks) 3012 // to which the cluster is connected. 3013 // Example: 3014 // projects/my-project/global/networks/my-network 3015 Network string `json:"network,omitempty"` 3016 3017 // Subnetwork: Output only. The relative name of the Google Compute 3018 // Engine 3019 // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which 3020 // the 3021 // cluster is connected. 3022 // Example: 3023 // projects/my-project/regions/us-central1/subnetworks/my-subnet 3024 Subnetwork string `json:"subnetwork,omitempty"` 3025 3026 // ForceSendFields is a list of field names (e.g. 3027 // "EnableIntraNodeVisibility") to unconditionally include in API 3028 // requests. By default, fields with empty values are omitted from API 3029 // requests. However, any non-pointer, non-interface field appearing in 3030 // ForceSendFields will be sent to the server regardless of whether the 3031 // field is empty or not. This may be used to include empty fields in 3032 // Patch requests. 3033 ForceSendFields []string `json:"-"` 3034 3035 // NullFields is a list of field names (e.g. 3036 // "EnableIntraNodeVisibility") to include in API requests with the JSON 3037 // null value. By default, fields with empty values are omitted from API 3038 // requests. However, any field with an empty value appearing in 3039 // NullFields will be sent to the server as null. It is an error if a 3040 // field in this list has a non-empty value. This may be used to include 3041 // null fields in Patch requests. 3042 NullFields []string `json:"-"` 3043} 3044 3045func (s *NetworkConfig) MarshalJSON() ([]byte, error) { 3046 type NoMethod NetworkConfig 3047 raw := NoMethod(*s) 3048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3049} 3050 3051// NetworkPolicy: Configuration options for the NetworkPolicy 3052// feature. 3053// https://kubernetes.io/docs/concepts/services-networking/netwo 3054// rkpolicies/ 3055type NetworkPolicy struct { 3056 // Enabled: Whether network policy is enabled on the cluster. 3057 Enabled bool `json:"enabled,omitempty"` 3058 3059 // Provider: The selected network policy provider. 3060 // 3061 // Possible values: 3062 // "PROVIDER_UNSPECIFIED" - Not set 3063 // "CALICO" - Tigera (Calico Felix). 3064 Provider string `json:"provider,omitempty"` 3065 3066 // ForceSendFields is a list of field names (e.g. "Enabled") to 3067 // unconditionally include in API requests. By default, fields with 3068 // empty values are omitted from API requests. However, any non-pointer, 3069 // non-interface field appearing in ForceSendFields will be sent to the 3070 // server regardless of whether the field is empty or not. This may be 3071 // used to include empty fields in Patch requests. 3072 ForceSendFields []string `json:"-"` 3073 3074 // NullFields is a list of field names (e.g. "Enabled") to include in 3075 // API requests with the JSON null value. By default, fields with empty 3076 // values are omitted from API requests. However, any field with an 3077 // empty value appearing in NullFields will be sent to the server as 3078 // null. It is an error if a field in this list has a non-empty value. 3079 // This may be used to include null fields in Patch requests. 3080 NullFields []string `json:"-"` 3081} 3082 3083func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { 3084 type NoMethod NetworkPolicy 3085 raw := NoMethod(*s) 3086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3087} 3088 3089// NetworkPolicyConfig: Configuration for NetworkPolicy. This only 3090// tracks whether the addon 3091// is enabled or not on the Master, it does not track whether network 3092// policy 3093// is enabled for the nodes. 3094type NetworkPolicyConfig struct { 3095 // Disabled: Whether NetworkPolicy is enabled for this cluster. 3096 Disabled bool `json:"disabled,omitempty"` 3097 3098 // ForceSendFields is a list of field names (e.g. "Disabled") to 3099 // unconditionally include in API requests. By default, fields with 3100 // empty values are omitted from API requests. However, any non-pointer, 3101 // non-interface field appearing in ForceSendFields will be sent to the 3102 // server regardless of whether the field is empty or not. This may be 3103 // used to include empty fields in Patch requests. 3104 ForceSendFields []string `json:"-"` 3105 3106 // NullFields is a list of field names (e.g. "Disabled") to include in 3107 // API requests with the JSON null value. By default, fields with empty 3108 // values are omitted from API requests. However, any field with an 3109 // empty value appearing in NullFields will be sent to the server as 3110 // null. It is an error if a field in this list has a non-empty value. 3111 // This may be used to include null fields in Patch requests. 3112 NullFields []string `json:"-"` 3113} 3114 3115func (s *NetworkPolicyConfig) MarshalJSON() ([]byte, error) { 3116 type NoMethod NetworkPolicyConfig 3117 raw := NoMethod(*s) 3118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3119} 3120 3121// NodeConfig: Parameters that describe the nodes in a cluster. 3122type NodeConfig struct { 3123 // Accelerators: A list of hardware accelerators to be attached to each 3124 // node. 3125 // See https://cloud.google.com/compute/docs/gpus for more information 3126 // about 3127 // support for GPUs. 3128 Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` 3129 3130 // BootDiskKmsKey: 3131 // The Customer Managed Encryption Key used to encrypt the boot disk 3132 // attached 3133 // to each node in the node pool. This should be of the 3134 // form 3135 // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAM 3136 // E]/cryptoKeys/[KEY_NAME]. 3137 // For more information about protecting resources with Cloud KMS Keys 3138 // please 3139 // see: 3140 // https://cloud.google.com/compute/docs/disks/customer-manag 3141 // ed-encryption 3142 BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` 3143 3144 // DiskSizeGb: Size of the disk attached to each node, specified in 3145 // GB. 3146 // The smallest allowed disk size is 10GB. 3147 // 3148 // If unspecified, the default disk size is 100GB. 3149 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 3150 3151 // DiskType: Type of the disk attached to each node (e.g. 'pd-standard' 3152 // or 'pd-ssd') 3153 // 3154 // If unspecified, the default disk type is 'pd-standard' 3155 DiskType string `json:"diskType,omitempty"` 3156 3157 // ImageType: The image type to use for this node. Note that for a given 3158 // image type, 3159 // the latest version of it will be used. 3160 ImageType string `json:"imageType,omitempty"` 3161 3162 // Labels: The map of Kubernetes labels (key/value pairs) to be applied 3163 // to each node. 3164 // These will added in addition to any default label(s) that 3165 // Kubernetes may apply to the node. 3166 // In case of conflict in label keys, the applied set may differ 3167 // depending on 3168 // the Kubernetes version -- it's best to assume the behavior is 3169 // undefined 3170 // and conflicts should be avoided. 3171 // For more information, including usage and the valid values, 3172 // see: 3173 // https://kubernetes.io/docs/concepts/overview/working-with-objects 3174 // /labels/ 3175 Labels map[string]string `json:"labels,omitempty"` 3176 3177 // LocalSsdCount: The number of local SSD disks to be attached to the 3178 // node. 3179 // 3180 // The limit for this value is dependent upon the maximum number 3181 // of 3182 // disks available on a machine per zone. 3183 // See: 3184 // https://cloud.google.com/compute/docs/disks/local-ssd 3185 // for more information. 3186 LocalSsdCount int64 `json:"localSsdCount,omitempty"` 3187 3188 // MachineType: The name of a Google Compute Engine 3189 // [machine 3190 // type](https://cloud.google.com/compute/docs/machine-types) 3191 // (e.g. 3192 // `n1-standard-1`). 3193 // 3194 // If unspecified, the default machine type is 3195 // `n1-standard-1`. 3196 MachineType string `json:"machineType,omitempty"` 3197 3198 // Metadata: The metadata key/value pairs assigned to instances in the 3199 // cluster. 3200 // 3201 // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 3202 // bytes 3203 // in length. These are reflected as part of a URL in the metadata 3204 // server. 3205 // Additionally, to avoid ambiguity, keys must not conflict with any 3206 // other 3207 // metadata keys for the project or be one of the reserved keys: 3208 // "cluster-location" 3209 // "cluster-name" 3210 // "cluster-uid" 3211 // "configure-sh" 3212 // "containerd-configure-sh" 3213 // "enable-oslogin" 3214 // "gci-ensure-gke-docker" 3215 // "gci-metrics-enabled" 3216 // "gci-update-strategy" 3217 // "instance-template" 3218 // "kube-env" 3219 // "startup-script" 3220 // "user-data" 3221 // "disable-address-manager" 3222 // "windows-startup-script-ps1" 3223 // "common-psm1" 3224 // "k8s-node-setup-psm1" 3225 // "install-ssh-psm1" 3226 // "user-profile-psm1" 3227 // "serial-port-logging-enable" 3228 // Values are free-form strings, and only have meaning as interpreted 3229 // by 3230 // the image running in the instance. The only restriction placed on 3231 // them is 3232 // that each value's size must be less than or equal to 32 KB. 3233 // 3234 // The total size of all keys and values must be less than 512 KB. 3235 Metadata map[string]string `json:"metadata,omitempty"` 3236 3237 // MinCpuPlatform: Minimum CPU platform to be used by this instance. The 3238 // instance may be 3239 // scheduled on the specified or newer CPU platform. Applicable values 3240 // are the 3241 // friendly names of CPU platforms, such as 3242 // <code>minCpuPlatform: "Intel Haswell"</code> 3243 // or 3244 // <code>minCpuPlatform: "Intel Sandy Bridge"</code>. For 3245 // more 3246 // information, read [how to specify min 3247 // CPU 3248 // platform](https://cloud.google.com/compute/docs/instances/specify- 3249 // min-cpu-platform) 3250 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 3251 3252 // OauthScopes: The set of Google API scopes to be made available on all 3253 // of the 3254 // node VMs under the "default" service account. 3255 // 3256 // The following scopes are recommended, but not required, and by 3257 // default are 3258 // not included: 3259 // 3260 // * `https://www.googleapis.com/auth/compute` is required for 3261 // mounting 3262 // persistent storage on your nodes. 3263 // * `https://www.googleapis.com/auth/devstorage.read_only` is required 3264 // for 3265 // communicating with **gcr.io** 3266 // (the [Google 3267 // Container 3268 // Registry](https://cloud.google.com/container-registry/)). 3269 // 3270 // I 3271 // f unspecified, no scopes are added, unless Cloud Logging or 3272 // Cloud 3273 // Monitoring are enabled, in which case their required scopes will be 3274 // added. 3275 OauthScopes []string `json:"oauthScopes,omitempty"` 3276 3277 // Preemptible: Whether the nodes are created as preemptible VM 3278 // instances. 3279 // See: 3280 // https://cloud.google.com/compute/docs/instances/preemptible for 3281 // more 3282 // inforamtion about preemptible VM instances. 3283 Preemptible bool `json:"preemptible,omitempty"` 3284 3285 // ReservationAffinity: The optional reservation affinity. Setting this 3286 // field will apply 3287 // the specified [Zonal 3288 // Compute 3289 // Reservation](https://cloud.google.com/compute/docs/instances/r 3290 // eserving-zonal-resources) 3291 // to this node pool. 3292 ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` 3293 3294 // SandboxConfig: Sandbox configuration for this node. 3295 SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` 3296 3297 // ServiceAccount: The Google Cloud Platform Service Account to be used 3298 // by the node VMs. 3299 // Specify the email address of the Service Account; otherwise, if no 3300 // Service 3301 // Account is specified, the "default" service account is used. 3302 ServiceAccount string `json:"serviceAccount,omitempty"` 3303 3304 // ShieldedInstanceConfig: Shielded Instance options. 3305 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` 3306 3307 // Tags: The list of instance tags applied to all nodes. Tags are used 3308 // to identify 3309 // valid sources or targets for network firewalls and are specified 3310 // by 3311 // the client during cluster or node pool creation. Each tag within the 3312 // list 3313 // must comply with RFC1035. 3314 Tags []string `json:"tags,omitempty"` 3315 3316 // Taints: List of kubernetes taints to be applied to each node. 3317 // 3318 // For more information, including usage and the valid values, 3319 // see: 3320 // https://kubernetes.io/docs/concepts/configuration/taint-and-toler 3321 // ation/ 3322 Taints []*NodeTaint `json:"taints,omitempty"` 3323 3324 // WorkloadMetadataConfig: The workload metadata configuration for this 3325 // node. 3326 WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` 3327 3328 // ForceSendFields is a list of field names (e.g. "Accelerators") to 3329 // unconditionally include in API requests. By default, fields with 3330 // empty values are omitted from API requests. However, any non-pointer, 3331 // non-interface field appearing in ForceSendFields will be sent to the 3332 // server regardless of whether the field is empty or not. This may be 3333 // used to include empty fields in Patch requests. 3334 ForceSendFields []string `json:"-"` 3335 3336 // NullFields is a list of field names (e.g. "Accelerators") to include 3337 // in API requests with the JSON null value. By default, fields with 3338 // empty values are omitted from API requests. However, any field with 3339 // an empty value appearing in NullFields will be sent to the server as 3340 // null. It is an error if a field in this list has a non-empty value. 3341 // This may be used to include null fields in Patch requests. 3342 NullFields []string `json:"-"` 3343} 3344 3345func (s *NodeConfig) MarshalJSON() ([]byte, error) { 3346 type NoMethod NodeConfig 3347 raw := NoMethod(*s) 3348 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3349} 3350 3351// NodeManagement: NodeManagement defines the set of node management 3352// services turned on for the 3353// node pool. 3354type NodeManagement struct { 3355 // AutoRepair: Whether the nodes will be automatically repaired. 3356 AutoRepair bool `json:"autoRepair,omitempty"` 3357 3358 // AutoUpgrade: Whether the nodes will be automatically upgraded. 3359 AutoUpgrade bool `json:"autoUpgrade,omitempty"` 3360 3361 // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool. 3362 UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"` 3363 3364 // ForceSendFields is a list of field names (e.g. "AutoRepair") to 3365 // unconditionally include in API requests. By default, fields with 3366 // empty values are omitted from API requests. However, any non-pointer, 3367 // non-interface field appearing in ForceSendFields will be sent to the 3368 // server regardless of whether the field is empty or not. This may be 3369 // used to include empty fields in Patch requests. 3370 ForceSendFields []string `json:"-"` 3371 3372 // NullFields is a list of field names (e.g. "AutoRepair") to include in 3373 // API requests with the JSON null value. By default, fields with empty 3374 // values are omitted from API requests. However, any field with an 3375 // empty value appearing in NullFields will be sent to the server as 3376 // null. It is an error if a field in this list has a non-empty value. 3377 // This may be used to include null fields in Patch requests. 3378 NullFields []string `json:"-"` 3379} 3380 3381func (s *NodeManagement) MarshalJSON() ([]byte, error) { 3382 type NoMethod NodeManagement 3383 raw := NoMethod(*s) 3384 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3385} 3386 3387// NodePool: NodePool contains the name and configuration for a 3388// cluster's node pool. 3389// Node pools are a set of nodes (i.e. VM's), with a common 3390// configuration and 3391// specification, under the control of the cluster master. They may have 3392// a set 3393// of Kubernetes labels applied to them, which may be used to reference 3394// them 3395// during pod scheduling. They may also be resized up or down, to 3396// accommodate 3397// the workload. 3398type NodePool struct { 3399 // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler 3400 // is enabled 3401 // only if a valid configuration is present. 3402 Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` 3403 3404 // Conditions: Which conditions caused the current node pool state. 3405 Conditions []*StatusCondition `json:"conditions,omitempty"` 3406 3407 // Config: The node configuration of the pool. 3408 Config *NodeConfig `json:"config,omitempty"` 3409 3410 // InitialNodeCount: The initial node count for the pool. You must 3411 // ensure that your 3412 // Compute Engine <a href="/compute/docs/resource-quotas">resource 3413 // quota</a> 3414 // is sufficient for this number of instances. You must also have 3415 // available 3416 // firewall and routes quota. 3417 InitialNodeCount int64 `json:"initialNodeCount,omitempty"` 3418 3419 // InstanceGroupUrls: [Output only] The resource URLs of the [managed 3420 // instance 3421 // groups](https://cloud.google.com/compute/docs/instance-groups 3422 // /creating-groups-of-managed-instances) 3423 // associated with this node pool. 3424 InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` 3425 3426 // Locations: The list of Google Compute 3427 // Engine 3428 // [zones](https://cloud.google.com/compute/docs/zones#available) in 3429 // which the 3430 // NodePool's nodes should be located. 3431 Locations []string `json:"locations,omitempty"` 3432 3433 // Management: NodeManagement configuration for this NodePool. 3434 Management *NodeManagement `json:"management,omitempty"` 3435 3436 // MaxPodsConstraint: The constraint on the maximum number of pods that 3437 // can be run 3438 // simultaneously on a node in the node pool. 3439 MaxPodsConstraint *MaxPodsConstraint `json:"maxPodsConstraint,omitempty"` 3440 3441 // Name: The name of the node pool. 3442 Name string `json:"name,omitempty"` 3443 3444 // PodIpv4CidrSize: [Output only] The pod CIDR block size per node in 3445 // this node pool. 3446 PodIpv4CidrSize int64 `json:"podIpv4CidrSize,omitempty"` 3447 3448 // SelfLink: [Output only] Server-defined URL for the resource. 3449 SelfLink string `json:"selfLink,omitempty"` 3450 3451 // Status: [Output only] The status of the nodes in this pool instance. 3452 // 3453 // Possible values: 3454 // "STATUS_UNSPECIFIED" - Not set. 3455 // "PROVISIONING" - The PROVISIONING state indicates the node pool is 3456 // being created. 3457 // "RUNNING" - The RUNNING state indicates the node pool has been 3458 // created 3459 // and is fully usable. 3460 // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the 3461 // node pool has been created 3462 // and is partially usable. Some error state has occurred and 3463 // some 3464 // functionality may be impaired. Customer may need to reissue a 3465 // request 3466 // or trigger a new update. 3467 // "RECONCILING" - The RECONCILING state indicates that some work is 3468 // actively being done on 3469 // the node pool, such as upgrading node software. Details can 3470 // be found in the `statusMessage` field. 3471 // "STOPPING" - The STOPPING state indicates the node pool is being 3472 // deleted. 3473 // "ERROR" - The ERROR state indicates the node pool may be unusable. 3474 // Details 3475 // can be found in the `statusMessage` field. 3476 Status string `json:"status,omitempty"` 3477 3478 // StatusMessage: [Output only] Additional information about the current 3479 // status of this 3480 // node pool instance, if available. 3481 StatusMessage string `json:"statusMessage,omitempty"` 3482 3483 // UpgradeSettings: Upgrade settings control disruption and speed of the 3484 // upgrade. 3485 UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` 3486 3487 // Version: The version of the Kubernetes of this node. 3488 Version string `json:"version,omitempty"` 3489 3490 // ServerResponse contains the HTTP response code and headers from the 3491 // server. 3492 googleapi.ServerResponse `json:"-"` 3493 3494 // ForceSendFields is a list of field names (e.g. "Autoscaling") to 3495 // unconditionally include in API requests. By default, fields with 3496 // empty values are omitted from API requests. However, any non-pointer, 3497 // non-interface field appearing in ForceSendFields will be sent to the 3498 // server regardless of whether the field is empty or not. This may be 3499 // used to include empty fields in Patch requests. 3500 ForceSendFields []string `json:"-"` 3501 3502 // NullFields is a list of field names (e.g. "Autoscaling") to include 3503 // in API requests with the JSON null value. By default, fields with 3504 // empty values are omitted from API requests. However, any field with 3505 // an empty value appearing in NullFields will be sent to the server as 3506 // null. It is an error if a field in this list has a non-empty value. 3507 // This may be used to include null fields in Patch requests. 3508 NullFields []string `json:"-"` 3509} 3510 3511func (s *NodePool) MarshalJSON() ([]byte, error) { 3512 type NoMethod NodePool 3513 raw := NoMethod(*s) 3514 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3515} 3516 3517// NodePoolAutoscaling: NodePoolAutoscaling contains information 3518// required by cluster autoscaler to 3519// adjust the size of the node pool to the current cluster usage. 3520type NodePoolAutoscaling struct { 3521 // Autoprovisioned: Can this node pool be deleted automatically. 3522 Autoprovisioned bool `json:"autoprovisioned,omitempty"` 3523 3524 // Enabled: Is autoscaling enabled for this node pool. 3525 Enabled bool `json:"enabled,omitempty"` 3526 3527 // MaxNodeCount: Maximum number of nodes in the NodePool. Must be >= 3528 // min_node_count. There 3529 // has to enough quota to scale up the cluster. 3530 MaxNodeCount int64 `json:"maxNodeCount,omitempty"` 3531 3532 // MinNodeCount: Minimum number of nodes in the NodePool. Must be >= 1 3533 // and <= 3534 // max_node_count. 3535 MinNodeCount int64 `json:"minNodeCount,omitempty"` 3536 3537 // ForceSendFields is a list of field names (e.g. "Autoprovisioned") to 3538 // unconditionally include in API requests. By default, fields with 3539 // empty values are omitted from API requests. However, any non-pointer, 3540 // non-interface field appearing in ForceSendFields will be sent to the 3541 // server regardless of whether the field is empty or not. This may be 3542 // used to include empty fields in Patch requests. 3543 ForceSendFields []string `json:"-"` 3544 3545 // NullFields is a list of field names (e.g. "Autoprovisioned") to 3546 // include in API requests with the JSON null value. By default, fields 3547 // with empty values are omitted from API requests. However, any field 3548 // with an empty value appearing in NullFields will be sent to the 3549 // server as null. It is an error if a field in this list has a 3550 // non-empty value. This may be used to include null fields in Patch 3551 // requests. 3552 NullFields []string `json:"-"` 3553} 3554 3555func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) { 3556 type NoMethod NodePoolAutoscaling 3557 raw := NoMethod(*s) 3558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3559} 3560 3561// NodeTaint: Kubernetes taint is comprised of three fields: key, value, 3562// and effect. Effect 3563// can only be one of three types: NoSchedule, PreferNoSchedule or 3564// NoExecute. 3565// 3566// For more information, including usage and the valid values, 3567// see: 3568// https://kubernetes.io/docs/concepts/configuration/taint-and-toler 3569// ation/ 3570type NodeTaint struct { 3571 // Effect: Effect for taint. 3572 // 3573 // Possible values: 3574 // "EFFECT_UNSPECIFIED" - Not set 3575 // "NO_SCHEDULE" - NoSchedule 3576 // "PREFER_NO_SCHEDULE" - PreferNoSchedule 3577 // "NO_EXECUTE" - NoExecute 3578 Effect string `json:"effect,omitempty"` 3579 3580 // Key: Key for taint. 3581 Key string `json:"key,omitempty"` 3582 3583 // Value: Value for taint. 3584 Value string `json:"value,omitempty"` 3585 3586 // ForceSendFields is a list of field names (e.g. "Effect") 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. "Effect") to include in API 3595 // requests with the JSON null value. By default, fields with empty 3596 // values are omitted from API requests. However, any field with an 3597 // 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 *NodeTaint) MarshalJSON() ([]byte, error) { 3604 type NoMethod NodeTaint 3605 raw := NoMethod(*s) 3606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3607} 3608 3609// Operation: This operation resource represents operations that may 3610// have happened or are 3611// happening on the cluster. All fields are output only. 3612type Operation struct { 3613 // ClusterConditions: Which conditions caused the current cluster state. 3614 ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"` 3615 3616 // Detail: Detailed operation progress, if available. 3617 Detail string `json:"detail,omitempty"` 3618 3619 // EndTime: [Output only] The time the operation completed, 3620 // in 3621 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 3622 EndTime string `json:"endTime,omitempty"` 3623 3624 // Location: [Output only] The name of the Google Compute 3625 // Engine 3626 // [zone](https://cloud.google.com/compute/docs/regions-zones/regi 3627 // ons-zones#available) 3628 // or 3629 // [region](https://cloud.google.com/compute/docs 3630 // /regions-zones/regions-zones#available) 3631 // in which the cluster resides. 3632 Location string `json:"location,omitempty"` 3633 3634 // Name: The server-assigned ID for the operation. 3635 Name string `json:"name,omitempty"` 3636 3637 // NodepoolConditions: Which conditions caused the current node pool 3638 // state. 3639 NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"` 3640 3641 // OperationType: The operation type. 3642 // 3643 // Possible values: 3644 // "TYPE_UNSPECIFIED" - Not set. 3645 // "CREATE_CLUSTER" - Cluster create. 3646 // "DELETE_CLUSTER" - Cluster delete. 3647 // "UPGRADE_MASTER" - A master upgrade. 3648 // "UPGRADE_NODES" - A node upgrade. 3649 // "REPAIR_CLUSTER" - Cluster repair. 3650 // "UPDATE_CLUSTER" - Cluster update. 3651 // "CREATE_NODE_POOL" - Node pool create. 3652 // "DELETE_NODE_POOL" - Node pool delete. 3653 // "SET_NODE_POOL_MANAGEMENT" - Set node pool management. 3654 // "AUTO_REPAIR_NODES" - Automatic node pool repair. 3655 // "AUTO_UPGRADE_NODES" - Automatic node upgrade. 3656 // "SET_LABELS" - Set labels. 3657 // "SET_MASTER_AUTH" - Set/generate master auth materials 3658 // "SET_NODE_POOL_SIZE" - Set node pool size. 3659 // "SET_NETWORK_POLICY" - Updates network policy for a cluster. 3660 // "SET_MAINTENANCE_POLICY" - Set the maintenance policy. 3661 OperationType string `json:"operationType,omitempty"` 3662 3663 // Progress: Output only. [Output only] Progress information for an 3664 // operation. 3665 Progress *OperationProgress `json:"progress,omitempty"` 3666 3667 // SelfLink: Server-defined URL for the resource. 3668 SelfLink string `json:"selfLink,omitempty"` 3669 3670 // StartTime: [Output only] The time the operation started, 3671 // in 3672 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 3673 StartTime string `json:"startTime,omitempty"` 3674 3675 // Status: The current status of the operation. 3676 // 3677 // Possible values: 3678 // "STATUS_UNSPECIFIED" - Not set. 3679 // "PENDING" - The operation has been created. 3680 // "RUNNING" - The operation is currently running. 3681 // "DONE" - The operation is done, either cancelled or completed. 3682 // "ABORTING" - The operation is aborting. 3683 Status string `json:"status,omitempty"` 3684 3685 // StatusMessage: Output only. If an error has occurred, a textual 3686 // description of the error. 3687 StatusMessage string `json:"statusMessage,omitempty"` 3688 3689 // TargetLink: Server-defined URL for the target of the operation. 3690 TargetLink string `json:"targetLink,omitempty"` 3691 3692 // Zone: The name of the Google Compute 3693 // Engine 3694 // [zone](https://cloud.google.com/compute/docs/zones#available) in 3695 // which the 3696 // operation is taking place. This field is deprecated, use location 3697 // instead. 3698 Zone string `json:"zone,omitempty"` 3699 3700 // ServerResponse contains the HTTP response code and headers from the 3701 // server. 3702 googleapi.ServerResponse `json:"-"` 3703 3704 // ForceSendFields is a list of field names (e.g. "ClusterConditions") 3705 // to unconditionally include in API requests. By default, fields with 3706 // empty values are omitted from API requests. However, any non-pointer, 3707 // non-interface field appearing in ForceSendFields will be sent to the 3708 // server regardless of whether the field is empty or not. This may be 3709 // used to include empty fields in Patch requests. 3710 ForceSendFields []string `json:"-"` 3711 3712 // NullFields is a list of field names (e.g. "ClusterConditions") to 3713 // include in API requests with the JSON null value. By default, fields 3714 // with empty values are omitted from API requests. However, any field 3715 // with an empty value appearing in NullFields will be sent to the 3716 // server as null. It is an error if a field in this list has a 3717 // non-empty value. This may be used to include null fields in Patch 3718 // requests. 3719 NullFields []string `json:"-"` 3720} 3721 3722func (s *Operation) MarshalJSON() ([]byte, error) { 3723 type NoMethod Operation 3724 raw := NoMethod(*s) 3725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3726} 3727 3728// OperationProgress: Information about operation (or operation stage) 3729// progress. 3730type OperationProgress struct { 3731 // Metrics: Progress metric bundle, for example: 3732 // metrics: [{name: "nodes done", int_value: 15}, 3733 // {name: "nodes total", int_value: 32}] 3734 // or 3735 // metrics: [{name: "progress", double_value: 0.56}, 3736 // {name: "progress scale", double_value: 1.0}] 3737 Metrics []*Metric `json:"metrics,omitempty"` 3738 3739 // Name: A non-parameterized string describing an operation stage. 3740 // Unset for single-stage operations. 3741 Name string `json:"name,omitempty"` 3742 3743 // Stages: Substages of an operation or a stage. 3744 Stages []*OperationProgress `json:"stages,omitempty"` 3745 3746 // Status: Status of an operation stage. 3747 // Unset for single-stage operations. 3748 // 3749 // Possible values: 3750 // "STATUS_UNSPECIFIED" - Not set. 3751 // "PENDING" - The operation has been created. 3752 // "RUNNING" - The operation is currently running. 3753 // "DONE" - The operation is done, either cancelled or completed. 3754 // "ABORTING" - The operation is aborting. 3755 Status string `json:"status,omitempty"` 3756 3757 // ForceSendFields is a list of field names (e.g. "Metrics") 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. "Metrics") 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 *OperationProgress) MarshalJSON() ([]byte, error) { 3775 type NoMethod OperationProgress 3776 raw := NoMethod(*s) 3777 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3778} 3779 3780// PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy 3781// feature. 3782type PodSecurityPolicyConfig struct { 3783 // Enabled: Enable the PodSecurityPolicy controller for this cluster. If 3784 // enabled, pods 3785 // must be valid under a PodSecurityPolicy to be created. 3786 Enabled bool `json:"enabled,omitempty"` 3787 3788 // ForceSendFields is a list of field names (e.g. "Enabled") to 3789 // unconditionally include in API requests. By default, fields with 3790 // empty values are omitted from API requests. However, any non-pointer, 3791 // non-interface field appearing in ForceSendFields will be sent to the 3792 // server regardless of whether the field is empty or not. This may be 3793 // used to include empty fields in Patch requests. 3794 ForceSendFields []string `json:"-"` 3795 3796 // NullFields is a list of field names (e.g. "Enabled") to include in 3797 // API requests with the JSON null value. By default, fields with empty 3798 // values are omitted from API requests. However, any field with an 3799 // empty value appearing in NullFields will be sent to the server as 3800 // null. It is an error if a field in this list has a non-empty value. 3801 // This may be used to include null fields in Patch requests. 3802 NullFields []string `json:"-"` 3803} 3804 3805func (s *PodSecurityPolicyConfig) MarshalJSON() ([]byte, error) { 3806 type NoMethod PodSecurityPolicyConfig 3807 raw := NoMethod(*s) 3808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3809} 3810 3811// PrivateClusterConfig: Configuration options for private clusters. 3812type PrivateClusterConfig struct { 3813 // EnablePrivateEndpoint: Whether the master's internal IP address is 3814 // used as the cluster endpoint. 3815 EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` 3816 3817 // EnablePrivateNodes: Whether nodes have internal IP addresses only. If 3818 // enabled, all nodes are 3819 // given only RFC 1918 private addresses and communicate with the master 3820 // via 3821 // private networking. 3822 EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` 3823 3824 // MasterGlobalAccessConfig: Controls master global access settings. 3825 MasterGlobalAccessConfig *PrivateClusterMasterGlobalAccessConfig `json:"masterGlobalAccessConfig,omitempty"` 3826 3827 // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the 3828 // hosted master network. This 3829 // range will be used for assigning internal IP addresses to the master 3830 // or 3831 // set of masters, as well as the ILB VIP. This range must not overlap 3832 // with 3833 // any other ranges in use within the cluster's network. 3834 MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` 3835 3836 // PeeringName: Output only. The peering name in the customer VPC used 3837 // by this cluster. 3838 PeeringName string `json:"peeringName,omitempty"` 3839 3840 // PrivateEndpoint: Output only. The internal IP address of this 3841 // cluster's master endpoint. 3842 PrivateEndpoint string `json:"privateEndpoint,omitempty"` 3843 3844 // PublicEndpoint: Output only. The external IP address of this 3845 // cluster's master endpoint. 3846 PublicEndpoint string `json:"publicEndpoint,omitempty"` 3847 3848 // ForceSendFields is a list of field names (e.g. 3849 // "EnablePrivateEndpoint") to unconditionally include in API requests. 3850 // By default, fields with empty values are omitted from API requests. 3851 // However, any non-pointer, non-interface field appearing in 3852 // ForceSendFields will be sent to the server regardless of whether the 3853 // field is empty or not. This may be used to include empty fields in 3854 // Patch requests. 3855 ForceSendFields []string `json:"-"` 3856 3857 // NullFields is a list of field names (e.g. "EnablePrivateEndpoint") to 3858 // include in API requests with the JSON null value. By default, fields 3859 // with empty values are omitted from API requests. However, any field 3860 // with an empty value appearing in NullFields will be sent to the 3861 // server as null. It is an error if a field in this list has a 3862 // non-empty value. This may be used to include null fields in Patch 3863 // requests. 3864 NullFields []string `json:"-"` 3865} 3866 3867func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { 3868 type NoMethod PrivateClusterConfig 3869 raw := NoMethod(*s) 3870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3871} 3872 3873// PrivateClusterMasterGlobalAccessConfig: Configuration for controlling 3874// master global access settings. 3875type PrivateClusterMasterGlobalAccessConfig struct { 3876 // Enabled: Whenever master is accessible globally or not. 3877 Enabled bool `json:"enabled,omitempty"` 3878 3879 // ForceSendFields is a list of field names (e.g. "Enabled") to 3880 // unconditionally include in API requests. By default, fields with 3881 // empty values are omitted from API requests. However, any non-pointer, 3882 // non-interface field appearing in ForceSendFields will be sent to the 3883 // server regardless of whether the field is empty or not. This may be 3884 // used to include empty fields in Patch requests. 3885 ForceSendFields []string `json:"-"` 3886 3887 // NullFields is a list of field names (e.g. "Enabled") to include in 3888 // API requests with the JSON null value. By default, fields with empty 3889 // values are omitted from API requests. However, any field with an 3890 // empty value appearing in NullFields will be sent to the server as 3891 // null. It is an error if a field in this list has a non-empty value. 3892 // This may be used to include null fields in Patch requests. 3893 NullFields []string `json:"-"` 3894} 3895 3896func (s *PrivateClusterMasterGlobalAccessConfig) MarshalJSON() ([]byte, error) { 3897 type NoMethod PrivateClusterMasterGlobalAccessConfig 3898 raw := NoMethod(*s) 3899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3900} 3901 3902// RecurringTimeWindow: Represents an arbitrary window of time that 3903// recurs. 3904type RecurringTimeWindow struct { 3905 // Recurrence: An RRULE 3906 // (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how 3907 // this window reccurs. They go on for the span of time between the 3908 // start and 3909 // end time. 3910 // 3911 // For example, to have something repeat every weekday, you'd use: 3912 // <code>FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR</code> 3913 // To repeat some window daily (equivalent to the 3914 // DailyMaintenanceWindow): 3915 // <code>FREQ=DAILY</code> 3916 // For the first weekend of every month: 3917 // <code>FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU</code> 3918 // This specifies how frequently the window starts. Eg, if you wanted to 3919 // have 3920 // a 9-5 UTC-4 window every weekday, you'd use something like: 3921 // <code> 3922 // start time = 2019-01-01T09:00:00-0400 3923 // end time = 2019-01-01T17:00:00-0400 3924 // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR 3925 // </code> 3926 // Windows can span multiple days. Eg, to make the window encompass 3927 // every 3928 // weekend from midnight Saturday till the last minute of Sunday 3929 // UTC: 3930 // <code> 3931 // start time = 2019-01-05T00:00:00Z 3932 // end time = 2019-01-07T23:59:00Z 3933 // recurrence = FREQ=WEEKLY;BYDAY=SA 3934 // </code> 3935 // Note the start and end time's specific dates are largely arbitrary 3936 // except 3937 // to specify duration of the window and when it first starts. 3938 // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. 3939 Recurrence string `json:"recurrence,omitempty"` 3940 3941 // Window: The window of the first recurrence. 3942 Window *TimeWindow `json:"window,omitempty"` 3943 3944 // ForceSendFields is a list of field names (e.g. "Recurrence") to 3945 // unconditionally include in API requests. By default, fields with 3946 // empty values are omitted from API requests. However, any non-pointer, 3947 // non-interface field appearing in ForceSendFields will be sent to the 3948 // server regardless of whether the field is empty or not. This may be 3949 // used to include empty fields in Patch requests. 3950 ForceSendFields []string `json:"-"` 3951 3952 // NullFields is a list of field names (e.g. "Recurrence") to include in 3953 // API requests with the JSON null value. By default, fields with empty 3954 // values are omitted from API requests. However, any field with an 3955 // empty value appearing in NullFields will be sent to the server as 3956 // null. It is an error if a field in this list has a non-empty value. 3957 // This may be used to include null fields in Patch requests. 3958 NullFields []string `json:"-"` 3959} 3960 3961func (s *RecurringTimeWindow) MarshalJSON() ([]byte, error) { 3962 type NoMethod RecurringTimeWindow 3963 raw := NoMethod(*s) 3964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3965} 3966 3967// ReleaseChannel: ReleaseChannel indicates which release channel a 3968// cluster is 3969// subscribed to. Release channels are arranged in order of risk 3970// and 3971// frequency of updates. 3972// 3973// When a cluster is subscribed to a release channel, Google 3974// maintains 3975// both the master version and the node version. Node 3976// auto-upgrade 3977// defaults to true and cannot be disabled. Updates to version 3978// related 3979// fields (e.g. current_master_version) return an error. 3980type ReleaseChannel struct { 3981 // Channel: channel specifies which release channel the cluster is 3982 // subscribed to. 3983 // 3984 // Possible values: 3985 // "UNSPECIFIED" - No channel specified. 3986 // "RAPID" - RAPID channel is offered on an early access basis for 3987 // customers who want 3988 // to test new releases before they are qualified for production use 3989 // or 3990 // general availability. New upgrades will occur roughly 3991 // weekly. 3992 // 3993 // WARNING: Versions available in the RAPID Channel may be subject 3994 // to 3995 // unresolved issues with no known workaround and are not for use 3996 // with 3997 // production workloads or subject to any SLAs. 3998 // "REGULAR" - Clusters subscribed to REGULAR receive versions that 3999 // are considered GA 4000 // quality. REGULAR is intended for production users who want to 4001 // take 4002 // advantage of new features. New upgrades will occur roughly every 4003 // few 4004 // weeks. 4005 // "STABLE" - Clusters subscribed to STABLE receive versions that are 4006 // known to be 4007 // stable and reliable in production. STABLE is intended for 4008 // production 4009 // users who need stability above all else, or for whom frequent 4010 // upgrades 4011 // are too risky. New upgrades will occur roughly every few months. 4012 Channel string `json:"channel,omitempty"` 4013 4014 // ForceSendFields is a list of field names (e.g. "Channel") to 4015 // unconditionally include in API requests. By default, fields with 4016 // empty values are omitted from API requests. However, any non-pointer, 4017 // non-interface field appearing in ForceSendFields will be sent to the 4018 // server regardless of whether the field is empty or not. This may be 4019 // used to include empty fields in Patch requests. 4020 ForceSendFields []string `json:"-"` 4021 4022 // NullFields is a list of field names (e.g. "Channel") to include in 4023 // API requests with the JSON null value. By default, fields with empty 4024 // values are omitted from API requests. However, any field with an 4025 // empty value appearing in NullFields will be sent to the server as 4026 // null. It is an error if a field in this list has a non-empty value. 4027 // This may be used to include null fields in Patch requests. 4028 NullFields []string `json:"-"` 4029} 4030 4031func (s *ReleaseChannel) MarshalJSON() ([]byte, error) { 4032 type NoMethod ReleaseChannel 4033 raw := NoMethod(*s) 4034 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4035} 4036 4037// ReleaseChannelConfig: ReleaseChannelConfig exposes configuration for 4038// a release channel. 4039type ReleaseChannelConfig struct { 4040 // AvailableVersions: List of available versions for the release 4041 // channel. 4042 AvailableVersions []*AvailableVersion `json:"availableVersions,omitempty"` 4043 4044 // Channel: The release channel this configuration applies to. 4045 // 4046 // Possible values: 4047 // "UNSPECIFIED" - No channel specified. 4048 // "RAPID" - RAPID channel is offered on an early access basis for 4049 // customers who want 4050 // to test new releases before they are qualified for production use 4051 // or 4052 // general availability. New upgrades will occur roughly 4053 // weekly. 4054 // 4055 // WARNING: Versions available in the RAPID Channel may be subject 4056 // to 4057 // unresolved issues with no known workaround and are not for use 4058 // with 4059 // production workloads or subject to any SLAs. 4060 // "REGULAR" - Clusters subscribed to REGULAR receive versions that 4061 // are considered GA 4062 // quality. REGULAR is intended for production users who want to 4063 // take 4064 // advantage of new features. New upgrades will occur roughly every 4065 // few 4066 // weeks. 4067 // "STABLE" - Clusters subscribed to STABLE receive versions that are 4068 // known to be 4069 // stable and reliable in production. STABLE is intended for 4070 // production 4071 // users who need stability above all else, or for whom frequent 4072 // upgrades 4073 // are too risky. New upgrades will occur roughly every few months. 4074 Channel string `json:"channel,omitempty"` 4075 4076 // DefaultVersion: The default version for newly created clusters on the 4077 // channel. 4078 DefaultVersion string `json:"defaultVersion,omitempty"` 4079 4080 // ForceSendFields is a list of field names (e.g. "AvailableVersions") 4081 // to unconditionally include in API requests. By default, fields with 4082 // empty values are omitted from API requests. However, any non-pointer, 4083 // non-interface field appearing in ForceSendFields will be sent to the 4084 // server regardless of whether the field is empty or not. This may be 4085 // used to include empty fields in Patch requests. 4086 ForceSendFields []string `json:"-"` 4087 4088 // NullFields is a list of field names (e.g. "AvailableVersions") to 4089 // include in API requests with the JSON null value. By default, fields 4090 // with empty values are omitted from API requests. However, any field 4091 // with an empty value appearing in NullFields will be sent to the 4092 // server as null. It is an error if a field in this list has a 4093 // non-empty value. This may be used to include null fields in Patch 4094 // requests. 4095 NullFields []string `json:"-"` 4096} 4097 4098func (s *ReleaseChannelConfig) MarshalJSON() ([]byte, error) { 4099 type NoMethod ReleaseChannelConfig 4100 raw := NoMethod(*s) 4101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4102} 4103 4104// ReservationAffinity: 4105// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/ 4106// reserving-zonal-resources) 4107// is the configuration of desired reservation which instances could 4108// take 4109// capacity from. 4110type ReservationAffinity struct { 4111 // ConsumeReservationType: Corresponds to the type of reservation 4112 // consumption. 4113 // 4114 // Possible values: 4115 // "UNSPECIFIED" - Default value. This should not be used. 4116 // "NO_RESERVATION" - Do not consume from any reserved capacity. 4117 // "ANY_RESERVATION" - Consume any reservation available. 4118 // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. 4119 // Must specify key value fields 4120 // for specifying the reservations. 4121 ConsumeReservationType string `json:"consumeReservationType,omitempty"` 4122 4123 // Key: Corresponds to the label key of a reservation resource. To 4124 // target a 4125 // SPECIFIC_RESERVATION by name, specify 4126 // "googleapis.com/reservation-name" as 4127 // the key and specify the name of your reservation as its value. 4128 Key string `json:"key,omitempty"` 4129 4130 // Values: Corresponds to the label value(s) of reservation resource(s). 4131 Values []string `json:"values,omitempty"` 4132 4133 // ForceSendFields is a list of field names (e.g. 4134 // "ConsumeReservationType") to unconditionally include in API requests. 4135 // By default, fields with empty values are omitted from API requests. 4136 // However, any non-pointer, non-interface field appearing in 4137 // ForceSendFields will be sent to the server regardless of whether the 4138 // field is empty or not. This may be used to include empty fields in 4139 // Patch requests. 4140 ForceSendFields []string `json:"-"` 4141 4142 // NullFields is a list of field names (e.g. "ConsumeReservationType") 4143 // to include in API requests with the JSON null value. By default, 4144 // fields with empty values are omitted from API requests. However, any 4145 // field with an empty value appearing in NullFields will be sent to the 4146 // server as null. It is an error if a field in this list has a 4147 // non-empty value. This may be used to include null fields in Patch 4148 // requests. 4149 NullFields []string `json:"-"` 4150} 4151 4152func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { 4153 type NoMethod ReservationAffinity 4154 raw := NoMethod(*s) 4155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4156} 4157 4158// ResourceLimit: Contains information about amount of some resource in 4159// the cluster. 4160// For memory, value should be in GB. 4161type ResourceLimit struct { 4162 // Maximum: Maximum amount of the resource in the cluster. 4163 Maximum int64 `json:"maximum,omitempty,string"` 4164 4165 // Minimum: Minimum amount of the resource in the cluster. 4166 Minimum int64 `json:"minimum,omitempty,string"` 4167 4168 // ResourceType: Resource name "cpu", "memory" or gpu-specific string. 4169 ResourceType string `json:"resourceType,omitempty"` 4170 4171 // ForceSendFields is a list of field names (e.g. "Maximum") to 4172 // unconditionally include in API requests. By default, fields with 4173 // empty values are omitted from API requests. However, any non-pointer, 4174 // non-interface field appearing in ForceSendFields will be sent to the 4175 // server regardless of whether the field is empty or not. This may be 4176 // used to include empty fields in Patch requests. 4177 ForceSendFields []string `json:"-"` 4178 4179 // NullFields is a list of field names (e.g. "Maximum") to include in 4180 // API requests with the JSON null value. By default, fields with empty 4181 // values are omitted from API requests. However, any field with an 4182 // empty value appearing in NullFields will be sent to the server as 4183 // null. It is an error if a field in this list has a non-empty value. 4184 // This may be used to include null fields in Patch requests. 4185 NullFields []string `json:"-"` 4186} 4187 4188func (s *ResourceLimit) MarshalJSON() ([]byte, error) { 4189 type NoMethod ResourceLimit 4190 raw := NoMethod(*s) 4191 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4192} 4193 4194// ResourceUsageExportConfig: Configuration for exporting cluster 4195// resource usages. 4196type ResourceUsageExportConfig struct { 4197 // BigqueryDestination: Configuration to use BigQuery as usage export 4198 // destination. 4199 BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"` 4200 4201 // ConsumptionMeteringConfig: Configuration to enable resource 4202 // consumption metering. 4203 ConsumptionMeteringConfig *ConsumptionMeteringConfig `json:"consumptionMeteringConfig,omitempty"` 4204 4205 // EnableNetworkEgressMetering: Whether to enable network egress 4206 // metering for this cluster. If enabled, a 4207 // daemonset will be created in the cluster to meter network egress 4208 // traffic. 4209 EnableNetworkEgressMetering bool `json:"enableNetworkEgressMetering,omitempty"` 4210 4211 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 4212 // to unconditionally include in API requests. By default, fields with 4213 // empty values are omitted from API requests. However, any non-pointer, 4214 // non-interface field appearing in ForceSendFields will be sent to the 4215 // server regardless of whether the field is empty or not. This may be 4216 // used to include empty fields in Patch requests. 4217 ForceSendFields []string `json:"-"` 4218 4219 // NullFields is a list of field names (e.g. "BigqueryDestination") to 4220 // include in API requests with the JSON null value. By default, fields 4221 // with empty values are omitted from API requests. However, any field 4222 // with an empty value appearing in NullFields will be sent to the 4223 // server as null. It is an error if a field in this list has a 4224 // non-empty value. This may be used to include null fields in Patch 4225 // requests. 4226 NullFields []string `json:"-"` 4227} 4228 4229func (s *ResourceUsageExportConfig) MarshalJSON() ([]byte, error) { 4230 type NoMethod ResourceUsageExportConfig 4231 raw := NoMethod(*s) 4232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4233} 4234 4235// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest 4236// rollbacks the previously Aborted or Failed 4237// NodePool upgrade. This will be an no-op if the last upgrade 4238// successfully 4239// completed. 4240type RollbackNodePoolUpgradeRequest struct { 4241 // ClusterId: Required. Deprecated. The name of the cluster to 4242 // rollback. 4243 // This field has been deprecated and replaced by the name field. 4244 ClusterId string `json:"clusterId,omitempty"` 4245 4246 // Name: The name (project, location, cluster, node pool id) of the node 4247 // poll to 4248 // rollback upgrade. 4249 // Specified in the format 4250 // 'projects/*/locations/*/clusters/*/nodePools/*'. 4251 Name string `json:"name,omitempty"` 4252 4253 // NodePoolId: Required. Deprecated. The name of the node pool to 4254 // rollback. 4255 // This field has been deprecated and replaced by the name field. 4256 NodePoolId string `json:"nodePoolId,omitempty"` 4257 4258 // ProjectId: Required. Deprecated. The Google Developers Console 4259 // [project ID or 4260 // project 4261 // number](https://support.google.com/cloud/answer/6158840). 4262 // This 4263 // field has been deprecated and replaced by the name field. 4264 ProjectId string `json:"projectId,omitempty"` 4265 4266 // Zone: Required. Deprecated. The name of the Google Compute 4267 // Engine 4268 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4269 // which the 4270 // cluster resides. This field has been deprecated and replaced by the 4271 // name 4272 // field. 4273 Zone string `json:"zone,omitempty"` 4274 4275 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4276 // unconditionally include in API requests. By default, fields with 4277 // empty values are omitted from API requests. However, any non-pointer, 4278 // non-interface field appearing in ForceSendFields will be sent to the 4279 // server regardless of whether the field is empty or not. This may be 4280 // used to include empty fields in Patch requests. 4281 ForceSendFields []string `json:"-"` 4282 4283 // NullFields is a list of field names (e.g. "ClusterId") to include in 4284 // API requests with the JSON null value. By default, fields with empty 4285 // values are omitted from API requests. However, any field with an 4286 // empty value appearing in NullFields will be sent to the server as 4287 // null. It is an error if a field in this list has a non-empty value. 4288 // This may be used to include null fields in Patch requests. 4289 NullFields []string `json:"-"` 4290} 4291 4292func (s *RollbackNodePoolUpgradeRequest) MarshalJSON() ([]byte, error) { 4293 type NoMethod RollbackNodePoolUpgradeRequest 4294 raw := NoMethod(*s) 4295 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4296} 4297 4298// SandboxConfig: SandboxConfig contains configurations of the sandbox 4299// to use for the node. 4300type SandboxConfig struct { 4301 // SandboxType: Type of the sandbox to use for the node (e.g. 'gvisor') 4302 SandboxType string `json:"sandboxType,omitempty"` 4303 4304 // Type: Type of the sandbox to use for the node. 4305 // 4306 // Possible values: 4307 // "UNSPECIFIED" - Default value. This should not be used. 4308 // "GVISOR" - Run sandbox using gvisor. 4309 Type string `json:"type,omitempty"` 4310 4311 // ForceSendFields is a list of field names (e.g. "SandboxType") to 4312 // unconditionally include in API requests. By default, fields with 4313 // empty values are omitted from API requests. However, any non-pointer, 4314 // non-interface field appearing in ForceSendFields will be sent to the 4315 // server regardless of whether the field is empty or not. This may be 4316 // used to include empty fields in Patch requests. 4317 ForceSendFields []string `json:"-"` 4318 4319 // NullFields is a list of field names (e.g. "SandboxType") to include 4320 // in API requests with the JSON null value. By default, fields with 4321 // empty values are omitted from API requests. However, any field with 4322 // an empty value appearing in NullFields will be sent to the server as 4323 // null. It is an error if a field in this list has a non-empty value. 4324 // This may be used to include null fields in Patch requests. 4325 NullFields []string `json:"-"` 4326} 4327 4328func (s *SandboxConfig) MarshalJSON() ([]byte, error) { 4329 type NoMethod SandboxConfig 4330 raw := NoMethod(*s) 4331 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4332} 4333 4334// ServerConfig: Kubernetes Engine service configuration. 4335type ServerConfig struct { 4336 // Channels: List of release channel configurations. 4337 Channels []*ReleaseChannelConfig `json:"channels,omitempty"` 4338 4339 // DefaultClusterVersion: Version of Kubernetes the service deploys by 4340 // default. 4341 DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` 4342 4343 // DefaultImageType: Default image type. 4344 DefaultImageType string `json:"defaultImageType,omitempty"` 4345 4346 // ValidImageTypes: List of valid image types. 4347 ValidImageTypes []string `json:"validImageTypes,omitempty"` 4348 4349 // ValidMasterVersions: List of valid master versions. 4350 ValidMasterVersions []string `json:"validMasterVersions,omitempty"` 4351 4352 // ValidNodeVersions: List of valid node upgrade target versions. 4353 ValidNodeVersions []string `json:"validNodeVersions,omitempty"` 4354 4355 // ServerResponse contains the HTTP response code and headers from the 4356 // server. 4357 googleapi.ServerResponse `json:"-"` 4358 4359 // ForceSendFields is a list of field names (e.g. "Channels") to 4360 // unconditionally include in API requests. By default, fields with 4361 // empty values are omitted from API requests. However, any non-pointer, 4362 // non-interface field appearing in ForceSendFields will be sent to the 4363 // server regardless of whether the field is empty or not. This may be 4364 // used to include empty fields in Patch requests. 4365 ForceSendFields []string `json:"-"` 4366 4367 // NullFields is a list of field names (e.g. "Channels") to include in 4368 // API requests with the JSON null value. By default, fields with empty 4369 // values are omitted from API requests. However, any field with an 4370 // empty value appearing in NullFields will be sent to the server as 4371 // null. It is an error if a field in this list has a non-empty value. 4372 // This may be used to include null fields in Patch requests. 4373 NullFields []string `json:"-"` 4374} 4375 4376func (s *ServerConfig) MarshalJSON() ([]byte, error) { 4377 type NoMethod ServerConfig 4378 raw := NoMethod(*s) 4379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4380} 4381 4382// SetAddonsConfigRequest: SetAddonsRequest sets the addons associated 4383// with the cluster. 4384type SetAddonsConfigRequest struct { 4385 // AddonsConfig: Required. The desired configurations for the various 4386 // addons available to run in the 4387 // cluster. 4388 AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` 4389 4390 // ClusterId: Required. Deprecated. The name of the cluster to 4391 // upgrade. 4392 // This field has been deprecated and replaced by the name field. 4393 ClusterId string `json:"clusterId,omitempty"` 4394 4395 // Name: The name (project, location, cluster) of the cluster to set 4396 // addons. 4397 // Specified in the format 'projects/*/locations/*/clusters/*'. 4398 Name string `json:"name,omitempty"` 4399 4400 // ProjectId: Required. Deprecated. The Google Developers Console 4401 // [project ID or 4402 // project 4403 // number](https://support.google.com/cloud/answer/6158840). 4404 // This 4405 // field has been deprecated and replaced by the name field. 4406 ProjectId string `json:"projectId,omitempty"` 4407 4408 // Zone: Required. Deprecated. The name of the Google Compute 4409 // Engine 4410 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4411 // which the 4412 // cluster resides. This field has been deprecated and replaced by the 4413 // name 4414 // field. 4415 Zone string `json:"zone,omitempty"` 4416 4417 // ForceSendFields is a list of field names (e.g. "AddonsConfig") to 4418 // unconditionally include in API requests. By default, fields with 4419 // empty values are omitted from API requests. However, any non-pointer, 4420 // non-interface field appearing in ForceSendFields will be sent to the 4421 // server regardless of whether the field is empty or not. This may be 4422 // used to include empty fields in Patch requests. 4423 ForceSendFields []string `json:"-"` 4424 4425 // NullFields is a list of field names (e.g. "AddonsConfig") to include 4426 // in API requests with the JSON null value. By default, fields with 4427 // empty values are omitted from API requests. However, any field with 4428 // an empty value appearing in NullFields will be sent to the server as 4429 // null. It is an error if a field in this list has a non-empty value. 4430 // This may be used to include null fields in Patch requests. 4431 NullFields []string `json:"-"` 4432} 4433 4434func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { 4435 type NoMethod SetAddonsConfigRequest 4436 raw := NoMethod(*s) 4437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4438} 4439 4440// SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform 4441// labels on a Google Container 4442// Engine cluster, which will in turn set them for Google Compute 4443// Engine 4444// resources used by that cluster 4445type SetLabelsRequest struct { 4446 // ClusterId: Required. Deprecated. The name of the cluster. 4447 // This field has been deprecated and replaced by the name field. 4448 ClusterId string `json:"clusterId,omitempty"` 4449 4450 // LabelFingerprint: Required. The fingerprint of the previous set of 4451 // labels for this resource, 4452 // used to detect conflicts. The fingerprint is initially generated 4453 // by 4454 // Kubernetes Engine and changes after every request to modify or 4455 // update 4456 // labels. You must always provide an up-to-date fingerprint hash 4457 // when 4458 // updating or changing labels. Make a <code>get()</code> request to 4459 // the 4460 // resource to get the latest fingerprint. 4461 LabelFingerprint string `json:"labelFingerprint,omitempty"` 4462 4463 // Name: The name (project, location, cluster id) of the cluster to set 4464 // labels. 4465 // Specified in the format 'projects/*/locations/*/clusters/*'. 4466 Name string `json:"name,omitempty"` 4467 4468 // ProjectId: Required. Deprecated. The Google Developers Console 4469 // [project ID or 4470 // project 4471 // number](https://developers.google.com/console/help/new/#projec 4472 // tnumber). 4473 // This field has been deprecated and replaced by the name field. 4474 ProjectId string `json:"projectId,omitempty"` 4475 4476 // ResourceLabels: Required. The labels to set for that cluster. 4477 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 4478 4479 // Zone: Required. Deprecated. The name of the Google Compute 4480 // Engine 4481 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4482 // which the 4483 // cluster resides. This field has been deprecated and replaced by the 4484 // name 4485 // field. 4486 Zone string `json:"zone,omitempty"` 4487 4488 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4489 // unconditionally include in API requests. By default, fields with 4490 // empty values are omitted from API requests. However, any non-pointer, 4491 // non-interface field appearing in ForceSendFields will be sent to the 4492 // server regardless of whether the field is empty or not. This may be 4493 // used to include empty fields in Patch requests. 4494 ForceSendFields []string `json:"-"` 4495 4496 // NullFields is a list of field names (e.g. "ClusterId") to include in 4497 // API requests with the JSON null value. By default, fields with empty 4498 // values are omitted from API requests. However, any field with an 4499 // empty value appearing in NullFields will be sent to the server as 4500 // null. It is an error if a field in this list has a non-empty value. 4501 // This may be used to include null fields in Patch requests. 4502 NullFields []string `json:"-"` 4503} 4504 4505func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { 4506 type NoMethod SetLabelsRequest 4507 raw := NoMethod(*s) 4508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4509} 4510 4511// SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the 4512// ABAC authorization mechanism for 4513// a cluster. 4514type SetLegacyAbacRequest struct { 4515 // ClusterId: Required. Deprecated. The name of the cluster to 4516 // update. 4517 // This field has been deprecated and replaced by the name field. 4518 ClusterId string `json:"clusterId,omitempty"` 4519 4520 // Enabled: Required. Whether ABAC authorization will be enabled in the 4521 // cluster. 4522 Enabled bool `json:"enabled,omitempty"` 4523 4524 // Name: The name (project, location, cluster id) of the cluster to set 4525 // legacy abac. 4526 // Specified in the format 'projects/*/locations/*/clusters/*'. 4527 Name string `json:"name,omitempty"` 4528 4529 // ProjectId: Required. Deprecated. The Google Developers Console 4530 // [project ID or 4531 // project 4532 // number](https://support.google.com/cloud/answer/6158840). 4533 // This 4534 // field has been deprecated and replaced by the name field. 4535 ProjectId string `json:"projectId,omitempty"` 4536 4537 // Zone: Required. Deprecated. The name of the Google Compute 4538 // Engine 4539 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4540 // which the 4541 // cluster resides. This field has been deprecated and replaced by the 4542 // name 4543 // field. 4544 Zone string `json:"zone,omitempty"` 4545 4546 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4547 // unconditionally include in API requests. By default, fields with 4548 // empty values are omitted from API requests. However, any non-pointer, 4549 // non-interface field appearing in ForceSendFields will be sent to the 4550 // server regardless of whether the field is empty or not. This may be 4551 // used to include empty fields in Patch requests. 4552 ForceSendFields []string `json:"-"` 4553 4554 // NullFields is a list of field names (e.g. "ClusterId") to include in 4555 // API requests with the JSON null value. By default, fields with empty 4556 // values are omitted from API requests. However, any field with an 4557 // empty value appearing in NullFields will be sent to the server as 4558 // null. It is an error if a field in this list has a non-empty value. 4559 // This may be used to include null fields in Patch requests. 4560 NullFields []string `json:"-"` 4561} 4562 4563func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { 4564 type NoMethod SetLegacyAbacRequest 4565 raw := NoMethod(*s) 4566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4567} 4568 4569// SetLocationsRequest: SetLocationsRequest sets the locations of the 4570// cluster. 4571type SetLocationsRequest struct { 4572 // ClusterId: Required. Deprecated. The name of the cluster to 4573 // upgrade. 4574 // This field has been deprecated and replaced by the name field. 4575 ClusterId string `json:"clusterId,omitempty"` 4576 4577 // Locations: Required. The desired list of Google Compute 4578 // Engine 4579 // [zones](https://cloud.google.com/compute/docs/zones#available) in 4580 // which the 4581 // cluster's nodes should be located. Changing the locations a cluster 4582 // is in 4583 // will result in nodes being either created or removed from the 4584 // cluster, 4585 // depending on whether locations are being added or removed. 4586 // 4587 // This list must always include the cluster's primary zone. 4588 Locations []string `json:"locations,omitempty"` 4589 4590 // Name: The name (project, location, cluster) of the cluster to set 4591 // locations. 4592 // Specified in the format 'projects/*/locations/*/clusters/*'. 4593 Name string `json:"name,omitempty"` 4594 4595 // ProjectId: Required. Deprecated. The Google Developers Console 4596 // [project ID or 4597 // project 4598 // number](https://support.google.com/cloud/answer/6158840). 4599 // This 4600 // field has been deprecated and replaced by the name field. 4601 ProjectId string `json:"projectId,omitempty"` 4602 4603 // Zone: Required. Deprecated. The name of the Google Compute 4604 // Engine 4605 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4606 // which the 4607 // cluster resides. This field has been deprecated and replaced by the 4608 // name 4609 // field. 4610 Zone string `json:"zone,omitempty"` 4611 4612 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4613 // unconditionally include in API requests. By default, fields with 4614 // empty values are omitted from API requests. However, any non-pointer, 4615 // non-interface field appearing in ForceSendFields will be sent to the 4616 // server regardless of whether the field is empty or not. This may be 4617 // used to include empty fields in Patch requests. 4618 ForceSendFields []string `json:"-"` 4619 4620 // NullFields is a list of field names (e.g. "ClusterId") to include in 4621 // API requests with the JSON null value. By default, fields with empty 4622 // values are omitted from API requests. However, any field with an 4623 // empty value appearing in NullFields will be sent to the server as 4624 // null. It is an error if a field in this list has a non-empty value. 4625 // This may be used to include null fields in Patch requests. 4626 NullFields []string `json:"-"` 4627} 4628 4629func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) { 4630 type NoMethod SetLocationsRequest 4631 raw := NoMethod(*s) 4632 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4633} 4634 4635// SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging 4636// service of a cluster. 4637type SetLoggingServiceRequest struct { 4638 // ClusterId: Required. Deprecated. The name of the cluster to 4639 // upgrade. 4640 // This field has been deprecated and replaced by the name field. 4641 ClusterId string `json:"clusterId,omitempty"` 4642 4643 // LoggingService: Required. The logging service the cluster should use 4644 // to write logs. 4645 // Currently available options: 4646 // 4647 // * `logging.googleapis.com/kubernetes` - The Cloud Logging 4648 // service with a Kubernetes-native resource model 4649 // * `logging.googleapis.com` - The legacy Cloud Logging service (no 4650 // longer 4651 // available as of GKE 1.15). 4652 // * `none` - no logs will be exported from the cluster. 4653 // 4654 // If left as an empty string,`logging.googleapis.com/kubernetes` will 4655 // be 4656 // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. 4657 LoggingService string `json:"loggingService,omitempty"` 4658 4659 // Name: The name (project, location, cluster) of the cluster to set 4660 // logging. 4661 // Specified in the format 'projects/*/locations/*/clusters/*'. 4662 Name string `json:"name,omitempty"` 4663 4664 // ProjectId: Required. Deprecated. The Google Developers Console 4665 // [project ID or 4666 // project 4667 // number](https://support.google.com/cloud/answer/6158840). 4668 // This 4669 // field has been deprecated and replaced by the name field. 4670 ProjectId string `json:"projectId,omitempty"` 4671 4672 // Zone: Required. Deprecated. The name of the Google Compute 4673 // Engine 4674 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4675 // which the 4676 // cluster resides. This field has been deprecated and replaced by the 4677 // name 4678 // field. 4679 Zone string `json:"zone,omitempty"` 4680 4681 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4682 // unconditionally include in API requests. By default, fields with 4683 // empty values are omitted from API requests. However, any non-pointer, 4684 // non-interface field appearing in ForceSendFields will be sent to the 4685 // server regardless of whether the field is empty or not. This may be 4686 // used to include empty fields in Patch requests. 4687 ForceSendFields []string `json:"-"` 4688 4689 // NullFields is a list of field names (e.g. "ClusterId") to include in 4690 // API requests with the JSON null value. By default, fields with empty 4691 // values are omitted from API requests. However, any field with an 4692 // empty value appearing in NullFields will be sent to the server as 4693 // null. It is an error if a field in this list has a non-empty value. 4694 // This may be used to include null fields in Patch requests. 4695 NullFields []string `json:"-"` 4696} 4697 4698func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { 4699 type NoMethod SetLoggingServiceRequest 4700 raw := NoMethod(*s) 4701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4702} 4703 4704// SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the 4705// maintenance policy for a cluster. 4706type SetMaintenancePolicyRequest struct { 4707 // ClusterId: Required. The name of the cluster to update. 4708 ClusterId string `json:"clusterId,omitempty"` 4709 4710 // MaintenancePolicy: Required. The maintenance policy to be set for the 4711 // cluster. An empty field 4712 // clears the existing maintenance policy. 4713 MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` 4714 4715 // Name: The name (project, location, cluster id) of the cluster to set 4716 // maintenance 4717 // policy. 4718 // Specified in the format 'projects/*/locations/*/clusters/*'. 4719 Name string `json:"name,omitempty"` 4720 4721 // ProjectId: Required. The Google Developers Console [project ID or 4722 // project 4723 // number](https://support.google.com/cloud/answer/6158840). 4724 ProjectId string `json:"projectId,omitempty"` 4725 4726 // Zone: Required. The name of the Google Compute 4727 // Engine 4728 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4729 // which the 4730 // cluster resides. 4731 Zone string `json:"zone,omitempty"` 4732 4733 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4734 // unconditionally include in API requests. By default, fields with 4735 // empty values are omitted from API requests. However, any non-pointer, 4736 // non-interface field appearing in ForceSendFields will be sent to the 4737 // server regardless of whether the field is empty or not. This may be 4738 // used to include empty fields in Patch requests. 4739 ForceSendFields []string `json:"-"` 4740 4741 // NullFields is a list of field names (e.g. "ClusterId") to include in 4742 // API requests with the JSON null value. By default, fields with empty 4743 // values are omitted from API requests. However, any field with an 4744 // empty value appearing in NullFields will be sent to the server as 4745 // null. It is an error if a field in this list has a non-empty value. 4746 // This may be used to include null fields in Patch requests. 4747 NullFields []string `json:"-"` 4748} 4749 4750func (s *SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) { 4751 type NoMethod SetMaintenancePolicyRequest 4752 raw := NoMethod(*s) 4753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4754} 4755 4756// SetMasterAuthRequest: SetMasterAuthRequest updates the admin password 4757// of a cluster. 4758type SetMasterAuthRequest struct { 4759 // Action: Required. The exact form of action to be taken on the master 4760 // auth. 4761 // 4762 // Possible values: 4763 // "UNKNOWN" - Operation is unknown and will error out. 4764 // "SET_PASSWORD" - Set the password to a user generated value. 4765 // "GENERATE_PASSWORD" - Generate a new password and set it to that. 4766 // "SET_USERNAME" - Set the username. If an empty username is 4767 // provided, basic authentication 4768 // is disabled for the cluster. If a non-empty username is provided, 4769 // basic 4770 // authentication is enabled, with either a provided password or a 4771 // generated 4772 // one. 4773 Action string `json:"action,omitempty"` 4774 4775 // ClusterId: Required. Deprecated. The name of the cluster to 4776 // upgrade. 4777 // This field has been deprecated and replaced by the name field. 4778 ClusterId string `json:"clusterId,omitempty"` 4779 4780 // Name: The name (project, location, cluster) of the cluster to set 4781 // auth. 4782 // Specified in the format 'projects/*/locations/*/clusters/*'. 4783 Name string `json:"name,omitempty"` 4784 4785 // ProjectId: Required. Deprecated. The Google Developers Console 4786 // [project ID or 4787 // project 4788 // number](https://support.google.com/cloud/answer/6158840). 4789 // This 4790 // field has been deprecated and replaced by the name field. 4791 ProjectId string `json:"projectId,omitempty"` 4792 4793 // Update: Required. A description of the update. 4794 Update *MasterAuth `json:"update,omitempty"` 4795 4796 // Zone: Required. Deprecated. The name of the Google Compute 4797 // Engine 4798 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4799 // which the 4800 // cluster resides. This field has been deprecated and replaced by the 4801 // name 4802 // field. 4803 Zone string `json:"zone,omitempty"` 4804 4805 // ForceSendFields is a list of field names (e.g. "Action") to 4806 // unconditionally include in API requests. By default, fields with 4807 // empty values are omitted from API requests. However, any non-pointer, 4808 // non-interface field appearing in ForceSendFields will be sent to the 4809 // server regardless of whether the field is empty or not. This may be 4810 // used to include empty fields in Patch requests. 4811 ForceSendFields []string `json:"-"` 4812 4813 // NullFields is a list of field names (e.g. "Action") to include in API 4814 // requests with the JSON null value. By default, fields with empty 4815 // values are omitted from API requests. However, any field with an 4816 // empty value appearing in NullFields will be sent to the server as 4817 // null. It is an error if a field in this list has a non-empty value. 4818 // This may be used to include null fields in Patch requests. 4819 NullFields []string `json:"-"` 4820} 4821 4822func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { 4823 type NoMethod SetMasterAuthRequest 4824 raw := NoMethod(*s) 4825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4826} 4827 4828// SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the 4829// monitoring service of a cluster. 4830type SetMonitoringServiceRequest struct { 4831 // ClusterId: Required. Deprecated. The name of the cluster to 4832 // upgrade. 4833 // This field has been deprecated and replaced by the name field. 4834 ClusterId string `json:"clusterId,omitempty"` 4835 4836 // MonitoringService: Required. The monitoring service the cluster 4837 // should use to write metrics. 4838 // Currently available options: 4839 // 4840 // * "monitoring.googleapis.com/kubernetes" - The Cloud 4841 // Monitoring 4842 // service with a Kubernetes-native resource model 4843 // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service 4844 // (no 4845 // longer available as of GKE 1.15). 4846 // * `none` - No metrics will be exported from the cluster. 4847 // 4848 // If left as an empty string,`monitoring.googleapis.com/kubernetes` 4849 // will be 4850 // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier 4851 // versions. 4852 MonitoringService string `json:"monitoringService,omitempty"` 4853 4854 // Name: The name (project, location, cluster) of the cluster to set 4855 // monitoring. 4856 // Specified in the format 'projects/*/locations/*/clusters/*'. 4857 Name string `json:"name,omitempty"` 4858 4859 // ProjectId: Required. Deprecated. The Google Developers Console 4860 // [project ID or 4861 // project 4862 // number](https://support.google.com/cloud/answer/6158840). 4863 // This 4864 // field has been deprecated and replaced by the name field. 4865 ProjectId string `json:"projectId,omitempty"` 4866 4867 // Zone: Required. Deprecated. The name of the Google Compute 4868 // Engine 4869 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4870 // which the 4871 // cluster resides. This field has been deprecated and replaced by the 4872 // name 4873 // field. 4874 Zone string `json:"zone,omitempty"` 4875 4876 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4877 // unconditionally include in API requests. By default, fields with 4878 // empty values are omitted from API requests. However, any non-pointer, 4879 // non-interface field appearing in ForceSendFields will be sent to the 4880 // server regardless of whether the field is empty or not. This may be 4881 // used to include empty fields in Patch requests. 4882 ForceSendFields []string `json:"-"` 4883 4884 // NullFields is a list of field names (e.g. "ClusterId") to include in 4885 // API requests with the JSON null value. By default, fields with empty 4886 // values are omitted from API requests. However, any field with an 4887 // empty value appearing in NullFields will be sent to the server as 4888 // null. It is an error if a field in this list has a non-empty value. 4889 // This may be used to include null fields in Patch requests. 4890 NullFields []string `json:"-"` 4891} 4892 4893func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { 4894 type NoMethod SetMonitoringServiceRequest 4895 raw := NoMethod(*s) 4896 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4897} 4898 4899// SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables 4900// network policy for a cluster. 4901type SetNetworkPolicyRequest struct { 4902 // ClusterId: Required. Deprecated. The name of the cluster. 4903 // This field has been deprecated and replaced by the name field. 4904 ClusterId string `json:"clusterId,omitempty"` 4905 4906 // Name: The name (project, location, cluster id) of the cluster to set 4907 // networking 4908 // policy. Specified in the format 'projects/*/locations/*/clusters/*'. 4909 Name string `json:"name,omitempty"` 4910 4911 // NetworkPolicy: Required. Configuration options for the NetworkPolicy 4912 // feature. 4913 NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` 4914 4915 // ProjectId: Required. Deprecated. The Google Developers Console 4916 // [project ID or 4917 // project 4918 // number](https://developers.google.com/console/help/new/#projec 4919 // tnumber). 4920 // This field has been deprecated and replaced by the name field. 4921 ProjectId string `json:"projectId,omitempty"` 4922 4923 // Zone: Required. Deprecated. The name of the Google Compute 4924 // Engine 4925 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4926 // which the 4927 // cluster resides. This field has been deprecated and replaced by the 4928 // name 4929 // field. 4930 Zone string `json:"zone,omitempty"` 4931 4932 // ForceSendFields is a list of field names (e.g. "ClusterId") to 4933 // unconditionally include in API requests. By default, fields with 4934 // empty values are omitted from API requests. However, any non-pointer, 4935 // non-interface field appearing in ForceSendFields will be sent to the 4936 // server regardless of whether the field is empty or not. This may be 4937 // used to include empty fields in Patch requests. 4938 ForceSendFields []string `json:"-"` 4939 4940 // NullFields is a list of field names (e.g. "ClusterId") to include in 4941 // API requests with the JSON null value. By default, fields with empty 4942 // values are omitted from API requests. However, any field with an 4943 // empty value appearing in NullFields will be sent to the server as 4944 // null. It is an error if a field in this list has a non-empty value. 4945 // This may be used to include null fields in Patch requests. 4946 NullFields []string `json:"-"` 4947} 4948 4949func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { 4950 type NoMethod SetNetworkPolicyRequest 4951 raw := NoMethod(*s) 4952 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4953} 4954 4955// SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the 4956// autoscaler settings of a node pool. 4957type SetNodePoolAutoscalingRequest struct { 4958 // Autoscaling: Required. Autoscaling configuration for the node pool. 4959 Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` 4960 4961 // ClusterId: Required. Deprecated. The name of the cluster to 4962 // upgrade. 4963 // This field has been deprecated and replaced by the name field. 4964 ClusterId string `json:"clusterId,omitempty"` 4965 4966 // Name: The name (project, location, cluster, node pool) of the node 4967 // pool to set 4968 // autoscaler settings. Specified in the 4969 // format 4970 // 'projects/*/locations/*/clusters/*/nodePools/*'. 4971 Name string `json:"name,omitempty"` 4972 4973 // NodePoolId: Required. Deprecated. The name of the node pool to 4974 // upgrade. 4975 // This field has been deprecated and replaced by the name field. 4976 NodePoolId string `json:"nodePoolId,omitempty"` 4977 4978 // ProjectId: Required. Deprecated. The Google Developers Console 4979 // [project ID or 4980 // project 4981 // number](https://support.google.com/cloud/answer/6158840). 4982 // This 4983 // field has been deprecated and replaced by the name field. 4984 ProjectId string `json:"projectId,omitempty"` 4985 4986 // Zone: Required. Deprecated. The name of the Google Compute 4987 // Engine 4988 // [zone](https://cloud.google.com/compute/docs/zones#available) in 4989 // which the 4990 // cluster resides. This field has been deprecated and replaced by the 4991 // name 4992 // field. 4993 Zone string `json:"zone,omitempty"` 4994 4995 // ForceSendFields is a list of field names (e.g. "Autoscaling") to 4996 // unconditionally include in API requests. By default, fields with 4997 // empty values are omitted from API requests. However, any non-pointer, 4998 // non-interface field appearing in ForceSendFields will be sent to the 4999 // server regardless of whether the field is empty or not. This may be 5000 // used to include empty fields in Patch requests. 5001 ForceSendFields []string `json:"-"` 5002 5003 // NullFields is a list of field names (e.g. "Autoscaling") to include 5004 // in API requests with the JSON null value. By default, fields with 5005 // empty values are omitted from API requests. However, any field with 5006 // an empty value appearing in NullFields will be sent to the server as 5007 // null. It is an error if a field in this list has a non-empty value. 5008 // This may be used to include null fields in Patch requests. 5009 NullFields []string `json:"-"` 5010} 5011 5012func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { 5013 type NoMethod SetNodePoolAutoscalingRequest 5014 raw := NoMethod(*s) 5015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5016} 5017 5018// SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the 5019// node management properties of a node 5020// pool. 5021type SetNodePoolManagementRequest struct { 5022 // ClusterId: Required. Deprecated. The name of the cluster to 5023 // update. 5024 // This field has been deprecated and replaced by the name field. 5025 ClusterId string `json:"clusterId,omitempty"` 5026 5027 // Management: Required. NodeManagement configuration for the node pool. 5028 Management *NodeManagement `json:"management,omitempty"` 5029 5030 // Name: The name (project, location, cluster, node pool id) of the node 5031 // pool to set 5032 // management properties. Specified in the 5033 // format 5034 // 'projects/*/locations/*/clusters/*/nodePools/*'. 5035 Name string `json:"name,omitempty"` 5036 5037 // NodePoolId: Required. Deprecated. The name of the node pool to 5038 // update. 5039 // This field has been deprecated and replaced by the name field. 5040 NodePoolId string `json:"nodePoolId,omitempty"` 5041 5042 // ProjectId: Required. Deprecated. The Google Developers Console 5043 // [project ID or 5044 // project 5045 // number](https://support.google.com/cloud/answer/6158840). 5046 // This 5047 // field has been deprecated and replaced by the name field. 5048 ProjectId string `json:"projectId,omitempty"` 5049 5050 // Zone: Required. Deprecated. The name of the Google Compute 5051 // Engine 5052 // [zone](https://cloud.google.com/compute/docs/zones#available) in 5053 // which the 5054 // cluster resides. This field has been deprecated and replaced by the 5055 // name 5056 // field. 5057 Zone string `json:"zone,omitempty"` 5058 5059 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5060 // unconditionally include in API requests. By default, fields with 5061 // empty values are omitted from API requests. However, any non-pointer, 5062 // non-interface field appearing in ForceSendFields will be sent to the 5063 // server regardless of whether the field is empty or not. This may be 5064 // used to include empty fields in Patch requests. 5065 ForceSendFields []string `json:"-"` 5066 5067 // NullFields is a list of field names (e.g. "ClusterId") to include in 5068 // API requests with the JSON null value. By default, fields with empty 5069 // values are omitted from API requests. However, any field with an 5070 // empty value appearing in NullFields will be sent to the server as 5071 // null. It is an error if a field in this list has a non-empty value. 5072 // This may be used to include null fields in Patch requests. 5073 NullFields []string `json:"-"` 5074} 5075 5076func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { 5077 type NoMethod SetNodePoolManagementRequest 5078 raw := NoMethod(*s) 5079 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5080} 5081 5082// SetNodePoolSizeRequest: SetNodePoolSizeRequest sets the size a 5083// node 5084// pool. 5085type SetNodePoolSizeRequest struct { 5086 // ClusterId: Required. Deprecated. The name of the cluster to 5087 // update. 5088 // This field has been deprecated and replaced by the name field. 5089 ClusterId string `json:"clusterId,omitempty"` 5090 5091 // Name: The name (project, location, cluster, node pool id) of the node 5092 // pool to set 5093 // size. 5094 // Specified in the format 5095 // 'projects/*/locations/*/clusters/*/nodePools/*'. 5096 Name string `json:"name,omitempty"` 5097 5098 // NodeCount: Required. The desired node count for the pool. 5099 NodeCount int64 `json:"nodeCount,omitempty"` 5100 5101 // NodePoolId: Required. Deprecated. The name of the node pool to 5102 // update. 5103 // This field has been deprecated and replaced by the name field. 5104 NodePoolId string `json:"nodePoolId,omitempty"` 5105 5106 // ProjectId: Required. Deprecated. The Google Developers Console 5107 // [project ID or 5108 // project 5109 // number](https://support.google.com/cloud/answer/6158840). 5110 // This 5111 // field has been deprecated and replaced by the name field. 5112 ProjectId string `json:"projectId,omitempty"` 5113 5114 // Zone: Required. Deprecated. The name of the Google Compute 5115 // Engine 5116 // [zone](https://cloud.google.com/compute/docs/zones#available) in 5117 // which the 5118 // cluster resides. This field has been deprecated and replaced by the 5119 // name 5120 // field. 5121 Zone string `json:"zone,omitempty"` 5122 5123 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5124 // unconditionally include in API requests. By default, fields with 5125 // empty values are omitted from API requests. However, any non-pointer, 5126 // non-interface field appearing in ForceSendFields will be sent to the 5127 // server regardless of whether the field is empty or not. This may be 5128 // used to include empty fields in Patch requests. 5129 ForceSendFields []string `json:"-"` 5130 5131 // NullFields is a list of field names (e.g. "ClusterId") to include in 5132 // API requests with the JSON null value. By default, fields with empty 5133 // values are omitted from API requests. However, any field with an 5134 // empty value appearing in NullFields will be sent to the server as 5135 // null. It is an error if a field in this list has a non-empty value. 5136 // This may be used to include null fields in Patch requests. 5137 NullFields []string `json:"-"` 5138} 5139 5140func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { 5141 type NoMethod SetNodePoolSizeRequest 5142 raw := NoMethod(*s) 5143 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5144} 5145 5146// ShieldedInstanceConfig: A set of Shielded Instance options. 5147type ShieldedInstanceConfig struct { 5148 // EnableIntegrityMonitoring: Defines whether the instance has integrity 5149 // monitoring enabled. 5150 // 5151 // Enables monitoring and attestation of the boot integrity of the 5152 // instance. 5153 // The attestation is performed against the integrity policy baseline. 5154 // This 5155 // baseline is initially derived from the implicitly trusted boot image 5156 // when 5157 // the instance is created. 5158 EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` 5159 5160 // EnableSecureBoot: Defines whether the instance has Secure Boot 5161 // enabled. 5162 // 5163 // Secure Boot helps ensure that the system only runs authentic software 5164 // by 5165 // verifying the digital signature of all boot components, and halting 5166 // the 5167 // boot process if signature verification fails. 5168 EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` 5169 5170 // ForceSendFields is a list of field names (e.g. 5171 // "EnableIntegrityMonitoring") to unconditionally include in API 5172 // requests. By default, fields with empty values are omitted from API 5173 // requests. However, any non-pointer, non-interface field appearing in 5174 // ForceSendFields will be sent to the server regardless of whether the 5175 // field is empty or not. This may be used to include empty fields in 5176 // Patch requests. 5177 ForceSendFields []string `json:"-"` 5178 5179 // NullFields is a list of field names (e.g. 5180 // "EnableIntegrityMonitoring") to include in API requests with the JSON 5181 // null value. By default, fields with empty values are omitted from API 5182 // requests. However, any field with an empty value appearing in 5183 // NullFields will be sent to the server as null. It is an error if a 5184 // field in this list has a non-empty value. This may be used to include 5185 // null fields in Patch requests. 5186 NullFields []string `json:"-"` 5187} 5188 5189func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { 5190 type NoMethod ShieldedInstanceConfig 5191 raw := NoMethod(*s) 5192 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5193} 5194 5195// ShieldedNodes: Configuration of Shielded Nodes feature. 5196type ShieldedNodes struct { 5197 // Enabled: Whether Shielded Nodes features are enabled on all nodes in 5198 // this cluster. 5199 Enabled bool `json:"enabled,omitempty"` 5200 5201 // ForceSendFields is a list of field names (e.g. "Enabled") to 5202 // unconditionally include in API requests. By default, fields with 5203 // empty values are omitted from API requests. However, any non-pointer, 5204 // non-interface field appearing in ForceSendFields will be sent to the 5205 // server regardless of whether the field is empty or not. This may be 5206 // used to include empty fields in Patch requests. 5207 ForceSendFields []string `json:"-"` 5208 5209 // NullFields is a list of field names (e.g. "Enabled") to include in 5210 // API requests with the JSON null value. By default, fields with empty 5211 // values are omitted from API requests. However, any field with an 5212 // empty value appearing in NullFields will be sent to the server as 5213 // null. It is an error if a field in this list has a non-empty value. 5214 // This may be used to include null fields in Patch requests. 5215 NullFields []string `json:"-"` 5216} 5217 5218func (s *ShieldedNodes) MarshalJSON() ([]byte, error) { 5219 type NoMethod ShieldedNodes 5220 raw := NoMethod(*s) 5221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5222} 5223 5224// StartIPRotationRequest: StartIPRotationRequest creates a new IP for 5225// the cluster and then performs 5226// a node upgrade on each node pool to point to the new IP. 5227type StartIPRotationRequest struct { 5228 // ClusterId: Required. Deprecated. The name of the cluster. 5229 // This field has been deprecated and replaced by the name field. 5230 ClusterId string `json:"clusterId,omitempty"` 5231 5232 // Name: The name (project, location, cluster id) of the cluster to 5233 // start IP 5234 // rotation. Specified in the format 5235 // 'projects/*/locations/*/clusters/*'. 5236 Name string `json:"name,omitempty"` 5237 5238 // ProjectId: Required. Deprecated. The Google Developers Console 5239 // [project ID or 5240 // project 5241 // number](https://developers.google.com/console/help/new/#projec 5242 // tnumber). 5243 // This field has been deprecated and replaced by the name field. 5244 ProjectId string `json:"projectId,omitempty"` 5245 5246 // RotateCredentials: Whether to rotate credentials during IP rotation. 5247 RotateCredentials bool `json:"rotateCredentials,omitempty"` 5248 5249 // Zone: Required. Deprecated. The name of the Google Compute 5250 // Engine 5251 // [zone](https://cloud.google.com/compute/docs/zones#available) in 5252 // which the 5253 // cluster resides. This field has been deprecated and replaced by the 5254 // name 5255 // field. 5256 Zone string `json:"zone,omitempty"` 5257 5258 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5259 // unconditionally include in API requests. By default, fields with 5260 // empty values are omitted from API requests. However, any non-pointer, 5261 // non-interface field appearing in ForceSendFields will be sent to the 5262 // server regardless of whether the field is empty or not. This may be 5263 // used to include empty fields in Patch requests. 5264 ForceSendFields []string `json:"-"` 5265 5266 // NullFields is a list of field names (e.g. "ClusterId") to include in 5267 // API requests with the JSON null value. By default, fields with empty 5268 // values are omitted from API requests. However, any field with an 5269 // empty value appearing in NullFields will be sent to the server as 5270 // null. It is an error if a field in this list has a non-empty value. 5271 // This may be used to include null fields in Patch requests. 5272 NullFields []string `json:"-"` 5273} 5274 5275func (s *StartIPRotationRequest) MarshalJSON() ([]byte, error) { 5276 type NoMethod StartIPRotationRequest 5277 raw := NoMethod(*s) 5278 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5279} 5280 5281// StatusCondition: StatusCondition describes why a cluster or a node 5282// pool has a certain status 5283// (e.g., ERROR or DEGRADED). 5284type StatusCondition struct { 5285 // Code: Machine-friendly representation of the condition 5286 // 5287 // Possible values: 5288 // "UNKNOWN" - UNKNOWN indicates a generic condition. 5289 // "GCE_STOCKOUT" - GCE_STOCKOUT indicates that Google Compute Engine 5290 // resources are 5291 // temporarily unavailable. 5292 // "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED 5293 // indicates that the user deleted their robot 5294 // service account. 5295 // "GCE_QUOTA_EXCEEDED" - Google Compute Engine quota was exceeded. 5296 // "SET_BY_OPERATOR" - Cluster state was manually changed by an SRE 5297 // due to a system logic error. 5298 // "CLOUD_KMS_KEY_ERROR" - Unable to perform an encrypt operation 5299 // against the CloudKMS key used for 5300 // etcd level encryption. 5301 // More codes TBA 5302 Code string `json:"code,omitempty"` 5303 5304 // Message: Human-friendly representation of the condition 5305 Message string `json:"message,omitempty"` 5306 5307 // ForceSendFields is a list of field names (e.g. "Code") to 5308 // unconditionally include in API requests. By default, fields with 5309 // empty values are omitted from API requests. However, any non-pointer, 5310 // non-interface field appearing in ForceSendFields will be sent to the 5311 // server regardless of whether the field is empty or not. This may be 5312 // used to include empty fields in Patch requests. 5313 ForceSendFields []string `json:"-"` 5314 5315 // NullFields is a list of field names (e.g. "Code") to include in API 5316 // requests with the JSON null value. By default, fields with empty 5317 // values are omitted from API requests. However, any field with an 5318 // empty value appearing in NullFields will be sent to the server as 5319 // null. It is an error if a field in this list has a non-empty value. 5320 // This may be used to include null fields in Patch requests. 5321 NullFields []string `json:"-"` 5322} 5323 5324func (s *StatusCondition) MarshalJSON() ([]byte, error) { 5325 type NoMethod StatusCondition 5326 raw := NoMethod(*s) 5327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5328} 5329 5330// TimeWindow: Represents an arbitrary window of time. 5331type TimeWindow struct { 5332 // EndTime: The time that the window ends. The end time should take 5333 // place after the 5334 // start time. 5335 EndTime string `json:"endTime,omitempty"` 5336 5337 // StartTime: The time that the window first starts. 5338 StartTime string `json:"startTime,omitempty"` 5339 5340 // ForceSendFields is a list of field names (e.g. "EndTime") to 5341 // unconditionally include in API requests. By default, fields with 5342 // empty values are omitted from API requests. However, any non-pointer, 5343 // non-interface field appearing in ForceSendFields will be sent to the 5344 // server regardless of whether the field is empty or not. This may be 5345 // used to include empty fields in Patch requests. 5346 ForceSendFields []string `json:"-"` 5347 5348 // NullFields is a list of field names (e.g. "EndTime") to include in 5349 // API requests with the JSON null value. By default, fields with empty 5350 // values are omitted from API requests. However, any field with an 5351 // empty value appearing in NullFields will be sent to the server as 5352 // null. It is an error if a field in this list has a non-empty value. 5353 // This may be used to include null fields in Patch requests. 5354 NullFields []string `json:"-"` 5355} 5356 5357func (s *TimeWindow) MarshalJSON() ([]byte, error) { 5358 type NoMethod TimeWindow 5359 raw := NoMethod(*s) 5360 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5361} 5362 5363// TpuConfig: Configuration for Cloud TPU. 5364type TpuConfig struct { 5365 // Enabled: Whether Cloud TPU integration is enabled or not. 5366 Enabled bool `json:"enabled,omitempty"` 5367 5368 // Ipv4CidrBlock: IPv4 CIDR block reserved for Cloud TPU in the VPC. 5369 Ipv4CidrBlock string `json:"ipv4CidrBlock,omitempty"` 5370 5371 // UseServiceNetworking: Whether to use service networking for Cloud TPU 5372 // or not. 5373 UseServiceNetworking bool `json:"useServiceNetworking,omitempty"` 5374 5375 // ForceSendFields is a list of field names (e.g. "Enabled") to 5376 // unconditionally include in API requests. By default, fields with 5377 // empty values are omitted from API requests. However, any non-pointer, 5378 // non-interface field appearing in ForceSendFields will be sent to the 5379 // server regardless of whether the field is empty or not. This may be 5380 // used to include empty fields in Patch requests. 5381 ForceSendFields []string `json:"-"` 5382 5383 // NullFields is a list of field names (e.g. "Enabled") to include in 5384 // API requests with the JSON null value. By default, fields with empty 5385 // values are omitted from API requests. However, any field with an 5386 // empty value appearing in NullFields will be sent to the server as 5387 // null. It is an error if a field in this list has a non-empty value. 5388 // This may be used to include null fields in Patch requests. 5389 NullFields []string `json:"-"` 5390} 5391 5392func (s *TpuConfig) MarshalJSON() ([]byte, error) { 5393 type NoMethod TpuConfig 5394 raw := NoMethod(*s) 5395 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5396} 5397 5398// UpdateClusterRequest: UpdateClusterRequest updates the settings of a 5399// cluster. 5400type UpdateClusterRequest struct { 5401 // ClusterId: Required. Deprecated. The name of the cluster to 5402 // upgrade. 5403 // This field has been deprecated and replaced by the name field. 5404 ClusterId string `json:"clusterId,omitempty"` 5405 5406 // Name: The name (project, location, cluster) of the cluster to 5407 // update. 5408 // Specified in the format 'projects/*/locations/*/clusters/*'. 5409 Name string `json:"name,omitempty"` 5410 5411 // ProjectId: Required. Deprecated. The Google Developers Console 5412 // [project ID or 5413 // project 5414 // number](https://support.google.com/cloud/answer/6158840). 5415 // This 5416 // field has been deprecated and replaced by the name field. 5417 ProjectId string `json:"projectId,omitempty"` 5418 5419 // Update: Required. A description of the update. 5420 Update *ClusterUpdate `json:"update,omitempty"` 5421 5422 // Zone: Required. Deprecated. The name of the Google Compute 5423 // Engine 5424 // [zone](https://cloud.google.com/compute/docs/zones#available) in 5425 // which the 5426 // cluster resides. This field has been deprecated and replaced by the 5427 // name 5428 // field. 5429 Zone string `json:"zone,omitempty"` 5430 5431 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5432 // unconditionally include in API requests. By default, fields with 5433 // empty values are omitted from API requests. However, any non-pointer, 5434 // non-interface field appearing in ForceSendFields will be sent to the 5435 // server regardless of whether the field is empty or not. This may be 5436 // used to include empty fields in Patch requests. 5437 ForceSendFields []string `json:"-"` 5438 5439 // NullFields is a list of field names (e.g. "ClusterId") to include in 5440 // API requests with the JSON null value. By default, fields with empty 5441 // values are omitted from API requests. However, any field with an 5442 // empty value appearing in NullFields will be sent to the server as 5443 // null. It is an error if a field in this list has a non-empty value. 5444 // This may be used to include null fields in Patch requests. 5445 NullFields []string `json:"-"` 5446} 5447 5448func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { 5449 type NoMethod UpdateClusterRequest 5450 raw := NoMethod(*s) 5451 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5452} 5453 5454// UpdateMasterRequest: UpdateMasterRequest updates the master of the 5455// cluster. 5456type UpdateMasterRequest struct { 5457 // ClusterId: Required. Deprecated. The name of the cluster to 5458 // upgrade. 5459 // This field has been deprecated and replaced by the name field. 5460 ClusterId string `json:"clusterId,omitempty"` 5461 5462 // MasterVersion: Required. The Kubernetes version to change the master 5463 // to. 5464 // 5465 // Users may specify either explicit versions offered by 5466 // Kubernetes Engine or version aliases, which have the following 5467 // behavior: 5468 // 5469 // - "latest": picks the highest valid Kubernetes version 5470 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 5471 // version 5472 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 5473 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 5474 // - "-": picks the default Kubernetes version 5475 MasterVersion string `json:"masterVersion,omitempty"` 5476 5477 // Name: The name (project, location, cluster) of the cluster to 5478 // update. 5479 // Specified in the format 'projects/*/locations/*/clusters/*'. 5480 Name string `json:"name,omitempty"` 5481 5482 // ProjectId: Required. Deprecated. The Google Developers Console 5483 // [project ID or 5484 // project 5485 // number](https://support.google.com/cloud/answer/6158840). 5486 // This 5487 // field has been deprecated and replaced by the name field. 5488 ProjectId string `json:"projectId,omitempty"` 5489 5490 // Zone: Required. Deprecated. The name of the Google Compute 5491 // Engine 5492 // [zone](https://cloud.google.com/compute/docs/zones#available) in 5493 // which the 5494 // cluster resides. This field has been deprecated and replaced by the 5495 // name 5496 // field. 5497 Zone string `json:"zone,omitempty"` 5498 5499 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5500 // unconditionally include in API requests. By default, fields with 5501 // empty values are omitted from API requests. However, any non-pointer, 5502 // non-interface field appearing in ForceSendFields will be sent to the 5503 // server regardless of whether the field is empty or not. This may be 5504 // used to include empty fields in Patch requests. 5505 ForceSendFields []string `json:"-"` 5506 5507 // NullFields is a list of field names (e.g. "ClusterId") to include in 5508 // API requests with the JSON null value. By default, fields with empty 5509 // values are omitted from API requests. However, any field with an 5510 // empty value appearing in NullFields will be sent to the server as 5511 // null. It is an error if a field in this list has a non-empty value. 5512 // This may be used to include null fields in Patch requests. 5513 NullFields []string `json:"-"` 5514} 5515 5516func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) { 5517 type NoMethod UpdateMasterRequest 5518 raw := NoMethod(*s) 5519 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5520} 5521 5522// UpdateNodePoolRequest: SetNodePoolVersionRequest updates the version 5523// of a node pool. 5524type UpdateNodePoolRequest struct { 5525 // ClusterId: Required. Deprecated. The name of the cluster to 5526 // upgrade. 5527 // This field has been deprecated and replaced by the name field. 5528 ClusterId string `json:"clusterId,omitempty"` 5529 5530 // ImageType: Required. The desired image type for the node pool. 5531 ImageType string `json:"imageType,omitempty"` 5532 5533 // Locations: The desired list of Google Compute 5534 // Engine 5535 // [zones](https://cloud.google.com/compute/docs/zones#available) in 5536 // which the 5537 // node pool's nodes should be located. Changing the locations for a 5538 // node pool 5539 // will result in nodes being either created or removed from the node 5540 // pool, 5541 // depending on whether locations are being added or removed. 5542 Locations []string `json:"locations,omitempty"` 5543 5544 // Name: The name (project, location, cluster, node pool) of the node 5545 // pool to 5546 // update. Specified in the 5547 // format 5548 // 'projects/*/locations/*/clusters/*/nodePools/*'. 5549 Name string `json:"name,omitempty"` 5550 5551 // NodePoolId: Required. Deprecated. The name of the node pool to 5552 // upgrade. 5553 // This field has been deprecated and replaced by the name field. 5554 NodePoolId string `json:"nodePoolId,omitempty"` 5555 5556 // NodeVersion: Required. The Kubernetes version to change the nodes to 5557 // (typically an 5558 // upgrade). 5559 // 5560 // Users may specify either explicit versions offered by Kubernetes 5561 // Engine or 5562 // version aliases, which have the following behavior: 5563 // 5564 // - "latest": picks the highest valid Kubernetes version 5565 // - "1.X": picks the highest valid patch+gke.N patch in the 1.X 5566 // version 5567 // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 5568 // - "1.X.Y-gke.N": picks an explicit Kubernetes version 5569 // - "-": picks the Kubernetes master version 5570 NodeVersion string `json:"nodeVersion,omitempty"` 5571 5572 // ProjectId: Required. Deprecated. The Google Developers Console 5573 // [project ID or 5574 // project 5575 // number](https://support.google.com/cloud/answer/6158840). 5576 // This 5577 // field has been deprecated and replaced by the name field. 5578 ProjectId string `json:"projectId,omitempty"` 5579 5580 // UpgradeSettings: Upgrade settings control disruption and speed of the 5581 // upgrade. 5582 UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` 5583 5584 // WorkloadMetadataConfig: The desired workload metadata config for the 5585 // node pool. 5586 WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` 5587 5588 // Zone: Required. Deprecated. The name of the Google Compute 5589 // Engine 5590 // [zone](https://cloud.google.com/compute/docs/zones#available) in 5591 // which the 5592 // cluster resides. This field has been deprecated and replaced by the 5593 // name 5594 // field. 5595 Zone string `json:"zone,omitempty"` 5596 5597 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5598 // unconditionally include in API requests. By default, fields with 5599 // empty values are omitted from API requests. However, any non-pointer, 5600 // non-interface field appearing in ForceSendFields will be sent to the 5601 // server regardless of whether the field is empty or not. This may be 5602 // used to include empty fields in Patch requests. 5603 ForceSendFields []string `json:"-"` 5604 5605 // NullFields is a list of field names (e.g. "ClusterId") to include in 5606 // API requests with the JSON null value. By default, fields with empty 5607 // values are omitted from API requests. However, any field with an 5608 // empty value appearing in NullFields will be sent to the server as 5609 // null. It is an error if a field in this list has a non-empty value. 5610 // This may be used to include null fields in Patch requests. 5611 NullFields []string `json:"-"` 5612} 5613 5614func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { 5615 type NoMethod UpdateNodePoolRequest 5616 raw := NoMethod(*s) 5617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5618} 5619 5620// UpgradeSettings: These upgrade settings control the level of 5621// parallelism and the level of 5622// disruption caused by an upgrade. 5623// 5624// maxUnavailable controls the number of nodes that can be 5625// simultaneously 5626// unavailable. 5627// 5628// maxSurge controls the number of additional nodes that can be added to 5629// the 5630// node pool temporarily for the time of the upgrade to increase the 5631// number of 5632// available nodes. 5633// 5634// (maxUnavailable + maxSurge) determines the level of parallelism (how 5635// many 5636// nodes are being upgraded at the same time). 5637// 5638// Note: upgrades inevitably introduce some disruption since workloads 5639// need to 5640// be moved from old nodes to new, upgraded ones. Even if 5641// maxUnavailable=0, 5642// this holds true. (Disruption stays within the limits 5643// of 5644// PodDisruptionBudget, if it is configured.) 5645// 5646// Consider a hypothetical node pool with 5 nodes having 5647// maxSurge=2, 5648// maxUnavailable=1. This means the upgrade process upgrades 3 5649// nodes 5650// simultaneously. It creates 2 additional (upgraded) nodes, then it 5651// brings 5652// down 3 old (not yet upgraded) nodes at the same time. This ensures 5653// that 5654// there are always at least 4 nodes available. 5655type UpgradeSettings struct { 5656 // MaxSurge: The maximum number of nodes that can be created beyond the 5657 // current size 5658 // of the node pool during the upgrade process. 5659 MaxSurge int64 `json:"maxSurge,omitempty"` 5660 5661 // MaxUnavailable: The maximum number of nodes that can be 5662 // simultaneously unavailable during 5663 // the upgrade process. A node is considered available if its status 5664 // is 5665 // Ready. 5666 MaxUnavailable int64 `json:"maxUnavailable,omitempty"` 5667 5668 // ForceSendFields is a list of field names (e.g. "MaxSurge") to 5669 // unconditionally include in API requests. By default, fields with 5670 // empty values are omitted from API requests. However, any non-pointer, 5671 // non-interface field appearing in ForceSendFields will be sent to the 5672 // server regardless of whether the field is empty or not. This may be 5673 // used to include empty fields in Patch requests. 5674 ForceSendFields []string `json:"-"` 5675 5676 // NullFields is a list of field names (e.g. "MaxSurge") to include in 5677 // API requests with the JSON null value. By default, fields with empty 5678 // values are omitted from API requests. However, any field with an 5679 // empty value appearing in NullFields will be sent to the server as 5680 // null. It is an error if a field in this list has a non-empty value. 5681 // This may be used to include null fields in Patch requests. 5682 NullFields []string `json:"-"` 5683} 5684 5685func (s *UpgradeSettings) MarshalJSON() ([]byte, error) { 5686 type NoMethod UpgradeSettings 5687 raw := NoMethod(*s) 5688 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5689} 5690 5691// UsableSubnetwork: UsableSubnetwork resource returns the subnetwork 5692// name, its associated network 5693// and the primary CIDR range. 5694type UsableSubnetwork struct { 5695 // IpCidrRange: The range of internal addresses that are owned by this 5696 // subnetwork. 5697 IpCidrRange string `json:"ipCidrRange,omitempty"` 5698 5699 // Network: Network Name. 5700 // Example: projects/my-project/global/networks/my-network 5701 Network string `json:"network,omitempty"` 5702 5703 // SecondaryIpRanges: Secondary IP ranges. 5704 SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` 5705 5706 // StatusMessage: A human readable status message representing the 5707 // reasons for cases where 5708 // the caller cannot use the secondary ranges under the subnet. For 5709 // example if 5710 // the secondary_ip_ranges is empty due to a permission issue, an 5711 // insufficient 5712 // permission message will be given by status_message. 5713 StatusMessage string `json:"statusMessage,omitempty"` 5714 5715 // Subnetwork: Subnetwork Name. 5716 // Example: 5717 // projects/my-project/regions/us-central1/subnetworks/my-subnet 5718 Subnetwork string `json:"subnetwork,omitempty"` 5719 5720 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 5721 // unconditionally include in API requests. By default, fields with 5722 // empty values are omitted from API requests. However, any non-pointer, 5723 // non-interface field appearing in ForceSendFields will be sent to the 5724 // server regardless of whether the field is empty or not. This may be 5725 // used to include empty fields in Patch requests. 5726 ForceSendFields []string `json:"-"` 5727 5728 // NullFields is a list of field names (e.g. "IpCidrRange") to include 5729 // in API requests with the JSON null value. By default, fields with 5730 // empty values are omitted from API requests. However, any field with 5731 // an empty value appearing in NullFields will be sent to the server as 5732 // null. It is an error if a field in this list has a non-empty value. 5733 // This may be used to include null fields in Patch requests. 5734 NullFields []string `json:"-"` 5735} 5736 5737func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) { 5738 type NoMethod UsableSubnetwork 5739 raw := NoMethod(*s) 5740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5741} 5742 5743// UsableSubnetworkSecondaryRange: Secondary IP range of a usable 5744// subnetwork. 5745type UsableSubnetworkSecondaryRange struct { 5746 // IpCidrRange: The range of IP addresses belonging to this subnetwork 5747 // secondary range. 5748 IpCidrRange string `json:"ipCidrRange,omitempty"` 5749 5750 // RangeName: The name associated with this subnetwork secondary range, 5751 // used when adding 5752 // an alias IP range to a VM instance. 5753 RangeName string `json:"rangeName,omitempty"` 5754 5755 // Status: This field is to determine the status of the secondary range 5756 // programmably. 5757 // 5758 // Possible values: 5759 // "UNKNOWN" - UNKNOWN is the zero value of the Status enum. It's not 5760 // a valid status. 5761 // "UNUSED" - UNUSED denotes that this range is unclaimed by any 5762 // cluster. 5763 // "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is 5764 // claimed by a cluster for 5765 // services. It cannot be used for other clusters. 5766 // "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range 5767 // was created by the network admin 5768 // and is currently claimed by a cluster for pods. It can only be used 5769 // by 5770 // other clusters as a pod range. 5771 // "IN_USE_MANAGED_POD" - IN_USE_MANAGED_POD denotes this range was 5772 // created by GKE and is claimed 5773 // for pods. It cannot be used for other clusters. 5774 Status string `json:"status,omitempty"` 5775 5776 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 5777 // unconditionally include in API requests. By default, fields with 5778 // empty values are omitted from API requests. However, any non-pointer, 5779 // non-interface field appearing in ForceSendFields will be sent to the 5780 // server regardless of whether the field is empty or not. This may be 5781 // used to include empty fields in Patch requests. 5782 ForceSendFields []string `json:"-"` 5783 5784 // NullFields is a list of field names (e.g. "IpCidrRange") to include 5785 // in API requests with the JSON null value. By default, fields with 5786 // empty values are omitted from API requests. However, any field with 5787 // an empty value appearing in NullFields will be sent to the server as 5788 // null. It is an error if a field in this list has a non-empty value. 5789 // This may be used to include null fields in Patch requests. 5790 NullFields []string `json:"-"` 5791} 5792 5793func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { 5794 type NoMethod UsableSubnetworkSecondaryRange 5795 raw := NoMethod(*s) 5796 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5797} 5798 5799// VerticalPodAutoscaling: VerticalPodAutoscaling contains global, 5800// per-cluster information 5801// required by Vertical Pod Autoscaler to automatically adjust 5802// the resources of pods controlled by it. 5803type VerticalPodAutoscaling struct { 5804 // Enabled: Enables vertical pod autoscaling. 5805 Enabled bool `json:"enabled,omitempty"` 5806 5807 // ForceSendFields is a list of field names (e.g. "Enabled") to 5808 // unconditionally include in API requests. By default, fields with 5809 // empty values are omitted from API requests. However, any non-pointer, 5810 // non-interface field appearing in ForceSendFields will be sent to the 5811 // server regardless of whether the field is empty or not. This may be 5812 // used to include empty fields in Patch requests. 5813 ForceSendFields []string `json:"-"` 5814 5815 // NullFields is a list of field names (e.g. "Enabled") to include in 5816 // API requests with the JSON null value. By default, fields with empty 5817 // values are omitted from API requests. However, any field with an 5818 // empty value appearing in NullFields will be sent to the server as 5819 // null. It is an error if a field in this list has a non-empty value. 5820 // This may be used to include null fields in Patch requests. 5821 NullFields []string `json:"-"` 5822} 5823 5824func (s *VerticalPodAutoscaling) MarshalJSON() ([]byte, error) { 5825 type NoMethod VerticalPodAutoscaling 5826 raw := NoMethod(*s) 5827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5828} 5829 5830// WorkloadIdentityConfig: Configuration for the use of Kubernetes 5831// Service Accounts in GCP IAM 5832// policies. 5833type WorkloadIdentityConfig struct { 5834 // IdentityNamespace: IAM Identity Namespace to attach all Kubernetes 5835 // Service Accounts to. 5836 IdentityNamespace string `json:"identityNamespace,omitempty"` 5837 5838 // WorkloadPool: The workload pool to attach all Kubernetes service 5839 // accounts to. 5840 WorkloadPool string `json:"workloadPool,omitempty"` 5841 5842 // ForceSendFields is a list of field names (e.g. "IdentityNamespace") 5843 // to unconditionally include in API requests. By default, fields with 5844 // empty values are omitted from API requests. However, any non-pointer, 5845 // non-interface field appearing in ForceSendFields will be sent to the 5846 // server regardless of whether the field is empty or not. This may be 5847 // used to include empty fields in Patch requests. 5848 ForceSendFields []string `json:"-"` 5849 5850 // NullFields is a list of field names (e.g. "IdentityNamespace") to 5851 // include in API requests with the JSON null value. By default, fields 5852 // with empty values are omitted from API requests. However, any field 5853 // with an empty value appearing in NullFields will be sent to the 5854 // server as null. It is an error if a field in this list has a 5855 // non-empty value. This may be used to include null fields in Patch 5856 // requests. 5857 NullFields []string `json:"-"` 5858} 5859 5860func (s *WorkloadIdentityConfig) MarshalJSON() ([]byte, error) { 5861 type NoMethod WorkloadIdentityConfig 5862 raw := NoMethod(*s) 5863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5864} 5865 5866// WorkloadMetadataConfig: WorkloadMetadataConfig defines the metadata 5867// configuration to expose to 5868// workloads on the node pool. 5869type WorkloadMetadataConfig struct { 5870 // Mode: Mode is the configuration for how to expose metadata to 5871 // workloads running 5872 // on the node pool. 5873 // 5874 // Possible values: 5875 // "MODE_UNSPECIFIED" - Not set. 5876 // "GCE_METADATA" - Expose all Compute Engine metadata to pods. 5877 // "GKE_METADATA" - Run the GKE Metadata Server on this node. The GKE 5878 // Metadata Server exposes 5879 // a metadata API to workloads that is compatible with the V1 5880 // Compute 5881 // Metadata APIs exposed by the Compute Engine and App Engine 5882 // Metadata 5883 // Servers. This feature can only be enabled if Workload Identity is 5884 // enabled 5885 // at the cluster level. 5886 Mode string `json:"mode,omitempty"` 5887 5888 // NodeMetadata: NodeMetadata is the configuration for how to expose 5889 // metadata to the 5890 // workloads running on the node. 5891 // 5892 // Possible values: 5893 // "UNSPECIFIED" - Not set. 5894 // "SECURE" - Prevent workloads not in hostNetwork from accessing 5895 // certain VM metadata, 5896 // specifically kube-env, which contains Kubelet credentials, and 5897 // the 5898 // instance identity token. 5899 // 5900 // Metadata concealment is a temporary security solution available while 5901 // the 5902 // bootstrapping process for cluster nodes is being redesigned 5903 // with 5904 // significant security improvements. This feature is scheduled to 5905 // be 5906 // deprecated in the future and later removed. 5907 // "EXPOSE" - Expose all VM metadata to pods. 5908 // "GKE_METADATA_SERVER" - Run the GKE Metadata Server on this node. 5909 // The GKE Metadata Server exposes 5910 // a metadata API to workloads that is compatible with the V1 5911 // Compute 5912 // Metadata APIs exposed by the Compute Engine and App Engine 5913 // Metadata 5914 // Servers. This feature can only be enabled if Workload Identity is 5915 // enabled 5916 // at the cluster level. 5917 NodeMetadata string `json:"nodeMetadata,omitempty"` 5918 5919 // ForceSendFields is a list of field names (e.g. "Mode") to 5920 // unconditionally include in API requests. By default, fields with 5921 // empty values are omitted from API requests. However, any non-pointer, 5922 // non-interface field appearing in ForceSendFields will be sent to the 5923 // server regardless of whether the field is empty or not. This may be 5924 // used to include empty fields in Patch requests. 5925 ForceSendFields []string `json:"-"` 5926 5927 // NullFields is a list of field names (e.g. "Mode") to include in API 5928 // requests with the JSON null value. By default, fields with empty 5929 // values are omitted from API requests. However, any field with an 5930 // empty value appearing in NullFields will be sent to the server as 5931 // null. It is an error if a field in this list has a non-empty value. 5932 // This may be used to include null fields in Patch requests. 5933 NullFields []string `json:"-"` 5934} 5935 5936func (s *WorkloadMetadataConfig) MarshalJSON() ([]byte, error) { 5937 type NoMethod WorkloadMetadataConfig 5938 raw := NoMethod(*s) 5939 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5940} 5941 5942// method id "container.projects.aggregated.usableSubnetworks.list": 5943 5944type ProjectsAggregatedUsableSubnetworksListCall struct { 5945 s *Service 5946 parent string 5947 urlParams_ gensupport.URLParams 5948 ifNoneMatch_ string 5949 ctx_ context.Context 5950 header_ http.Header 5951} 5952 5953// List: Lists subnetworks that can be used for creating clusters in a 5954// project. 5955func (r *ProjectsAggregatedUsableSubnetworksService) List(parent string) *ProjectsAggregatedUsableSubnetworksListCall { 5956 c := &ProjectsAggregatedUsableSubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5957 c.parent = parent 5958 return c 5959} 5960 5961// Filter sets the optional parameter "filter": Filtering currently only 5962// supports equality on the networkProjectId and must 5963// be in the form: "networkProjectId=[PROJECTID]", where 5964// `networkProjectId` 5965// is the project which owns the listed subnetworks. This defaults to 5966// the 5967// parent project ID. 5968func (c *ProjectsAggregatedUsableSubnetworksListCall) Filter(filter string) *ProjectsAggregatedUsableSubnetworksListCall { 5969 c.urlParams_.Set("filter", filter) 5970 return c 5971} 5972 5973// PageSize sets the optional parameter "pageSize": The max number of 5974// results per page that should be returned. If the number 5975// of available results is larger than `page_size`, a `next_page_token` 5976// is 5977// returned which can be used to get the next page of results in 5978// subsequent 5979// requests. Acceptable values are 0 to 500, inclusive. (Default: 500) 5980func (c *ProjectsAggregatedUsableSubnetworksListCall) PageSize(pageSize int64) *ProjectsAggregatedUsableSubnetworksListCall { 5981 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5982 return c 5983} 5984 5985// PageToken sets the optional parameter "pageToken": Specifies a page 5986// token to use. Set this to the nextPageToken returned by 5987// previous list requests to get the next page of results. 5988func (c *ProjectsAggregatedUsableSubnetworksListCall) PageToken(pageToken string) *ProjectsAggregatedUsableSubnetworksListCall { 5989 c.urlParams_.Set("pageToken", pageToken) 5990 return c 5991} 5992 5993// Fields allows partial responses to be retrieved. See 5994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5995// for more information. 5996func (c *ProjectsAggregatedUsableSubnetworksListCall) Fields(s ...googleapi.Field) *ProjectsAggregatedUsableSubnetworksListCall { 5997 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5998 return c 5999} 6000 6001// IfNoneMatch sets the optional parameter which makes the operation 6002// fail if the object's ETag matches the given value. This is useful for 6003// getting updates only after the object has changed since the last 6004// request. Use googleapi.IsNotModified to check whether the response 6005// error from Do is the result of In-None-Match. 6006func (c *ProjectsAggregatedUsableSubnetworksListCall) IfNoneMatch(entityTag string) *ProjectsAggregatedUsableSubnetworksListCall { 6007 c.ifNoneMatch_ = entityTag 6008 return c 6009} 6010 6011// Context sets the context to be used in this call's Do method. Any 6012// pending HTTP request will be aborted if the provided context is 6013// canceled. 6014func (c *ProjectsAggregatedUsableSubnetworksListCall) Context(ctx context.Context) *ProjectsAggregatedUsableSubnetworksListCall { 6015 c.ctx_ = ctx 6016 return c 6017} 6018 6019// Header returns an http.Header that can be modified by the caller to 6020// add HTTP headers to the request. 6021func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header { 6022 if c.header_ == nil { 6023 c.header_ = make(http.Header) 6024 } 6025 return c.header_ 6026} 6027 6028func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) { 6029 reqHeaders := make(http.Header) 6030 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 6031 for k, v := range c.header_ { 6032 reqHeaders[k] = v 6033 } 6034 reqHeaders.Set("User-Agent", c.s.userAgent()) 6035 if c.ifNoneMatch_ != "" { 6036 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6037 } 6038 var body io.Reader = nil 6039 c.urlParams_.Set("alt", alt) 6040 c.urlParams_.Set("prettyPrint", "false") 6041 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/aggregated/usableSubnetworks") 6042 urls += "?" + c.urlParams_.Encode() 6043 req, err := http.NewRequest("GET", urls, body) 6044 if err != nil { 6045 return nil, err 6046 } 6047 req.Header = reqHeaders 6048 googleapi.Expand(req.URL, map[string]string{ 6049 "parent": c.parent, 6050 }) 6051 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6052} 6053 6054// Do executes the "container.projects.aggregated.usableSubnetworks.list" call. 6055// Exactly one of *ListUsableSubnetworksResponse or error will be 6056// non-nil. Any non-2xx status code is an error. Response headers are in 6057// either *ListUsableSubnetworksResponse.ServerResponse.Header or (if a 6058// response was returned at all) in error.(*googleapi.Error).Header. Use 6059// googleapi.IsNotModified to check whether the returned error was 6060// because http.StatusNotModified was returned. 6061func (c *ProjectsAggregatedUsableSubnetworksListCall) Do(opts ...googleapi.CallOption) (*ListUsableSubnetworksResponse, error) { 6062 gensupport.SetOptions(c.urlParams_, opts...) 6063 res, err := c.doRequest("json") 6064 if res != nil && res.StatusCode == http.StatusNotModified { 6065 if res.Body != nil { 6066 res.Body.Close() 6067 } 6068 return nil, &googleapi.Error{ 6069 Code: res.StatusCode, 6070 Header: res.Header, 6071 } 6072 } 6073 if err != nil { 6074 return nil, err 6075 } 6076 defer googleapi.CloseBody(res) 6077 if err := googleapi.CheckResponse(res); err != nil { 6078 return nil, err 6079 } 6080 ret := &ListUsableSubnetworksResponse{ 6081 ServerResponse: googleapi.ServerResponse{ 6082 Header: res.Header, 6083 HTTPStatusCode: res.StatusCode, 6084 }, 6085 } 6086 target := &ret 6087 if err := gensupport.DecodeResponse(target, res); err != nil { 6088 return nil, err 6089 } 6090 return ret, nil 6091 // { 6092 // "description": "Lists subnetworks that can be used for creating clusters in a project.", 6093 // "flatPath": "v1beta1/projects/{projectsId}/aggregated/usableSubnetworks", 6094 // "httpMethod": "GET", 6095 // "id": "container.projects.aggregated.usableSubnetworks.list", 6096 // "parameterOrder": [ 6097 // "parent" 6098 // ], 6099 // "parameters": { 6100 // "filter": { 6101 // "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.", 6102 // "location": "query", 6103 // "type": "string" 6104 // }, 6105 // "pageSize": { 6106 // "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)", 6107 // "format": "int32", 6108 // "location": "query", 6109 // "type": "integer" 6110 // }, 6111 // "pageToken": { 6112 // "description": "Specifies a page token to use. Set this to the nextPageToken returned by\nprevious list requests to get the next page of results.", 6113 // "location": "query", 6114 // "type": "string" 6115 // }, 6116 // "parent": { 6117 // "description": "Required. The parent project where subnetworks are usable.\nSpecified in the format 'projects/*'.", 6118 // "location": "path", 6119 // "pattern": "^projects/[^/]+$", 6120 // "required": true, 6121 // "type": "string" 6122 // } 6123 // }, 6124 // "path": "v1beta1/{+parent}/aggregated/usableSubnetworks", 6125 // "response": { 6126 // "$ref": "ListUsableSubnetworksResponse" 6127 // }, 6128 // "scopes": [ 6129 // "https://www.googleapis.com/auth/cloud-platform" 6130 // ] 6131 // } 6132 6133} 6134 6135// Pages invokes f for each page of results. 6136// A non-nil error returned from f will halt the iteration. 6137// The provided context supersedes any context provided to the Context method. 6138func (c *ProjectsAggregatedUsableSubnetworksListCall) Pages(ctx context.Context, f func(*ListUsableSubnetworksResponse) error) error { 6139 c.ctx_ = ctx 6140 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6141 for { 6142 x, err := c.Do() 6143 if err != nil { 6144 return err 6145 } 6146 if err := f(x); err != nil { 6147 return err 6148 } 6149 if x.NextPageToken == "" { 6150 return nil 6151 } 6152 c.PageToken(x.NextPageToken) 6153 } 6154} 6155 6156// method id "container.projects.locations.getServerConfig": 6157 6158type ProjectsLocationsGetServerConfigCall struct { 6159 s *Service 6160 name string 6161 urlParams_ gensupport.URLParams 6162 ifNoneMatch_ string 6163 ctx_ context.Context 6164 header_ http.Header 6165} 6166 6167// GetServerConfig: Returns configuration info about the Google 6168// Kubernetes Engine service. 6169func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { 6170 c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6171 c.name = name 6172 return c 6173} 6174 6175// ProjectId sets the optional parameter "projectId": Required. 6176// Deprecated. The Google Developers Console [project ID or 6177// project 6178// number](https://support.google.com/cloud/answer/6158840). 6179// This 6180// field has been deprecated and replaced by the name field. 6181func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *ProjectsLocationsGetServerConfigCall { 6182 c.urlParams_.Set("projectId", projectId) 6183 return c 6184} 6185 6186// Zone sets the optional parameter "zone": Required. Deprecated. The 6187// name of the Google Compute 6188// Engine 6189// [zone](https://cloud.google.com/compute/docs/zones#available) to 6190// return 6191// operations for. This field has been deprecated and replaced by the 6192// name 6193// field. 6194func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall { 6195 c.urlParams_.Set("zone", zone) 6196 return c 6197} 6198 6199// Fields allows partial responses to be retrieved. See 6200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6201// for more information. 6202func (c *ProjectsLocationsGetServerConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetServerConfigCall { 6203 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6204 return c 6205} 6206 6207// IfNoneMatch sets the optional parameter which makes the operation 6208// fail if the object's ETag matches the given value. This is useful for 6209// getting updates only after the object has changed since the last 6210// request. Use googleapi.IsNotModified to check whether the response 6211// error from Do is the result of In-None-Match. 6212func (c *ProjectsLocationsGetServerConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetServerConfigCall { 6213 c.ifNoneMatch_ = entityTag 6214 return c 6215} 6216 6217// Context sets the context to be used in this call's Do method. Any 6218// pending HTTP request will be aborted if the provided context is 6219// canceled. 6220func (c *ProjectsLocationsGetServerConfigCall) Context(ctx context.Context) *ProjectsLocationsGetServerConfigCall { 6221 c.ctx_ = ctx 6222 return c 6223} 6224 6225// Header returns an http.Header that can be modified by the caller to 6226// add HTTP headers to the request. 6227func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header { 6228 if c.header_ == nil { 6229 c.header_ = make(http.Header) 6230 } 6231 return c.header_ 6232} 6233 6234func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) { 6235 reqHeaders := make(http.Header) 6236 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 6237 for k, v := range c.header_ { 6238 reqHeaders[k] = v 6239 } 6240 reqHeaders.Set("User-Agent", c.s.userAgent()) 6241 if c.ifNoneMatch_ != "" { 6242 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6243 } 6244 var body io.Reader = nil 6245 c.urlParams_.Set("alt", alt) 6246 c.urlParams_.Set("prettyPrint", "false") 6247 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/serverConfig") 6248 urls += "?" + c.urlParams_.Encode() 6249 req, err := http.NewRequest("GET", urls, body) 6250 if err != nil { 6251 return nil, err 6252 } 6253 req.Header = reqHeaders 6254 googleapi.Expand(req.URL, map[string]string{ 6255 "name": c.name, 6256 }) 6257 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6258} 6259 6260// Do executes the "container.projects.locations.getServerConfig" call. 6261// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx 6262// status code is an error. Response headers are in either 6263// *ServerConfig.ServerResponse.Header or (if a response was returned at 6264// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6265// to check whether the returned error was because 6266// http.StatusNotModified was returned. 6267func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { 6268 gensupport.SetOptions(c.urlParams_, opts...) 6269 res, err := c.doRequest("json") 6270 if res != nil && res.StatusCode == http.StatusNotModified { 6271 if res.Body != nil { 6272 res.Body.Close() 6273 } 6274 return nil, &googleapi.Error{ 6275 Code: res.StatusCode, 6276 Header: res.Header, 6277 } 6278 } 6279 if err != nil { 6280 return nil, err 6281 } 6282 defer googleapi.CloseBody(res) 6283 if err := googleapi.CheckResponse(res); err != nil { 6284 return nil, err 6285 } 6286 ret := &ServerConfig{ 6287 ServerResponse: googleapi.ServerResponse{ 6288 Header: res.Header, 6289 HTTPStatusCode: res.StatusCode, 6290 }, 6291 } 6292 target := &ret 6293 if err := gensupport.DecodeResponse(target, res); err != nil { 6294 return nil, err 6295 } 6296 return ret, nil 6297 // { 6298 // "description": "Returns configuration info about the Google Kubernetes Engine service.", 6299 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", 6300 // "httpMethod": "GET", 6301 // "id": "container.projects.locations.getServerConfig", 6302 // "parameterOrder": [ 6303 // "name" 6304 // ], 6305 // "parameters": { 6306 // "name": { 6307 // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", 6308 // "location": "path", 6309 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6310 // "required": true, 6311 // "type": "string" 6312 // }, 6313 // "projectId": { 6314 // "description": "Required. 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.", 6315 // "location": "query", 6316 // "type": "string" 6317 // }, 6318 // "zone": { 6319 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) to return\noperations for. This field has been deprecated and replaced by the name\nfield.", 6320 // "location": "query", 6321 // "type": "string" 6322 // } 6323 // }, 6324 // "path": "v1beta1/{+name}/serverConfig", 6325 // "response": { 6326 // "$ref": "ServerConfig" 6327 // }, 6328 // "scopes": [ 6329 // "https://www.googleapis.com/auth/cloud-platform" 6330 // ] 6331 // } 6332 6333} 6334 6335// method id "container.projects.locations.list": 6336 6337type ProjectsLocationsListCall struct { 6338 s *Service 6339 parent string 6340 urlParams_ gensupport.URLParams 6341 ifNoneMatch_ string 6342 ctx_ context.Context 6343 header_ http.Header 6344} 6345 6346// List: Fetches locations that offer Google Kubernetes Engine. 6347func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall { 6348 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6349 c.parent = parent 6350 return c 6351} 6352 6353// Fields allows partial responses to be retrieved. See 6354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6355// for more information. 6356func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 6357 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6358 return c 6359} 6360 6361// IfNoneMatch sets the optional parameter which makes the operation 6362// fail if the object's ETag matches the given value. This is useful for 6363// getting updates only after the object has changed since the last 6364// request. Use googleapi.IsNotModified to check whether the response 6365// error from Do is the result of In-None-Match. 6366func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 6367 c.ifNoneMatch_ = entityTag 6368 return c 6369} 6370 6371// Context sets the context to be used in this call's Do method. Any 6372// pending HTTP request will be aborted if the provided context is 6373// canceled. 6374func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 6375 c.ctx_ = ctx 6376 return c 6377} 6378 6379// Header returns an http.Header that can be modified by the caller to 6380// add HTTP headers to the request. 6381func (c *ProjectsLocationsListCall) Header() http.Header { 6382 if c.header_ == nil { 6383 c.header_ = make(http.Header) 6384 } 6385 return c.header_ 6386} 6387 6388func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 6389 reqHeaders := make(http.Header) 6390 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 6391 for k, v := range c.header_ { 6392 reqHeaders[k] = v 6393 } 6394 reqHeaders.Set("User-Agent", c.s.userAgent()) 6395 if c.ifNoneMatch_ != "" { 6396 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6397 } 6398 var body io.Reader = nil 6399 c.urlParams_.Set("alt", alt) 6400 c.urlParams_.Set("prettyPrint", "false") 6401 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/locations") 6402 urls += "?" + c.urlParams_.Encode() 6403 req, err := http.NewRequest("GET", urls, body) 6404 if err != nil { 6405 return nil, err 6406 } 6407 req.Header = reqHeaders 6408 googleapi.Expand(req.URL, map[string]string{ 6409 "parent": c.parent, 6410 }) 6411 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6412} 6413 6414// Do executes the "container.projects.locations.list" call. 6415// Exactly one of *ListLocationsResponse or error will be non-nil. Any 6416// non-2xx status code is an error. Response headers are in either 6417// *ListLocationsResponse.ServerResponse.Header or (if a response was 6418// returned at all) in error.(*googleapi.Error).Header. Use 6419// googleapi.IsNotModified to check whether the returned error was 6420// because http.StatusNotModified was returned. 6421func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 6422 gensupport.SetOptions(c.urlParams_, opts...) 6423 res, err := c.doRequest("json") 6424 if res != nil && res.StatusCode == http.StatusNotModified { 6425 if res.Body != nil { 6426 res.Body.Close() 6427 } 6428 return nil, &googleapi.Error{ 6429 Code: res.StatusCode, 6430 Header: res.Header, 6431 } 6432 } 6433 if err != nil { 6434 return nil, err 6435 } 6436 defer googleapi.CloseBody(res) 6437 if err := googleapi.CheckResponse(res); err != nil { 6438 return nil, err 6439 } 6440 ret := &ListLocationsResponse{ 6441 ServerResponse: googleapi.ServerResponse{ 6442 Header: res.Header, 6443 HTTPStatusCode: res.StatusCode, 6444 }, 6445 } 6446 target := &ret 6447 if err := gensupport.DecodeResponse(target, res); err != nil { 6448 return nil, err 6449 } 6450 return ret, nil 6451 // { 6452 // "description": "Fetches locations that offer Google Kubernetes Engine.", 6453 // "flatPath": "v1beta1/projects/{projectsId}/locations", 6454 // "httpMethod": "GET", 6455 // "id": "container.projects.locations.list", 6456 // "parameterOrder": [ 6457 // "parent" 6458 // ], 6459 // "parameters": { 6460 // "parent": { 6461 // "description": "Required. Contains the name of the resource requested.\nSpecified in the format 'projects/*'.", 6462 // "location": "path", 6463 // "pattern": "^projects/[^/]+$", 6464 // "required": true, 6465 // "type": "string" 6466 // } 6467 // }, 6468 // "path": "v1beta1/{+parent}/locations", 6469 // "response": { 6470 // "$ref": "ListLocationsResponse" 6471 // }, 6472 // "scopes": [ 6473 // "https://www.googleapis.com/auth/cloud-platform" 6474 // ] 6475 // } 6476 6477} 6478 6479// method id "container.projects.locations.clusters.completeIpRotation": 6480 6481type ProjectsLocationsClustersCompleteIpRotationCall struct { 6482 s *Service 6483 name string 6484 completeiprotationrequest *CompleteIPRotationRequest 6485 urlParams_ gensupport.URLParams 6486 ctx_ context.Context 6487 header_ http.Header 6488} 6489 6490// CompleteIpRotation: Completes master IP rotation. 6491func (r *ProjectsLocationsClustersService) CompleteIpRotation(name string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsLocationsClustersCompleteIpRotationCall { 6492 c := &ProjectsLocationsClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6493 c.name = name 6494 c.completeiprotationrequest = completeiprotationrequest 6495 return c 6496} 6497 6498// Fields allows partial responses to be retrieved. See 6499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6500// for more information. 6501func (c *ProjectsLocationsClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCompleteIpRotationCall { 6502 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6503 return c 6504} 6505 6506// Context sets the context to be used in this call's Do method. Any 6507// pending HTTP request will be aborted if the provided context is 6508// canceled. 6509func (c *ProjectsLocationsClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersCompleteIpRotationCall { 6510 c.ctx_ = ctx 6511 return c 6512} 6513 6514// Header returns an http.Header that can be modified by the caller to 6515// add HTTP headers to the request. 6516func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header { 6517 if c.header_ == nil { 6518 c.header_ = make(http.Header) 6519 } 6520 return c.header_ 6521} 6522 6523func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { 6524 reqHeaders := make(http.Header) 6525 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 6526 for k, v := range c.header_ { 6527 reqHeaders[k] = v 6528 } 6529 reqHeaders.Set("User-Agent", c.s.userAgent()) 6530 var body io.Reader = nil 6531 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) 6532 if err != nil { 6533 return nil, err 6534 } 6535 reqHeaders.Set("Content-Type", "application/json") 6536 c.urlParams_.Set("alt", alt) 6537 c.urlParams_.Set("prettyPrint", "false") 6538 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeIpRotation") 6539 urls += "?" + c.urlParams_.Encode() 6540 req, err := http.NewRequest("POST", urls, body) 6541 if err != nil { 6542 return nil, err 6543 } 6544 req.Header = reqHeaders 6545 googleapi.Expand(req.URL, map[string]string{ 6546 "name": c.name, 6547 }) 6548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6549} 6550 6551// Do executes the "container.projects.locations.clusters.completeIpRotation" call. 6552// Exactly one of *Operation or error will be non-nil. Any non-2xx 6553// status code is an error. Response headers are in either 6554// *Operation.ServerResponse.Header or (if a response was returned at 6555// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6556// to check whether the returned error was because 6557// http.StatusNotModified was returned. 6558func (c *ProjectsLocationsClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6559 gensupport.SetOptions(c.urlParams_, opts...) 6560 res, err := c.doRequest("json") 6561 if res != nil && res.StatusCode == http.StatusNotModified { 6562 if res.Body != nil { 6563 res.Body.Close() 6564 } 6565 return nil, &googleapi.Error{ 6566 Code: res.StatusCode, 6567 Header: res.Header, 6568 } 6569 } 6570 if err != nil { 6571 return nil, err 6572 } 6573 defer googleapi.CloseBody(res) 6574 if err := googleapi.CheckResponse(res); err != nil { 6575 return nil, err 6576 } 6577 ret := &Operation{ 6578 ServerResponse: googleapi.ServerResponse{ 6579 Header: res.Header, 6580 HTTPStatusCode: res.StatusCode, 6581 }, 6582 } 6583 target := &ret 6584 if err := gensupport.DecodeResponse(target, res); err != nil { 6585 return nil, err 6586 } 6587 return ret, nil 6588 // { 6589 // "description": "Completes master IP rotation.", 6590 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation", 6591 // "httpMethod": "POST", 6592 // "id": "container.projects.locations.clusters.completeIpRotation", 6593 // "parameterOrder": [ 6594 // "name" 6595 // ], 6596 // "parameters": { 6597 // "name": { 6598 // "description": "The name (project, location, cluster id) of the cluster to complete IP\nrotation. Specified in the format 'projects/*/locations/*/clusters/*'.", 6599 // "location": "path", 6600 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6601 // "required": true, 6602 // "type": "string" 6603 // } 6604 // }, 6605 // "path": "v1beta1/{+name}:completeIpRotation", 6606 // "request": { 6607 // "$ref": "CompleteIPRotationRequest" 6608 // }, 6609 // "response": { 6610 // "$ref": "Operation" 6611 // }, 6612 // "scopes": [ 6613 // "https://www.googleapis.com/auth/cloud-platform" 6614 // ] 6615 // } 6616 6617} 6618 6619// method id "container.projects.locations.clusters.create": 6620 6621type ProjectsLocationsClustersCreateCall struct { 6622 s *Service 6623 parent string 6624 createclusterrequest *CreateClusterRequest 6625 urlParams_ gensupport.URLParams 6626 ctx_ context.Context 6627 header_ http.Header 6628} 6629 6630// Create: Creates a cluster, consisting of the specified number and 6631// type of Google 6632// Compute Engine instances. 6633// 6634// By default, the cluster is created in the 6635// project's 6636// [default 6637// network](https://cloud.google.com/compute/docs/netw 6638// orks-and-firewalls#networks). 6639// 6640// One firewall is added for the cluster. After cluster creation, 6641// the Kubelet creates routes for each node to allow the containers 6642// on that node to communicate with all other instances in 6643// the 6644// cluster. 6645// 6646// Finally, an entry is added to the project's global metadata 6647// indicating 6648// which CIDR range the cluster is using. 6649func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { 6650 c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6651 c.parent = parent 6652 c.createclusterrequest = createclusterrequest 6653 return c 6654} 6655 6656// Fields allows partial responses to be retrieved. See 6657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6658// for more information. 6659func (c *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { 6660 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6661 return c 6662} 6663 6664// Context sets the context to be used in this call's Do method. Any 6665// pending HTTP request will be aborted if the provided context is 6666// canceled. 6667func (c *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { 6668 c.ctx_ = ctx 6669 return c 6670} 6671 6672// Header returns an http.Header that can be modified by the caller to 6673// add HTTP headers to the request. 6674func (c *ProjectsLocationsClustersCreateCall) Header() http.Header { 6675 if c.header_ == nil { 6676 c.header_ = make(http.Header) 6677 } 6678 return c.header_ 6679} 6680 6681func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) { 6682 reqHeaders := make(http.Header) 6683 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 6684 for k, v := range c.header_ { 6685 reqHeaders[k] = v 6686 } 6687 reqHeaders.Set("User-Agent", c.s.userAgent()) 6688 var body io.Reader = nil 6689 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) 6690 if err != nil { 6691 return nil, err 6692 } 6693 reqHeaders.Set("Content-Type", "application/json") 6694 c.urlParams_.Set("alt", alt) 6695 c.urlParams_.Set("prettyPrint", "false") 6696 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") 6697 urls += "?" + c.urlParams_.Encode() 6698 req, err := http.NewRequest("POST", urls, body) 6699 if err != nil { 6700 return nil, err 6701 } 6702 req.Header = reqHeaders 6703 googleapi.Expand(req.URL, map[string]string{ 6704 "parent": c.parent, 6705 }) 6706 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6707} 6708 6709// Do executes the "container.projects.locations.clusters.create" call. 6710// Exactly one of *Operation or error will be non-nil. Any non-2xx 6711// status code is an error. Response headers are in either 6712// *Operation.ServerResponse.Header or (if a response was returned at 6713// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6714// to check whether the returned error was because 6715// http.StatusNotModified was returned. 6716func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6717 gensupport.SetOptions(c.urlParams_, opts...) 6718 res, err := c.doRequest("json") 6719 if res != nil && res.StatusCode == http.StatusNotModified { 6720 if res.Body != nil { 6721 res.Body.Close() 6722 } 6723 return nil, &googleapi.Error{ 6724 Code: res.StatusCode, 6725 Header: res.Header, 6726 } 6727 } 6728 if err != nil { 6729 return nil, err 6730 } 6731 defer googleapi.CloseBody(res) 6732 if err := googleapi.CheckResponse(res); err != nil { 6733 return nil, err 6734 } 6735 ret := &Operation{ 6736 ServerResponse: googleapi.ServerResponse{ 6737 Header: res.Header, 6738 HTTPStatusCode: res.StatusCode, 6739 }, 6740 } 6741 target := &ret 6742 if err := gensupport.DecodeResponse(target, res); err != nil { 6743 return nil, err 6744 } 6745 return ret, nil 6746 // { 6747 // "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\nnetwork](https://cloud.google.com/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.", 6748 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", 6749 // "httpMethod": "POST", 6750 // "id": "container.projects.locations.clusters.create", 6751 // "parameterOrder": [ 6752 // "parent" 6753 // ], 6754 // "parameters": { 6755 // "parent": { 6756 // "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", 6757 // "location": "path", 6758 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6759 // "required": true, 6760 // "type": "string" 6761 // } 6762 // }, 6763 // "path": "v1beta1/{+parent}/clusters", 6764 // "request": { 6765 // "$ref": "CreateClusterRequest" 6766 // }, 6767 // "response": { 6768 // "$ref": "Operation" 6769 // }, 6770 // "scopes": [ 6771 // "https://www.googleapis.com/auth/cloud-platform" 6772 // ] 6773 // } 6774 6775} 6776 6777// method id "container.projects.locations.clusters.delete": 6778 6779type ProjectsLocationsClustersDeleteCall struct { 6780 s *Service 6781 name string 6782 urlParams_ gensupport.URLParams 6783 ctx_ context.Context 6784 header_ http.Header 6785} 6786 6787// Delete: Deletes the cluster, including the Kubernetes endpoint and 6788// all worker 6789// nodes. 6790// 6791// Firewalls and routes that were configured during cluster creation 6792// are also deleted. 6793// 6794// Other Google Compute Engine resources that might be in use by the 6795// cluster, 6796// such as load balancer resources, are not deleted if they weren't 6797// present 6798// when the cluster was initially created. 6799func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { 6800 c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6801 c.name = name 6802 return c 6803} 6804 6805// ClusterId sets the optional parameter "clusterId": Required. 6806// Deprecated. The name of the cluster to delete. 6807// This field has been deprecated and replaced by the name field. 6808func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall { 6809 c.urlParams_.Set("clusterId", clusterId) 6810 return c 6811} 6812 6813// ProjectId sets the optional parameter "projectId": Required. 6814// Deprecated. The Google Developers Console [project ID or 6815// project 6816// number](https://support.google.com/cloud/answer/6158840). 6817// This 6818// field has been deprecated and replaced by the name field. 6819func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersDeleteCall { 6820 c.urlParams_.Set("projectId", projectId) 6821 return c 6822} 6823 6824// Zone sets the optional parameter "zone": Required. Deprecated. The 6825// name of the Google Compute 6826// Engine 6827// [zone](https://cloud.google.com/compute/docs/zones#available) in 6828// which the 6829// cluster resides. This field has been deprecated and replaced by the 6830// name 6831// field. 6832func (c *ProjectsLocationsClustersDeleteCall) Zone(zone string) *ProjectsLocationsClustersDeleteCall { 6833 c.urlParams_.Set("zone", zone) 6834 return c 6835} 6836 6837// Fields allows partial responses to be retrieved. See 6838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6839// for more information. 6840func (c *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { 6841 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6842 return c 6843} 6844 6845// Context sets the context to be used in this call's Do method. Any 6846// pending HTTP request will be aborted if the provided context is 6847// canceled. 6848func (c *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { 6849 c.ctx_ = ctx 6850 return c 6851} 6852 6853// Header returns an http.Header that can be modified by the caller to 6854// add HTTP headers to the request. 6855func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header { 6856 if c.header_ == nil { 6857 c.header_ = make(http.Header) 6858 } 6859 return c.header_ 6860} 6861 6862func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) { 6863 reqHeaders := make(http.Header) 6864 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 6865 for k, v := range c.header_ { 6866 reqHeaders[k] = v 6867 } 6868 reqHeaders.Set("User-Agent", c.s.userAgent()) 6869 var body io.Reader = nil 6870 c.urlParams_.Set("alt", alt) 6871 c.urlParams_.Set("prettyPrint", "false") 6872 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6873 urls += "?" + c.urlParams_.Encode() 6874 req, err := http.NewRequest("DELETE", urls, body) 6875 if err != nil { 6876 return nil, err 6877 } 6878 req.Header = reqHeaders 6879 googleapi.Expand(req.URL, map[string]string{ 6880 "name": c.name, 6881 }) 6882 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6883} 6884 6885// Do executes the "container.projects.locations.clusters.delete" call. 6886// Exactly one of *Operation or error will be non-nil. Any non-2xx 6887// status code is an error. Response headers are in either 6888// *Operation.ServerResponse.Header or (if a response was returned at 6889// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6890// to check whether the returned error was because 6891// http.StatusNotModified was returned. 6892func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6893 gensupport.SetOptions(c.urlParams_, opts...) 6894 res, err := c.doRequest("json") 6895 if res != nil && res.StatusCode == http.StatusNotModified { 6896 if res.Body != nil { 6897 res.Body.Close() 6898 } 6899 return nil, &googleapi.Error{ 6900 Code: res.StatusCode, 6901 Header: res.Header, 6902 } 6903 } 6904 if err != nil { 6905 return nil, err 6906 } 6907 defer googleapi.CloseBody(res) 6908 if err := googleapi.CheckResponse(res); err != nil { 6909 return nil, err 6910 } 6911 ret := &Operation{ 6912 ServerResponse: googleapi.ServerResponse{ 6913 Header: res.Header, 6914 HTTPStatusCode: res.StatusCode, 6915 }, 6916 } 6917 target := &ret 6918 if err := gensupport.DecodeResponse(target, res); err != nil { 6919 return nil, err 6920 } 6921 return ret, nil 6922 // { 6923 // "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.", 6924 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", 6925 // "httpMethod": "DELETE", 6926 // "id": "container.projects.locations.clusters.delete", 6927 // "parameterOrder": [ 6928 // "name" 6929 // ], 6930 // "parameters": { 6931 // "clusterId": { 6932 // "description": "Required. Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", 6933 // "location": "query", 6934 // "type": "string" 6935 // }, 6936 // "name": { 6937 // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 6938 // "location": "path", 6939 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 6940 // "required": true, 6941 // "type": "string" 6942 // }, 6943 // "projectId": { 6944 // "description": "Required. 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.", 6945 // "location": "query", 6946 // "type": "string" 6947 // }, 6948 // "zone": { 6949 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 6950 // "location": "query", 6951 // "type": "string" 6952 // } 6953 // }, 6954 // "path": "v1beta1/{+name}", 6955 // "response": { 6956 // "$ref": "Operation" 6957 // }, 6958 // "scopes": [ 6959 // "https://www.googleapis.com/auth/cloud-platform" 6960 // ] 6961 // } 6962 6963} 6964 6965// method id "container.projects.locations.clusters.get": 6966 6967type ProjectsLocationsClustersGetCall struct { 6968 s *Service 6969 name string 6970 urlParams_ gensupport.URLParams 6971 ifNoneMatch_ string 6972 ctx_ context.Context 6973 header_ http.Header 6974} 6975 6976// Get: Gets the details for a specific cluster. 6977func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { 6978 c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6979 c.name = name 6980 return c 6981} 6982 6983// ClusterId sets the optional parameter "clusterId": Required. 6984// Deprecated. The name of the cluster to retrieve. 6985// This field has been deprecated and replaced by the name field. 6986func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall { 6987 c.urlParams_.Set("clusterId", clusterId) 6988 return c 6989} 6990 6991// ProjectId sets the optional parameter "projectId": Required. 6992// Deprecated. The Google Developers Console [project ID or 6993// project 6994// number](https://support.google.com/cloud/answer/6158840). 6995// This 6996// field has been deprecated and replaced by the name field. 6997func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *ProjectsLocationsClustersGetCall { 6998 c.urlParams_.Set("projectId", projectId) 6999 return c 7000} 7001 7002// Zone sets the optional parameter "zone": Required. Deprecated. The 7003// name of the Google Compute 7004// Engine 7005// [zone](https://cloud.google.com/compute/docs/zones#available) in 7006// which the 7007// cluster resides. This field has been deprecated and replaced by the 7008// name 7009// field. 7010func (c *ProjectsLocationsClustersGetCall) Zone(zone string) *ProjectsLocationsClustersGetCall { 7011 c.urlParams_.Set("zone", zone) 7012 return c 7013} 7014 7015// Fields allows partial responses to be retrieved. See 7016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7017// for more information. 7018func (c *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { 7019 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7020 return c 7021} 7022 7023// IfNoneMatch sets the optional parameter which makes the operation 7024// fail if the object's ETag matches the given value. This is useful for 7025// getting updates only after the object has changed since the last 7026// request. Use googleapi.IsNotModified to check whether the response 7027// error from Do is the result of In-None-Match. 7028func (c *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { 7029 c.ifNoneMatch_ = entityTag 7030 return c 7031} 7032 7033// Context sets the context to be used in this call's Do method. Any 7034// pending HTTP request will be aborted if the provided context is 7035// canceled. 7036func (c *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { 7037 c.ctx_ = ctx 7038 return c 7039} 7040 7041// Header returns an http.Header that can be modified by the caller to 7042// add HTTP headers to the request. 7043func (c *ProjectsLocationsClustersGetCall) Header() http.Header { 7044 if c.header_ == nil { 7045 c.header_ = make(http.Header) 7046 } 7047 return c.header_ 7048} 7049 7050func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) { 7051 reqHeaders := make(http.Header) 7052 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7053 for k, v := range c.header_ { 7054 reqHeaders[k] = v 7055 } 7056 reqHeaders.Set("User-Agent", c.s.userAgent()) 7057 if c.ifNoneMatch_ != "" { 7058 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7059 } 7060 var body io.Reader = nil 7061 c.urlParams_.Set("alt", alt) 7062 c.urlParams_.Set("prettyPrint", "false") 7063 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7064 urls += "?" + c.urlParams_.Encode() 7065 req, err := http.NewRequest("GET", urls, body) 7066 if err != nil { 7067 return nil, err 7068 } 7069 req.Header = reqHeaders 7070 googleapi.Expand(req.URL, map[string]string{ 7071 "name": c.name, 7072 }) 7073 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7074} 7075 7076// Do executes the "container.projects.locations.clusters.get" call. 7077// Exactly one of *Cluster or error will be non-nil. Any non-2xx status 7078// code is an error. Response headers are in either 7079// *Cluster.ServerResponse.Header or (if a response was returned at all) 7080// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7081// check whether the returned error was because http.StatusNotModified 7082// was returned. 7083func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { 7084 gensupport.SetOptions(c.urlParams_, opts...) 7085 res, err := c.doRequest("json") 7086 if res != nil && res.StatusCode == http.StatusNotModified { 7087 if res.Body != nil { 7088 res.Body.Close() 7089 } 7090 return nil, &googleapi.Error{ 7091 Code: res.StatusCode, 7092 Header: res.Header, 7093 } 7094 } 7095 if err != nil { 7096 return nil, err 7097 } 7098 defer googleapi.CloseBody(res) 7099 if err := googleapi.CheckResponse(res); err != nil { 7100 return nil, err 7101 } 7102 ret := &Cluster{ 7103 ServerResponse: googleapi.ServerResponse{ 7104 Header: res.Header, 7105 HTTPStatusCode: res.StatusCode, 7106 }, 7107 } 7108 target := &ret 7109 if err := gensupport.DecodeResponse(target, res); err != nil { 7110 return nil, err 7111 } 7112 return ret, nil 7113 // { 7114 // "description": "Gets the details for a specific cluster.", 7115 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", 7116 // "httpMethod": "GET", 7117 // "id": "container.projects.locations.clusters.get", 7118 // "parameterOrder": [ 7119 // "name" 7120 // ], 7121 // "parameters": { 7122 // "clusterId": { 7123 // "description": "Required. Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", 7124 // "location": "query", 7125 // "type": "string" 7126 // }, 7127 // "name": { 7128 // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7129 // "location": "path", 7130 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7131 // "required": true, 7132 // "type": "string" 7133 // }, 7134 // "projectId": { 7135 // "description": "Required. 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.", 7136 // "location": "query", 7137 // "type": "string" 7138 // }, 7139 // "zone": { 7140 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 7141 // "location": "query", 7142 // "type": "string" 7143 // } 7144 // }, 7145 // "path": "v1beta1/{+name}", 7146 // "response": { 7147 // "$ref": "Cluster" 7148 // }, 7149 // "scopes": [ 7150 // "https://www.googleapis.com/auth/cloud-platform" 7151 // ] 7152 // } 7153 7154} 7155 7156// method id "container.projects.locations.clusters.getJwks": 7157 7158type ProjectsLocationsClustersGetJwksCall struct { 7159 s *Service 7160 parent string 7161 urlParams_ gensupport.URLParams 7162 ifNoneMatch_ string 7163 ctx_ context.Context 7164 header_ http.Header 7165} 7166 7167// GetJwks: Gets the public component of the cluster signing keys 7168// in 7169// JSON Web Key format. 7170// This API is not yet intended for general use, and is not available 7171// for all 7172// clusters. 7173func (r *ProjectsLocationsClustersService) GetJwks(parent string) *ProjectsLocationsClustersGetJwksCall { 7174 c := &ProjectsLocationsClustersGetJwksCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7175 c.parent = parent 7176 return c 7177} 7178 7179// Fields allows partial responses to be retrieved. See 7180// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7181// for more information. 7182func (c *ProjectsLocationsClustersGetJwksCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetJwksCall { 7183 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7184 return c 7185} 7186 7187// IfNoneMatch sets the optional parameter which makes the operation 7188// fail if the object's ETag matches the given value. This is useful for 7189// getting updates only after the object has changed since the last 7190// request. Use googleapi.IsNotModified to check whether the response 7191// error from Do is the result of In-None-Match. 7192func (c *ProjectsLocationsClustersGetJwksCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetJwksCall { 7193 c.ifNoneMatch_ = entityTag 7194 return c 7195} 7196 7197// Context sets the context to be used in this call's Do method. Any 7198// pending HTTP request will be aborted if the provided context is 7199// canceled. 7200func (c *ProjectsLocationsClustersGetJwksCall) Context(ctx context.Context) *ProjectsLocationsClustersGetJwksCall { 7201 c.ctx_ = ctx 7202 return c 7203} 7204 7205// Header returns an http.Header that can be modified by the caller to 7206// add HTTP headers to the request. 7207func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { 7208 if c.header_ == nil { 7209 c.header_ = make(http.Header) 7210 } 7211 return c.header_ 7212} 7213 7214func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { 7215 reqHeaders := make(http.Header) 7216 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7217 for k, v := range c.header_ { 7218 reqHeaders[k] = v 7219 } 7220 reqHeaders.Set("User-Agent", c.s.userAgent()) 7221 if c.ifNoneMatch_ != "" { 7222 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7223 } 7224 var body io.Reader = nil 7225 c.urlParams_.Set("alt", alt) 7226 c.urlParams_.Set("prettyPrint", "false") 7227 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jwks") 7228 urls += "?" + c.urlParams_.Encode() 7229 req, err := http.NewRequest("GET", urls, body) 7230 if err != nil { 7231 return nil, err 7232 } 7233 req.Header = reqHeaders 7234 googleapi.Expand(req.URL, map[string]string{ 7235 "parent": c.parent, 7236 }) 7237 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7238} 7239 7240// Do executes the "container.projects.locations.clusters.getJwks" call. 7241// Exactly one of *GetJSONWebKeysResponse or error will be non-nil. Any 7242// non-2xx status code is an error. Response headers are in either 7243// *GetJSONWebKeysResponse.ServerResponse.Header or (if a response was 7244// returned at all) in error.(*googleapi.Error).Header. Use 7245// googleapi.IsNotModified to check whether the returned error was 7246// because http.StatusNotModified was returned. 7247func (c *ProjectsLocationsClustersGetJwksCall) Do(opts ...googleapi.CallOption) (*GetJSONWebKeysResponse, error) { 7248 gensupport.SetOptions(c.urlParams_, opts...) 7249 res, err := c.doRequest("json") 7250 if res != nil && res.StatusCode == http.StatusNotModified { 7251 if res.Body != nil { 7252 res.Body.Close() 7253 } 7254 return nil, &googleapi.Error{ 7255 Code: res.StatusCode, 7256 Header: res.Header, 7257 } 7258 } 7259 if err != nil { 7260 return nil, err 7261 } 7262 defer googleapi.CloseBody(res) 7263 if err := googleapi.CheckResponse(res); err != nil { 7264 return nil, err 7265 } 7266 ret := &GetJSONWebKeysResponse{ 7267 ServerResponse: googleapi.ServerResponse{ 7268 Header: res.Header, 7269 HTTPStatusCode: res.StatusCode, 7270 }, 7271 } 7272 target := &ret 7273 if err := gensupport.DecodeResponse(target, res); err != nil { 7274 return nil, err 7275 } 7276 return ret, nil 7277 // { 7278 // "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.", 7279 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", 7280 // "httpMethod": "GET", 7281 // "id": "container.projects.locations.clusters.getJwks", 7282 // "parameterOrder": [ 7283 // "parent" 7284 // ], 7285 // "parameters": { 7286 // "parent": { 7287 // "description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.", 7288 // "location": "path", 7289 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7290 // "required": true, 7291 // "type": "string" 7292 // } 7293 // }, 7294 // "path": "v1beta1/{+parent}/jwks", 7295 // "response": { 7296 // "$ref": "GetJSONWebKeysResponse" 7297 // } 7298 // } 7299 7300} 7301 7302// method id "container.projects.locations.clusters.list": 7303 7304type ProjectsLocationsClustersListCall struct { 7305 s *Service 7306 parent string 7307 urlParams_ gensupport.URLParams 7308 ifNoneMatch_ string 7309 ctx_ context.Context 7310 header_ http.Header 7311} 7312 7313// List: Lists all clusters owned by a project in either the specified 7314// zone or all 7315// zones. 7316func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { 7317 c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7318 c.parent = parent 7319 return c 7320} 7321 7322// ProjectId sets the optional parameter "projectId": Required. 7323// Deprecated. The Google Developers Console [project ID or 7324// project 7325// number](https://support.google.com/cloud/answer/6158840). 7326// This 7327// field has been deprecated and replaced by the parent field. 7328func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *ProjectsLocationsClustersListCall { 7329 c.urlParams_.Set("projectId", projectId) 7330 return c 7331} 7332 7333// Zone sets the optional parameter "zone": Required. Deprecated. The 7334// name of the Google Compute 7335// Engine 7336// [zone](https://cloud.google.com/compute/docs/zones#available) in 7337// which the 7338// cluster resides, or "-" for all zones. This field has been deprecated 7339// and 7340// replaced by the parent field. 7341func (c *ProjectsLocationsClustersListCall) Zone(zone string) *ProjectsLocationsClustersListCall { 7342 c.urlParams_.Set("zone", zone) 7343 return c 7344} 7345 7346// Fields allows partial responses to be retrieved. See 7347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7348// for more information. 7349func (c *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { 7350 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7351 return c 7352} 7353 7354// IfNoneMatch sets the optional parameter which makes the operation 7355// fail if the object's ETag matches the given value. This is useful for 7356// getting updates only after the object has changed since the last 7357// request. Use googleapi.IsNotModified to check whether the response 7358// error from Do is the result of In-None-Match. 7359func (c *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { 7360 c.ifNoneMatch_ = entityTag 7361 return c 7362} 7363 7364// Context sets the context to be used in this call's Do method. Any 7365// pending HTTP request will be aborted if the provided context is 7366// canceled. 7367func (c *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { 7368 c.ctx_ = ctx 7369 return c 7370} 7371 7372// Header returns an http.Header that can be modified by the caller to 7373// add HTTP headers to the request. 7374func (c *ProjectsLocationsClustersListCall) Header() http.Header { 7375 if c.header_ == nil { 7376 c.header_ = make(http.Header) 7377 } 7378 return c.header_ 7379} 7380 7381func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) { 7382 reqHeaders := make(http.Header) 7383 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7384 for k, v := range c.header_ { 7385 reqHeaders[k] = v 7386 } 7387 reqHeaders.Set("User-Agent", c.s.userAgent()) 7388 if c.ifNoneMatch_ != "" { 7389 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7390 } 7391 var body io.Reader = nil 7392 c.urlParams_.Set("alt", alt) 7393 c.urlParams_.Set("prettyPrint", "false") 7394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") 7395 urls += "?" + c.urlParams_.Encode() 7396 req, err := http.NewRequest("GET", urls, body) 7397 if err != nil { 7398 return nil, err 7399 } 7400 req.Header = reqHeaders 7401 googleapi.Expand(req.URL, map[string]string{ 7402 "parent": c.parent, 7403 }) 7404 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7405} 7406 7407// Do executes the "container.projects.locations.clusters.list" call. 7408// Exactly one of *ListClustersResponse or error will be non-nil. Any 7409// non-2xx status code is an error. Response headers are in either 7410// *ListClustersResponse.ServerResponse.Header or (if a response was 7411// returned at all) in error.(*googleapi.Error).Header. Use 7412// googleapi.IsNotModified to check whether the returned error was 7413// because http.StatusNotModified was returned. 7414func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { 7415 gensupport.SetOptions(c.urlParams_, opts...) 7416 res, err := c.doRequest("json") 7417 if res != nil && res.StatusCode == http.StatusNotModified { 7418 if res.Body != nil { 7419 res.Body.Close() 7420 } 7421 return nil, &googleapi.Error{ 7422 Code: res.StatusCode, 7423 Header: res.Header, 7424 } 7425 } 7426 if err != nil { 7427 return nil, err 7428 } 7429 defer googleapi.CloseBody(res) 7430 if err := googleapi.CheckResponse(res); err != nil { 7431 return nil, err 7432 } 7433 ret := &ListClustersResponse{ 7434 ServerResponse: googleapi.ServerResponse{ 7435 Header: res.Header, 7436 HTTPStatusCode: res.StatusCode, 7437 }, 7438 } 7439 target := &ret 7440 if err := gensupport.DecodeResponse(target, res); err != nil { 7441 return nil, err 7442 } 7443 return ret, nil 7444 // { 7445 // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", 7446 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", 7447 // "httpMethod": "GET", 7448 // "id": "container.projects.locations.clusters.list", 7449 // "parameterOrder": [ 7450 // "parent" 7451 // ], 7452 // "parameters": { 7453 // "parent": { 7454 // "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.", 7455 // "location": "path", 7456 // "pattern": "^projects/[^/]+/locations/[^/]+$", 7457 // "required": true, 7458 // "type": "string" 7459 // }, 7460 // "projectId": { 7461 // "description": "Required. 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.", 7462 // "location": "query", 7463 // "type": "string" 7464 // }, 7465 // "zone": { 7466 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides, or \"-\" for all zones. This field has been deprecated and\nreplaced by the parent field.", 7467 // "location": "query", 7468 // "type": "string" 7469 // } 7470 // }, 7471 // "path": "v1beta1/{+parent}/clusters", 7472 // "response": { 7473 // "$ref": "ListClustersResponse" 7474 // }, 7475 // "scopes": [ 7476 // "https://www.googleapis.com/auth/cloud-platform" 7477 // ] 7478 // } 7479 7480} 7481 7482// method id "container.projects.locations.clusters.setAddons": 7483 7484type ProjectsLocationsClustersSetAddonsCall struct { 7485 s *Service 7486 name string 7487 setaddonsconfigrequest *SetAddonsConfigRequest 7488 urlParams_ gensupport.URLParams 7489 ctx_ context.Context 7490 header_ http.Header 7491} 7492 7493// SetAddons: Sets the addons for a specific cluster. 7494func (r *ProjectsLocationsClustersService) SetAddons(name string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsLocationsClustersSetAddonsCall { 7495 c := &ProjectsLocationsClustersSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7496 c.name = name 7497 c.setaddonsconfigrequest = setaddonsconfigrequest 7498 return c 7499} 7500 7501// Fields allows partial responses to be retrieved. See 7502// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7503// for more information. 7504func (c *ProjectsLocationsClustersSetAddonsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetAddonsCall { 7505 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7506 return c 7507} 7508 7509// Context sets the context to be used in this call's Do method. Any 7510// pending HTTP request will be aborted if the provided context is 7511// canceled. 7512func (c *ProjectsLocationsClustersSetAddonsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetAddonsCall { 7513 c.ctx_ = ctx 7514 return c 7515} 7516 7517// Header returns an http.Header that can be modified by the caller to 7518// add HTTP headers to the request. 7519func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header { 7520 if c.header_ == nil { 7521 c.header_ = make(http.Header) 7522 } 7523 return c.header_ 7524} 7525 7526func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) { 7527 reqHeaders := make(http.Header) 7528 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7529 for k, v := range c.header_ { 7530 reqHeaders[k] = v 7531 } 7532 reqHeaders.Set("User-Agent", c.s.userAgent()) 7533 var body io.Reader = nil 7534 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) 7535 if err != nil { 7536 return nil, err 7537 } 7538 reqHeaders.Set("Content-Type", "application/json") 7539 c.urlParams_.Set("alt", alt) 7540 c.urlParams_.Set("prettyPrint", "false") 7541 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAddons") 7542 urls += "?" + c.urlParams_.Encode() 7543 req, err := http.NewRequest("POST", urls, body) 7544 if err != nil { 7545 return nil, err 7546 } 7547 req.Header = reqHeaders 7548 googleapi.Expand(req.URL, map[string]string{ 7549 "name": c.name, 7550 }) 7551 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7552} 7553 7554// Do executes the "container.projects.locations.clusters.setAddons" call. 7555// Exactly one of *Operation or error will be non-nil. Any non-2xx 7556// status code is an error. Response headers are in either 7557// *Operation.ServerResponse.Header or (if a response was returned at 7558// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7559// to check whether the returned error was because 7560// http.StatusNotModified was returned. 7561func (c *ProjectsLocationsClustersSetAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7562 gensupport.SetOptions(c.urlParams_, opts...) 7563 res, err := c.doRequest("json") 7564 if res != nil && res.StatusCode == http.StatusNotModified { 7565 if res.Body != nil { 7566 res.Body.Close() 7567 } 7568 return nil, &googleapi.Error{ 7569 Code: res.StatusCode, 7570 Header: res.Header, 7571 } 7572 } 7573 if err != nil { 7574 return nil, err 7575 } 7576 defer googleapi.CloseBody(res) 7577 if err := googleapi.CheckResponse(res); err != nil { 7578 return nil, err 7579 } 7580 ret := &Operation{ 7581 ServerResponse: googleapi.ServerResponse{ 7582 Header: res.Header, 7583 HTTPStatusCode: res.StatusCode, 7584 }, 7585 } 7586 target := &ret 7587 if err := gensupport.DecodeResponse(target, res); err != nil { 7588 return nil, err 7589 } 7590 return ret, nil 7591 // { 7592 // "description": "Sets the addons for a specific cluster.", 7593 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setAddons", 7594 // "httpMethod": "POST", 7595 // "id": "container.projects.locations.clusters.setAddons", 7596 // "parameterOrder": [ 7597 // "name" 7598 // ], 7599 // "parameters": { 7600 // "name": { 7601 // "description": "The name (project, location, cluster) of the cluster to set addons.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7602 // "location": "path", 7603 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7604 // "required": true, 7605 // "type": "string" 7606 // } 7607 // }, 7608 // "path": "v1beta1/{+name}:setAddons", 7609 // "request": { 7610 // "$ref": "SetAddonsConfigRequest" 7611 // }, 7612 // "response": { 7613 // "$ref": "Operation" 7614 // }, 7615 // "scopes": [ 7616 // "https://www.googleapis.com/auth/cloud-platform" 7617 // ] 7618 // } 7619 7620} 7621 7622// method id "container.projects.locations.clusters.setLegacyAbac": 7623 7624type ProjectsLocationsClustersSetLegacyAbacCall struct { 7625 s *Service 7626 name string 7627 setlegacyabacrequest *SetLegacyAbacRequest 7628 urlParams_ gensupport.URLParams 7629 ctx_ context.Context 7630 header_ http.Header 7631} 7632 7633// SetLegacyAbac: Enables or disables the ABAC authorization mechanism 7634// on a cluster. 7635func (r *ProjectsLocationsClustersService) SetLegacyAbac(name string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsLocationsClustersSetLegacyAbacCall { 7636 c := &ProjectsLocationsClustersSetLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7637 c.name = name 7638 c.setlegacyabacrequest = setlegacyabacrequest 7639 return c 7640} 7641 7642// Fields allows partial responses to be retrieved. See 7643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7644// for more information. 7645func (c *ProjectsLocationsClustersSetLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLegacyAbacCall { 7646 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7647 return c 7648} 7649 7650// Context sets the context to be used in this call's Do method. Any 7651// pending HTTP request will be aborted if the provided context is 7652// canceled. 7653func (c *ProjectsLocationsClustersSetLegacyAbacCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLegacyAbacCall { 7654 c.ctx_ = ctx 7655 return c 7656} 7657 7658// Header returns an http.Header that can be modified by the caller to 7659// add HTTP headers to the request. 7660func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header { 7661 if c.header_ == nil { 7662 c.header_ = make(http.Header) 7663 } 7664 return c.header_ 7665} 7666 7667func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) { 7668 reqHeaders := make(http.Header) 7669 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7670 for k, v := range c.header_ { 7671 reqHeaders[k] = v 7672 } 7673 reqHeaders.Set("User-Agent", c.s.userAgent()) 7674 var body io.Reader = nil 7675 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) 7676 if err != nil { 7677 return nil, err 7678 } 7679 reqHeaders.Set("Content-Type", "application/json") 7680 c.urlParams_.Set("alt", alt) 7681 c.urlParams_.Set("prettyPrint", "false") 7682 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLegacyAbac") 7683 urls += "?" + c.urlParams_.Encode() 7684 req, err := http.NewRequest("POST", urls, body) 7685 if err != nil { 7686 return nil, err 7687 } 7688 req.Header = reqHeaders 7689 googleapi.Expand(req.URL, map[string]string{ 7690 "name": c.name, 7691 }) 7692 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7693} 7694 7695// Do executes the "container.projects.locations.clusters.setLegacyAbac" call. 7696// Exactly one of *Operation or error will be non-nil. Any non-2xx 7697// status code is an error. Response headers are in either 7698// *Operation.ServerResponse.Header or (if a response was returned at 7699// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7700// to check whether the returned error was because 7701// http.StatusNotModified was returned. 7702func (c *ProjectsLocationsClustersSetLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7703 gensupport.SetOptions(c.urlParams_, opts...) 7704 res, err := c.doRequest("json") 7705 if res != nil && res.StatusCode == http.StatusNotModified { 7706 if res.Body != nil { 7707 res.Body.Close() 7708 } 7709 return nil, &googleapi.Error{ 7710 Code: res.StatusCode, 7711 Header: res.Header, 7712 } 7713 } 7714 if err != nil { 7715 return nil, err 7716 } 7717 defer googleapi.CloseBody(res) 7718 if err := googleapi.CheckResponse(res); err != nil { 7719 return nil, err 7720 } 7721 ret := &Operation{ 7722 ServerResponse: googleapi.ServerResponse{ 7723 Header: res.Header, 7724 HTTPStatusCode: res.StatusCode, 7725 }, 7726 } 7727 target := &ret 7728 if err := gensupport.DecodeResponse(target, res); err != nil { 7729 return nil, err 7730 } 7731 return ret, nil 7732 // { 7733 // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", 7734 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac", 7735 // "httpMethod": "POST", 7736 // "id": "container.projects.locations.clusters.setLegacyAbac", 7737 // "parameterOrder": [ 7738 // "name" 7739 // ], 7740 // "parameters": { 7741 // "name": { 7742 // "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7743 // "location": "path", 7744 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7745 // "required": true, 7746 // "type": "string" 7747 // } 7748 // }, 7749 // "path": "v1beta1/{+name}:setLegacyAbac", 7750 // "request": { 7751 // "$ref": "SetLegacyAbacRequest" 7752 // }, 7753 // "response": { 7754 // "$ref": "Operation" 7755 // }, 7756 // "scopes": [ 7757 // "https://www.googleapis.com/auth/cloud-platform" 7758 // ] 7759 // } 7760 7761} 7762 7763// method id "container.projects.locations.clusters.setLocations": 7764 7765type ProjectsLocationsClustersSetLocationsCall struct { 7766 s *Service 7767 name string 7768 setlocationsrequest *SetLocationsRequest 7769 urlParams_ gensupport.URLParams 7770 ctx_ context.Context 7771 header_ http.Header 7772} 7773 7774// SetLocations: Sets the locations for a specific cluster. 7775// Deprecated. 7776// Use 7777// [projects.locations.clusters.update](https://cloud.google.com/kube 7778// rnetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/ 7779// update) 7780// instead. 7781func (r *ProjectsLocationsClustersService) SetLocations(name string, setlocationsrequest *SetLocationsRequest) *ProjectsLocationsClustersSetLocationsCall { 7782 c := &ProjectsLocationsClustersSetLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7783 c.name = name 7784 c.setlocationsrequest = setlocationsrequest 7785 return c 7786} 7787 7788// Fields allows partial responses to be retrieved. See 7789// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7790// for more information. 7791func (c *ProjectsLocationsClustersSetLocationsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLocationsCall { 7792 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7793 return c 7794} 7795 7796// Context sets the context to be used in this call's Do method. Any 7797// pending HTTP request will be aborted if the provided context is 7798// canceled. 7799func (c *ProjectsLocationsClustersSetLocationsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLocationsCall { 7800 c.ctx_ = ctx 7801 return c 7802} 7803 7804// Header returns an http.Header that can be modified by the caller to 7805// add HTTP headers to the request. 7806func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header { 7807 if c.header_ == nil { 7808 c.header_ = make(http.Header) 7809 } 7810 return c.header_ 7811} 7812 7813func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) { 7814 reqHeaders := make(http.Header) 7815 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7816 for k, v := range c.header_ { 7817 reqHeaders[k] = v 7818 } 7819 reqHeaders.Set("User-Agent", c.s.userAgent()) 7820 var body io.Reader = nil 7821 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) 7822 if err != nil { 7823 return nil, err 7824 } 7825 reqHeaders.Set("Content-Type", "application/json") 7826 c.urlParams_.Set("alt", alt) 7827 c.urlParams_.Set("prettyPrint", "false") 7828 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLocations") 7829 urls += "?" + c.urlParams_.Encode() 7830 req, err := http.NewRequest("POST", urls, body) 7831 if err != nil { 7832 return nil, err 7833 } 7834 req.Header = reqHeaders 7835 googleapi.Expand(req.URL, map[string]string{ 7836 "name": c.name, 7837 }) 7838 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7839} 7840 7841// Do executes the "container.projects.locations.clusters.setLocations" call. 7842// Exactly one of *Operation or error will be non-nil. Any non-2xx 7843// status code is an error. Response headers are in either 7844// *Operation.ServerResponse.Header or (if a response was returned at 7845// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7846// to check whether the returned error was because 7847// http.StatusNotModified was returned. 7848func (c *ProjectsLocationsClustersSetLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7849 gensupport.SetOptions(c.urlParams_, opts...) 7850 res, err := c.doRequest("json") 7851 if res != nil && res.StatusCode == http.StatusNotModified { 7852 if res.Body != nil { 7853 res.Body.Close() 7854 } 7855 return nil, &googleapi.Error{ 7856 Code: res.StatusCode, 7857 Header: res.Header, 7858 } 7859 } 7860 if err != nil { 7861 return nil, err 7862 } 7863 defer googleapi.CloseBody(res) 7864 if err := googleapi.CheckResponse(res); err != nil { 7865 return nil, err 7866 } 7867 ret := &Operation{ 7868 ServerResponse: googleapi.ServerResponse{ 7869 Header: res.Header, 7870 HTTPStatusCode: res.StatusCode, 7871 }, 7872 } 7873 target := &ret 7874 if err := gensupport.DecodeResponse(target, res); err != nil { 7875 return nil, err 7876 } 7877 return ret, nil 7878 // { 7879 // "description": "Sets the locations for a specific cluster.\nDeprecated. Use\n[projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update)\ninstead.", 7880 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLocations", 7881 // "httpMethod": "POST", 7882 // "id": "container.projects.locations.clusters.setLocations", 7883 // "parameterOrder": [ 7884 // "name" 7885 // ], 7886 // "parameters": { 7887 // "name": { 7888 // "description": "The name (project, location, cluster) of the cluster to set locations.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 7889 // "location": "path", 7890 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 7891 // "required": true, 7892 // "type": "string" 7893 // } 7894 // }, 7895 // "path": "v1beta1/{+name}:setLocations", 7896 // "request": { 7897 // "$ref": "SetLocationsRequest" 7898 // }, 7899 // "response": { 7900 // "$ref": "Operation" 7901 // }, 7902 // "scopes": [ 7903 // "https://www.googleapis.com/auth/cloud-platform" 7904 // ] 7905 // } 7906 7907} 7908 7909// method id "container.projects.locations.clusters.setLogging": 7910 7911type ProjectsLocationsClustersSetLoggingCall struct { 7912 s *Service 7913 name string 7914 setloggingservicerequest *SetLoggingServiceRequest 7915 urlParams_ gensupport.URLParams 7916 ctx_ context.Context 7917 header_ http.Header 7918} 7919 7920// SetLogging: Sets the logging service for a specific cluster. 7921func (r *ProjectsLocationsClustersService) SetLogging(name string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsLocationsClustersSetLoggingCall { 7922 c := &ProjectsLocationsClustersSetLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7923 c.name = name 7924 c.setloggingservicerequest = setloggingservicerequest 7925 return c 7926} 7927 7928// Fields allows partial responses to be retrieved. See 7929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7930// for more information. 7931func (c *ProjectsLocationsClustersSetLoggingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLoggingCall { 7932 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7933 return c 7934} 7935 7936// Context sets the context to be used in this call's Do method. Any 7937// pending HTTP request will be aborted if the provided context is 7938// canceled. 7939func (c *ProjectsLocationsClustersSetLoggingCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLoggingCall { 7940 c.ctx_ = ctx 7941 return c 7942} 7943 7944// Header returns an http.Header that can be modified by the caller to 7945// add HTTP headers to the request. 7946func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header { 7947 if c.header_ == nil { 7948 c.header_ = make(http.Header) 7949 } 7950 return c.header_ 7951} 7952 7953func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) { 7954 reqHeaders := make(http.Header) 7955 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 7956 for k, v := range c.header_ { 7957 reqHeaders[k] = v 7958 } 7959 reqHeaders.Set("User-Agent", c.s.userAgent()) 7960 var body io.Reader = nil 7961 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) 7962 if err != nil { 7963 return nil, err 7964 } 7965 reqHeaders.Set("Content-Type", "application/json") 7966 c.urlParams_.Set("alt", alt) 7967 c.urlParams_.Set("prettyPrint", "false") 7968 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLogging") 7969 urls += "?" + c.urlParams_.Encode() 7970 req, err := http.NewRequest("POST", urls, body) 7971 if err != nil { 7972 return nil, err 7973 } 7974 req.Header = reqHeaders 7975 googleapi.Expand(req.URL, map[string]string{ 7976 "name": c.name, 7977 }) 7978 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7979} 7980 7981// Do executes the "container.projects.locations.clusters.setLogging" call. 7982// Exactly one of *Operation or error will be non-nil. Any non-2xx 7983// status code is an error. Response headers are in either 7984// *Operation.ServerResponse.Header or (if a response was returned at 7985// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7986// to check whether the returned error was because 7987// http.StatusNotModified was returned. 7988func (c *ProjectsLocationsClustersSetLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7989 gensupport.SetOptions(c.urlParams_, opts...) 7990 res, err := c.doRequest("json") 7991 if res != nil && res.StatusCode == http.StatusNotModified { 7992 if res.Body != nil { 7993 res.Body.Close() 7994 } 7995 return nil, &googleapi.Error{ 7996 Code: res.StatusCode, 7997 Header: res.Header, 7998 } 7999 } 8000 if err != nil { 8001 return nil, err 8002 } 8003 defer googleapi.CloseBody(res) 8004 if err := googleapi.CheckResponse(res); err != nil { 8005 return nil, err 8006 } 8007 ret := &Operation{ 8008 ServerResponse: googleapi.ServerResponse{ 8009 Header: res.Header, 8010 HTTPStatusCode: res.StatusCode, 8011 }, 8012 } 8013 target := &ret 8014 if err := gensupport.DecodeResponse(target, res); err != nil { 8015 return nil, err 8016 } 8017 return ret, nil 8018 // { 8019 // "description": "Sets the logging service for a specific cluster.", 8020 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLogging", 8021 // "httpMethod": "POST", 8022 // "id": "container.projects.locations.clusters.setLogging", 8023 // "parameterOrder": [ 8024 // "name" 8025 // ], 8026 // "parameters": { 8027 // "name": { 8028 // "description": "The name (project, location, cluster) of the cluster to set logging.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8029 // "location": "path", 8030 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8031 // "required": true, 8032 // "type": "string" 8033 // } 8034 // }, 8035 // "path": "v1beta1/{+name}:setLogging", 8036 // "request": { 8037 // "$ref": "SetLoggingServiceRequest" 8038 // }, 8039 // "response": { 8040 // "$ref": "Operation" 8041 // }, 8042 // "scopes": [ 8043 // "https://www.googleapis.com/auth/cloud-platform" 8044 // ] 8045 // } 8046 8047} 8048 8049// method id "container.projects.locations.clusters.setMaintenancePolicy": 8050 8051type ProjectsLocationsClustersSetMaintenancePolicyCall struct { 8052 s *Service 8053 name string 8054 setmaintenancepolicyrequest *SetMaintenancePolicyRequest 8055 urlParams_ gensupport.URLParams 8056 ctx_ context.Context 8057 header_ http.Header 8058} 8059 8060// SetMaintenancePolicy: Sets the maintenance policy for a cluster. 8061func (r *ProjectsLocationsClustersService) SetMaintenancePolicy(name string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsLocationsClustersSetMaintenancePolicyCall { 8062 c := &ProjectsLocationsClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8063 c.name = name 8064 c.setmaintenancepolicyrequest = setmaintenancepolicyrequest 8065 return c 8066} 8067 8068// Fields allows partial responses to be retrieved. See 8069// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8070// for more information. 8071func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMaintenancePolicyCall { 8072 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8073 return c 8074} 8075 8076// Context sets the context to be used in this call's Do method. Any 8077// pending HTTP request will be aborted if the provided context is 8078// canceled. 8079func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMaintenancePolicyCall { 8080 c.ctx_ = ctx 8081 return c 8082} 8083 8084// Header returns an http.Header that can be modified by the caller to 8085// add HTTP headers to the request. 8086func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header { 8087 if c.header_ == nil { 8088 c.header_ = make(http.Header) 8089 } 8090 return c.header_ 8091} 8092 8093func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { 8094 reqHeaders := make(http.Header) 8095 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8096 for k, v := range c.header_ { 8097 reqHeaders[k] = v 8098 } 8099 reqHeaders.Set("User-Agent", c.s.userAgent()) 8100 var body io.Reader = nil 8101 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest) 8102 if err != nil { 8103 return nil, err 8104 } 8105 reqHeaders.Set("Content-Type", "application/json") 8106 c.urlParams_.Set("alt", alt) 8107 c.urlParams_.Set("prettyPrint", "false") 8108 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMaintenancePolicy") 8109 urls += "?" + c.urlParams_.Encode() 8110 req, err := http.NewRequest("POST", urls, body) 8111 if err != nil { 8112 return nil, err 8113 } 8114 req.Header = reqHeaders 8115 googleapi.Expand(req.URL, map[string]string{ 8116 "name": c.name, 8117 }) 8118 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8119} 8120 8121// Do executes the "container.projects.locations.clusters.setMaintenancePolicy" call. 8122// Exactly one of *Operation or error will be non-nil. Any non-2xx 8123// status code is an error. Response headers are in either 8124// *Operation.ServerResponse.Header or (if a response was returned at 8125// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8126// to check whether the returned error was because 8127// http.StatusNotModified was returned. 8128func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8129 gensupport.SetOptions(c.urlParams_, opts...) 8130 res, err := c.doRequest("json") 8131 if res != nil && res.StatusCode == http.StatusNotModified { 8132 if res.Body != nil { 8133 res.Body.Close() 8134 } 8135 return nil, &googleapi.Error{ 8136 Code: res.StatusCode, 8137 Header: res.Header, 8138 } 8139 } 8140 if err != nil { 8141 return nil, err 8142 } 8143 defer googleapi.CloseBody(res) 8144 if err := googleapi.CheckResponse(res); err != nil { 8145 return nil, err 8146 } 8147 ret := &Operation{ 8148 ServerResponse: googleapi.ServerResponse{ 8149 Header: res.Header, 8150 HTTPStatusCode: res.StatusCode, 8151 }, 8152 } 8153 target := &ret 8154 if err := gensupport.DecodeResponse(target, res); err != nil { 8155 return nil, err 8156 } 8157 return ret, nil 8158 // { 8159 // "description": "Sets the maintenance policy for a cluster.", 8160 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMaintenancePolicy", 8161 // "httpMethod": "POST", 8162 // "id": "container.projects.locations.clusters.setMaintenancePolicy", 8163 // "parameterOrder": [ 8164 // "name" 8165 // ], 8166 // "parameters": { 8167 // "name": { 8168 // "description": "The name (project, location, cluster id) of the cluster to set maintenance\npolicy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8169 // "location": "path", 8170 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8171 // "required": true, 8172 // "type": "string" 8173 // } 8174 // }, 8175 // "path": "v1beta1/{+name}:setMaintenancePolicy", 8176 // "request": { 8177 // "$ref": "SetMaintenancePolicyRequest" 8178 // }, 8179 // "response": { 8180 // "$ref": "Operation" 8181 // }, 8182 // "scopes": [ 8183 // "https://www.googleapis.com/auth/cloud-platform" 8184 // ] 8185 // } 8186 8187} 8188 8189// method id "container.projects.locations.clusters.setMasterAuth": 8190 8191type ProjectsLocationsClustersSetMasterAuthCall struct { 8192 s *Service 8193 name string 8194 setmasterauthrequest *SetMasterAuthRequest 8195 urlParams_ gensupport.URLParams 8196 ctx_ context.Context 8197 header_ http.Header 8198} 8199 8200// SetMasterAuth: Sets master auth materials. Currently supports 8201// changing the admin password 8202// or a specific cluster, either via password generation or explicitly 8203// setting 8204// the password. 8205func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { 8206 c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8207 c.name = name 8208 c.setmasterauthrequest = setmasterauthrequest 8209 return c 8210} 8211 8212// Fields allows partial responses to be retrieved. See 8213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8214// for more information. 8215func (c *ProjectsLocationsClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMasterAuthCall { 8216 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8217 return c 8218} 8219 8220// Context sets the context to be used in this call's Do method. Any 8221// pending HTTP request will be aborted if the provided context is 8222// canceled. 8223func (c *ProjectsLocationsClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMasterAuthCall { 8224 c.ctx_ = ctx 8225 return c 8226} 8227 8228// Header returns an http.Header that can be modified by the caller to 8229// add HTTP headers to the request. 8230func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header { 8231 if c.header_ == nil { 8232 c.header_ = make(http.Header) 8233 } 8234 return c.header_ 8235} 8236 8237func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { 8238 reqHeaders := make(http.Header) 8239 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8240 for k, v := range c.header_ { 8241 reqHeaders[k] = v 8242 } 8243 reqHeaders.Set("User-Agent", c.s.userAgent()) 8244 var body io.Reader = nil 8245 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) 8246 if err != nil { 8247 return nil, err 8248 } 8249 reqHeaders.Set("Content-Type", "application/json") 8250 c.urlParams_.Set("alt", alt) 8251 c.urlParams_.Set("prettyPrint", "false") 8252 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMasterAuth") 8253 urls += "?" + c.urlParams_.Encode() 8254 req, err := http.NewRequest("POST", urls, body) 8255 if err != nil { 8256 return nil, err 8257 } 8258 req.Header = reqHeaders 8259 googleapi.Expand(req.URL, map[string]string{ 8260 "name": c.name, 8261 }) 8262 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8263} 8264 8265// Do executes the "container.projects.locations.clusters.setMasterAuth" call. 8266// Exactly one of *Operation or error will be non-nil. Any non-2xx 8267// status code is an error. Response headers are in either 8268// *Operation.ServerResponse.Header or (if a response was returned at 8269// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8270// to check whether the returned error was because 8271// http.StatusNotModified was returned. 8272func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8273 gensupport.SetOptions(c.urlParams_, opts...) 8274 res, err := c.doRequest("json") 8275 if res != nil && res.StatusCode == http.StatusNotModified { 8276 if res.Body != nil { 8277 res.Body.Close() 8278 } 8279 return nil, &googleapi.Error{ 8280 Code: res.StatusCode, 8281 Header: res.Header, 8282 } 8283 } 8284 if err != nil { 8285 return nil, err 8286 } 8287 defer googleapi.CloseBody(res) 8288 if err := googleapi.CheckResponse(res); err != nil { 8289 return nil, err 8290 } 8291 ret := &Operation{ 8292 ServerResponse: googleapi.ServerResponse{ 8293 Header: res.Header, 8294 HTTPStatusCode: res.StatusCode, 8295 }, 8296 } 8297 target := &ret 8298 if err := gensupport.DecodeResponse(target, res); err != nil { 8299 return nil, err 8300 } 8301 return ret, nil 8302 // { 8303 // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", 8304 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", 8305 // "httpMethod": "POST", 8306 // "id": "container.projects.locations.clusters.setMasterAuth", 8307 // "parameterOrder": [ 8308 // "name" 8309 // ], 8310 // "parameters": { 8311 // "name": { 8312 // "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8313 // "location": "path", 8314 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8315 // "required": true, 8316 // "type": "string" 8317 // } 8318 // }, 8319 // "path": "v1beta1/{+name}:setMasterAuth", 8320 // "request": { 8321 // "$ref": "SetMasterAuthRequest" 8322 // }, 8323 // "response": { 8324 // "$ref": "Operation" 8325 // }, 8326 // "scopes": [ 8327 // "https://www.googleapis.com/auth/cloud-platform" 8328 // ] 8329 // } 8330 8331} 8332 8333// method id "container.projects.locations.clusters.setMonitoring": 8334 8335type ProjectsLocationsClustersSetMonitoringCall struct { 8336 s *Service 8337 name string 8338 setmonitoringservicerequest *SetMonitoringServiceRequest 8339 urlParams_ gensupport.URLParams 8340 ctx_ context.Context 8341 header_ http.Header 8342} 8343 8344// SetMonitoring: Sets the monitoring service for a specific cluster. 8345func (r *ProjectsLocationsClustersService) SetMonitoring(name string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsLocationsClustersSetMonitoringCall { 8346 c := &ProjectsLocationsClustersSetMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8347 c.name = name 8348 c.setmonitoringservicerequest = setmonitoringservicerequest 8349 return c 8350} 8351 8352// Fields allows partial responses to be retrieved. See 8353// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8354// for more information. 8355func (c *ProjectsLocationsClustersSetMonitoringCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMonitoringCall { 8356 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8357 return c 8358} 8359 8360// Context sets the context to be used in this call's Do method. Any 8361// pending HTTP request will be aborted if the provided context is 8362// canceled. 8363func (c *ProjectsLocationsClustersSetMonitoringCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMonitoringCall { 8364 c.ctx_ = ctx 8365 return c 8366} 8367 8368// Header returns an http.Header that can be modified by the caller to 8369// add HTTP headers to the request. 8370func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header { 8371 if c.header_ == nil { 8372 c.header_ = make(http.Header) 8373 } 8374 return c.header_ 8375} 8376 8377func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) { 8378 reqHeaders := make(http.Header) 8379 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8380 for k, v := range c.header_ { 8381 reqHeaders[k] = v 8382 } 8383 reqHeaders.Set("User-Agent", c.s.userAgent()) 8384 var body io.Reader = nil 8385 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) 8386 if err != nil { 8387 return nil, err 8388 } 8389 reqHeaders.Set("Content-Type", "application/json") 8390 c.urlParams_.Set("alt", alt) 8391 c.urlParams_.Set("prettyPrint", "false") 8392 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMonitoring") 8393 urls += "?" + c.urlParams_.Encode() 8394 req, err := http.NewRequest("POST", urls, body) 8395 if err != nil { 8396 return nil, err 8397 } 8398 req.Header = reqHeaders 8399 googleapi.Expand(req.URL, map[string]string{ 8400 "name": c.name, 8401 }) 8402 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8403} 8404 8405// Do executes the "container.projects.locations.clusters.setMonitoring" call. 8406// Exactly one of *Operation or error will be non-nil. Any non-2xx 8407// status code is an error. Response headers are in either 8408// *Operation.ServerResponse.Header or (if a response was returned at 8409// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8410// to check whether the returned error was because 8411// http.StatusNotModified was returned. 8412func (c *ProjectsLocationsClustersSetMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8413 gensupport.SetOptions(c.urlParams_, opts...) 8414 res, err := c.doRequest("json") 8415 if res != nil && res.StatusCode == http.StatusNotModified { 8416 if res.Body != nil { 8417 res.Body.Close() 8418 } 8419 return nil, &googleapi.Error{ 8420 Code: res.StatusCode, 8421 Header: res.Header, 8422 } 8423 } 8424 if err != nil { 8425 return nil, err 8426 } 8427 defer googleapi.CloseBody(res) 8428 if err := googleapi.CheckResponse(res); err != nil { 8429 return nil, err 8430 } 8431 ret := &Operation{ 8432 ServerResponse: googleapi.ServerResponse{ 8433 Header: res.Header, 8434 HTTPStatusCode: res.StatusCode, 8435 }, 8436 } 8437 target := &ret 8438 if err := gensupport.DecodeResponse(target, res); err != nil { 8439 return nil, err 8440 } 8441 return ret, nil 8442 // { 8443 // "description": "Sets the monitoring service for a specific cluster.", 8444 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMonitoring", 8445 // "httpMethod": "POST", 8446 // "id": "container.projects.locations.clusters.setMonitoring", 8447 // "parameterOrder": [ 8448 // "name" 8449 // ], 8450 // "parameters": { 8451 // "name": { 8452 // "description": "The name (project, location, cluster) of the cluster to set monitoring.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8453 // "location": "path", 8454 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8455 // "required": true, 8456 // "type": "string" 8457 // } 8458 // }, 8459 // "path": "v1beta1/{+name}:setMonitoring", 8460 // "request": { 8461 // "$ref": "SetMonitoringServiceRequest" 8462 // }, 8463 // "response": { 8464 // "$ref": "Operation" 8465 // }, 8466 // "scopes": [ 8467 // "https://www.googleapis.com/auth/cloud-platform" 8468 // ] 8469 // } 8470 8471} 8472 8473// method id "container.projects.locations.clusters.setNetworkPolicy": 8474 8475type ProjectsLocationsClustersSetNetworkPolicyCall struct { 8476 s *Service 8477 name string 8478 setnetworkpolicyrequest *SetNetworkPolicyRequest 8479 urlParams_ gensupport.URLParams 8480 ctx_ context.Context 8481 header_ http.Header 8482} 8483 8484// SetNetworkPolicy: Enables or disables Network Policy for a cluster. 8485func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { 8486 c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8487 c.name = name 8488 c.setnetworkpolicyrequest = setnetworkpolicyrequest 8489 return c 8490} 8491 8492// Fields allows partial responses to be retrieved. See 8493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8494// for more information. 8495func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetNetworkPolicyCall { 8496 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8497 return c 8498} 8499 8500// Context sets the context to be used in this call's Do method. Any 8501// pending HTTP request will be aborted if the provided context is 8502// canceled. 8503func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetNetworkPolicyCall { 8504 c.ctx_ = ctx 8505 return c 8506} 8507 8508// Header returns an http.Header that can be modified by the caller to 8509// add HTTP headers to the request. 8510func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header { 8511 if c.header_ == nil { 8512 c.header_ = make(http.Header) 8513 } 8514 return c.header_ 8515} 8516 8517func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { 8518 reqHeaders := make(http.Header) 8519 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8520 for k, v := range c.header_ { 8521 reqHeaders[k] = v 8522 } 8523 reqHeaders.Set("User-Agent", c.s.userAgent()) 8524 var body io.Reader = nil 8525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) 8526 if err != nil { 8527 return nil, err 8528 } 8529 reqHeaders.Set("Content-Type", "application/json") 8530 c.urlParams_.Set("alt", alt) 8531 c.urlParams_.Set("prettyPrint", "false") 8532 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setNetworkPolicy") 8533 urls += "?" + c.urlParams_.Encode() 8534 req, err := http.NewRequest("POST", urls, body) 8535 if err != nil { 8536 return nil, err 8537 } 8538 req.Header = reqHeaders 8539 googleapi.Expand(req.URL, map[string]string{ 8540 "name": c.name, 8541 }) 8542 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8543} 8544 8545// Do executes the "container.projects.locations.clusters.setNetworkPolicy" call. 8546// Exactly one of *Operation or error will be non-nil. Any non-2xx 8547// status code is an error. Response headers are in either 8548// *Operation.ServerResponse.Header or (if a response was returned at 8549// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8550// to check whether the returned error was because 8551// http.StatusNotModified was returned. 8552func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8553 gensupport.SetOptions(c.urlParams_, opts...) 8554 res, err := c.doRequest("json") 8555 if res != nil && res.StatusCode == http.StatusNotModified { 8556 if res.Body != nil { 8557 res.Body.Close() 8558 } 8559 return nil, &googleapi.Error{ 8560 Code: res.StatusCode, 8561 Header: res.Header, 8562 } 8563 } 8564 if err != nil { 8565 return nil, err 8566 } 8567 defer googleapi.CloseBody(res) 8568 if err := googleapi.CheckResponse(res); err != nil { 8569 return nil, err 8570 } 8571 ret := &Operation{ 8572 ServerResponse: googleapi.ServerResponse{ 8573 Header: res.Header, 8574 HTTPStatusCode: res.StatusCode, 8575 }, 8576 } 8577 target := &ret 8578 if err := gensupport.DecodeResponse(target, res); err != nil { 8579 return nil, err 8580 } 8581 return ret, nil 8582 // { 8583 // "description": "Enables or disables Network Policy for a cluster.", 8584 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", 8585 // "httpMethod": "POST", 8586 // "id": "container.projects.locations.clusters.setNetworkPolicy", 8587 // "parameterOrder": [ 8588 // "name" 8589 // ], 8590 // "parameters": { 8591 // "name": { 8592 // "description": "The name (project, location, cluster id) of the cluster to set networking\npolicy. Specified in the format 'projects/*/locations/*/clusters/*'.", 8593 // "location": "path", 8594 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8595 // "required": true, 8596 // "type": "string" 8597 // } 8598 // }, 8599 // "path": "v1beta1/{+name}:setNetworkPolicy", 8600 // "request": { 8601 // "$ref": "SetNetworkPolicyRequest" 8602 // }, 8603 // "response": { 8604 // "$ref": "Operation" 8605 // }, 8606 // "scopes": [ 8607 // "https://www.googleapis.com/auth/cloud-platform" 8608 // ] 8609 // } 8610 8611} 8612 8613// method id "container.projects.locations.clusters.setResourceLabels": 8614 8615type ProjectsLocationsClustersSetResourceLabelsCall struct { 8616 s *Service 8617 name string 8618 setlabelsrequest *SetLabelsRequest 8619 urlParams_ gensupport.URLParams 8620 ctx_ context.Context 8621 header_ http.Header 8622} 8623 8624// SetResourceLabels: Sets labels on a cluster. 8625func (r *ProjectsLocationsClustersService) SetResourceLabels(name string, setlabelsrequest *SetLabelsRequest) *ProjectsLocationsClustersSetResourceLabelsCall { 8626 c := &ProjectsLocationsClustersSetResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8627 c.name = name 8628 c.setlabelsrequest = setlabelsrequest 8629 return c 8630} 8631 8632// Fields allows partial responses to be retrieved. See 8633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8634// for more information. 8635func (c *ProjectsLocationsClustersSetResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetResourceLabelsCall { 8636 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8637 return c 8638} 8639 8640// Context sets the context to be used in this call's Do method. Any 8641// pending HTTP request will be aborted if the provided context is 8642// canceled. 8643func (c *ProjectsLocationsClustersSetResourceLabelsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetResourceLabelsCall { 8644 c.ctx_ = ctx 8645 return c 8646} 8647 8648// Header returns an http.Header that can be modified by the caller to 8649// add HTTP headers to the request. 8650func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header { 8651 if c.header_ == nil { 8652 c.header_ = make(http.Header) 8653 } 8654 return c.header_ 8655} 8656 8657func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) { 8658 reqHeaders := make(http.Header) 8659 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8660 for k, v := range c.header_ { 8661 reqHeaders[k] = v 8662 } 8663 reqHeaders.Set("User-Agent", c.s.userAgent()) 8664 var body io.Reader = nil 8665 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) 8666 if err != nil { 8667 return nil, err 8668 } 8669 reqHeaders.Set("Content-Type", "application/json") 8670 c.urlParams_.Set("alt", alt) 8671 c.urlParams_.Set("prettyPrint", "false") 8672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setResourceLabels") 8673 urls += "?" + c.urlParams_.Encode() 8674 req, err := http.NewRequest("POST", urls, body) 8675 if err != nil { 8676 return nil, err 8677 } 8678 req.Header = reqHeaders 8679 googleapi.Expand(req.URL, map[string]string{ 8680 "name": c.name, 8681 }) 8682 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8683} 8684 8685// Do executes the "container.projects.locations.clusters.setResourceLabels" call. 8686// Exactly one of *Operation or error will be non-nil. Any non-2xx 8687// status code is an error. Response headers are in either 8688// *Operation.ServerResponse.Header or (if a response was returned at 8689// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8690// to check whether the returned error was because 8691// http.StatusNotModified was returned. 8692func (c *ProjectsLocationsClustersSetResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8693 gensupport.SetOptions(c.urlParams_, opts...) 8694 res, err := c.doRequest("json") 8695 if res != nil && res.StatusCode == http.StatusNotModified { 8696 if res.Body != nil { 8697 res.Body.Close() 8698 } 8699 return nil, &googleapi.Error{ 8700 Code: res.StatusCode, 8701 Header: res.Header, 8702 } 8703 } 8704 if err != nil { 8705 return nil, err 8706 } 8707 defer googleapi.CloseBody(res) 8708 if err := googleapi.CheckResponse(res); err != nil { 8709 return nil, err 8710 } 8711 ret := &Operation{ 8712 ServerResponse: googleapi.ServerResponse{ 8713 Header: res.Header, 8714 HTTPStatusCode: res.StatusCode, 8715 }, 8716 } 8717 target := &ret 8718 if err := gensupport.DecodeResponse(target, res); err != nil { 8719 return nil, err 8720 } 8721 return ret, nil 8722 // { 8723 // "description": "Sets labels on a cluster.", 8724 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels", 8725 // "httpMethod": "POST", 8726 // "id": "container.projects.locations.clusters.setResourceLabels", 8727 // "parameterOrder": [ 8728 // "name" 8729 // ], 8730 // "parameters": { 8731 // "name": { 8732 // "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 8733 // "location": "path", 8734 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8735 // "required": true, 8736 // "type": "string" 8737 // } 8738 // }, 8739 // "path": "v1beta1/{+name}:setResourceLabels", 8740 // "request": { 8741 // "$ref": "SetLabelsRequest" 8742 // }, 8743 // "response": { 8744 // "$ref": "Operation" 8745 // }, 8746 // "scopes": [ 8747 // "https://www.googleapis.com/auth/cloud-platform" 8748 // ] 8749 // } 8750 8751} 8752 8753// method id "container.projects.locations.clusters.startIpRotation": 8754 8755type ProjectsLocationsClustersStartIpRotationCall struct { 8756 s *Service 8757 name string 8758 startiprotationrequest *StartIPRotationRequest 8759 urlParams_ gensupport.URLParams 8760 ctx_ context.Context 8761 header_ http.Header 8762} 8763 8764// StartIpRotation: Starts master IP rotation. 8765func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { 8766 c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8767 c.name = name 8768 c.startiprotationrequest = startiprotationrequest 8769 return c 8770} 8771 8772// Fields allows partial responses to be retrieved. See 8773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8774// for more information. 8775func (c *ProjectsLocationsClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersStartIpRotationCall { 8776 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8777 return c 8778} 8779 8780// Context sets the context to be used in this call's Do method. Any 8781// pending HTTP request will be aborted if the provided context is 8782// canceled. 8783func (c *ProjectsLocationsClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersStartIpRotationCall { 8784 c.ctx_ = ctx 8785 return c 8786} 8787 8788// Header returns an http.Header that can be modified by the caller to 8789// add HTTP headers to the request. 8790func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header { 8791 if c.header_ == nil { 8792 c.header_ = make(http.Header) 8793 } 8794 return c.header_ 8795} 8796 8797func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { 8798 reqHeaders := make(http.Header) 8799 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8800 for k, v := range c.header_ { 8801 reqHeaders[k] = v 8802 } 8803 reqHeaders.Set("User-Agent", c.s.userAgent()) 8804 var body io.Reader = nil 8805 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) 8806 if err != nil { 8807 return nil, err 8808 } 8809 reqHeaders.Set("Content-Type", "application/json") 8810 c.urlParams_.Set("alt", alt) 8811 c.urlParams_.Set("prettyPrint", "false") 8812 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:startIpRotation") 8813 urls += "?" + c.urlParams_.Encode() 8814 req, err := http.NewRequest("POST", urls, body) 8815 if err != nil { 8816 return nil, err 8817 } 8818 req.Header = reqHeaders 8819 googleapi.Expand(req.URL, map[string]string{ 8820 "name": c.name, 8821 }) 8822 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8823} 8824 8825// Do executes the "container.projects.locations.clusters.startIpRotation" call. 8826// Exactly one of *Operation or error will be non-nil. Any non-2xx 8827// status code is an error. Response headers are in either 8828// *Operation.ServerResponse.Header or (if a response was returned at 8829// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8830// to check whether the returned error was because 8831// http.StatusNotModified was returned. 8832func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8833 gensupport.SetOptions(c.urlParams_, opts...) 8834 res, err := c.doRequest("json") 8835 if res != nil && res.StatusCode == http.StatusNotModified { 8836 if res.Body != nil { 8837 res.Body.Close() 8838 } 8839 return nil, &googleapi.Error{ 8840 Code: res.StatusCode, 8841 Header: res.Header, 8842 } 8843 } 8844 if err != nil { 8845 return nil, err 8846 } 8847 defer googleapi.CloseBody(res) 8848 if err := googleapi.CheckResponse(res); err != nil { 8849 return nil, err 8850 } 8851 ret := &Operation{ 8852 ServerResponse: googleapi.ServerResponse{ 8853 Header: res.Header, 8854 HTTPStatusCode: res.StatusCode, 8855 }, 8856 } 8857 target := &ret 8858 if err := gensupport.DecodeResponse(target, res); err != nil { 8859 return nil, err 8860 } 8861 return ret, nil 8862 // { 8863 // "description": "Starts master IP rotation.", 8864 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", 8865 // "httpMethod": "POST", 8866 // "id": "container.projects.locations.clusters.startIpRotation", 8867 // "parameterOrder": [ 8868 // "name" 8869 // ], 8870 // "parameters": { 8871 // "name": { 8872 // "description": "The name (project, location, cluster id) of the cluster to start IP\nrotation. Specified in the format 'projects/*/locations/*/clusters/*'.", 8873 // "location": "path", 8874 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 8875 // "required": true, 8876 // "type": "string" 8877 // } 8878 // }, 8879 // "path": "v1beta1/{+name}:startIpRotation", 8880 // "request": { 8881 // "$ref": "StartIPRotationRequest" 8882 // }, 8883 // "response": { 8884 // "$ref": "Operation" 8885 // }, 8886 // "scopes": [ 8887 // "https://www.googleapis.com/auth/cloud-platform" 8888 // ] 8889 // } 8890 8891} 8892 8893// method id "container.projects.locations.clusters.update": 8894 8895type ProjectsLocationsClustersUpdateCall struct { 8896 s *Service 8897 name string 8898 updateclusterrequest *UpdateClusterRequest 8899 urlParams_ gensupport.URLParams 8900 ctx_ context.Context 8901 header_ http.Header 8902} 8903 8904// Update: Updates the settings for a specific cluster. 8905func (r *ProjectsLocationsClustersService) Update(name string, updateclusterrequest *UpdateClusterRequest) *ProjectsLocationsClustersUpdateCall { 8906 c := &ProjectsLocationsClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8907 c.name = name 8908 c.updateclusterrequest = updateclusterrequest 8909 return c 8910} 8911 8912// Fields allows partial responses to be retrieved. See 8913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8914// for more information. 8915func (c *ProjectsLocationsClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateCall { 8916 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8917 return c 8918} 8919 8920// Context sets the context to be used in this call's Do method. Any 8921// pending HTTP request will be aborted if the provided context is 8922// canceled. 8923func (c *ProjectsLocationsClustersUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateCall { 8924 c.ctx_ = ctx 8925 return c 8926} 8927 8928// Header returns an http.Header that can be modified by the caller to 8929// add HTTP headers to the request. 8930func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header { 8931 if c.header_ == nil { 8932 c.header_ = make(http.Header) 8933 } 8934 return c.header_ 8935} 8936 8937func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) { 8938 reqHeaders := make(http.Header) 8939 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 8940 for k, v := range c.header_ { 8941 reqHeaders[k] = v 8942 } 8943 reqHeaders.Set("User-Agent", c.s.userAgent()) 8944 var body io.Reader = nil 8945 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) 8946 if err != nil { 8947 return nil, err 8948 } 8949 reqHeaders.Set("Content-Type", "application/json") 8950 c.urlParams_.Set("alt", alt) 8951 c.urlParams_.Set("prettyPrint", "false") 8952 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8953 urls += "?" + c.urlParams_.Encode() 8954 req, err := http.NewRequest("PUT", urls, body) 8955 if err != nil { 8956 return nil, err 8957 } 8958 req.Header = reqHeaders 8959 googleapi.Expand(req.URL, map[string]string{ 8960 "name": c.name, 8961 }) 8962 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8963} 8964 8965// Do executes the "container.projects.locations.clusters.update" call. 8966// Exactly one of *Operation or error will be non-nil. Any non-2xx 8967// status code is an error. Response headers are in either 8968// *Operation.ServerResponse.Header or (if a response was returned at 8969// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8970// to check whether the returned error was because 8971// http.StatusNotModified was returned. 8972func (c *ProjectsLocationsClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8973 gensupport.SetOptions(c.urlParams_, opts...) 8974 res, err := c.doRequest("json") 8975 if res != nil && res.StatusCode == http.StatusNotModified { 8976 if res.Body != nil { 8977 res.Body.Close() 8978 } 8979 return nil, &googleapi.Error{ 8980 Code: res.StatusCode, 8981 Header: res.Header, 8982 } 8983 } 8984 if err != nil { 8985 return nil, err 8986 } 8987 defer googleapi.CloseBody(res) 8988 if err := googleapi.CheckResponse(res); err != nil { 8989 return nil, err 8990 } 8991 ret := &Operation{ 8992 ServerResponse: googleapi.ServerResponse{ 8993 Header: res.Header, 8994 HTTPStatusCode: res.StatusCode, 8995 }, 8996 } 8997 target := &ret 8998 if err := gensupport.DecodeResponse(target, res); err != nil { 8999 return nil, err 9000 } 9001 return ret, nil 9002 // { 9003 // "description": "Updates the settings for a specific cluster.", 9004 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", 9005 // "httpMethod": "PUT", 9006 // "id": "container.projects.locations.clusters.update", 9007 // "parameterOrder": [ 9008 // "name" 9009 // ], 9010 // "parameters": { 9011 // "name": { 9012 // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 9013 // "location": "path", 9014 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 9015 // "required": true, 9016 // "type": "string" 9017 // } 9018 // }, 9019 // "path": "v1beta1/{+name}", 9020 // "request": { 9021 // "$ref": "UpdateClusterRequest" 9022 // }, 9023 // "response": { 9024 // "$ref": "Operation" 9025 // }, 9026 // "scopes": [ 9027 // "https://www.googleapis.com/auth/cloud-platform" 9028 // ] 9029 // } 9030 9031} 9032 9033// method id "container.projects.locations.clusters.updateMaster": 9034 9035type ProjectsLocationsClustersUpdateMasterCall struct { 9036 s *Service 9037 name string 9038 updatemasterrequest *UpdateMasterRequest 9039 urlParams_ gensupport.URLParams 9040 ctx_ context.Context 9041 header_ http.Header 9042} 9043 9044// UpdateMaster: Updates the master for a specific cluster. 9045func (r *ProjectsLocationsClustersService) UpdateMaster(name string, updatemasterrequest *UpdateMasterRequest) *ProjectsLocationsClustersUpdateMasterCall { 9046 c := &ProjectsLocationsClustersUpdateMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9047 c.name = name 9048 c.updatemasterrequest = updatemasterrequest 9049 return c 9050} 9051 9052// Fields allows partial responses to be retrieved. See 9053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9054// for more information. 9055func (c *ProjectsLocationsClustersUpdateMasterCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateMasterCall { 9056 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9057 return c 9058} 9059 9060// Context sets the context to be used in this call's Do method. Any 9061// pending HTTP request will be aborted if the provided context is 9062// canceled. 9063func (c *ProjectsLocationsClustersUpdateMasterCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateMasterCall { 9064 c.ctx_ = ctx 9065 return c 9066} 9067 9068// Header returns an http.Header that can be modified by the caller to 9069// add HTTP headers to the request. 9070func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header { 9071 if c.header_ == nil { 9072 c.header_ = make(http.Header) 9073 } 9074 return c.header_ 9075} 9076 9077func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) { 9078 reqHeaders := make(http.Header) 9079 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 9080 for k, v := range c.header_ { 9081 reqHeaders[k] = v 9082 } 9083 reqHeaders.Set("User-Agent", c.s.userAgent()) 9084 var body io.Reader = nil 9085 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) 9086 if err != nil { 9087 return nil, err 9088 } 9089 reqHeaders.Set("Content-Type", "application/json") 9090 c.urlParams_.Set("alt", alt) 9091 c.urlParams_.Set("prettyPrint", "false") 9092 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:updateMaster") 9093 urls += "?" + c.urlParams_.Encode() 9094 req, err := http.NewRequest("POST", urls, body) 9095 if err != nil { 9096 return nil, err 9097 } 9098 req.Header = reqHeaders 9099 googleapi.Expand(req.URL, map[string]string{ 9100 "name": c.name, 9101 }) 9102 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9103} 9104 9105// Do executes the "container.projects.locations.clusters.updateMaster" call. 9106// Exactly one of *Operation or error will be non-nil. Any non-2xx 9107// status code is an error. Response headers are in either 9108// *Operation.ServerResponse.Header or (if a response was returned at 9109// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9110// to check whether the returned error was because 9111// http.StatusNotModified was returned. 9112func (c *ProjectsLocationsClustersUpdateMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9113 gensupport.SetOptions(c.urlParams_, opts...) 9114 res, err := c.doRequest("json") 9115 if res != nil && res.StatusCode == http.StatusNotModified { 9116 if res.Body != nil { 9117 res.Body.Close() 9118 } 9119 return nil, &googleapi.Error{ 9120 Code: res.StatusCode, 9121 Header: res.Header, 9122 } 9123 } 9124 if err != nil { 9125 return nil, err 9126 } 9127 defer googleapi.CloseBody(res) 9128 if err := googleapi.CheckResponse(res); err != nil { 9129 return nil, err 9130 } 9131 ret := &Operation{ 9132 ServerResponse: googleapi.ServerResponse{ 9133 Header: res.Header, 9134 HTTPStatusCode: res.StatusCode, 9135 }, 9136 } 9137 target := &ret 9138 if err := gensupport.DecodeResponse(target, res); err != nil { 9139 return nil, err 9140 } 9141 return ret, nil 9142 // { 9143 // "description": "Updates the master for a specific cluster.", 9144 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:updateMaster", 9145 // "httpMethod": "POST", 9146 // "id": "container.projects.locations.clusters.updateMaster", 9147 // "parameterOrder": [ 9148 // "name" 9149 // ], 9150 // "parameters": { 9151 // "name": { 9152 // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 9153 // "location": "path", 9154 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 9155 // "required": true, 9156 // "type": "string" 9157 // } 9158 // }, 9159 // "path": "v1beta1/{+name}:updateMaster", 9160 // "request": { 9161 // "$ref": "UpdateMasterRequest" 9162 // }, 9163 // "response": { 9164 // "$ref": "Operation" 9165 // }, 9166 // "scopes": [ 9167 // "https://www.googleapis.com/auth/cloud-platform" 9168 // ] 9169 // } 9170 9171} 9172 9173// method id "container.projects.locations.clusters.nodePools.create": 9174 9175type ProjectsLocationsClustersNodePoolsCreateCall struct { 9176 s *Service 9177 parent string 9178 createnodepoolrequest *CreateNodePoolRequest 9179 urlParams_ gensupport.URLParams 9180 ctx_ context.Context 9181 header_ http.Header 9182} 9183 9184// Create: Creates a node pool for a cluster. 9185func (r *ProjectsLocationsClustersNodePoolsService) Create(parent string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsLocationsClustersNodePoolsCreateCall { 9186 c := &ProjectsLocationsClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9187 c.parent = parent 9188 c.createnodepoolrequest = createnodepoolrequest 9189 return c 9190} 9191 9192// Fields allows partial responses to be retrieved. See 9193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9194// for more information. 9195func (c *ProjectsLocationsClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCreateCall { 9196 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9197 return c 9198} 9199 9200// Context sets the context to be used in this call's Do method. Any 9201// pending HTTP request will be aborted if the provided context is 9202// canceled. 9203func (c *ProjectsLocationsClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCreateCall { 9204 c.ctx_ = ctx 9205 return c 9206} 9207 9208// Header returns an http.Header that can be modified by the caller to 9209// add HTTP headers to the request. 9210func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header { 9211 if c.header_ == nil { 9212 c.header_ = make(http.Header) 9213 } 9214 return c.header_ 9215} 9216 9217func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { 9218 reqHeaders := make(http.Header) 9219 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 9220 for k, v := range c.header_ { 9221 reqHeaders[k] = v 9222 } 9223 reqHeaders.Set("User-Agent", c.s.userAgent()) 9224 var body io.Reader = nil 9225 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) 9226 if err != nil { 9227 return nil, err 9228 } 9229 reqHeaders.Set("Content-Type", "application/json") 9230 c.urlParams_.Set("alt", alt) 9231 c.urlParams_.Set("prettyPrint", "false") 9232 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") 9233 urls += "?" + c.urlParams_.Encode() 9234 req, err := http.NewRequest("POST", urls, body) 9235 if err != nil { 9236 return nil, err 9237 } 9238 req.Header = reqHeaders 9239 googleapi.Expand(req.URL, map[string]string{ 9240 "parent": c.parent, 9241 }) 9242 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9243} 9244 9245// Do executes the "container.projects.locations.clusters.nodePools.create" call. 9246// Exactly one of *Operation or error will be non-nil. Any non-2xx 9247// status code is an error. Response headers are in either 9248// *Operation.ServerResponse.Header or (if a response was returned at 9249// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9250// to check whether the returned error was because 9251// http.StatusNotModified was returned. 9252func (c *ProjectsLocationsClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9253 gensupport.SetOptions(c.urlParams_, opts...) 9254 res, err := c.doRequest("json") 9255 if res != nil && res.StatusCode == http.StatusNotModified { 9256 if res.Body != nil { 9257 res.Body.Close() 9258 } 9259 return nil, &googleapi.Error{ 9260 Code: res.StatusCode, 9261 Header: res.Header, 9262 } 9263 } 9264 if err != nil { 9265 return nil, err 9266 } 9267 defer googleapi.CloseBody(res) 9268 if err := googleapi.CheckResponse(res); err != nil { 9269 return nil, err 9270 } 9271 ret := &Operation{ 9272 ServerResponse: googleapi.ServerResponse{ 9273 Header: res.Header, 9274 HTTPStatusCode: res.StatusCode, 9275 }, 9276 } 9277 target := &ret 9278 if err := gensupport.DecodeResponse(target, res); err != nil { 9279 return nil, err 9280 } 9281 return ret, nil 9282 // { 9283 // "description": "Creates a node pool for a cluster.", 9284 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", 9285 // "httpMethod": "POST", 9286 // "id": "container.projects.locations.clusters.nodePools.create", 9287 // "parameterOrder": [ 9288 // "parent" 9289 // ], 9290 // "parameters": { 9291 // "parent": { 9292 // "description": "The parent (project, location, cluster id) where the node pool will be\ncreated. Specified in the format\n'projects/*/locations/*/clusters/*'.", 9293 // "location": "path", 9294 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 9295 // "required": true, 9296 // "type": "string" 9297 // } 9298 // }, 9299 // "path": "v1beta1/{+parent}/nodePools", 9300 // "request": { 9301 // "$ref": "CreateNodePoolRequest" 9302 // }, 9303 // "response": { 9304 // "$ref": "Operation" 9305 // }, 9306 // "scopes": [ 9307 // "https://www.googleapis.com/auth/cloud-platform" 9308 // ] 9309 // } 9310 9311} 9312 9313// method id "container.projects.locations.clusters.nodePools.delete": 9314 9315type ProjectsLocationsClustersNodePoolsDeleteCall struct { 9316 s *Service 9317 name string 9318 urlParams_ gensupport.URLParams 9319 ctx_ context.Context 9320 header_ http.Header 9321} 9322 9323// Delete: Deletes a node pool from a cluster. 9324func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *ProjectsLocationsClustersNodePoolsDeleteCall { 9325 c := &ProjectsLocationsClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9326 c.name = name 9327 return c 9328} 9329 9330// ClusterId sets the optional parameter "clusterId": Required. 9331// Deprecated. The name of the cluster. 9332// This field has been deprecated and replaced by the name field. 9333func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 9334 c.urlParams_.Set("clusterId", clusterId) 9335 return c 9336} 9337 9338// NodePoolId sets the optional parameter "nodePoolId": Required. 9339// Deprecated. The name of the node pool to delete. 9340// This field has been deprecated and replaced by the name field. 9341func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 9342 c.urlParams_.Set("nodePoolId", nodePoolId) 9343 return c 9344} 9345 9346// ProjectId sets the optional parameter "projectId": Required. 9347// Deprecated. The Google Developers Console [project ID or 9348// project 9349// number](https://developers.google.com/console/help/new/#projec 9350// tnumber). 9351// This field has been deprecated and replaced by the name field. 9352func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 9353 c.urlParams_.Set("projectId", projectId) 9354 return c 9355} 9356 9357// Zone sets the optional parameter "zone": Required. Deprecated. The 9358// name of the Google Compute 9359// Engine 9360// [zone](https://cloud.google.com/compute/docs/zones#available) in 9361// which the 9362// cluster resides. This field has been deprecated and replaced by the 9363// name 9364// field. 9365func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsDeleteCall { 9366 c.urlParams_.Set("zone", zone) 9367 return c 9368} 9369 9370// Fields allows partial responses to be retrieved. See 9371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9372// for more information. 9373func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsDeleteCall { 9374 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9375 return c 9376} 9377 9378// Context sets the context to be used in this call's Do method. Any 9379// pending HTTP request will be aborted if the provided context is 9380// canceled. 9381func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsDeleteCall { 9382 c.ctx_ = ctx 9383 return c 9384} 9385 9386// Header returns an http.Header that can be modified by the caller to 9387// add HTTP headers to the request. 9388func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header { 9389 if c.header_ == nil { 9390 c.header_ = make(http.Header) 9391 } 9392 return c.header_ 9393} 9394 9395func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 9396 reqHeaders := make(http.Header) 9397 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 9398 for k, v := range c.header_ { 9399 reqHeaders[k] = v 9400 } 9401 reqHeaders.Set("User-Agent", c.s.userAgent()) 9402 var body io.Reader = nil 9403 c.urlParams_.Set("alt", alt) 9404 c.urlParams_.Set("prettyPrint", "false") 9405 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9406 urls += "?" + c.urlParams_.Encode() 9407 req, err := http.NewRequest("DELETE", urls, body) 9408 if err != nil { 9409 return nil, err 9410 } 9411 req.Header = reqHeaders 9412 googleapi.Expand(req.URL, map[string]string{ 9413 "name": c.name, 9414 }) 9415 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9416} 9417 9418// Do executes the "container.projects.locations.clusters.nodePools.delete" call. 9419// Exactly one of *Operation or error will be non-nil. Any non-2xx 9420// status code is an error. Response headers are in either 9421// *Operation.ServerResponse.Header or (if a response was returned at 9422// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9423// to check whether the returned error was because 9424// http.StatusNotModified was returned. 9425func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9426 gensupport.SetOptions(c.urlParams_, opts...) 9427 res, err := c.doRequest("json") 9428 if res != nil && res.StatusCode == http.StatusNotModified { 9429 if res.Body != nil { 9430 res.Body.Close() 9431 } 9432 return nil, &googleapi.Error{ 9433 Code: res.StatusCode, 9434 Header: res.Header, 9435 } 9436 } 9437 if err != nil { 9438 return nil, err 9439 } 9440 defer googleapi.CloseBody(res) 9441 if err := googleapi.CheckResponse(res); err != nil { 9442 return nil, err 9443 } 9444 ret := &Operation{ 9445 ServerResponse: googleapi.ServerResponse{ 9446 Header: res.Header, 9447 HTTPStatusCode: res.StatusCode, 9448 }, 9449 } 9450 target := &ret 9451 if err := gensupport.DecodeResponse(target, res); err != nil { 9452 return nil, err 9453 } 9454 return ret, nil 9455 // { 9456 // "description": "Deletes a node pool from a cluster.", 9457 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", 9458 // "httpMethod": "DELETE", 9459 // "id": "container.projects.locations.clusters.nodePools.delete", 9460 // "parameterOrder": [ 9461 // "name" 9462 // ], 9463 // "parameters": { 9464 // "clusterId": { 9465 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 9466 // "location": "query", 9467 // "type": "string" 9468 // }, 9469 // "name": { 9470 // "description": "The name (project, location, cluster, node pool id) of the node pool to\ndelete. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 9471 // "location": "path", 9472 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9473 // "required": true, 9474 // "type": "string" 9475 // }, 9476 // "nodePoolId": { 9477 // "description": "Required. Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", 9478 // "location": "query", 9479 // "type": "string" 9480 // }, 9481 // "projectId": { 9482 // "description": "Required. 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.", 9483 // "location": "query", 9484 // "type": "string" 9485 // }, 9486 // "zone": { 9487 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 9488 // "location": "query", 9489 // "type": "string" 9490 // } 9491 // }, 9492 // "path": "v1beta1/{+name}", 9493 // "response": { 9494 // "$ref": "Operation" 9495 // }, 9496 // "scopes": [ 9497 // "https://www.googleapis.com/auth/cloud-platform" 9498 // ] 9499 // } 9500 9501} 9502 9503// method id "container.projects.locations.clusters.nodePools.get": 9504 9505type ProjectsLocationsClustersNodePoolsGetCall struct { 9506 s *Service 9507 name string 9508 urlParams_ gensupport.URLParams 9509 ifNoneMatch_ string 9510 ctx_ context.Context 9511 header_ http.Header 9512} 9513 9514// Get: Retrieves the requested node pool. 9515func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { 9516 c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9517 c.name = name 9518 return c 9519} 9520 9521// ClusterId sets the optional parameter "clusterId": Required. 9522// Deprecated. The name of the cluster. 9523// This field has been deprecated and replaced by the name field. 9524func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall { 9525 c.urlParams_.Set("clusterId", clusterId) 9526 return c 9527} 9528 9529// NodePoolId sets the optional parameter "nodePoolId": Required. 9530// Deprecated. The name of the node pool. 9531// This field has been deprecated and replaced by the name field. 9532func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall { 9533 c.urlParams_.Set("nodePoolId", nodePoolId) 9534 return c 9535} 9536 9537// ProjectId sets the optional parameter "projectId": Required. 9538// Deprecated. The Google Developers Console [project ID or 9539// project 9540// number](https://developers.google.com/console/help/new/#projec 9541// tnumber). 9542// This field has been deprecated and replaced by the name field. 9543func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsGetCall { 9544 c.urlParams_.Set("projectId", projectId) 9545 return c 9546} 9547 9548// Zone sets the optional parameter "zone": Required. Deprecated. The 9549// name of the Google Compute 9550// Engine 9551// [zone](https://cloud.google.com/compute/docs/zones#available) in 9552// which the 9553// cluster resides. This field has been deprecated and replaced by the 9554// name 9555// field. 9556func (c *ProjectsLocationsClustersNodePoolsGetCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsGetCall { 9557 c.urlParams_.Set("zone", zone) 9558 return c 9559} 9560 9561// Fields allows partial responses to be retrieved. See 9562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9563// for more information. 9564func (c *ProjectsLocationsClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsGetCall { 9565 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9566 return c 9567} 9568 9569// IfNoneMatch sets the optional parameter which makes the operation 9570// fail if the object's ETag matches the given value. This is useful for 9571// getting updates only after the object has changed since the last 9572// request. Use googleapi.IsNotModified to check whether the response 9573// error from Do is the result of In-None-Match. 9574func (c *ProjectsLocationsClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsGetCall { 9575 c.ifNoneMatch_ = entityTag 9576 return c 9577} 9578 9579// Context sets the context to be used in this call's Do method. Any 9580// pending HTTP request will be aborted if the provided context is 9581// canceled. 9582func (c *ProjectsLocationsClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsGetCall { 9583 c.ctx_ = ctx 9584 return c 9585} 9586 9587// Header returns an http.Header that can be modified by the caller to 9588// add HTTP headers to the request. 9589func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header { 9590 if c.header_ == nil { 9591 c.header_ = make(http.Header) 9592 } 9593 return c.header_ 9594} 9595 9596func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { 9597 reqHeaders := make(http.Header) 9598 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 9599 for k, v := range c.header_ { 9600 reqHeaders[k] = v 9601 } 9602 reqHeaders.Set("User-Agent", c.s.userAgent()) 9603 if c.ifNoneMatch_ != "" { 9604 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9605 } 9606 var body io.Reader = nil 9607 c.urlParams_.Set("alt", alt) 9608 c.urlParams_.Set("prettyPrint", "false") 9609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9610 urls += "?" + c.urlParams_.Encode() 9611 req, err := http.NewRequest("GET", urls, body) 9612 if err != nil { 9613 return nil, err 9614 } 9615 req.Header = reqHeaders 9616 googleapi.Expand(req.URL, map[string]string{ 9617 "name": c.name, 9618 }) 9619 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9620} 9621 9622// Do executes the "container.projects.locations.clusters.nodePools.get" call. 9623// Exactly one of *NodePool or error will be non-nil. Any non-2xx status 9624// code is an error. Response headers are in either 9625// *NodePool.ServerResponse.Header or (if a response was returned at 9626// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9627// to check whether the returned error was because 9628// http.StatusNotModified was returned. 9629func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { 9630 gensupport.SetOptions(c.urlParams_, opts...) 9631 res, err := c.doRequest("json") 9632 if res != nil && res.StatusCode == http.StatusNotModified { 9633 if res.Body != nil { 9634 res.Body.Close() 9635 } 9636 return nil, &googleapi.Error{ 9637 Code: res.StatusCode, 9638 Header: res.Header, 9639 } 9640 } 9641 if err != nil { 9642 return nil, err 9643 } 9644 defer googleapi.CloseBody(res) 9645 if err := googleapi.CheckResponse(res); err != nil { 9646 return nil, err 9647 } 9648 ret := &NodePool{ 9649 ServerResponse: googleapi.ServerResponse{ 9650 Header: res.Header, 9651 HTTPStatusCode: res.StatusCode, 9652 }, 9653 } 9654 target := &ret 9655 if err := gensupport.DecodeResponse(target, res); err != nil { 9656 return nil, err 9657 } 9658 return ret, nil 9659 // { 9660 // "description": "Retrieves the requested node pool.", 9661 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", 9662 // "httpMethod": "GET", 9663 // "id": "container.projects.locations.clusters.nodePools.get", 9664 // "parameterOrder": [ 9665 // "name" 9666 // ], 9667 // "parameters": { 9668 // "clusterId": { 9669 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 9670 // "location": "query", 9671 // "type": "string" 9672 // }, 9673 // "name": { 9674 // "description": "The name (project, location, cluster, node pool id) of the node pool to\nget. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 9675 // "location": "path", 9676 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 9677 // "required": true, 9678 // "type": "string" 9679 // }, 9680 // "nodePoolId": { 9681 // "description": "Required. Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", 9682 // "location": "query", 9683 // "type": "string" 9684 // }, 9685 // "projectId": { 9686 // "description": "Required. 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.", 9687 // "location": "query", 9688 // "type": "string" 9689 // }, 9690 // "zone": { 9691 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 9692 // "location": "query", 9693 // "type": "string" 9694 // } 9695 // }, 9696 // "path": "v1beta1/{+name}", 9697 // "response": { 9698 // "$ref": "NodePool" 9699 // }, 9700 // "scopes": [ 9701 // "https://www.googleapis.com/auth/cloud-platform" 9702 // ] 9703 // } 9704 9705} 9706 9707// method id "container.projects.locations.clusters.nodePools.list": 9708 9709type ProjectsLocationsClustersNodePoolsListCall struct { 9710 s *Service 9711 parent string 9712 urlParams_ gensupport.URLParams 9713 ifNoneMatch_ string 9714 ctx_ context.Context 9715 header_ http.Header 9716} 9717 9718// List: Lists the node pools for a cluster. 9719func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *ProjectsLocationsClustersNodePoolsListCall { 9720 c := &ProjectsLocationsClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9721 c.parent = parent 9722 return c 9723} 9724 9725// ClusterId sets the optional parameter "clusterId": Required. 9726// Deprecated. The name of the cluster. 9727// This field has been deprecated and replaced by the parent field. 9728func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall { 9729 c.urlParams_.Set("clusterId", clusterId) 9730 return c 9731} 9732 9733// ProjectId sets the optional parameter "projectId": Required. 9734// Deprecated. The Google Developers Console [project ID or 9735// project 9736// number](https://developers.google.com/console/help/new/#projec 9737// tnumber). 9738// This field has been deprecated and replaced by the parent field. 9739func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsListCall { 9740 c.urlParams_.Set("projectId", projectId) 9741 return c 9742} 9743 9744// Zone sets the optional parameter "zone": Required. Deprecated. The 9745// name of the Google Compute 9746// Engine 9747// [zone](https://cloud.google.com/compute/docs/zones#available) in 9748// which the 9749// cluster resides. This field has been deprecated and replaced by the 9750// parent 9751// field. 9752func (c *ProjectsLocationsClustersNodePoolsListCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsListCall { 9753 c.urlParams_.Set("zone", zone) 9754 return c 9755} 9756 9757// Fields allows partial responses to be retrieved. See 9758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9759// for more information. 9760func (c *ProjectsLocationsClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsListCall { 9761 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9762 return c 9763} 9764 9765// IfNoneMatch sets the optional parameter which makes the operation 9766// fail if the object's ETag matches the given value. This is useful for 9767// getting updates only after the object has changed since the last 9768// request. Use googleapi.IsNotModified to check whether the response 9769// error from Do is the result of In-None-Match. 9770func (c *ProjectsLocationsClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsListCall { 9771 c.ifNoneMatch_ = entityTag 9772 return c 9773} 9774 9775// Context sets the context to be used in this call's Do method. Any 9776// pending HTTP request will be aborted if the provided context is 9777// canceled. 9778func (c *ProjectsLocationsClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsListCall { 9779 c.ctx_ = ctx 9780 return c 9781} 9782 9783// Header returns an http.Header that can be modified by the caller to 9784// add HTTP headers to the request. 9785func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header { 9786 if c.header_ == nil { 9787 c.header_ = make(http.Header) 9788 } 9789 return c.header_ 9790} 9791 9792func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { 9793 reqHeaders := make(http.Header) 9794 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 9795 for k, v := range c.header_ { 9796 reqHeaders[k] = v 9797 } 9798 reqHeaders.Set("User-Agent", c.s.userAgent()) 9799 if c.ifNoneMatch_ != "" { 9800 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9801 } 9802 var body io.Reader = nil 9803 c.urlParams_.Set("alt", alt) 9804 c.urlParams_.Set("prettyPrint", "false") 9805 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") 9806 urls += "?" + c.urlParams_.Encode() 9807 req, err := http.NewRequest("GET", urls, body) 9808 if err != nil { 9809 return nil, err 9810 } 9811 req.Header = reqHeaders 9812 googleapi.Expand(req.URL, map[string]string{ 9813 "parent": c.parent, 9814 }) 9815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9816} 9817 9818// Do executes the "container.projects.locations.clusters.nodePools.list" call. 9819// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any 9820// non-2xx status code is an error. Response headers are in either 9821// *ListNodePoolsResponse.ServerResponse.Header or (if a response was 9822// returned at all) in error.(*googleapi.Error).Header. Use 9823// googleapi.IsNotModified to check whether the returned error was 9824// because http.StatusNotModified was returned. 9825func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { 9826 gensupport.SetOptions(c.urlParams_, opts...) 9827 res, err := c.doRequest("json") 9828 if res != nil && res.StatusCode == http.StatusNotModified { 9829 if res.Body != nil { 9830 res.Body.Close() 9831 } 9832 return nil, &googleapi.Error{ 9833 Code: res.StatusCode, 9834 Header: res.Header, 9835 } 9836 } 9837 if err != nil { 9838 return nil, err 9839 } 9840 defer googleapi.CloseBody(res) 9841 if err := googleapi.CheckResponse(res); err != nil { 9842 return nil, err 9843 } 9844 ret := &ListNodePoolsResponse{ 9845 ServerResponse: googleapi.ServerResponse{ 9846 Header: res.Header, 9847 HTTPStatusCode: res.StatusCode, 9848 }, 9849 } 9850 target := &ret 9851 if err := gensupport.DecodeResponse(target, res); err != nil { 9852 return nil, err 9853 } 9854 return ret, nil 9855 // { 9856 // "description": "Lists the node pools for a cluster.", 9857 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", 9858 // "httpMethod": "GET", 9859 // "id": "container.projects.locations.clusters.nodePools.list", 9860 // "parameterOrder": [ 9861 // "parent" 9862 // ], 9863 // "parameters": { 9864 // "clusterId": { 9865 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", 9866 // "location": "query", 9867 // "type": "string" 9868 // }, 9869 // "parent": { 9870 // "description": "The parent (project, location, cluster id) where the node pools will be\nlisted. Specified in the format 'projects/*/locations/*/clusters/*'.", 9871 // "location": "path", 9872 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 9873 // "required": true, 9874 // "type": "string" 9875 // }, 9876 // "projectId": { 9877 // "description": "Required. 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.", 9878 // "location": "query", 9879 // "type": "string" 9880 // }, 9881 // "zone": { 9882 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the parent\nfield.", 9883 // "location": "query", 9884 // "type": "string" 9885 // } 9886 // }, 9887 // "path": "v1beta1/{+parent}/nodePools", 9888 // "response": { 9889 // "$ref": "ListNodePoolsResponse" 9890 // }, 9891 // "scopes": [ 9892 // "https://www.googleapis.com/auth/cloud-platform" 9893 // ] 9894 // } 9895 9896} 9897 9898// method id "container.projects.locations.clusters.nodePools.rollback": 9899 9900type ProjectsLocationsClustersNodePoolsRollbackCall struct { 9901 s *Service 9902 name string 9903 rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest 9904 urlParams_ gensupport.URLParams 9905 ctx_ context.Context 9906 header_ http.Header 9907} 9908 9909// Rollback: Rolls back a previously Aborted or Failed NodePool 9910// upgrade. 9911// This makes no changes if the last upgrade successfully completed. 9912func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { 9913 c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9914 c.name = name 9915 c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest 9916 return c 9917} 9918 9919// Fields allows partial responses to be retrieved. See 9920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9921// for more information. 9922func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsRollbackCall { 9923 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9924 return c 9925} 9926 9927// Context sets the context to be used in this call's Do method. Any 9928// pending HTTP request will be aborted if the provided context is 9929// canceled. 9930func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsRollbackCall { 9931 c.ctx_ = ctx 9932 return c 9933} 9934 9935// Header returns an http.Header that can be modified by the caller to 9936// add HTTP headers to the request. 9937func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header { 9938 if c.header_ == nil { 9939 c.header_ = make(http.Header) 9940 } 9941 return c.header_ 9942} 9943 9944func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { 9945 reqHeaders := make(http.Header) 9946 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 9947 for k, v := range c.header_ { 9948 reqHeaders[k] = v 9949 } 9950 reqHeaders.Set("User-Agent", c.s.userAgent()) 9951 var body io.Reader = nil 9952 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) 9953 if err != nil { 9954 return nil, err 9955 } 9956 reqHeaders.Set("Content-Type", "application/json") 9957 c.urlParams_.Set("alt", alt) 9958 c.urlParams_.Set("prettyPrint", "false") 9959 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") 9960 urls += "?" + c.urlParams_.Encode() 9961 req, err := http.NewRequest("POST", urls, body) 9962 if err != nil { 9963 return nil, err 9964 } 9965 req.Header = reqHeaders 9966 googleapi.Expand(req.URL, map[string]string{ 9967 "name": c.name, 9968 }) 9969 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9970} 9971 9972// Do executes the "container.projects.locations.clusters.nodePools.rollback" call. 9973// Exactly one of *Operation or error will be non-nil. Any non-2xx 9974// status code is an error. Response headers are in either 9975// *Operation.ServerResponse.Header or (if a response was returned at 9976// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9977// to check whether the returned error was because 9978// http.StatusNotModified was returned. 9979func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9980 gensupport.SetOptions(c.urlParams_, opts...) 9981 res, err := c.doRequest("json") 9982 if res != nil && res.StatusCode == http.StatusNotModified { 9983 if res.Body != nil { 9984 res.Body.Close() 9985 } 9986 return nil, &googleapi.Error{ 9987 Code: res.StatusCode, 9988 Header: res.Header, 9989 } 9990 } 9991 if err != nil { 9992 return nil, err 9993 } 9994 defer googleapi.CloseBody(res) 9995 if err := googleapi.CheckResponse(res); err != nil { 9996 return nil, err 9997 } 9998 ret := &Operation{ 9999 ServerResponse: googleapi.ServerResponse{ 10000 Header: res.Header, 10001 HTTPStatusCode: res.StatusCode, 10002 }, 10003 } 10004 target := &ret 10005 if err := gensupport.DecodeResponse(target, res); err != nil { 10006 return nil, err 10007 } 10008 return ret, nil 10009 // { 10010 // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", 10011 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", 10012 // "httpMethod": "POST", 10013 // "id": "container.projects.locations.clusters.nodePools.rollback", 10014 // "parameterOrder": [ 10015 // "name" 10016 // ], 10017 // "parameters": { 10018 // "name": { 10019 // "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", 10020 // "location": "path", 10021 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 10022 // "required": true, 10023 // "type": "string" 10024 // } 10025 // }, 10026 // "path": "v1beta1/{+name}:rollback", 10027 // "request": { 10028 // "$ref": "RollbackNodePoolUpgradeRequest" 10029 // }, 10030 // "response": { 10031 // "$ref": "Operation" 10032 // }, 10033 // "scopes": [ 10034 // "https://www.googleapis.com/auth/cloud-platform" 10035 // ] 10036 // } 10037 10038} 10039 10040// method id "container.projects.locations.clusters.nodePools.setAutoscaling": 10041 10042type ProjectsLocationsClustersNodePoolsSetAutoscalingCall struct { 10043 s *Service 10044 name string 10045 setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest 10046 urlParams_ gensupport.URLParams 10047 ctx_ context.Context 10048 header_ http.Header 10049} 10050 10051// SetAutoscaling: Sets the autoscaling settings of a specific node 10052// pool. 10053func (r *ProjectsLocationsClustersNodePoolsService) SetAutoscaling(name string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 10054 c := &ProjectsLocationsClustersNodePoolsSetAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10055 c.name = name 10056 c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest 10057 return c 10058} 10059 10060// Fields allows partial responses to be retrieved. See 10061// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10062// for more information. 10063func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 10064 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10065 return c 10066} 10067 10068// Context sets the context to be used in this call's Do method. Any 10069// pending HTTP request will be aborted if the provided context is 10070// canceled. 10071func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 10072 c.ctx_ = ctx 10073 return c 10074} 10075 10076// Header returns an http.Header that can be modified by the caller to 10077// add HTTP headers to the request. 10078func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Header { 10079 if c.header_ == nil { 10080 c.header_ = make(http.Header) 10081 } 10082 return c.header_ 10083} 10084 10085func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) { 10086 reqHeaders := make(http.Header) 10087 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10088 for k, v := range c.header_ { 10089 reqHeaders[k] = v 10090 } 10091 reqHeaders.Set("User-Agent", c.s.userAgent()) 10092 var body io.Reader = nil 10093 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) 10094 if err != nil { 10095 return nil, err 10096 } 10097 reqHeaders.Set("Content-Type", "application/json") 10098 c.urlParams_.Set("alt", alt) 10099 c.urlParams_.Set("prettyPrint", "false") 10100 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAutoscaling") 10101 urls += "?" + c.urlParams_.Encode() 10102 req, err := http.NewRequest("POST", urls, body) 10103 if err != nil { 10104 return nil, err 10105 } 10106 req.Header = reqHeaders 10107 googleapi.Expand(req.URL, map[string]string{ 10108 "name": c.name, 10109 }) 10110 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10111} 10112 10113// Do executes the "container.projects.locations.clusters.nodePools.setAutoscaling" call. 10114// Exactly one of *Operation or error will be non-nil. Any non-2xx 10115// status code is an error. Response headers are in either 10116// *Operation.ServerResponse.Header or (if a response was returned at 10117// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10118// to check whether the returned error was because 10119// http.StatusNotModified was returned. 10120func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10121 gensupport.SetOptions(c.urlParams_, opts...) 10122 res, err := c.doRequest("json") 10123 if res != nil && res.StatusCode == http.StatusNotModified { 10124 if res.Body != nil { 10125 res.Body.Close() 10126 } 10127 return nil, &googleapi.Error{ 10128 Code: res.StatusCode, 10129 Header: res.Header, 10130 } 10131 } 10132 if err != nil { 10133 return nil, err 10134 } 10135 defer googleapi.CloseBody(res) 10136 if err := googleapi.CheckResponse(res); err != nil { 10137 return nil, err 10138 } 10139 ret := &Operation{ 10140 ServerResponse: googleapi.ServerResponse{ 10141 Header: res.Header, 10142 HTTPStatusCode: res.StatusCode, 10143 }, 10144 } 10145 target := &ret 10146 if err := gensupport.DecodeResponse(target, res); err != nil { 10147 return nil, err 10148 } 10149 return ret, nil 10150 // { 10151 // "description": "Sets the autoscaling settings of a specific node pool.", 10152 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling", 10153 // "httpMethod": "POST", 10154 // "id": "container.projects.locations.clusters.nodePools.setAutoscaling", 10155 // "parameterOrder": [ 10156 // "name" 10157 // ], 10158 // "parameters": { 10159 // "name": { 10160 // "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/*'.", 10161 // "location": "path", 10162 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 10163 // "required": true, 10164 // "type": "string" 10165 // } 10166 // }, 10167 // "path": "v1beta1/{+name}:setAutoscaling", 10168 // "request": { 10169 // "$ref": "SetNodePoolAutoscalingRequest" 10170 // }, 10171 // "response": { 10172 // "$ref": "Operation" 10173 // }, 10174 // "scopes": [ 10175 // "https://www.googleapis.com/auth/cloud-platform" 10176 // ] 10177 // } 10178 10179} 10180 10181// method id "container.projects.locations.clusters.nodePools.setManagement": 10182 10183type ProjectsLocationsClustersNodePoolsSetManagementCall struct { 10184 s *Service 10185 name string 10186 setnodepoolmanagementrequest *SetNodePoolManagementRequest 10187 urlParams_ gensupport.URLParams 10188 ctx_ context.Context 10189 header_ http.Header 10190} 10191 10192// SetManagement: Sets the NodeManagement options for a node pool. 10193func (r *ProjectsLocationsClustersNodePoolsService) SetManagement(name string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsLocationsClustersNodePoolsSetManagementCall { 10194 c := &ProjectsLocationsClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10195 c.name = name 10196 c.setnodepoolmanagementrequest = setnodepoolmanagementrequest 10197 return c 10198} 10199 10200// Fields allows partial responses to be retrieved. See 10201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10202// for more information. 10203func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetManagementCall { 10204 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10205 return c 10206} 10207 10208// Context sets the context to be used in this call's Do method. Any 10209// pending HTTP request will be aborted if the provided context is 10210// canceled. 10211func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetManagementCall { 10212 c.ctx_ = ctx 10213 return c 10214} 10215 10216// Header returns an http.Header that can be modified by the caller to 10217// add HTTP headers to the request. 10218func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Header { 10219 if c.header_ == nil { 10220 c.header_ = make(http.Header) 10221 } 10222 return c.header_ 10223} 10224 10225func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { 10226 reqHeaders := make(http.Header) 10227 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10228 for k, v := range c.header_ { 10229 reqHeaders[k] = v 10230 } 10231 reqHeaders.Set("User-Agent", c.s.userAgent()) 10232 var body io.Reader = nil 10233 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) 10234 if err != nil { 10235 return nil, err 10236 } 10237 reqHeaders.Set("Content-Type", "application/json") 10238 c.urlParams_.Set("alt", alt) 10239 c.urlParams_.Set("prettyPrint", "false") 10240 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setManagement") 10241 urls += "?" + c.urlParams_.Encode() 10242 req, err := http.NewRequest("POST", urls, body) 10243 if err != nil { 10244 return nil, err 10245 } 10246 req.Header = reqHeaders 10247 googleapi.Expand(req.URL, map[string]string{ 10248 "name": c.name, 10249 }) 10250 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10251} 10252 10253// Do executes the "container.projects.locations.clusters.nodePools.setManagement" call. 10254// Exactly one of *Operation or error will be non-nil. Any non-2xx 10255// status code is an error. Response headers are in either 10256// *Operation.ServerResponse.Header or (if a response was returned at 10257// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10258// to check whether the returned error was because 10259// http.StatusNotModified was returned. 10260func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10261 gensupport.SetOptions(c.urlParams_, opts...) 10262 res, err := c.doRequest("json") 10263 if res != nil && res.StatusCode == http.StatusNotModified { 10264 if res.Body != nil { 10265 res.Body.Close() 10266 } 10267 return nil, &googleapi.Error{ 10268 Code: res.StatusCode, 10269 Header: res.Header, 10270 } 10271 } 10272 if err != nil { 10273 return nil, err 10274 } 10275 defer googleapi.CloseBody(res) 10276 if err := googleapi.CheckResponse(res); err != nil { 10277 return nil, err 10278 } 10279 ret := &Operation{ 10280 ServerResponse: googleapi.ServerResponse{ 10281 Header: res.Header, 10282 HTTPStatusCode: res.StatusCode, 10283 }, 10284 } 10285 target := &ret 10286 if err := gensupport.DecodeResponse(target, res); err != nil { 10287 return nil, err 10288 } 10289 return ret, nil 10290 // { 10291 // "description": "Sets the NodeManagement options for a node pool.", 10292 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", 10293 // "httpMethod": "POST", 10294 // "id": "container.projects.locations.clusters.nodePools.setManagement", 10295 // "parameterOrder": [ 10296 // "name" 10297 // ], 10298 // "parameters": { 10299 // "name": { 10300 // "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/*'.", 10301 // "location": "path", 10302 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 10303 // "required": true, 10304 // "type": "string" 10305 // } 10306 // }, 10307 // "path": "v1beta1/{+name}:setManagement", 10308 // "request": { 10309 // "$ref": "SetNodePoolManagementRequest" 10310 // }, 10311 // "response": { 10312 // "$ref": "Operation" 10313 // }, 10314 // "scopes": [ 10315 // "https://www.googleapis.com/auth/cloud-platform" 10316 // ] 10317 // } 10318 10319} 10320 10321// method id "container.projects.locations.clusters.nodePools.setSize": 10322 10323type ProjectsLocationsClustersNodePoolsSetSizeCall struct { 10324 s *Service 10325 name string 10326 setnodepoolsizerequest *SetNodePoolSizeRequest 10327 urlParams_ gensupport.URLParams 10328 ctx_ context.Context 10329 header_ http.Header 10330} 10331 10332// SetSize: Sets the size for a specific node pool. 10333func (r *ProjectsLocationsClustersNodePoolsService) SetSize(name string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsLocationsClustersNodePoolsSetSizeCall { 10334 c := &ProjectsLocationsClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10335 c.name = name 10336 c.setnodepoolsizerequest = setnodepoolsizerequest 10337 return c 10338} 10339 10340// Fields allows partial responses to be retrieved. See 10341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10342// for more information. 10343func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetSizeCall { 10344 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10345 return c 10346} 10347 10348// Context sets the context to be used in this call's Do method. Any 10349// pending HTTP request will be aborted if the provided context is 10350// canceled. 10351func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetSizeCall { 10352 c.ctx_ = ctx 10353 return c 10354} 10355 10356// Header returns an http.Header that can be modified by the caller to 10357// add HTTP headers to the request. 10358func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header { 10359 if c.header_ == nil { 10360 c.header_ = make(http.Header) 10361 } 10362 return c.header_ 10363} 10364 10365func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { 10366 reqHeaders := make(http.Header) 10367 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10368 for k, v := range c.header_ { 10369 reqHeaders[k] = v 10370 } 10371 reqHeaders.Set("User-Agent", c.s.userAgent()) 10372 var body io.Reader = nil 10373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) 10374 if err != nil { 10375 return nil, err 10376 } 10377 reqHeaders.Set("Content-Type", "application/json") 10378 c.urlParams_.Set("alt", alt) 10379 c.urlParams_.Set("prettyPrint", "false") 10380 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setSize") 10381 urls += "?" + c.urlParams_.Encode() 10382 req, err := http.NewRequest("POST", urls, body) 10383 if err != nil { 10384 return nil, err 10385 } 10386 req.Header = reqHeaders 10387 googleapi.Expand(req.URL, map[string]string{ 10388 "name": c.name, 10389 }) 10390 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10391} 10392 10393// Do executes the "container.projects.locations.clusters.nodePools.setSize" call. 10394// Exactly one of *Operation or error will be non-nil. Any non-2xx 10395// status code is an error. Response headers are in either 10396// *Operation.ServerResponse.Header or (if a response was returned at 10397// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10398// to check whether the returned error was because 10399// http.StatusNotModified was returned. 10400func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10401 gensupport.SetOptions(c.urlParams_, opts...) 10402 res, err := c.doRequest("json") 10403 if res != nil && res.StatusCode == http.StatusNotModified { 10404 if res.Body != nil { 10405 res.Body.Close() 10406 } 10407 return nil, &googleapi.Error{ 10408 Code: res.StatusCode, 10409 Header: res.Header, 10410 } 10411 } 10412 if err != nil { 10413 return nil, err 10414 } 10415 defer googleapi.CloseBody(res) 10416 if err := googleapi.CheckResponse(res); err != nil { 10417 return nil, err 10418 } 10419 ret := &Operation{ 10420 ServerResponse: googleapi.ServerResponse{ 10421 Header: res.Header, 10422 HTTPStatusCode: res.StatusCode, 10423 }, 10424 } 10425 target := &ret 10426 if err := gensupport.DecodeResponse(target, res); err != nil { 10427 return nil, err 10428 } 10429 return ret, nil 10430 // { 10431 // "description": "Sets the size for a specific node pool.", 10432 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setSize", 10433 // "httpMethod": "POST", 10434 // "id": "container.projects.locations.clusters.nodePools.setSize", 10435 // "parameterOrder": [ 10436 // "name" 10437 // ], 10438 // "parameters": { 10439 // "name": { 10440 // "description": "The name (project, location, cluster, node pool id) of the node pool to set\nsize.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", 10441 // "location": "path", 10442 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 10443 // "required": true, 10444 // "type": "string" 10445 // } 10446 // }, 10447 // "path": "v1beta1/{+name}:setSize", 10448 // "request": { 10449 // "$ref": "SetNodePoolSizeRequest" 10450 // }, 10451 // "response": { 10452 // "$ref": "Operation" 10453 // }, 10454 // "scopes": [ 10455 // "https://www.googleapis.com/auth/cloud-platform" 10456 // ] 10457 // } 10458 10459} 10460 10461// method id "container.projects.locations.clusters.nodePools.update": 10462 10463type ProjectsLocationsClustersNodePoolsUpdateCall struct { 10464 s *Service 10465 name string 10466 updatenodepoolrequest *UpdateNodePoolRequest 10467 urlParams_ gensupport.URLParams 10468 ctx_ context.Context 10469 header_ http.Header 10470} 10471 10472// Update: Updates the version and/or image type of a specific node 10473// pool. 10474func (r *ProjectsLocationsClustersNodePoolsService) Update(name string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsLocationsClustersNodePoolsUpdateCall { 10475 c := &ProjectsLocationsClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10476 c.name = name 10477 c.updatenodepoolrequest = updatenodepoolrequest 10478 return c 10479} 10480 10481// Fields allows partial responses to be retrieved. See 10482// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10483// for more information. 10484func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsUpdateCall { 10485 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10486 return c 10487} 10488 10489// Context sets the context to be used in this call's Do method. Any 10490// pending HTTP request will be aborted if the provided context is 10491// canceled. 10492func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsUpdateCall { 10493 c.ctx_ = ctx 10494 return c 10495} 10496 10497// Header returns an http.Header that can be modified by the caller to 10498// add HTTP headers to the request. 10499func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header { 10500 if c.header_ == nil { 10501 c.header_ = make(http.Header) 10502 } 10503 return c.header_ 10504} 10505 10506func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { 10507 reqHeaders := make(http.Header) 10508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10509 for k, v := range c.header_ { 10510 reqHeaders[k] = v 10511 } 10512 reqHeaders.Set("User-Agent", c.s.userAgent()) 10513 var body io.Reader = nil 10514 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) 10515 if err != nil { 10516 return nil, err 10517 } 10518 reqHeaders.Set("Content-Type", "application/json") 10519 c.urlParams_.Set("alt", alt) 10520 c.urlParams_.Set("prettyPrint", "false") 10521 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10522 urls += "?" + c.urlParams_.Encode() 10523 req, err := http.NewRequest("PUT", urls, body) 10524 if err != nil { 10525 return nil, err 10526 } 10527 req.Header = reqHeaders 10528 googleapi.Expand(req.URL, map[string]string{ 10529 "name": c.name, 10530 }) 10531 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10532} 10533 10534// Do executes the "container.projects.locations.clusters.nodePools.update" call. 10535// Exactly one of *Operation or error will be non-nil. Any non-2xx 10536// status code is an error. Response headers are in either 10537// *Operation.ServerResponse.Header or (if a response was returned at 10538// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10539// to check whether the returned error was because 10540// http.StatusNotModified was returned. 10541func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10542 gensupport.SetOptions(c.urlParams_, opts...) 10543 res, err := c.doRequest("json") 10544 if res != nil && res.StatusCode == http.StatusNotModified { 10545 if res.Body != nil { 10546 res.Body.Close() 10547 } 10548 return nil, &googleapi.Error{ 10549 Code: res.StatusCode, 10550 Header: res.Header, 10551 } 10552 } 10553 if err != nil { 10554 return nil, err 10555 } 10556 defer googleapi.CloseBody(res) 10557 if err := googleapi.CheckResponse(res); err != nil { 10558 return nil, err 10559 } 10560 ret := &Operation{ 10561 ServerResponse: googleapi.ServerResponse{ 10562 Header: res.Header, 10563 HTTPStatusCode: res.StatusCode, 10564 }, 10565 } 10566 target := &ret 10567 if err := gensupport.DecodeResponse(target, res); err != nil { 10568 return nil, err 10569 } 10570 return ret, nil 10571 // { 10572 // "description": "Updates the version and/or image type of a specific node pool.", 10573 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", 10574 // "httpMethod": "PUT", 10575 // "id": "container.projects.locations.clusters.nodePools.update", 10576 // "parameterOrder": [ 10577 // "name" 10578 // ], 10579 // "parameters": { 10580 // "name": { 10581 // "description": "The name (project, location, cluster, node pool) of the node pool to\nupdate. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 10582 // "location": "path", 10583 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", 10584 // "required": true, 10585 // "type": "string" 10586 // } 10587 // }, 10588 // "path": "v1beta1/{+name}", 10589 // "request": { 10590 // "$ref": "UpdateNodePoolRequest" 10591 // }, 10592 // "response": { 10593 // "$ref": "Operation" 10594 // }, 10595 // "scopes": [ 10596 // "https://www.googleapis.com/auth/cloud-platform" 10597 // ] 10598 // } 10599 10600} 10601 10602// method id "container.projects.locations.clusters.well-known.getOpenid-configuration": 10603 10604type ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall struct { 10605 s *Service 10606 parent string 10607 urlParams_ gensupport.URLParams 10608 ifNoneMatch_ string 10609 ctx_ context.Context 10610 header_ http.Header 10611} 10612 10613// GetOpenidConfiguration: Gets the OIDC discovery document for the 10614// cluster. 10615// See the 10616// [OpenID Connect Discovery 10617// 1.0 10618// specification](https://openid.net/specs/openid-connect-discovery-1 10619// _0.html) 10620// for details. 10621// This API is not yet intended for general use, and is not available 10622// for all 10623// clusters. 10624func (r *ProjectsLocationsClustersWellKnownService) GetOpenidConfiguration(parent string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 10625 c := &ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10626 c.parent = parent 10627 return c 10628} 10629 10630// Fields allows partial responses to be retrieved. See 10631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10632// for more information. 10633func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 10634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10635 return c 10636} 10637 10638// IfNoneMatch sets the optional parameter which makes the operation 10639// fail if the object's ETag matches the given value. This is useful for 10640// getting updates only after the object has changed since the last 10641// request. Use googleapi.IsNotModified to check whether the response 10642// error from Do is the result of In-None-Match. 10643func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 10644 c.ifNoneMatch_ = entityTag 10645 return c 10646} 10647 10648// Context sets the context to be used in this call's Do method. Any 10649// pending HTTP request will be aborted if the provided context is 10650// canceled. 10651func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Context(ctx context.Context) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 10652 c.ctx_ = ctx 10653 return c 10654} 10655 10656// Header returns an http.Header that can be modified by the caller to 10657// add HTTP headers to the request. 10658func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() http.Header { 10659 if c.header_ == nil { 10660 c.header_ = make(http.Header) 10661 } 10662 return c.header_ 10663} 10664 10665func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { 10666 reqHeaders := make(http.Header) 10667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10668 for k, v := range c.header_ { 10669 reqHeaders[k] = v 10670 } 10671 reqHeaders.Set("User-Agent", c.s.userAgent()) 10672 if c.ifNoneMatch_ != "" { 10673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10674 } 10675 var body io.Reader = nil 10676 c.urlParams_.Set("alt", alt) 10677 c.urlParams_.Set("prettyPrint", "false") 10678 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/.well-known/openid-configuration") 10679 urls += "?" + c.urlParams_.Encode() 10680 req, err := http.NewRequest("GET", urls, body) 10681 if err != nil { 10682 return nil, err 10683 } 10684 req.Header = reqHeaders 10685 googleapi.Expand(req.URL, map[string]string{ 10686 "parent": c.parent, 10687 }) 10688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10689} 10690 10691// Do executes the "container.projects.locations.clusters.well-known.getOpenid-configuration" call. 10692// Exactly one of *GetOpenIDConfigResponse or error will be non-nil. Any 10693// non-2xx status code is an error. Response headers are in either 10694// *GetOpenIDConfigResponse.ServerResponse.Header or (if a response was 10695// returned at all) in error.(*googleapi.Error).Header. Use 10696// googleapi.IsNotModified to check whether the returned error was 10697// because http.StatusNotModified was returned. 10698func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Do(opts ...googleapi.CallOption) (*GetOpenIDConfigResponse, error) { 10699 gensupport.SetOptions(c.urlParams_, opts...) 10700 res, err := c.doRequest("json") 10701 if res != nil && res.StatusCode == http.StatusNotModified { 10702 if res.Body != nil { 10703 res.Body.Close() 10704 } 10705 return nil, &googleapi.Error{ 10706 Code: res.StatusCode, 10707 Header: res.Header, 10708 } 10709 } 10710 if err != nil { 10711 return nil, err 10712 } 10713 defer googleapi.CloseBody(res) 10714 if err := googleapi.CheckResponse(res); err != nil { 10715 return nil, err 10716 } 10717 ret := &GetOpenIDConfigResponse{ 10718 ServerResponse: googleapi.ServerResponse{ 10719 Header: res.Header, 10720 HTTPStatusCode: res.StatusCode, 10721 }, 10722 } 10723 target := &ret 10724 if err := gensupport.DecodeResponse(target, res); err != nil { 10725 return nil, err 10726 } 10727 return ret, nil 10728 // { 10729 // "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.", 10730 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", 10731 // "httpMethod": "GET", 10732 // "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", 10733 // "parameterOrder": [ 10734 // "parent" 10735 // ], 10736 // "parameters": { 10737 // "parent": { 10738 // "description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.", 10739 // "location": "path", 10740 // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", 10741 // "required": true, 10742 // "type": "string" 10743 // } 10744 // }, 10745 // "path": "v1beta1/{+parent}/.well-known/openid-configuration", 10746 // "response": { 10747 // "$ref": "GetOpenIDConfigResponse" 10748 // } 10749 // } 10750 10751} 10752 10753// method id "container.projects.locations.operations.cancel": 10754 10755type ProjectsLocationsOperationsCancelCall struct { 10756 s *Service 10757 name string 10758 canceloperationrequest *CancelOperationRequest 10759 urlParams_ gensupport.URLParams 10760 ctx_ context.Context 10761 header_ http.Header 10762} 10763 10764// Cancel: Cancels the specified operation. 10765func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 10766 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10767 c.name = name 10768 c.canceloperationrequest = canceloperationrequest 10769 return c 10770} 10771 10772// Fields allows partial responses to be retrieved. See 10773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10774// for more information. 10775func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 10776 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10777 return c 10778} 10779 10780// Context sets the context to be used in this call's Do method. Any 10781// pending HTTP request will be aborted if the provided context is 10782// canceled. 10783func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 10784 c.ctx_ = ctx 10785 return c 10786} 10787 10788// Header returns an http.Header that can be modified by the caller to 10789// add HTTP headers to the request. 10790func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 10791 if c.header_ == nil { 10792 c.header_ = make(http.Header) 10793 } 10794 return c.header_ 10795} 10796 10797func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 10798 reqHeaders := make(http.Header) 10799 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10800 for k, v := range c.header_ { 10801 reqHeaders[k] = v 10802 } 10803 reqHeaders.Set("User-Agent", c.s.userAgent()) 10804 var body io.Reader = nil 10805 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 10806 if err != nil { 10807 return nil, err 10808 } 10809 reqHeaders.Set("Content-Type", "application/json") 10810 c.urlParams_.Set("alt", alt) 10811 c.urlParams_.Set("prettyPrint", "false") 10812 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") 10813 urls += "?" + c.urlParams_.Encode() 10814 req, err := http.NewRequest("POST", urls, body) 10815 if err != nil { 10816 return nil, err 10817 } 10818 req.Header = reqHeaders 10819 googleapi.Expand(req.URL, map[string]string{ 10820 "name": c.name, 10821 }) 10822 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10823} 10824 10825// Do executes the "container.projects.locations.operations.cancel" call. 10826// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10827// code is an error. Response headers are in either 10828// *Empty.ServerResponse.Header or (if a response was returned at all) 10829// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10830// check whether the returned error was because http.StatusNotModified 10831// was returned. 10832func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10833 gensupport.SetOptions(c.urlParams_, opts...) 10834 res, err := c.doRequest("json") 10835 if res != nil && res.StatusCode == http.StatusNotModified { 10836 if res.Body != nil { 10837 res.Body.Close() 10838 } 10839 return nil, &googleapi.Error{ 10840 Code: res.StatusCode, 10841 Header: res.Header, 10842 } 10843 } 10844 if err != nil { 10845 return nil, err 10846 } 10847 defer googleapi.CloseBody(res) 10848 if err := googleapi.CheckResponse(res); err != nil { 10849 return nil, err 10850 } 10851 ret := &Empty{ 10852 ServerResponse: googleapi.ServerResponse{ 10853 Header: res.Header, 10854 HTTPStatusCode: res.StatusCode, 10855 }, 10856 } 10857 target := &ret 10858 if err := gensupport.DecodeResponse(target, res); err != nil { 10859 return nil, err 10860 } 10861 return ret, nil 10862 // { 10863 // "description": "Cancels the specified operation.", 10864 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 10865 // "httpMethod": "POST", 10866 // "id": "container.projects.locations.operations.cancel", 10867 // "parameterOrder": [ 10868 // "name" 10869 // ], 10870 // "parameters": { 10871 // "name": { 10872 // "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", 10873 // "location": "path", 10874 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 10875 // "required": true, 10876 // "type": "string" 10877 // } 10878 // }, 10879 // "path": "v1beta1/{+name}:cancel", 10880 // "request": { 10881 // "$ref": "CancelOperationRequest" 10882 // }, 10883 // "response": { 10884 // "$ref": "Empty" 10885 // }, 10886 // "scopes": [ 10887 // "https://www.googleapis.com/auth/cloud-platform" 10888 // ] 10889 // } 10890 10891} 10892 10893// method id "container.projects.locations.operations.get": 10894 10895type ProjectsLocationsOperationsGetCall struct { 10896 s *Service 10897 name string 10898 urlParams_ gensupport.URLParams 10899 ifNoneMatch_ string 10900 ctx_ context.Context 10901 header_ http.Header 10902} 10903 10904// Get: Gets the specified operation. 10905func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 10906 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10907 c.name = name 10908 return c 10909} 10910 10911// OperationId sets the optional parameter "operationId": Required. 10912// Deprecated. The server-assigned `name` of the operation. 10913// This field has been deprecated and replaced by the name field. 10914func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall { 10915 c.urlParams_.Set("operationId", operationId) 10916 return c 10917} 10918 10919// ProjectId sets the optional parameter "projectId": Required. 10920// Deprecated. The Google Developers Console [project ID or 10921// project 10922// number](https://support.google.com/cloud/answer/6158840). 10923// This 10924// field has been deprecated and replaced by the name field. 10925func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *ProjectsLocationsOperationsGetCall { 10926 c.urlParams_.Set("projectId", projectId) 10927 return c 10928} 10929 10930// Zone sets the optional parameter "zone": Required. Deprecated. The 10931// name of the Google Compute 10932// Engine 10933// [zone](https://cloud.google.com/compute/docs/zones#available) in 10934// which the 10935// cluster resides. This field has been deprecated and replaced by the 10936// name 10937// field. 10938func (c *ProjectsLocationsOperationsGetCall) Zone(zone string) *ProjectsLocationsOperationsGetCall { 10939 c.urlParams_.Set("zone", zone) 10940 return c 10941} 10942 10943// Fields allows partial responses to be retrieved. See 10944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10945// for more information. 10946func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 10947 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10948 return c 10949} 10950 10951// IfNoneMatch sets the optional parameter which makes the operation 10952// fail if the object's ETag matches the given value. This is useful for 10953// getting updates only after the object has changed since the last 10954// request. Use googleapi.IsNotModified to check whether the response 10955// error from Do is the result of In-None-Match. 10956func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 10957 c.ifNoneMatch_ = entityTag 10958 return c 10959} 10960 10961// Context sets the context to be used in this call's Do method. Any 10962// pending HTTP request will be aborted if the provided context is 10963// canceled. 10964func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 10965 c.ctx_ = ctx 10966 return c 10967} 10968 10969// Header returns an http.Header that can be modified by the caller to 10970// add HTTP headers to the request. 10971func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 10972 if c.header_ == nil { 10973 c.header_ = make(http.Header) 10974 } 10975 return c.header_ 10976} 10977 10978func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 10979 reqHeaders := make(http.Header) 10980 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 10981 for k, v := range c.header_ { 10982 reqHeaders[k] = v 10983 } 10984 reqHeaders.Set("User-Agent", c.s.userAgent()) 10985 if c.ifNoneMatch_ != "" { 10986 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10987 } 10988 var body io.Reader = nil 10989 c.urlParams_.Set("alt", alt) 10990 c.urlParams_.Set("prettyPrint", "false") 10991 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10992 urls += "?" + c.urlParams_.Encode() 10993 req, err := http.NewRequest("GET", urls, body) 10994 if err != nil { 10995 return nil, err 10996 } 10997 req.Header = reqHeaders 10998 googleapi.Expand(req.URL, map[string]string{ 10999 "name": c.name, 11000 }) 11001 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11002} 11003 11004// Do executes the "container.projects.locations.operations.get" call. 11005// Exactly one of *Operation or error will be non-nil. Any non-2xx 11006// status code is an error. Response headers are in either 11007// *Operation.ServerResponse.Header or (if a response was returned at 11008// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11009// to check whether the returned error was because 11010// http.StatusNotModified was returned. 11011func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11012 gensupport.SetOptions(c.urlParams_, opts...) 11013 res, err := c.doRequest("json") 11014 if res != nil && res.StatusCode == http.StatusNotModified { 11015 if res.Body != nil { 11016 res.Body.Close() 11017 } 11018 return nil, &googleapi.Error{ 11019 Code: res.StatusCode, 11020 Header: res.Header, 11021 } 11022 } 11023 if err != nil { 11024 return nil, err 11025 } 11026 defer googleapi.CloseBody(res) 11027 if err := googleapi.CheckResponse(res); err != nil { 11028 return nil, err 11029 } 11030 ret := &Operation{ 11031 ServerResponse: googleapi.ServerResponse{ 11032 Header: res.Header, 11033 HTTPStatusCode: res.StatusCode, 11034 }, 11035 } 11036 target := &ret 11037 if err := gensupport.DecodeResponse(target, res); err != nil { 11038 return nil, err 11039 } 11040 return ret, nil 11041 // { 11042 // "description": "Gets the specified operation.", 11043 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 11044 // "httpMethod": "GET", 11045 // "id": "container.projects.locations.operations.get", 11046 // "parameterOrder": [ 11047 // "name" 11048 // ], 11049 // "parameters": { 11050 // "name": { 11051 // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", 11052 // "location": "path", 11053 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 11054 // "required": true, 11055 // "type": "string" 11056 // }, 11057 // "operationId": { 11058 // "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", 11059 // "location": "query", 11060 // "type": "string" 11061 // }, 11062 // "projectId": { 11063 // "description": "Required. 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.", 11064 // "location": "query", 11065 // "type": "string" 11066 // }, 11067 // "zone": { 11068 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 11069 // "location": "query", 11070 // "type": "string" 11071 // } 11072 // }, 11073 // "path": "v1beta1/{+name}", 11074 // "response": { 11075 // "$ref": "Operation" 11076 // }, 11077 // "scopes": [ 11078 // "https://www.googleapis.com/auth/cloud-platform" 11079 // ] 11080 // } 11081 11082} 11083 11084// method id "container.projects.locations.operations.list": 11085 11086type ProjectsLocationsOperationsListCall struct { 11087 s *Service 11088 parent string 11089 urlParams_ gensupport.URLParams 11090 ifNoneMatch_ string 11091 ctx_ context.Context 11092 header_ http.Header 11093} 11094 11095// List: Lists all operations in a project in the specified zone or all 11096// zones. 11097func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall { 11098 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11099 c.parent = parent 11100 return c 11101} 11102 11103// ProjectId sets the optional parameter "projectId": Required. 11104// Deprecated. The Google Developers Console [project ID or 11105// project 11106// number](https://support.google.com/cloud/answer/6158840). 11107// This 11108// field has been deprecated and replaced by the parent field. 11109func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *ProjectsLocationsOperationsListCall { 11110 c.urlParams_.Set("projectId", projectId) 11111 return c 11112} 11113 11114// Zone sets the optional parameter "zone": Required. Deprecated. The 11115// name of the Google Compute 11116// Engine 11117// [zone](https://cloud.google.com/compute/docs/zones#available) to 11118// return 11119// operations for, or `-` for all zones. This field has been deprecated 11120// and 11121// replaced by the parent field. 11122func (c *ProjectsLocationsOperationsListCall) Zone(zone string) *ProjectsLocationsOperationsListCall { 11123 c.urlParams_.Set("zone", zone) 11124 return c 11125} 11126 11127// Fields allows partial responses to be retrieved. See 11128// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11129// for more information. 11130func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 11131 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11132 return c 11133} 11134 11135// IfNoneMatch sets the optional parameter which makes the operation 11136// fail if the object's ETag matches the given value. This is useful for 11137// getting updates only after the object has changed since the last 11138// request. Use googleapi.IsNotModified to check whether the response 11139// error from Do is the result of In-None-Match. 11140func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 11141 c.ifNoneMatch_ = entityTag 11142 return c 11143} 11144 11145// Context sets the context to be used in this call's Do method. Any 11146// pending HTTP request will be aborted if the provided context is 11147// canceled. 11148func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 11149 c.ctx_ = ctx 11150 return c 11151} 11152 11153// Header returns an http.Header that can be modified by the caller to 11154// add HTTP headers to the request. 11155func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 11156 if c.header_ == nil { 11157 c.header_ = make(http.Header) 11158 } 11159 return c.header_ 11160} 11161 11162func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 11163 reqHeaders := make(http.Header) 11164 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 11165 for k, v := range c.header_ { 11166 reqHeaders[k] = v 11167 } 11168 reqHeaders.Set("User-Agent", c.s.userAgent()) 11169 if c.ifNoneMatch_ != "" { 11170 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11171 } 11172 var body io.Reader = nil 11173 c.urlParams_.Set("alt", alt) 11174 c.urlParams_.Set("prettyPrint", "false") 11175 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/operations") 11176 urls += "?" + c.urlParams_.Encode() 11177 req, err := http.NewRequest("GET", urls, body) 11178 if err != nil { 11179 return nil, err 11180 } 11181 req.Header = reqHeaders 11182 googleapi.Expand(req.URL, map[string]string{ 11183 "parent": c.parent, 11184 }) 11185 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11186} 11187 11188// Do executes the "container.projects.locations.operations.list" call. 11189// Exactly one of *ListOperationsResponse or error will be non-nil. Any 11190// non-2xx status code is an error. Response headers are in either 11191// *ListOperationsResponse.ServerResponse.Header or (if a response was 11192// returned at all) in error.(*googleapi.Error).Header. Use 11193// googleapi.IsNotModified to check whether the returned error was 11194// because http.StatusNotModified was returned. 11195func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 11196 gensupport.SetOptions(c.urlParams_, opts...) 11197 res, err := c.doRequest("json") 11198 if res != nil && res.StatusCode == http.StatusNotModified { 11199 if res.Body != nil { 11200 res.Body.Close() 11201 } 11202 return nil, &googleapi.Error{ 11203 Code: res.StatusCode, 11204 Header: res.Header, 11205 } 11206 } 11207 if err != nil { 11208 return nil, err 11209 } 11210 defer googleapi.CloseBody(res) 11211 if err := googleapi.CheckResponse(res); err != nil { 11212 return nil, err 11213 } 11214 ret := &ListOperationsResponse{ 11215 ServerResponse: googleapi.ServerResponse{ 11216 Header: res.Header, 11217 HTTPStatusCode: res.StatusCode, 11218 }, 11219 } 11220 target := &ret 11221 if err := gensupport.DecodeResponse(target, res); err != nil { 11222 return nil, err 11223 } 11224 return ret, nil 11225 // { 11226 // "description": "Lists all operations in a project in the specified zone or all zones.", 11227 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", 11228 // "httpMethod": "GET", 11229 // "id": "container.projects.locations.operations.list", 11230 // "parameterOrder": [ 11231 // "parent" 11232 // ], 11233 // "parameters": { 11234 // "parent": { 11235 // "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.", 11236 // "location": "path", 11237 // "pattern": "^projects/[^/]+/locations/[^/]+$", 11238 // "required": true, 11239 // "type": "string" 11240 // }, 11241 // "projectId": { 11242 // "description": "Required. 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.", 11243 // "location": "query", 11244 // "type": "string" 11245 // }, 11246 // "zone": { 11247 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) to return\noperations for, or `-` for all zones. This field has been deprecated and\nreplaced by the parent field.", 11248 // "location": "query", 11249 // "type": "string" 11250 // } 11251 // }, 11252 // "path": "v1beta1/{+parent}/operations", 11253 // "response": { 11254 // "$ref": "ListOperationsResponse" 11255 // }, 11256 // "scopes": [ 11257 // "https://www.googleapis.com/auth/cloud-platform" 11258 // ] 11259 // } 11260 11261} 11262 11263// method id "container.projects.zones.getServerconfig": 11264 11265type ProjectsZonesGetServerconfigCall struct { 11266 s *Service 11267 projectId string 11268 zone string 11269 urlParams_ gensupport.URLParams 11270 ifNoneMatch_ string 11271 ctx_ context.Context 11272 header_ http.Header 11273} 11274 11275// GetServerconfig: Returns configuration info about the Google 11276// Kubernetes Engine service. 11277func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { 11278 c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11279 c.projectId = projectId 11280 c.zone = zone 11281 return c 11282} 11283 11284// Name sets the optional parameter "name": The name (project and 11285// location) of the server config to get, 11286// specified in the format 'projects/*/locations/*'. 11287func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { 11288 c.urlParams_.Set("name", name) 11289 return c 11290} 11291 11292// Fields allows partial responses to be retrieved. See 11293// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11294// for more information. 11295func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall { 11296 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11297 return c 11298} 11299 11300// IfNoneMatch sets the optional parameter which makes the operation 11301// fail if the object's ETag matches the given value. This is useful for 11302// getting updates only after the object has changed since the last 11303// request. Use googleapi.IsNotModified to check whether the response 11304// error from Do is the result of In-None-Match. 11305func (c *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall { 11306 c.ifNoneMatch_ = entityTag 11307 return c 11308} 11309 11310// Context sets the context to be used in this call's Do method. Any 11311// pending HTTP request will be aborted if the provided context is 11312// canceled. 11313func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall { 11314 c.ctx_ = ctx 11315 return c 11316} 11317 11318// Header returns an http.Header that can be modified by the caller to 11319// add HTTP headers to the request. 11320func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { 11321 if c.header_ == nil { 11322 c.header_ = make(http.Header) 11323 } 11324 return c.header_ 11325} 11326 11327func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { 11328 reqHeaders := make(http.Header) 11329 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 11330 for k, v := range c.header_ { 11331 reqHeaders[k] = v 11332 } 11333 reqHeaders.Set("User-Agent", c.s.userAgent()) 11334 if c.ifNoneMatch_ != "" { 11335 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11336 } 11337 var body io.Reader = nil 11338 c.urlParams_.Set("alt", alt) 11339 c.urlParams_.Set("prettyPrint", "false") 11340 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/serverconfig") 11341 urls += "?" + c.urlParams_.Encode() 11342 req, err := http.NewRequest("GET", urls, body) 11343 if err != nil { 11344 return nil, err 11345 } 11346 req.Header = reqHeaders 11347 googleapi.Expand(req.URL, map[string]string{ 11348 "projectId": c.projectId, 11349 "zone": c.zone, 11350 }) 11351 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11352} 11353 11354// Do executes the "container.projects.zones.getServerconfig" call. 11355// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx 11356// status code is an error. Response headers are in either 11357// *ServerConfig.ServerResponse.Header or (if a response was returned at 11358// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11359// to check whether the returned error was because 11360// http.StatusNotModified was returned. 11361func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { 11362 gensupport.SetOptions(c.urlParams_, opts...) 11363 res, err := c.doRequest("json") 11364 if res != nil && res.StatusCode == http.StatusNotModified { 11365 if res.Body != nil { 11366 res.Body.Close() 11367 } 11368 return nil, &googleapi.Error{ 11369 Code: res.StatusCode, 11370 Header: res.Header, 11371 } 11372 } 11373 if err != nil { 11374 return nil, err 11375 } 11376 defer googleapi.CloseBody(res) 11377 if err := googleapi.CheckResponse(res); err != nil { 11378 return nil, err 11379 } 11380 ret := &ServerConfig{ 11381 ServerResponse: googleapi.ServerResponse{ 11382 Header: res.Header, 11383 HTTPStatusCode: res.StatusCode, 11384 }, 11385 } 11386 target := &ret 11387 if err := gensupport.DecodeResponse(target, res); err != nil { 11388 return nil, err 11389 } 11390 return ret, nil 11391 // { 11392 // "description": "Returns configuration info about the Google Kubernetes Engine service.", 11393 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", 11394 // "httpMethod": "GET", 11395 // "id": "container.projects.zones.getServerconfig", 11396 // "parameterOrder": [ 11397 // "projectId", 11398 // "zone" 11399 // ], 11400 // "parameters": { 11401 // "name": { 11402 // "description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.", 11403 // "location": "query", 11404 // "type": "string" 11405 // }, 11406 // "projectId": { 11407 // "description": "Required. 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.", 11408 // "location": "path", 11409 // "required": true, 11410 // "type": "string" 11411 // }, 11412 // "zone": { 11413 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) to return\noperations for. This field has been deprecated and replaced by the name\nfield.", 11414 // "location": "path", 11415 // "required": true, 11416 // "type": "string" 11417 // } 11418 // }, 11419 // "path": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", 11420 // "response": { 11421 // "$ref": "ServerConfig" 11422 // }, 11423 // "scopes": [ 11424 // "https://www.googleapis.com/auth/cloud-platform" 11425 // ] 11426 // } 11427 11428} 11429 11430// method id "container.projects.zones.clusters.addons": 11431 11432type ProjectsZonesClustersAddonsCall struct { 11433 s *Service 11434 projectId string 11435 zone string 11436 clusterId string 11437 setaddonsconfigrequest *SetAddonsConfigRequest 11438 urlParams_ gensupport.URLParams 11439 ctx_ context.Context 11440 header_ http.Header 11441} 11442 11443// Addons: Sets the addons for a specific cluster. 11444func (r *ProjectsZonesClustersService) Addons(projectId string, zone string, clusterId string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsZonesClustersAddonsCall { 11445 c := &ProjectsZonesClustersAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11446 c.projectId = projectId 11447 c.zone = zone 11448 c.clusterId = clusterId 11449 c.setaddonsconfigrequest = setaddonsconfigrequest 11450 return c 11451} 11452 11453// Fields allows partial responses to be retrieved. See 11454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11455// for more information. 11456func (c *ProjectsZonesClustersAddonsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersAddonsCall { 11457 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11458 return c 11459} 11460 11461// Context sets the context to be used in this call's Do method. Any 11462// pending HTTP request will be aborted if the provided context is 11463// canceled. 11464func (c *ProjectsZonesClustersAddonsCall) Context(ctx context.Context) *ProjectsZonesClustersAddonsCall { 11465 c.ctx_ = ctx 11466 return c 11467} 11468 11469// Header returns an http.Header that can be modified by the caller to 11470// add HTTP headers to the request. 11471func (c *ProjectsZonesClustersAddonsCall) Header() http.Header { 11472 if c.header_ == nil { 11473 c.header_ = make(http.Header) 11474 } 11475 return c.header_ 11476} 11477 11478func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) { 11479 reqHeaders := make(http.Header) 11480 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 11481 for k, v := range c.header_ { 11482 reqHeaders[k] = v 11483 } 11484 reqHeaders.Set("User-Agent", c.s.userAgent()) 11485 var body io.Reader = nil 11486 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) 11487 if err != nil { 11488 return nil, err 11489 } 11490 reqHeaders.Set("Content-Type", "application/json") 11491 c.urlParams_.Set("alt", alt) 11492 c.urlParams_.Set("prettyPrint", "false") 11493 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") 11494 urls += "?" + c.urlParams_.Encode() 11495 req, err := http.NewRequest("POST", urls, body) 11496 if err != nil { 11497 return nil, err 11498 } 11499 req.Header = reqHeaders 11500 googleapi.Expand(req.URL, map[string]string{ 11501 "projectId": c.projectId, 11502 "zone": c.zone, 11503 "clusterId": c.clusterId, 11504 }) 11505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11506} 11507 11508// Do executes the "container.projects.zones.clusters.addons" call. 11509// Exactly one of *Operation or error will be non-nil. Any non-2xx 11510// status code is an error. Response headers are in either 11511// *Operation.ServerResponse.Header or (if a response was returned at 11512// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11513// to check whether the returned error was because 11514// http.StatusNotModified was returned. 11515func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11516 gensupport.SetOptions(c.urlParams_, opts...) 11517 res, err := c.doRequest("json") 11518 if res != nil && res.StatusCode == http.StatusNotModified { 11519 if res.Body != nil { 11520 res.Body.Close() 11521 } 11522 return nil, &googleapi.Error{ 11523 Code: res.StatusCode, 11524 Header: res.Header, 11525 } 11526 } 11527 if err != nil { 11528 return nil, err 11529 } 11530 defer googleapi.CloseBody(res) 11531 if err := googleapi.CheckResponse(res); err != nil { 11532 return nil, err 11533 } 11534 ret := &Operation{ 11535 ServerResponse: googleapi.ServerResponse{ 11536 Header: res.Header, 11537 HTTPStatusCode: res.StatusCode, 11538 }, 11539 } 11540 target := &ret 11541 if err := gensupport.DecodeResponse(target, res); err != nil { 11542 return nil, err 11543 } 11544 return ret, nil 11545 // { 11546 // "description": "Sets the addons for a specific cluster.", 11547 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", 11548 // "httpMethod": "POST", 11549 // "id": "container.projects.zones.clusters.addons", 11550 // "parameterOrder": [ 11551 // "projectId", 11552 // "zone", 11553 // "clusterId" 11554 // ], 11555 // "parameters": { 11556 // "clusterId": { 11557 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 11558 // "location": "path", 11559 // "required": true, 11560 // "type": "string" 11561 // }, 11562 // "projectId": { 11563 // "description": "Required. 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.", 11564 // "location": "path", 11565 // "required": true, 11566 // "type": "string" 11567 // }, 11568 // "zone": { 11569 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 11570 // "location": "path", 11571 // "required": true, 11572 // "type": "string" 11573 // } 11574 // }, 11575 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", 11576 // "request": { 11577 // "$ref": "SetAddonsConfigRequest" 11578 // }, 11579 // "response": { 11580 // "$ref": "Operation" 11581 // }, 11582 // "scopes": [ 11583 // "https://www.googleapis.com/auth/cloud-platform" 11584 // ] 11585 // } 11586 11587} 11588 11589// method id "container.projects.zones.clusters.completeIpRotation": 11590 11591type ProjectsZonesClustersCompleteIpRotationCall struct { 11592 s *Service 11593 projectId string 11594 zone string 11595 clusterId string 11596 completeiprotationrequest *CompleteIPRotationRequest 11597 urlParams_ gensupport.URLParams 11598 ctx_ context.Context 11599 header_ http.Header 11600} 11601 11602// CompleteIpRotation: Completes master IP rotation. 11603func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall { 11604 c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11605 c.projectId = projectId 11606 c.zone = zone 11607 c.clusterId = clusterId 11608 c.completeiprotationrequest = completeiprotationrequest 11609 return c 11610} 11611 11612// Fields allows partial responses to be retrieved. See 11613// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11614// for more information. 11615func (c *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall { 11616 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11617 return c 11618} 11619 11620// Context sets the context to be used in this call's Do method. Any 11621// pending HTTP request will be aborted if the provided context is 11622// canceled. 11623func (c *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall { 11624 c.ctx_ = ctx 11625 return c 11626} 11627 11628// Header returns an http.Header that can be modified by the caller to 11629// add HTTP headers to the request. 11630func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { 11631 if c.header_ == nil { 11632 c.header_ = make(http.Header) 11633 } 11634 return c.header_ 11635} 11636 11637func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { 11638 reqHeaders := make(http.Header) 11639 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 11640 for k, v := range c.header_ { 11641 reqHeaders[k] = v 11642 } 11643 reqHeaders.Set("User-Agent", c.s.userAgent()) 11644 var body io.Reader = nil 11645 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) 11646 if err != nil { 11647 return nil, err 11648 } 11649 reqHeaders.Set("Content-Type", "application/json") 11650 c.urlParams_.Set("alt", alt) 11651 c.urlParams_.Set("prettyPrint", "false") 11652 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") 11653 urls += "?" + c.urlParams_.Encode() 11654 req, err := http.NewRequest("POST", urls, body) 11655 if err != nil { 11656 return nil, err 11657 } 11658 req.Header = reqHeaders 11659 googleapi.Expand(req.URL, map[string]string{ 11660 "projectId": c.projectId, 11661 "zone": c.zone, 11662 "clusterId": c.clusterId, 11663 }) 11664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11665} 11666 11667// Do executes the "container.projects.zones.clusters.completeIpRotation" call. 11668// Exactly one of *Operation or error will be non-nil. Any non-2xx 11669// status code is an error. Response headers are in either 11670// *Operation.ServerResponse.Header or (if a response was returned at 11671// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11672// to check whether the returned error was because 11673// http.StatusNotModified was returned. 11674func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11675 gensupport.SetOptions(c.urlParams_, opts...) 11676 res, err := c.doRequest("json") 11677 if res != nil && res.StatusCode == http.StatusNotModified { 11678 if res.Body != nil { 11679 res.Body.Close() 11680 } 11681 return nil, &googleapi.Error{ 11682 Code: res.StatusCode, 11683 Header: res.Header, 11684 } 11685 } 11686 if err != nil { 11687 return nil, err 11688 } 11689 defer googleapi.CloseBody(res) 11690 if err := googleapi.CheckResponse(res); err != nil { 11691 return nil, err 11692 } 11693 ret := &Operation{ 11694 ServerResponse: googleapi.ServerResponse{ 11695 Header: res.Header, 11696 HTTPStatusCode: res.StatusCode, 11697 }, 11698 } 11699 target := &ret 11700 if err := gensupport.DecodeResponse(target, res); err != nil { 11701 return nil, err 11702 } 11703 return ret, nil 11704 // { 11705 // "description": "Completes master IP rotation.", 11706 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", 11707 // "httpMethod": "POST", 11708 // "id": "container.projects.zones.clusters.completeIpRotation", 11709 // "parameterOrder": [ 11710 // "projectId", 11711 // "zone", 11712 // "clusterId" 11713 // ], 11714 // "parameters": { 11715 // "clusterId": { 11716 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 11717 // "location": "path", 11718 // "required": true, 11719 // "type": "string" 11720 // }, 11721 // "projectId": { 11722 // "description": "Required. 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.", 11723 // "location": "path", 11724 // "required": true, 11725 // "type": "string" 11726 // }, 11727 // "zone": { 11728 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 11729 // "location": "path", 11730 // "required": true, 11731 // "type": "string" 11732 // } 11733 // }, 11734 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", 11735 // "request": { 11736 // "$ref": "CompleteIPRotationRequest" 11737 // }, 11738 // "response": { 11739 // "$ref": "Operation" 11740 // }, 11741 // "scopes": [ 11742 // "https://www.googleapis.com/auth/cloud-platform" 11743 // ] 11744 // } 11745 11746} 11747 11748// method id "container.projects.zones.clusters.create": 11749 11750type ProjectsZonesClustersCreateCall struct { 11751 s *Service 11752 projectId string 11753 zone string 11754 createclusterrequest *CreateClusterRequest 11755 urlParams_ gensupport.URLParams 11756 ctx_ context.Context 11757 header_ http.Header 11758} 11759 11760// Create: Creates a cluster, consisting of the specified number and 11761// type of Google 11762// Compute Engine instances. 11763// 11764// By default, the cluster is created in the 11765// project's 11766// [default 11767// network](https://cloud.google.com/compute/docs/netw 11768// orks-and-firewalls#networks). 11769// 11770// One firewall is added for the cluster. After cluster creation, 11771// the Kubelet creates routes for each node to allow the containers 11772// on that node to communicate with all other instances in 11773// the 11774// cluster. 11775// 11776// Finally, an entry is added to the project's global metadata 11777// indicating 11778// which CIDR range the cluster is using. 11779func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { 11780 c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11781 c.projectId = projectId 11782 c.zone = zone 11783 c.createclusterrequest = createclusterrequest 11784 return c 11785} 11786 11787// Fields allows partial responses to be retrieved. See 11788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11789// for more information. 11790func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { 11791 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11792 return c 11793} 11794 11795// Context sets the context to be used in this call's Do method. Any 11796// pending HTTP request will be aborted if the provided context is 11797// canceled. 11798func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall { 11799 c.ctx_ = ctx 11800 return c 11801} 11802 11803// Header returns an http.Header that can be modified by the caller to 11804// add HTTP headers to the request. 11805func (c *ProjectsZonesClustersCreateCall) Header() http.Header { 11806 if c.header_ == nil { 11807 c.header_ = make(http.Header) 11808 } 11809 return c.header_ 11810} 11811 11812func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { 11813 reqHeaders := make(http.Header) 11814 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 11815 for k, v := range c.header_ { 11816 reqHeaders[k] = v 11817 } 11818 reqHeaders.Set("User-Agent", c.s.userAgent()) 11819 var body io.Reader = nil 11820 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) 11821 if err != nil { 11822 return nil, err 11823 } 11824 reqHeaders.Set("Content-Type", "application/json") 11825 c.urlParams_.Set("alt", alt) 11826 c.urlParams_.Set("prettyPrint", "false") 11827 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") 11828 urls += "?" + c.urlParams_.Encode() 11829 req, err := http.NewRequest("POST", urls, body) 11830 if err != nil { 11831 return nil, err 11832 } 11833 req.Header = reqHeaders 11834 googleapi.Expand(req.URL, map[string]string{ 11835 "projectId": c.projectId, 11836 "zone": c.zone, 11837 }) 11838 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11839} 11840 11841// Do executes the "container.projects.zones.clusters.create" call. 11842// Exactly one of *Operation or error will be non-nil. Any non-2xx 11843// status code is an error. Response headers are in either 11844// *Operation.ServerResponse.Header or (if a response was returned at 11845// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11846// to check whether the returned error was because 11847// http.StatusNotModified was returned. 11848func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11849 gensupport.SetOptions(c.urlParams_, opts...) 11850 res, err := c.doRequest("json") 11851 if res != nil && res.StatusCode == http.StatusNotModified { 11852 if res.Body != nil { 11853 res.Body.Close() 11854 } 11855 return nil, &googleapi.Error{ 11856 Code: res.StatusCode, 11857 Header: res.Header, 11858 } 11859 } 11860 if err != nil { 11861 return nil, err 11862 } 11863 defer googleapi.CloseBody(res) 11864 if err := googleapi.CheckResponse(res); err != nil { 11865 return nil, err 11866 } 11867 ret := &Operation{ 11868 ServerResponse: googleapi.ServerResponse{ 11869 Header: res.Header, 11870 HTTPStatusCode: res.StatusCode, 11871 }, 11872 } 11873 target := &ret 11874 if err := gensupport.DecodeResponse(target, res); err != nil { 11875 return nil, err 11876 } 11877 return ret, nil 11878 // { 11879 // "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\nnetwork](https://cloud.google.com/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.", 11880 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 11881 // "httpMethod": "POST", 11882 // "id": "container.projects.zones.clusters.create", 11883 // "parameterOrder": [ 11884 // "projectId", 11885 // "zone" 11886 // ], 11887 // "parameters": { 11888 // "projectId": { 11889 // "description": "Required. 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.", 11890 // "location": "path", 11891 // "required": true, 11892 // "type": "string" 11893 // }, 11894 // "zone": { 11895 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the parent\nfield.", 11896 // "location": "path", 11897 // "required": true, 11898 // "type": "string" 11899 // } 11900 // }, 11901 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 11902 // "request": { 11903 // "$ref": "CreateClusterRequest" 11904 // }, 11905 // "response": { 11906 // "$ref": "Operation" 11907 // }, 11908 // "scopes": [ 11909 // "https://www.googleapis.com/auth/cloud-platform" 11910 // ] 11911 // } 11912 11913} 11914 11915// method id "container.projects.zones.clusters.delete": 11916 11917type ProjectsZonesClustersDeleteCall struct { 11918 s *Service 11919 projectId string 11920 zone string 11921 clusterId string 11922 urlParams_ gensupport.URLParams 11923 ctx_ context.Context 11924 header_ http.Header 11925} 11926 11927// Delete: Deletes the cluster, including the Kubernetes endpoint and 11928// all worker 11929// nodes. 11930// 11931// Firewalls and routes that were configured during cluster creation 11932// are also deleted. 11933// 11934// Other Google Compute Engine resources that might be in use by the 11935// cluster, 11936// such as load balancer resources, are not deleted if they weren't 11937// present 11938// when the cluster was initially created. 11939func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { 11940 c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11941 c.projectId = projectId 11942 c.zone = zone 11943 c.clusterId = clusterId 11944 return c 11945} 11946 11947// Name sets the optional parameter "name": The name (project, location, 11948// cluster) of the cluster to delete. 11949// Specified in the format 'projects/*/locations/*/clusters/*'. 11950func (c *ProjectsZonesClustersDeleteCall) Name(name string) *ProjectsZonesClustersDeleteCall { 11951 c.urlParams_.Set("name", name) 11952 return c 11953} 11954 11955// Fields allows partial responses to be retrieved. See 11956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11957// for more information. 11958func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { 11959 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11960 return c 11961} 11962 11963// Context sets the context to be used in this call's Do method. Any 11964// pending HTTP request will be aborted if the provided context is 11965// canceled. 11966func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall { 11967 c.ctx_ = ctx 11968 return c 11969} 11970 11971// Header returns an http.Header that can be modified by the caller to 11972// add HTTP headers to the request. 11973func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { 11974 if c.header_ == nil { 11975 c.header_ = make(http.Header) 11976 } 11977 return c.header_ 11978} 11979 11980func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { 11981 reqHeaders := make(http.Header) 11982 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 11983 for k, v := range c.header_ { 11984 reqHeaders[k] = v 11985 } 11986 reqHeaders.Set("User-Agent", c.s.userAgent()) 11987 var body io.Reader = nil 11988 c.urlParams_.Set("alt", alt) 11989 c.urlParams_.Set("prettyPrint", "false") 11990 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 11991 urls += "?" + c.urlParams_.Encode() 11992 req, err := http.NewRequest("DELETE", urls, body) 11993 if err != nil { 11994 return nil, err 11995 } 11996 req.Header = reqHeaders 11997 googleapi.Expand(req.URL, map[string]string{ 11998 "projectId": c.projectId, 11999 "zone": c.zone, 12000 "clusterId": c.clusterId, 12001 }) 12002 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12003} 12004 12005// Do executes the "container.projects.zones.clusters.delete" call. 12006// Exactly one of *Operation or error will be non-nil. Any non-2xx 12007// status code is an error. Response headers are in either 12008// *Operation.ServerResponse.Header or (if a response was returned at 12009// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12010// to check whether the returned error was because 12011// http.StatusNotModified was returned. 12012func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12013 gensupport.SetOptions(c.urlParams_, opts...) 12014 res, err := c.doRequest("json") 12015 if res != nil && res.StatusCode == http.StatusNotModified { 12016 if res.Body != nil { 12017 res.Body.Close() 12018 } 12019 return nil, &googleapi.Error{ 12020 Code: res.StatusCode, 12021 Header: res.Header, 12022 } 12023 } 12024 if err != nil { 12025 return nil, err 12026 } 12027 defer googleapi.CloseBody(res) 12028 if err := googleapi.CheckResponse(res); err != nil { 12029 return nil, err 12030 } 12031 ret := &Operation{ 12032 ServerResponse: googleapi.ServerResponse{ 12033 Header: res.Header, 12034 HTTPStatusCode: res.StatusCode, 12035 }, 12036 } 12037 target := &ret 12038 if err := gensupport.DecodeResponse(target, res); err != nil { 12039 return nil, err 12040 } 12041 return ret, nil 12042 // { 12043 // "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.", 12044 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 12045 // "httpMethod": "DELETE", 12046 // "id": "container.projects.zones.clusters.delete", 12047 // "parameterOrder": [ 12048 // "projectId", 12049 // "zone", 12050 // "clusterId" 12051 // ], 12052 // "parameters": { 12053 // "clusterId": { 12054 // "description": "Required. Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", 12055 // "location": "path", 12056 // "required": true, 12057 // "type": "string" 12058 // }, 12059 // "name": { 12060 // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 12061 // "location": "query", 12062 // "type": "string" 12063 // }, 12064 // "projectId": { 12065 // "description": "Required. 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.", 12066 // "location": "path", 12067 // "required": true, 12068 // "type": "string" 12069 // }, 12070 // "zone": { 12071 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 12072 // "location": "path", 12073 // "required": true, 12074 // "type": "string" 12075 // } 12076 // }, 12077 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 12078 // "response": { 12079 // "$ref": "Operation" 12080 // }, 12081 // "scopes": [ 12082 // "https://www.googleapis.com/auth/cloud-platform" 12083 // ] 12084 // } 12085 12086} 12087 12088// method id "container.projects.zones.clusters.get": 12089 12090type ProjectsZonesClustersGetCall struct { 12091 s *Service 12092 projectId string 12093 zone string 12094 clusterId string 12095 urlParams_ gensupport.URLParams 12096 ifNoneMatch_ string 12097 ctx_ context.Context 12098 header_ http.Header 12099} 12100 12101// Get: Gets the details for a specific cluster. 12102func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { 12103 c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12104 c.projectId = projectId 12105 c.zone = zone 12106 c.clusterId = clusterId 12107 return c 12108} 12109 12110// Name sets the optional parameter "name": The name (project, location, 12111// cluster) of the cluster to retrieve. 12112// Specified in the format 'projects/*/locations/*/clusters/*'. 12113func (c *ProjectsZonesClustersGetCall) Name(name string) *ProjectsZonesClustersGetCall { 12114 c.urlParams_.Set("name", name) 12115 return c 12116} 12117 12118// Fields allows partial responses to be retrieved. See 12119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12120// for more information. 12121func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { 12122 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12123 return c 12124} 12125 12126// IfNoneMatch sets the optional parameter which makes the operation 12127// fail if the object's ETag matches the given value. This is useful for 12128// getting updates only after the object has changed since the last 12129// request. Use googleapi.IsNotModified to check whether the response 12130// error from Do is the result of In-None-Match. 12131func (c *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall { 12132 c.ifNoneMatch_ = entityTag 12133 return c 12134} 12135 12136// Context sets the context to be used in this call's Do method. Any 12137// pending HTTP request will be aborted if the provided context is 12138// canceled. 12139func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall { 12140 c.ctx_ = ctx 12141 return c 12142} 12143 12144// Header returns an http.Header that can be modified by the caller to 12145// add HTTP headers to the request. 12146func (c *ProjectsZonesClustersGetCall) Header() http.Header { 12147 if c.header_ == nil { 12148 c.header_ = make(http.Header) 12149 } 12150 return c.header_ 12151} 12152 12153func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { 12154 reqHeaders := make(http.Header) 12155 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12156 for k, v := range c.header_ { 12157 reqHeaders[k] = v 12158 } 12159 reqHeaders.Set("User-Agent", c.s.userAgent()) 12160 if c.ifNoneMatch_ != "" { 12161 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12162 } 12163 var body io.Reader = nil 12164 c.urlParams_.Set("alt", alt) 12165 c.urlParams_.Set("prettyPrint", "false") 12166 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 12167 urls += "?" + c.urlParams_.Encode() 12168 req, err := http.NewRequest("GET", urls, body) 12169 if err != nil { 12170 return nil, err 12171 } 12172 req.Header = reqHeaders 12173 googleapi.Expand(req.URL, map[string]string{ 12174 "projectId": c.projectId, 12175 "zone": c.zone, 12176 "clusterId": c.clusterId, 12177 }) 12178 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12179} 12180 12181// Do executes the "container.projects.zones.clusters.get" call. 12182// Exactly one of *Cluster or error will be non-nil. Any non-2xx status 12183// code is an error. Response headers are in either 12184// *Cluster.ServerResponse.Header or (if a response was returned at all) 12185// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12186// check whether the returned error was because http.StatusNotModified 12187// was returned. 12188func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { 12189 gensupport.SetOptions(c.urlParams_, opts...) 12190 res, err := c.doRequest("json") 12191 if res != nil && res.StatusCode == http.StatusNotModified { 12192 if res.Body != nil { 12193 res.Body.Close() 12194 } 12195 return nil, &googleapi.Error{ 12196 Code: res.StatusCode, 12197 Header: res.Header, 12198 } 12199 } 12200 if err != nil { 12201 return nil, err 12202 } 12203 defer googleapi.CloseBody(res) 12204 if err := googleapi.CheckResponse(res); err != nil { 12205 return nil, err 12206 } 12207 ret := &Cluster{ 12208 ServerResponse: googleapi.ServerResponse{ 12209 Header: res.Header, 12210 HTTPStatusCode: res.StatusCode, 12211 }, 12212 } 12213 target := &ret 12214 if err := gensupport.DecodeResponse(target, res); err != nil { 12215 return nil, err 12216 } 12217 return ret, nil 12218 // { 12219 // "description": "Gets the details for a specific cluster.", 12220 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 12221 // "httpMethod": "GET", 12222 // "id": "container.projects.zones.clusters.get", 12223 // "parameterOrder": [ 12224 // "projectId", 12225 // "zone", 12226 // "clusterId" 12227 // ], 12228 // "parameters": { 12229 // "clusterId": { 12230 // "description": "Required. Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", 12231 // "location": "path", 12232 // "required": true, 12233 // "type": "string" 12234 // }, 12235 // "name": { 12236 // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", 12237 // "location": "query", 12238 // "type": "string" 12239 // }, 12240 // "projectId": { 12241 // "description": "Required. 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.", 12242 // "location": "path", 12243 // "required": true, 12244 // "type": "string" 12245 // }, 12246 // "zone": { 12247 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 12248 // "location": "path", 12249 // "required": true, 12250 // "type": "string" 12251 // } 12252 // }, 12253 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 12254 // "response": { 12255 // "$ref": "Cluster" 12256 // }, 12257 // "scopes": [ 12258 // "https://www.googleapis.com/auth/cloud-platform" 12259 // ] 12260 // } 12261 12262} 12263 12264// method id "container.projects.zones.clusters.legacyAbac": 12265 12266type ProjectsZonesClustersLegacyAbacCall struct { 12267 s *Service 12268 projectId string 12269 zone string 12270 clusterId string 12271 setlegacyabacrequest *SetLegacyAbacRequest 12272 urlParams_ gensupport.URLParams 12273 ctx_ context.Context 12274 header_ http.Header 12275} 12276 12277// LegacyAbac: Enables or disables the ABAC authorization mechanism on a 12278// cluster. 12279func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall { 12280 c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12281 c.projectId = projectId 12282 c.zone = zone 12283 c.clusterId = clusterId 12284 c.setlegacyabacrequest = setlegacyabacrequest 12285 return c 12286} 12287 12288// Fields allows partial responses to be retrieved. See 12289// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12290// for more information. 12291func (c *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall { 12292 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12293 return c 12294} 12295 12296// Context sets the context to be used in this call's Do method. Any 12297// pending HTTP request will be aborted if the provided context is 12298// canceled. 12299func (c *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall { 12300 c.ctx_ = ctx 12301 return c 12302} 12303 12304// Header returns an http.Header that can be modified by the caller to 12305// add HTTP headers to the request. 12306func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { 12307 if c.header_ == nil { 12308 c.header_ = make(http.Header) 12309 } 12310 return c.header_ 12311} 12312 12313func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) { 12314 reqHeaders := make(http.Header) 12315 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12316 for k, v := range c.header_ { 12317 reqHeaders[k] = v 12318 } 12319 reqHeaders.Set("User-Agent", c.s.userAgent()) 12320 var body io.Reader = nil 12321 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) 12322 if err != nil { 12323 return nil, err 12324 } 12325 reqHeaders.Set("Content-Type", "application/json") 12326 c.urlParams_.Set("alt", alt) 12327 c.urlParams_.Set("prettyPrint", "false") 12328 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") 12329 urls += "?" + c.urlParams_.Encode() 12330 req, err := http.NewRequest("POST", urls, body) 12331 if err != nil { 12332 return nil, err 12333 } 12334 req.Header = reqHeaders 12335 googleapi.Expand(req.URL, map[string]string{ 12336 "projectId": c.projectId, 12337 "zone": c.zone, 12338 "clusterId": c.clusterId, 12339 }) 12340 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12341} 12342 12343// Do executes the "container.projects.zones.clusters.legacyAbac" call. 12344// Exactly one of *Operation or error will be non-nil. Any non-2xx 12345// status code is an error. Response headers are in either 12346// *Operation.ServerResponse.Header or (if a response was returned at 12347// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12348// to check whether the returned error was because 12349// http.StatusNotModified was returned. 12350func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12351 gensupport.SetOptions(c.urlParams_, opts...) 12352 res, err := c.doRequest("json") 12353 if res != nil && res.StatusCode == http.StatusNotModified { 12354 if res.Body != nil { 12355 res.Body.Close() 12356 } 12357 return nil, &googleapi.Error{ 12358 Code: res.StatusCode, 12359 Header: res.Header, 12360 } 12361 } 12362 if err != nil { 12363 return nil, err 12364 } 12365 defer googleapi.CloseBody(res) 12366 if err := googleapi.CheckResponse(res); err != nil { 12367 return nil, err 12368 } 12369 ret := &Operation{ 12370 ServerResponse: googleapi.ServerResponse{ 12371 Header: res.Header, 12372 HTTPStatusCode: res.StatusCode, 12373 }, 12374 } 12375 target := &ret 12376 if err := gensupport.DecodeResponse(target, res); err != nil { 12377 return nil, err 12378 } 12379 return ret, nil 12380 // { 12381 // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", 12382 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", 12383 // "httpMethod": "POST", 12384 // "id": "container.projects.zones.clusters.legacyAbac", 12385 // "parameterOrder": [ 12386 // "projectId", 12387 // "zone", 12388 // "clusterId" 12389 // ], 12390 // "parameters": { 12391 // "clusterId": { 12392 // "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", 12393 // "location": "path", 12394 // "required": true, 12395 // "type": "string" 12396 // }, 12397 // "projectId": { 12398 // "description": "Required. 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.", 12399 // "location": "path", 12400 // "required": true, 12401 // "type": "string" 12402 // }, 12403 // "zone": { 12404 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 12405 // "location": "path", 12406 // "required": true, 12407 // "type": "string" 12408 // } 12409 // }, 12410 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", 12411 // "request": { 12412 // "$ref": "SetLegacyAbacRequest" 12413 // }, 12414 // "response": { 12415 // "$ref": "Operation" 12416 // }, 12417 // "scopes": [ 12418 // "https://www.googleapis.com/auth/cloud-platform" 12419 // ] 12420 // } 12421 12422} 12423 12424// method id "container.projects.zones.clusters.list": 12425 12426type ProjectsZonesClustersListCall struct { 12427 s *Service 12428 projectId string 12429 zone string 12430 urlParams_ gensupport.URLParams 12431 ifNoneMatch_ string 12432 ctx_ context.Context 12433 header_ http.Header 12434} 12435 12436// List: Lists all clusters owned by a project in either the specified 12437// zone or all 12438// zones. 12439func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall { 12440 c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12441 c.projectId = projectId 12442 c.zone = zone 12443 return c 12444} 12445 12446// Parent sets the optional parameter "parent": The parent (project and 12447// location) where the clusters will be listed. 12448// Specified in the format 'projects/*/locations/*'. 12449// Location "-" matches all zones and all regions. 12450func (c *ProjectsZonesClustersListCall) Parent(parent string) *ProjectsZonesClustersListCall { 12451 c.urlParams_.Set("parent", parent) 12452 return c 12453} 12454 12455// Fields allows partial responses to be retrieved. See 12456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12457// for more information. 12458func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { 12459 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12460 return c 12461} 12462 12463// IfNoneMatch sets the optional parameter which makes the operation 12464// fail if the object's ETag matches the given value. This is useful for 12465// getting updates only after the object has changed since the last 12466// request. Use googleapi.IsNotModified to check whether the response 12467// error from Do is the result of In-None-Match. 12468func (c *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall { 12469 c.ifNoneMatch_ = entityTag 12470 return c 12471} 12472 12473// Context sets the context to be used in this call's Do method. Any 12474// pending HTTP request will be aborted if the provided context is 12475// canceled. 12476func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall { 12477 c.ctx_ = ctx 12478 return c 12479} 12480 12481// Header returns an http.Header that can be modified by the caller to 12482// add HTTP headers to the request. 12483func (c *ProjectsZonesClustersListCall) Header() http.Header { 12484 if c.header_ == nil { 12485 c.header_ = make(http.Header) 12486 } 12487 return c.header_ 12488} 12489 12490func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { 12491 reqHeaders := make(http.Header) 12492 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12493 for k, v := range c.header_ { 12494 reqHeaders[k] = v 12495 } 12496 reqHeaders.Set("User-Agent", c.s.userAgent()) 12497 if c.ifNoneMatch_ != "" { 12498 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12499 } 12500 var body io.Reader = nil 12501 c.urlParams_.Set("alt", alt) 12502 c.urlParams_.Set("prettyPrint", "false") 12503 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") 12504 urls += "?" + c.urlParams_.Encode() 12505 req, err := http.NewRequest("GET", urls, body) 12506 if err != nil { 12507 return nil, err 12508 } 12509 req.Header = reqHeaders 12510 googleapi.Expand(req.URL, map[string]string{ 12511 "projectId": c.projectId, 12512 "zone": c.zone, 12513 }) 12514 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12515} 12516 12517// Do executes the "container.projects.zones.clusters.list" call. 12518// Exactly one of *ListClustersResponse or error will be non-nil. Any 12519// non-2xx status code is an error. Response headers are in either 12520// *ListClustersResponse.ServerResponse.Header or (if a response was 12521// returned at all) in error.(*googleapi.Error).Header. Use 12522// googleapi.IsNotModified to check whether the returned error was 12523// because http.StatusNotModified was returned. 12524func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { 12525 gensupport.SetOptions(c.urlParams_, opts...) 12526 res, err := c.doRequest("json") 12527 if res != nil && res.StatusCode == http.StatusNotModified { 12528 if res.Body != nil { 12529 res.Body.Close() 12530 } 12531 return nil, &googleapi.Error{ 12532 Code: res.StatusCode, 12533 Header: res.Header, 12534 } 12535 } 12536 if err != nil { 12537 return nil, err 12538 } 12539 defer googleapi.CloseBody(res) 12540 if err := googleapi.CheckResponse(res); err != nil { 12541 return nil, err 12542 } 12543 ret := &ListClustersResponse{ 12544 ServerResponse: googleapi.ServerResponse{ 12545 Header: res.Header, 12546 HTTPStatusCode: res.StatusCode, 12547 }, 12548 } 12549 target := &ret 12550 if err := gensupport.DecodeResponse(target, res); err != nil { 12551 return nil, err 12552 } 12553 return ret, nil 12554 // { 12555 // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", 12556 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 12557 // "httpMethod": "GET", 12558 // "id": "container.projects.zones.clusters.list", 12559 // "parameterOrder": [ 12560 // "projectId", 12561 // "zone" 12562 // ], 12563 // "parameters": { 12564 // "parent": { 12565 // "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.", 12566 // "location": "query", 12567 // "type": "string" 12568 // }, 12569 // "projectId": { 12570 // "description": "Required. 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.", 12571 // "location": "path", 12572 // "required": true, 12573 // "type": "string" 12574 // }, 12575 // "zone": { 12576 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides, or \"-\" for all zones. This field has been deprecated and\nreplaced by the parent field.", 12577 // "location": "path", 12578 // "required": true, 12579 // "type": "string" 12580 // } 12581 // }, 12582 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", 12583 // "response": { 12584 // "$ref": "ListClustersResponse" 12585 // }, 12586 // "scopes": [ 12587 // "https://www.googleapis.com/auth/cloud-platform" 12588 // ] 12589 // } 12590 12591} 12592 12593// method id "container.projects.zones.clusters.locations": 12594 12595type ProjectsZonesClustersLocationsCall struct { 12596 s *Service 12597 projectId string 12598 zone string 12599 clusterId string 12600 setlocationsrequest *SetLocationsRequest 12601 urlParams_ gensupport.URLParams 12602 ctx_ context.Context 12603 header_ http.Header 12604} 12605 12606// Locations: Sets the locations for a specific cluster. 12607// Deprecated. 12608// Use 12609// [projects.locations.clusters.update](https://cloud.google.com/kube 12610// rnetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/ 12611// update) 12612// instead. 12613func (r *ProjectsZonesClustersService) Locations(projectId string, zone string, clusterId string, setlocationsrequest *SetLocationsRequest) *ProjectsZonesClustersLocationsCall { 12614 c := &ProjectsZonesClustersLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12615 c.projectId = projectId 12616 c.zone = zone 12617 c.clusterId = clusterId 12618 c.setlocationsrequest = setlocationsrequest 12619 return c 12620} 12621 12622// Fields allows partial responses to be retrieved. See 12623// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12624// for more information. 12625func (c *ProjectsZonesClustersLocationsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLocationsCall { 12626 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12627 return c 12628} 12629 12630// Context sets the context to be used in this call's Do method. Any 12631// pending HTTP request will be aborted if the provided context is 12632// canceled. 12633func (c *ProjectsZonesClustersLocationsCall) Context(ctx context.Context) *ProjectsZonesClustersLocationsCall { 12634 c.ctx_ = ctx 12635 return c 12636} 12637 12638// Header returns an http.Header that can be modified by the caller to 12639// add HTTP headers to the request. 12640func (c *ProjectsZonesClustersLocationsCall) Header() http.Header { 12641 if c.header_ == nil { 12642 c.header_ = make(http.Header) 12643 } 12644 return c.header_ 12645} 12646 12647func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) { 12648 reqHeaders := make(http.Header) 12649 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12650 for k, v := range c.header_ { 12651 reqHeaders[k] = v 12652 } 12653 reqHeaders.Set("User-Agent", c.s.userAgent()) 12654 var body io.Reader = nil 12655 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) 12656 if err != nil { 12657 return nil, err 12658 } 12659 reqHeaders.Set("Content-Type", "application/json") 12660 c.urlParams_.Set("alt", alt) 12661 c.urlParams_.Set("prettyPrint", "false") 12662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") 12663 urls += "?" + c.urlParams_.Encode() 12664 req, err := http.NewRequest("POST", urls, body) 12665 if err != nil { 12666 return nil, err 12667 } 12668 req.Header = reqHeaders 12669 googleapi.Expand(req.URL, map[string]string{ 12670 "projectId": c.projectId, 12671 "zone": c.zone, 12672 "clusterId": c.clusterId, 12673 }) 12674 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12675} 12676 12677// Do executes the "container.projects.zones.clusters.locations" call. 12678// Exactly one of *Operation or error will be non-nil. Any non-2xx 12679// status code is an error. Response headers are in either 12680// *Operation.ServerResponse.Header or (if a response was returned at 12681// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12682// to check whether the returned error was because 12683// http.StatusNotModified was returned. 12684func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12685 gensupport.SetOptions(c.urlParams_, opts...) 12686 res, err := c.doRequest("json") 12687 if res != nil && res.StatusCode == http.StatusNotModified { 12688 if res.Body != nil { 12689 res.Body.Close() 12690 } 12691 return nil, &googleapi.Error{ 12692 Code: res.StatusCode, 12693 Header: res.Header, 12694 } 12695 } 12696 if err != nil { 12697 return nil, err 12698 } 12699 defer googleapi.CloseBody(res) 12700 if err := googleapi.CheckResponse(res); err != nil { 12701 return nil, err 12702 } 12703 ret := &Operation{ 12704 ServerResponse: googleapi.ServerResponse{ 12705 Header: res.Header, 12706 HTTPStatusCode: res.StatusCode, 12707 }, 12708 } 12709 target := &ret 12710 if err := gensupport.DecodeResponse(target, res); err != nil { 12711 return nil, err 12712 } 12713 return ret, nil 12714 // { 12715 // "description": "Sets the locations for a specific cluster.\nDeprecated. Use\n[projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update)\ninstead.", 12716 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", 12717 // "httpMethod": "POST", 12718 // "id": "container.projects.zones.clusters.locations", 12719 // "parameterOrder": [ 12720 // "projectId", 12721 // "zone", 12722 // "clusterId" 12723 // ], 12724 // "parameters": { 12725 // "clusterId": { 12726 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 12727 // "location": "path", 12728 // "required": true, 12729 // "type": "string" 12730 // }, 12731 // "projectId": { 12732 // "description": "Required. 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.", 12733 // "location": "path", 12734 // "required": true, 12735 // "type": "string" 12736 // }, 12737 // "zone": { 12738 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 12739 // "location": "path", 12740 // "required": true, 12741 // "type": "string" 12742 // } 12743 // }, 12744 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", 12745 // "request": { 12746 // "$ref": "SetLocationsRequest" 12747 // }, 12748 // "response": { 12749 // "$ref": "Operation" 12750 // }, 12751 // "scopes": [ 12752 // "https://www.googleapis.com/auth/cloud-platform" 12753 // ] 12754 // } 12755 12756} 12757 12758// method id "container.projects.zones.clusters.logging": 12759 12760type ProjectsZonesClustersLoggingCall struct { 12761 s *Service 12762 projectId string 12763 zone string 12764 clusterId string 12765 setloggingservicerequest *SetLoggingServiceRequest 12766 urlParams_ gensupport.URLParams 12767 ctx_ context.Context 12768 header_ http.Header 12769} 12770 12771// Logging: Sets the logging service for a specific cluster. 12772func (r *ProjectsZonesClustersService) Logging(projectId string, zone string, clusterId string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsZonesClustersLoggingCall { 12773 c := &ProjectsZonesClustersLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12774 c.projectId = projectId 12775 c.zone = zone 12776 c.clusterId = clusterId 12777 c.setloggingservicerequest = setloggingservicerequest 12778 return c 12779} 12780 12781// Fields allows partial responses to be retrieved. See 12782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12783// for more information. 12784func (c *ProjectsZonesClustersLoggingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLoggingCall { 12785 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12786 return c 12787} 12788 12789// Context sets the context to be used in this call's Do method. Any 12790// pending HTTP request will be aborted if the provided context is 12791// canceled. 12792func (c *ProjectsZonesClustersLoggingCall) Context(ctx context.Context) *ProjectsZonesClustersLoggingCall { 12793 c.ctx_ = ctx 12794 return c 12795} 12796 12797// Header returns an http.Header that can be modified by the caller to 12798// add HTTP headers to the request. 12799func (c *ProjectsZonesClustersLoggingCall) Header() http.Header { 12800 if c.header_ == nil { 12801 c.header_ = make(http.Header) 12802 } 12803 return c.header_ 12804} 12805 12806func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) { 12807 reqHeaders := make(http.Header) 12808 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12809 for k, v := range c.header_ { 12810 reqHeaders[k] = v 12811 } 12812 reqHeaders.Set("User-Agent", c.s.userAgent()) 12813 var body io.Reader = nil 12814 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) 12815 if err != nil { 12816 return nil, err 12817 } 12818 reqHeaders.Set("Content-Type", "application/json") 12819 c.urlParams_.Set("alt", alt) 12820 c.urlParams_.Set("prettyPrint", "false") 12821 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") 12822 urls += "?" + c.urlParams_.Encode() 12823 req, err := http.NewRequest("POST", urls, body) 12824 if err != nil { 12825 return nil, err 12826 } 12827 req.Header = reqHeaders 12828 googleapi.Expand(req.URL, map[string]string{ 12829 "projectId": c.projectId, 12830 "zone": c.zone, 12831 "clusterId": c.clusterId, 12832 }) 12833 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12834} 12835 12836// Do executes the "container.projects.zones.clusters.logging" call. 12837// Exactly one of *Operation or error will be non-nil. Any non-2xx 12838// status code is an error. Response headers are in either 12839// *Operation.ServerResponse.Header or (if a response was returned at 12840// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12841// to check whether the returned error was because 12842// http.StatusNotModified was returned. 12843func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12844 gensupport.SetOptions(c.urlParams_, opts...) 12845 res, err := c.doRequest("json") 12846 if res != nil && res.StatusCode == http.StatusNotModified { 12847 if res.Body != nil { 12848 res.Body.Close() 12849 } 12850 return nil, &googleapi.Error{ 12851 Code: res.StatusCode, 12852 Header: res.Header, 12853 } 12854 } 12855 if err != nil { 12856 return nil, err 12857 } 12858 defer googleapi.CloseBody(res) 12859 if err := googleapi.CheckResponse(res); err != nil { 12860 return nil, err 12861 } 12862 ret := &Operation{ 12863 ServerResponse: googleapi.ServerResponse{ 12864 Header: res.Header, 12865 HTTPStatusCode: res.StatusCode, 12866 }, 12867 } 12868 target := &ret 12869 if err := gensupport.DecodeResponse(target, res); err != nil { 12870 return nil, err 12871 } 12872 return ret, nil 12873 // { 12874 // "description": "Sets the logging service for a specific cluster.", 12875 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", 12876 // "httpMethod": "POST", 12877 // "id": "container.projects.zones.clusters.logging", 12878 // "parameterOrder": [ 12879 // "projectId", 12880 // "zone", 12881 // "clusterId" 12882 // ], 12883 // "parameters": { 12884 // "clusterId": { 12885 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 12886 // "location": "path", 12887 // "required": true, 12888 // "type": "string" 12889 // }, 12890 // "projectId": { 12891 // "description": "Required. 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.", 12892 // "location": "path", 12893 // "required": true, 12894 // "type": "string" 12895 // }, 12896 // "zone": { 12897 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 12898 // "location": "path", 12899 // "required": true, 12900 // "type": "string" 12901 // } 12902 // }, 12903 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", 12904 // "request": { 12905 // "$ref": "SetLoggingServiceRequest" 12906 // }, 12907 // "response": { 12908 // "$ref": "Operation" 12909 // }, 12910 // "scopes": [ 12911 // "https://www.googleapis.com/auth/cloud-platform" 12912 // ] 12913 // } 12914 12915} 12916 12917// method id "container.projects.zones.clusters.master": 12918 12919type ProjectsZonesClustersMasterCall struct { 12920 s *Service 12921 projectId string 12922 zone string 12923 clusterId string 12924 updatemasterrequest *UpdateMasterRequest 12925 urlParams_ gensupport.URLParams 12926 ctx_ context.Context 12927 header_ http.Header 12928} 12929 12930// Master: Updates the master for a specific cluster. 12931func (r *ProjectsZonesClustersService) Master(projectId string, zone string, clusterId string, updatemasterrequest *UpdateMasterRequest) *ProjectsZonesClustersMasterCall { 12932 c := &ProjectsZonesClustersMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12933 c.projectId = projectId 12934 c.zone = zone 12935 c.clusterId = clusterId 12936 c.updatemasterrequest = updatemasterrequest 12937 return c 12938} 12939 12940// Fields allows partial responses to be retrieved. See 12941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12942// for more information. 12943func (c *ProjectsZonesClustersMasterCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMasterCall { 12944 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12945 return c 12946} 12947 12948// Context sets the context to be used in this call's Do method. Any 12949// pending HTTP request will be aborted if the provided context is 12950// canceled. 12951func (c *ProjectsZonesClustersMasterCall) Context(ctx context.Context) *ProjectsZonesClustersMasterCall { 12952 c.ctx_ = ctx 12953 return c 12954} 12955 12956// Header returns an http.Header that can be modified by the caller to 12957// add HTTP headers to the request. 12958func (c *ProjectsZonesClustersMasterCall) Header() http.Header { 12959 if c.header_ == nil { 12960 c.header_ = make(http.Header) 12961 } 12962 return c.header_ 12963} 12964 12965func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) { 12966 reqHeaders := make(http.Header) 12967 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12968 for k, v := range c.header_ { 12969 reqHeaders[k] = v 12970 } 12971 reqHeaders.Set("User-Agent", c.s.userAgent()) 12972 var body io.Reader = nil 12973 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) 12974 if err != nil { 12975 return nil, err 12976 } 12977 reqHeaders.Set("Content-Type", "application/json") 12978 c.urlParams_.Set("alt", alt) 12979 c.urlParams_.Set("prettyPrint", "false") 12980 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") 12981 urls += "?" + c.urlParams_.Encode() 12982 req, err := http.NewRequest("POST", urls, body) 12983 if err != nil { 12984 return nil, err 12985 } 12986 req.Header = reqHeaders 12987 googleapi.Expand(req.URL, map[string]string{ 12988 "projectId": c.projectId, 12989 "zone": c.zone, 12990 "clusterId": c.clusterId, 12991 }) 12992 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12993} 12994 12995// Do executes the "container.projects.zones.clusters.master" call. 12996// Exactly one of *Operation or error will be non-nil. Any non-2xx 12997// status code is an error. Response headers are in either 12998// *Operation.ServerResponse.Header or (if a response was returned at 12999// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13000// to check whether the returned error was because 13001// http.StatusNotModified was returned. 13002func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13003 gensupport.SetOptions(c.urlParams_, opts...) 13004 res, err := c.doRequest("json") 13005 if res != nil && res.StatusCode == http.StatusNotModified { 13006 if res.Body != nil { 13007 res.Body.Close() 13008 } 13009 return nil, &googleapi.Error{ 13010 Code: res.StatusCode, 13011 Header: res.Header, 13012 } 13013 } 13014 if err != nil { 13015 return nil, err 13016 } 13017 defer googleapi.CloseBody(res) 13018 if err := googleapi.CheckResponse(res); err != nil { 13019 return nil, err 13020 } 13021 ret := &Operation{ 13022 ServerResponse: googleapi.ServerResponse{ 13023 Header: res.Header, 13024 HTTPStatusCode: res.StatusCode, 13025 }, 13026 } 13027 target := &ret 13028 if err := gensupport.DecodeResponse(target, res); err != nil { 13029 return nil, err 13030 } 13031 return ret, nil 13032 // { 13033 // "description": "Updates the master for a specific cluster.", 13034 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", 13035 // "httpMethod": "POST", 13036 // "id": "container.projects.zones.clusters.master", 13037 // "parameterOrder": [ 13038 // "projectId", 13039 // "zone", 13040 // "clusterId" 13041 // ], 13042 // "parameters": { 13043 // "clusterId": { 13044 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 13045 // "location": "path", 13046 // "required": true, 13047 // "type": "string" 13048 // }, 13049 // "projectId": { 13050 // "description": "Required. 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.", 13051 // "location": "path", 13052 // "required": true, 13053 // "type": "string" 13054 // }, 13055 // "zone": { 13056 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 13057 // "location": "path", 13058 // "required": true, 13059 // "type": "string" 13060 // } 13061 // }, 13062 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", 13063 // "request": { 13064 // "$ref": "UpdateMasterRequest" 13065 // }, 13066 // "response": { 13067 // "$ref": "Operation" 13068 // }, 13069 // "scopes": [ 13070 // "https://www.googleapis.com/auth/cloud-platform" 13071 // ] 13072 // } 13073 13074} 13075 13076// method id "container.projects.zones.clusters.monitoring": 13077 13078type ProjectsZonesClustersMonitoringCall struct { 13079 s *Service 13080 projectId string 13081 zone string 13082 clusterId string 13083 setmonitoringservicerequest *SetMonitoringServiceRequest 13084 urlParams_ gensupport.URLParams 13085 ctx_ context.Context 13086 header_ http.Header 13087} 13088 13089// Monitoring: Sets the monitoring service for a specific cluster. 13090func (r *ProjectsZonesClustersService) Monitoring(projectId string, zone string, clusterId string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsZonesClustersMonitoringCall { 13091 c := &ProjectsZonesClustersMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13092 c.projectId = projectId 13093 c.zone = zone 13094 c.clusterId = clusterId 13095 c.setmonitoringservicerequest = setmonitoringservicerequest 13096 return c 13097} 13098 13099// Fields allows partial responses to be retrieved. See 13100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13101// for more information. 13102func (c *ProjectsZonesClustersMonitoringCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMonitoringCall { 13103 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13104 return c 13105} 13106 13107// Context sets the context to be used in this call's Do method. Any 13108// pending HTTP request will be aborted if the provided context is 13109// canceled. 13110func (c *ProjectsZonesClustersMonitoringCall) Context(ctx context.Context) *ProjectsZonesClustersMonitoringCall { 13111 c.ctx_ = ctx 13112 return c 13113} 13114 13115// Header returns an http.Header that can be modified by the caller to 13116// add HTTP headers to the request. 13117func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header { 13118 if c.header_ == nil { 13119 c.header_ = make(http.Header) 13120 } 13121 return c.header_ 13122} 13123 13124func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) { 13125 reqHeaders := make(http.Header) 13126 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13127 for k, v := range c.header_ { 13128 reqHeaders[k] = v 13129 } 13130 reqHeaders.Set("User-Agent", c.s.userAgent()) 13131 var body io.Reader = nil 13132 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) 13133 if err != nil { 13134 return nil, err 13135 } 13136 reqHeaders.Set("Content-Type", "application/json") 13137 c.urlParams_.Set("alt", alt) 13138 c.urlParams_.Set("prettyPrint", "false") 13139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") 13140 urls += "?" + c.urlParams_.Encode() 13141 req, err := http.NewRequest("POST", urls, body) 13142 if err != nil { 13143 return nil, err 13144 } 13145 req.Header = reqHeaders 13146 googleapi.Expand(req.URL, map[string]string{ 13147 "projectId": c.projectId, 13148 "zone": c.zone, 13149 "clusterId": c.clusterId, 13150 }) 13151 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13152} 13153 13154// Do executes the "container.projects.zones.clusters.monitoring" call. 13155// Exactly one of *Operation or error will be non-nil. Any non-2xx 13156// status code is an error. Response headers are in either 13157// *Operation.ServerResponse.Header or (if a response was returned at 13158// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13159// to check whether the returned error was because 13160// http.StatusNotModified was returned. 13161func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13162 gensupport.SetOptions(c.urlParams_, opts...) 13163 res, err := c.doRequest("json") 13164 if res != nil && res.StatusCode == http.StatusNotModified { 13165 if res.Body != nil { 13166 res.Body.Close() 13167 } 13168 return nil, &googleapi.Error{ 13169 Code: res.StatusCode, 13170 Header: res.Header, 13171 } 13172 } 13173 if err != nil { 13174 return nil, err 13175 } 13176 defer googleapi.CloseBody(res) 13177 if err := googleapi.CheckResponse(res); err != nil { 13178 return nil, err 13179 } 13180 ret := &Operation{ 13181 ServerResponse: googleapi.ServerResponse{ 13182 Header: res.Header, 13183 HTTPStatusCode: res.StatusCode, 13184 }, 13185 } 13186 target := &ret 13187 if err := gensupport.DecodeResponse(target, res); err != nil { 13188 return nil, err 13189 } 13190 return ret, nil 13191 // { 13192 // "description": "Sets the monitoring service for a specific cluster.", 13193 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", 13194 // "httpMethod": "POST", 13195 // "id": "container.projects.zones.clusters.monitoring", 13196 // "parameterOrder": [ 13197 // "projectId", 13198 // "zone", 13199 // "clusterId" 13200 // ], 13201 // "parameters": { 13202 // "clusterId": { 13203 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 13204 // "location": "path", 13205 // "required": true, 13206 // "type": "string" 13207 // }, 13208 // "projectId": { 13209 // "description": "Required. 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.", 13210 // "location": "path", 13211 // "required": true, 13212 // "type": "string" 13213 // }, 13214 // "zone": { 13215 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 13216 // "location": "path", 13217 // "required": true, 13218 // "type": "string" 13219 // } 13220 // }, 13221 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", 13222 // "request": { 13223 // "$ref": "SetMonitoringServiceRequest" 13224 // }, 13225 // "response": { 13226 // "$ref": "Operation" 13227 // }, 13228 // "scopes": [ 13229 // "https://www.googleapis.com/auth/cloud-platform" 13230 // ] 13231 // } 13232 13233} 13234 13235// method id "container.projects.zones.clusters.resourceLabels": 13236 13237type ProjectsZonesClustersResourceLabelsCall struct { 13238 s *Service 13239 projectId string 13240 zone string 13241 clusterId string 13242 setlabelsrequest *SetLabelsRequest 13243 urlParams_ gensupport.URLParams 13244 ctx_ context.Context 13245 header_ http.Header 13246} 13247 13248// ResourceLabels: Sets labels on a cluster. 13249func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall { 13250 c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13251 c.projectId = projectId 13252 c.zone = zone 13253 c.clusterId = clusterId 13254 c.setlabelsrequest = setlabelsrequest 13255 return c 13256} 13257 13258// Fields allows partial responses to be retrieved. See 13259// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13260// for more information. 13261func (c *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall { 13262 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13263 return c 13264} 13265 13266// Context sets the context to be used in this call's Do method. Any 13267// pending HTTP request will be aborted if the provided context is 13268// canceled. 13269func (c *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall { 13270 c.ctx_ = ctx 13271 return c 13272} 13273 13274// Header returns an http.Header that can be modified by the caller to 13275// add HTTP headers to the request. 13276func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { 13277 if c.header_ == nil { 13278 c.header_ = make(http.Header) 13279 } 13280 return c.header_ 13281} 13282 13283func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) { 13284 reqHeaders := make(http.Header) 13285 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13286 for k, v := range c.header_ { 13287 reqHeaders[k] = v 13288 } 13289 reqHeaders.Set("User-Agent", c.s.userAgent()) 13290 var body io.Reader = nil 13291 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) 13292 if err != nil { 13293 return nil, err 13294 } 13295 reqHeaders.Set("Content-Type", "application/json") 13296 c.urlParams_.Set("alt", alt) 13297 c.urlParams_.Set("prettyPrint", "false") 13298 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") 13299 urls += "?" + c.urlParams_.Encode() 13300 req, err := http.NewRequest("POST", urls, body) 13301 if err != nil { 13302 return nil, err 13303 } 13304 req.Header = reqHeaders 13305 googleapi.Expand(req.URL, map[string]string{ 13306 "projectId": c.projectId, 13307 "zone": c.zone, 13308 "clusterId": c.clusterId, 13309 }) 13310 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13311} 13312 13313// Do executes the "container.projects.zones.clusters.resourceLabels" call. 13314// Exactly one of *Operation or error will be non-nil. Any non-2xx 13315// status code is an error. Response headers are in either 13316// *Operation.ServerResponse.Header or (if a response was returned at 13317// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13318// to check whether the returned error was because 13319// http.StatusNotModified was returned. 13320func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13321 gensupport.SetOptions(c.urlParams_, opts...) 13322 res, err := c.doRequest("json") 13323 if res != nil && res.StatusCode == http.StatusNotModified { 13324 if res.Body != nil { 13325 res.Body.Close() 13326 } 13327 return nil, &googleapi.Error{ 13328 Code: res.StatusCode, 13329 Header: res.Header, 13330 } 13331 } 13332 if err != nil { 13333 return nil, err 13334 } 13335 defer googleapi.CloseBody(res) 13336 if err := googleapi.CheckResponse(res); err != nil { 13337 return nil, err 13338 } 13339 ret := &Operation{ 13340 ServerResponse: googleapi.ServerResponse{ 13341 Header: res.Header, 13342 HTTPStatusCode: res.StatusCode, 13343 }, 13344 } 13345 target := &ret 13346 if err := gensupport.DecodeResponse(target, res); err != nil { 13347 return nil, err 13348 } 13349 return ret, nil 13350 // { 13351 // "description": "Sets labels on a cluster.", 13352 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", 13353 // "httpMethod": "POST", 13354 // "id": "container.projects.zones.clusters.resourceLabels", 13355 // "parameterOrder": [ 13356 // "projectId", 13357 // "zone", 13358 // "clusterId" 13359 // ], 13360 // "parameters": { 13361 // "clusterId": { 13362 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 13363 // "location": "path", 13364 // "required": true, 13365 // "type": "string" 13366 // }, 13367 // "projectId": { 13368 // "description": "Required. 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.", 13369 // "location": "path", 13370 // "required": true, 13371 // "type": "string" 13372 // }, 13373 // "zone": { 13374 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 13375 // "location": "path", 13376 // "required": true, 13377 // "type": "string" 13378 // } 13379 // }, 13380 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", 13381 // "request": { 13382 // "$ref": "SetLabelsRequest" 13383 // }, 13384 // "response": { 13385 // "$ref": "Operation" 13386 // }, 13387 // "scopes": [ 13388 // "https://www.googleapis.com/auth/cloud-platform" 13389 // ] 13390 // } 13391 13392} 13393 13394// method id "container.projects.zones.clusters.setMaintenancePolicy": 13395 13396type ProjectsZonesClustersSetMaintenancePolicyCall struct { 13397 s *Service 13398 projectId string 13399 zone string 13400 clusterId string 13401 setmaintenancepolicyrequest *SetMaintenancePolicyRequest 13402 urlParams_ gensupport.URLParams 13403 ctx_ context.Context 13404 header_ http.Header 13405} 13406 13407// SetMaintenancePolicy: Sets the maintenance policy for a cluster. 13408func (r *ProjectsZonesClustersService) SetMaintenancePolicy(projectId string, zone string, clusterId string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsZonesClustersSetMaintenancePolicyCall { 13409 c := &ProjectsZonesClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13410 c.projectId = projectId 13411 c.zone = zone 13412 c.clusterId = clusterId 13413 c.setmaintenancepolicyrequest = setmaintenancepolicyrequest 13414 return c 13415} 13416 13417// Fields allows partial responses to be retrieved. See 13418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13419// for more information. 13420func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMaintenancePolicyCall { 13421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13422 return c 13423} 13424 13425// Context sets the context to be used in this call's Do method. Any 13426// pending HTTP request will be aborted if the provided context is 13427// canceled. 13428func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetMaintenancePolicyCall { 13429 c.ctx_ = ctx 13430 return c 13431} 13432 13433// Header returns an http.Header that can be modified by the caller to 13434// add HTTP headers to the request. 13435func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header { 13436 if c.header_ == nil { 13437 c.header_ = make(http.Header) 13438 } 13439 return c.header_ 13440} 13441 13442func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { 13443 reqHeaders := make(http.Header) 13444 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13445 for k, v := range c.header_ { 13446 reqHeaders[k] = v 13447 } 13448 reqHeaders.Set("User-Agent", c.s.userAgent()) 13449 var body io.Reader = nil 13450 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest) 13451 if err != nil { 13452 return nil, err 13453 } 13454 reqHeaders.Set("Content-Type", "application/json") 13455 c.urlParams_.Set("alt", alt) 13456 c.urlParams_.Set("prettyPrint", "false") 13457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") 13458 urls += "?" + c.urlParams_.Encode() 13459 req, err := http.NewRequest("POST", urls, body) 13460 if err != nil { 13461 return nil, err 13462 } 13463 req.Header = reqHeaders 13464 googleapi.Expand(req.URL, map[string]string{ 13465 "projectId": c.projectId, 13466 "zone": c.zone, 13467 "clusterId": c.clusterId, 13468 }) 13469 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13470} 13471 13472// Do executes the "container.projects.zones.clusters.setMaintenancePolicy" call. 13473// Exactly one of *Operation or error will be non-nil. Any non-2xx 13474// status code is an error. Response headers are in either 13475// *Operation.ServerResponse.Header or (if a response was returned at 13476// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13477// to check whether the returned error was because 13478// http.StatusNotModified was returned. 13479func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13480 gensupport.SetOptions(c.urlParams_, opts...) 13481 res, err := c.doRequest("json") 13482 if res != nil && res.StatusCode == http.StatusNotModified { 13483 if res.Body != nil { 13484 res.Body.Close() 13485 } 13486 return nil, &googleapi.Error{ 13487 Code: res.StatusCode, 13488 Header: res.Header, 13489 } 13490 } 13491 if err != nil { 13492 return nil, err 13493 } 13494 defer googleapi.CloseBody(res) 13495 if err := googleapi.CheckResponse(res); err != nil { 13496 return nil, err 13497 } 13498 ret := &Operation{ 13499 ServerResponse: googleapi.ServerResponse{ 13500 Header: res.Header, 13501 HTTPStatusCode: res.StatusCode, 13502 }, 13503 } 13504 target := &ret 13505 if err := gensupport.DecodeResponse(target, res); err != nil { 13506 return nil, err 13507 } 13508 return ret, nil 13509 // { 13510 // "description": "Sets the maintenance policy for a cluster.", 13511 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", 13512 // "httpMethod": "POST", 13513 // "id": "container.projects.zones.clusters.setMaintenancePolicy", 13514 // "parameterOrder": [ 13515 // "projectId", 13516 // "zone", 13517 // "clusterId" 13518 // ], 13519 // "parameters": { 13520 // "clusterId": { 13521 // "description": "Required. The name of the cluster to update.", 13522 // "location": "path", 13523 // "required": true, 13524 // "type": "string" 13525 // }, 13526 // "projectId": { 13527 // "description": "Required. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", 13528 // "location": "path", 13529 // "required": true, 13530 // "type": "string" 13531 // }, 13532 // "zone": { 13533 // "description": "Required. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides.", 13534 // "location": "path", 13535 // "required": true, 13536 // "type": "string" 13537 // } 13538 // }, 13539 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", 13540 // "request": { 13541 // "$ref": "SetMaintenancePolicyRequest" 13542 // }, 13543 // "response": { 13544 // "$ref": "Operation" 13545 // }, 13546 // "scopes": [ 13547 // "https://www.googleapis.com/auth/cloud-platform" 13548 // ] 13549 // } 13550 13551} 13552 13553// method id "container.projects.zones.clusters.setMasterAuth": 13554 13555type ProjectsZonesClustersSetMasterAuthCall struct { 13556 s *Service 13557 projectId string 13558 zone string 13559 clusterId string 13560 setmasterauthrequest *SetMasterAuthRequest 13561 urlParams_ gensupport.URLParams 13562 ctx_ context.Context 13563 header_ http.Header 13564} 13565 13566// SetMasterAuth: Sets master auth materials. Currently supports 13567// changing the admin password 13568// or a specific cluster, either via password generation or explicitly 13569// setting 13570// the password. 13571func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { 13572 c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13573 c.projectId = projectId 13574 c.zone = zone 13575 c.clusterId = clusterId 13576 c.setmasterauthrequest = setmasterauthrequest 13577 return c 13578} 13579 13580// Fields allows partial responses to be retrieved. See 13581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13582// for more information. 13583func (c *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall { 13584 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13585 return c 13586} 13587 13588// Context sets the context to be used in this call's Do method. Any 13589// pending HTTP request will be aborted if the provided context is 13590// canceled. 13591func (c *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall { 13592 c.ctx_ = ctx 13593 return c 13594} 13595 13596// Header returns an http.Header that can be modified by the caller to 13597// add HTTP headers to the request. 13598func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { 13599 if c.header_ == nil { 13600 c.header_ = make(http.Header) 13601 } 13602 return c.header_ 13603} 13604 13605func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { 13606 reqHeaders := make(http.Header) 13607 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13608 for k, v := range c.header_ { 13609 reqHeaders[k] = v 13610 } 13611 reqHeaders.Set("User-Agent", c.s.userAgent()) 13612 var body io.Reader = nil 13613 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) 13614 if err != nil { 13615 return nil, err 13616 } 13617 reqHeaders.Set("Content-Type", "application/json") 13618 c.urlParams_.Set("alt", alt) 13619 c.urlParams_.Set("prettyPrint", "false") 13620 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") 13621 urls += "?" + c.urlParams_.Encode() 13622 req, err := http.NewRequest("POST", urls, body) 13623 if err != nil { 13624 return nil, err 13625 } 13626 req.Header = reqHeaders 13627 googleapi.Expand(req.URL, map[string]string{ 13628 "projectId": c.projectId, 13629 "zone": c.zone, 13630 "clusterId": c.clusterId, 13631 }) 13632 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13633} 13634 13635// Do executes the "container.projects.zones.clusters.setMasterAuth" call. 13636// Exactly one of *Operation or error will be non-nil. Any non-2xx 13637// status code is an error. Response headers are in either 13638// *Operation.ServerResponse.Header or (if a response was returned at 13639// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13640// to check whether the returned error was because 13641// http.StatusNotModified was returned. 13642func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13643 gensupport.SetOptions(c.urlParams_, opts...) 13644 res, err := c.doRequest("json") 13645 if res != nil && res.StatusCode == http.StatusNotModified { 13646 if res.Body != nil { 13647 res.Body.Close() 13648 } 13649 return nil, &googleapi.Error{ 13650 Code: res.StatusCode, 13651 Header: res.Header, 13652 } 13653 } 13654 if err != nil { 13655 return nil, err 13656 } 13657 defer googleapi.CloseBody(res) 13658 if err := googleapi.CheckResponse(res); err != nil { 13659 return nil, err 13660 } 13661 ret := &Operation{ 13662 ServerResponse: googleapi.ServerResponse{ 13663 Header: res.Header, 13664 HTTPStatusCode: res.StatusCode, 13665 }, 13666 } 13667 target := &ret 13668 if err := gensupport.DecodeResponse(target, res); err != nil { 13669 return nil, err 13670 } 13671 return ret, nil 13672 // { 13673 // "description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.", 13674 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", 13675 // "httpMethod": "POST", 13676 // "id": "container.projects.zones.clusters.setMasterAuth", 13677 // "parameterOrder": [ 13678 // "projectId", 13679 // "zone", 13680 // "clusterId" 13681 // ], 13682 // "parameters": { 13683 // "clusterId": { 13684 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 13685 // "location": "path", 13686 // "required": true, 13687 // "type": "string" 13688 // }, 13689 // "projectId": { 13690 // "description": "Required. 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.", 13691 // "location": "path", 13692 // "required": true, 13693 // "type": "string" 13694 // }, 13695 // "zone": { 13696 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 13697 // "location": "path", 13698 // "required": true, 13699 // "type": "string" 13700 // } 13701 // }, 13702 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", 13703 // "request": { 13704 // "$ref": "SetMasterAuthRequest" 13705 // }, 13706 // "response": { 13707 // "$ref": "Operation" 13708 // }, 13709 // "scopes": [ 13710 // "https://www.googleapis.com/auth/cloud-platform" 13711 // ] 13712 // } 13713 13714} 13715 13716// method id "container.projects.zones.clusters.setNetworkPolicy": 13717 13718type ProjectsZonesClustersSetNetworkPolicyCall struct { 13719 s *Service 13720 projectId string 13721 zone string 13722 clusterId string 13723 setnetworkpolicyrequest *SetNetworkPolicyRequest 13724 urlParams_ gensupport.URLParams 13725 ctx_ context.Context 13726 header_ http.Header 13727} 13728 13729// SetNetworkPolicy: Enables or disables Network Policy for a cluster. 13730func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { 13731 c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13732 c.projectId = projectId 13733 c.zone = zone 13734 c.clusterId = clusterId 13735 c.setnetworkpolicyrequest = setnetworkpolicyrequest 13736 return c 13737} 13738 13739// Fields allows partial responses to be retrieved. See 13740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13741// for more information. 13742func (c *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall { 13743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13744 return c 13745} 13746 13747// Context sets the context to be used in this call's Do method. Any 13748// pending HTTP request will be aborted if the provided context is 13749// canceled. 13750func (c *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall { 13751 c.ctx_ = ctx 13752 return c 13753} 13754 13755// Header returns an http.Header that can be modified by the caller to 13756// add HTTP headers to the request. 13757func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { 13758 if c.header_ == nil { 13759 c.header_ = make(http.Header) 13760 } 13761 return c.header_ 13762} 13763 13764func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { 13765 reqHeaders := make(http.Header) 13766 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13767 for k, v := range c.header_ { 13768 reqHeaders[k] = v 13769 } 13770 reqHeaders.Set("User-Agent", c.s.userAgent()) 13771 var body io.Reader = nil 13772 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) 13773 if err != nil { 13774 return nil, err 13775 } 13776 reqHeaders.Set("Content-Type", "application/json") 13777 c.urlParams_.Set("alt", alt) 13778 c.urlParams_.Set("prettyPrint", "false") 13779 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") 13780 urls += "?" + c.urlParams_.Encode() 13781 req, err := http.NewRequest("POST", urls, body) 13782 if err != nil { 13783 return nil, err 13784 } 13785 req.Header = reqHeaders 13786 googleapi.Expand(req.URL, map[string]string{ 13787 "projectId": c.projectId, 13788 "zone": c.zone, 13789 "clusterId": c.clusterId, 13790 }) 13791 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13792} 13793 13794// Do executes the "container.projects.zones.clusters.setNetworkPolicy" call. 13795// Exactly one of *Operation or error will be non-nil. Any non-2xx 13796// status code is an error. Response headers are in either 13797// *Operation.ServerResponse.Header or (if a response was returned at 13798// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13799// to check whether the returned error was because 13800// http.StatusNotModified was returned. 13801func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13802 gensupport.SetOptions(c.urlParams_, opts...) 13803 res, err := c.doRequest("json") 13804 if res != nil && res.StatusCode == http.StatusNotModified { 13805 if res.Body != nil { 13806 res.Body.Close() 13807 } 13808 return nil, &googleapi.Error{ 13809 Code: res.StatusCode, 13810 Header: res.Header, 13811 } 13812 } 13813 if err != nil { 13814 return nil, err 13815 } 13816 defer googleapi.CloseBody(res) 13817 if err := googleapi.CheckResponse(res); err != nil { 13818 return nil, err 13819 } 13820 ret := &Operation{ 13821 ServerResponse: googleapi.ServerResponse{ 13822 Header: res.Header, 13823 HTTPStatusCode: res.StatusCode, 13824 }, 13825 } 13826 target := &ret 13827 if err := gensupport.DecodeResponse(target, res); err != nil { 13828 return nil, err 13829 } 13830 return ret, nil 13831 // { 13832 // "description": "Enables or disables Network Policy for a cluster.", 13833 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", 13834 // "httpMethod": "POST", 13835 // "id": "container.projects.zones.clusters.setNetworkPolicy", 13836 // "parameterOrder": [ 13837 // "projectId", 13838 // "zone", 13839 // "clusterId" 13840 // ], 13841 // "parameters": { 13842 // "clusterId": { 13843 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 13844 // "location": "path", 13845 // "required": true, 13846 // "type": "string" 13847 // }, 13848 // "projectId": { 13849 // "description": "Required. 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.", 13850 // "location": "path", 13851 // "required": true, 13852 // "type": "string" 13853 // }, 13854 // "zone": { 13855 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 13856 // "location": "path", 13857 // "required": true, 13858 // "type": "string" 13859 // } 13860 // }, 13861 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", 13862 // "request": { 13863 // "$ref": "SetNetworkPolicyRequest" 13864 // }, 13865 // "response": { 13866 // "$ref": "Operation" 13867 // }, 13868 // "scopes": [ 13869 // "https://www.googleapis.com/auth/cloud-platform" 13870 // ] 13871 // } 13872 13873} 13874 13875// method id "container.projects.zones.clusters.startIpRotation": 13876 13877type ProjectsZonesClustersStartIpRotationCall struct { 13878 s *Service 13879 projectId string 13880 zone string 13881 clusterId string 13882 startiprotationrequest *StartIPRotationRequest 13883 urlParams_ gensupport.URLParams 13884 ctx_ context.Context 13885 header_ http.Header 13886} 13887 13888// StartIpRotation: Starts master IP rotation. 13889func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { 13890 c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13891 c.projectId = projectId 13892 c.zone = zone 13893 c.clusterId = clusterId 13894 c.startiprotationrequest = startiprotationrequest 13895 return c 13896} 13897 13898// Fields allows partial responses to be retrieved. See 13899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13900// for more information. 13901func (c *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall { 13902 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13903 return c 13904} 13905 13906// Context sets the context to be used in this call's Do method. Any 13907// pending HTTP request will be aborted if the provided context is 13908// canceled. 13909func (c *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall { 13910 c.ctx_ = ctx 13911 return c 13912} 13913 13914// Header returns an http.Header that can be modified by the caller to 13915// add HTTP headers to the request. 13916func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { 13917 if c.header_ == nil { 13918 c.header_ = make(http.Header) 13919 } 13920 return c.header_ 13921} 13922 13923func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { 13924 reqHeaders := make(http.Header) 13925 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13926 for k, v := range c.header_ { 13927 reqHeaders[k] = v 13928 } 13929 reqHeaders.Set("User-Agent", c.s.userAgent()) 13930 var body io.Reader = nil 13931 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) 13932 if err != nil { 13933 return nil, err 13934 } 13935 reqHeaders.Set("Content-Type", "application/json") 13936 c.urlParams_.Set("alt", alt) 13937 c.urlParams_.Set("prettyPrint", "false") 13938 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") 13939 urls += "?" + c.urlParams_.Encode() 13940 req, err := http.NewRequest("POST", urls, body) 13941 if err != nil { 13942 return nil, err 13943 } 13944 req.Header = reqHeaders 13945 googleapi.Expand(req.URL, map[string]string{ 13946 "projectId": c.projectId, 13947 "zone": c.zone, 13948 "clusterId": c.clusterId, 13949 }) 13950 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13951} 13952 13953// Do executes the "container.projects.zones.clusters.startIpRotation" call. 13954// Exactly one of *Operation or error will be non-nil. Any non-2xx 13955// status code is an error. Response headers are in either 13956// *Operation.ServerResponse.Header or (if a response was returned at 13957// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13958// to check whether the returned error was because 13959// http.StatusNotModified was returned. 13960func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13961 gensupport.SetOptions(c.urlParams_, opts...) 13962 res, err := c.doRequest("json") 13963 if res != nil && res.StatusCode == http.StatusNotModified { 13964 if res.Body != nil { 13965 res.Body.Close() 13966 } 13967 return nil, &googleapi.Error{ 13968 Code: res.StatusCode, 13969 Header: res.Header, 13970 } 13971 } 13972 if err != nil { 13973 return nil, err 13974 } 13975 defer googleapi.CloseBody(res) 13976 if err := googleapi.CheckResponse(res); err != nil { 13977 return nil, err 13978 } 13979 ret := &Operation{ 13980 ServerResponse: googleapi.ServerResponse{ 13981 Header: res.Header, 13982 HTTPStatusCode: res.StatusCode, 13983 }, 13984 } 13985 target := &ret 13986 if err := gensupport.DecodeResponse(target, res); err != nil { 13987 return nil, err 13988 } 13989 return ret, nil 13990 // { 13991 // "description": "Starts master IP rotation.", 13992 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", 13993 // "httpMethod": "POST", 13994 // "id": "container.projects.zones.clusters.startIpRotation", 13995 // "parameterOrder": [ 13996 // "projectId", 13997 // "zone", 13998 // "clusterId" 13999 // ], 14000 // "parameters": { 14001 // "clusterId": { 14002 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 14003 // "location": "path", 14004 // "required": true, 14005 // "type": "string" 14006 // }, 14007 // "projectId": { 14008 // "description": "Required. 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.", 14009 // "location": "path", 14010 // "required": true, 14011 // "type": "string" 14012 // }, 14013 // "zone": { 14014 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 14015 // "location": "path", 14016 // "required": true, 14017 // "type": "string" 14018 // } 14019 // }, 14020 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", 14021 // "request": { 14022 // "$ref": "StartIPRotationRequest" 14023 // }, 14024 // "response": { 14025 // "$ref": "Operation" 14026 // }, 14027 // "scopes": [ 14028 // "https://www.googleapis.com/auth/cloud-platform" 14029 // ] 14030 // } 14031 14032} 14033 14034// method id "container.projects.zones.clusters.update": 14035 14036type ProjectsZonesClustersUpdateCall struct { 14037 s *Service 14038 projectId string 14039 zone string 14040 clusterId string 14041 updateclusterrequest *UpdateClusterRequest 14042 urlParams_ gensupport.URLParams 14043 ctx_ context.Context 14044 header_ http.Header 14045} 14046 14047// Update: Updates the settings for a specific cluster. 14048func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall { 14049 c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14050 c.projectId = projectId 14051 c.zone = zone 14052 c.clusterId = clusterId 14053 c.updateclusterrequest = updateclusterrequest 14054 return c 14055} 14056 14057// Fields allows partial responses to be retrieved. See 14058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14059// for more information. 14060func (c *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall { 14061 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14062 return c 14063} 14064 14065// Context sets the context to be used in this call's Do method. Any 14066// pending HTTP request will be aborted if the provided context is 14067// canceled. 14068func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall { 14069 c.ctx_ = ctx 14070 return c 14071} 14072 14073// Header returns an http.Header that can be modified by the caller to 14074// add HTTP headers to the request. 14075func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { 14076 if c.header_ == nil { 14077 c.header_ = make(http.Header) 14078 } 14079 return c.header_ 14080} 14081 14082func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { 14083 reqHeaders := make(http.Header) 14084 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14085 for k, v := range c.header_ { 14086 reqHeaders[k] = v 14087 } 14088 reqHeaders.Set("User-Agent", c.s.userAgent()) 14089 var body io.Reader = nil 14090 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) 14091 if err != nil { 14092 return nil, err 14093 } 14094 reqHeaders.Set("Content-Type", "application/json") 14095 c.urlParams_.Set("alt", alt) 14096 c.urlParams_.Set("prettyPrint", "false") 14097 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 14098 urls += "?" + c.urlParams_.Encode() 14099 req, err := http.NewRequest("PUT", urls, body) 14100 if err != nil { 14101 return nil, err 14102 } 14103 req.Header = reqHeaders 14104 googleapi.Expand(req.URL, map[string]string{ 14105 "projectId": c.projectId, 14106 "zone": c.zone, 14107 "clusterId": c.clusterId, 14108 }) 14109 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14110} 14111 14112// Do executes the "container.projects.zones.clusters.update" call. 14113// Exactly one of *Operation or error will be non-nil. Any non-2xx 14114// status code is an error. Response headers are in either 14115// *Operation.ServerResponse.Header or (if a response was returned at 14116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14117// to check whether the returned error was because 14118// http.StatusNotModified was returned. 14119func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14120 gensupport.SetOptions(c.urlParams_, opts...) 14121 res, err := c.doRequest("json") 14122 if res != nil && res.StatusCode == http.StatusNotModified { 14123 if res.Body != nil { 14124 res.Body.Close() 14125 } 14126 return nil, &googleapi.Error{ 14127 Code: res.StatusCode, 14128 Header: res.Header, 14129 } 14130 } 14131 if err != nil { 14132 return nil, err 14133 } 14134 defer googleapi.CloseBody(res) 14135 if err := googleapi.CheckResponse(res); err != nil { 14136 return nil, err 14137 } 14138 ret := &Operation{ 14139 ServerResponse: googleapi.ServerResponse{ 14140 Header: res.Header, 14141 HTTPStatusCode: res.StatusCode, 14142 }, 14143 } 14144 target := &ret 14145 if err := gensupport.DecodeResponse(target, res); err != nil { 14146 return nil, err 14147 } 14148 return ret, nil 14149 // { 14150 // "description": "Updates the settings for a specific cluster.", 14151 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 14152 // "httpMethod": "PUT", 14153 // "id": "container.projects.zones.clusters.update", 14154 // "parameterOrder": [ 14155 // "projectId", 14156 // "zone", 14157 // "clusterId" 14158 // ], 14159 // "parameters": { 14160 // "clusterId": { 14161 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 14162 // "location": "path", 14163 // "required": true, 14164 // "type": "string" 14165 // }, 14166 // "projectId": { 14167 // "description": "Required. 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.", 14168 // "location": "path", 14169 // "required": true, 14170 // "type": "string" 14171 // }, 14172 // "zone": { 14173 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 14174 // "location": "path", 14175 // "required": true, 14176 // "type": "string" 14177 // } 14178 // }, 14179 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", 14180 // "request": { 14181 // "$ref": "UpdateClusterRequest" 14182 // }, 14183 // "response": { 14184 // "$ref": "Operation" 14185 // }, 14186 // "scopes": [ 14187 // "https://www.googleapis.com/auth/cloud-platform" 14188 // ] 14189 // } 14190 14191} 14192 14193// method id "container.projects.zones.clusters.nodePools.autoscaling": 14194 14195type ProjectsZonesClustersNodePoolsAutoscalingCall struct { 14196 s *Service 14197 projectId string 14198 zone string 14199 clusterId string 14200 nodePoolId string 14201 setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest 14202 urlParams_ gensupport.URLParams 14203 ctx_ context.Context 14204 header_ http.Header 14205} 14206 14207// Autoscaling: Sets the autoscaling settings of a specific node pool. 14208func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall { 14209 c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14210 c.projectId = projectId 14211 c.zone = zone 14212 c.clusterId = clusterId 14213 c.nodePoolId = nodePoolId 14214 c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest 14215 return c 14216} 14217 14218// Fields allows partial responses to be retrieved. See 14219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14220// for more information. 14221func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsAutoscalingCall { 14222 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14223 return c 14224} 14225 14226// Context sets the context to be used in this call's Do method. Any 14227// pending HTTP request will be aborted if the provided context is 14228// canceled. 14229func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsAutoscalingCall { 14230 c.ctx_ = ctx 14231 return c 14232} 14233 14234// Header returns an http.Header that can be modified by the caller to 14235// add HTTP headers to the request. 14236func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header { 14237 if c.header_ == nil { 14238 c.header_ = make(http.Header) 14239 } 14240 return c.header_ 14241} 14242 14243func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) { 14244 reqHeaders := make(http.Header) 14245 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14246 for k, v := range c.header_ { 14247 reqHeaders[k] = v 14248 } 14249 reqHeaders.Set("User-Agent", c.s.userAgent()) 14250 var body io.Reader = nil 14251 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) 14252 if err != nil { 14253 return nil, err 14254 } 14255 reqHeaders.Set("Content-Type", "application/json") 14256 c.urlParams_.Set("alt", alt) 14257 c.urlParams_.Set("prettyPrint", "false") 14258 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") 14259 urls += "?" + c.urlParams_.Encode() 14260 req, err := http.NewRequest("POST", urls, body) 14261 if err != nil { 14262 return nil, err 14263 } 14264 req.Header = reqHeaders 14265 googleapi.Expand(req.URL, map[string]string{ 14266 "projectId": c.projectId, 14267 "zone": c.zone, 14268 "clusterId": c.clusterId, 14269 "nodePoolId": c.nodePoolId, 14270 }) 14271 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14272} 14273 14274// Do executes the "container.projects.zones.clusters.nodePools.autoscaling" call. 14275// Exactly one of *Operation or error will be non-nil. Any non-2xx 14276// status code is an error. Response headers are in either 14277// *Operation.ServerResponse.Header or (if a response was returned at 14278// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14279// to check whether the returned error was because 14280// http.StatusNotModified was returned. 14281func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14282 gensupport.SetOptions(c.urlParams_, opts...) 14283 res, err := c.doRequest("json") 14284 if res != nil && res.StatusCode == http.StatusNotModified { 14285 if res.Body != nil { 14286 res.Body.Close() 14287 } 14288 return nil, &googleapi.Error{ 14289 Code: res.StatusCode, 14290 Header: res.Header, 14291 } 14292 } 14293 if err != nil { 14294 return nil, err 14295 } 14296 defer googleapi.CloseBody(res) 14297 if err := googleapi.CheckResponse(res); err != nil { 14298 return nil, err 14299 } 14300 ret := &Operation{ 14301 ServerResponse: googleapi.ServerResponse{ 14302 Header: res.Header, 14303 HTTPStatusCode: res.StatusCode, 14304 }, 14305 } 14306 target := &ret 14307 if err := gensupport.DecodeResponse(target, res); err != nil { 14308 return nil, err 14309 } 14310 return ret, nil 14311 // { 14312 // "description": "Sets the autoscaling settings of a specific node pool.", 14313 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", 14314 // "httpMethod": "POST", 14315 // "id": "container.projects.zones.clusters.nodePools.autoscaling", 14316 // "parameterOrder": [ 14317 // "projectId", 14318 // "zone", 14319 // "clusterId", 14320 // "nodePoolId" 14321 // ], 14322 // "parameters": { 14323 // "clusterId": { 14324 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 14325 // "location": "path", 14326 // "required": true, 14327 // "type": "string" 14328 // }, 14329 // "nodePoolId": { 14330 // "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", 14331 // "location": "path", 14332 // "required": true, 14333 // "type": "string" 14334 // }, 14335 // "projectId": { 14336 // "description": "Required. 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.", 14337 // "location": "path", 14338 // "required": true, 14339 // "type": "string" 14340 // }, 14341 // "zone": { 14342 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 14343 // "location": "path", 14344 // "required": true, 14345 // "type": "string" 14346 // } 14347 // }, 14348 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", 14349 // "request": { 14350 // "$ref": "SetNodePoolAutoscalingRequest" 14351 // }, 14352 // "response": { 14353 // "$ref": "Operation" 14354 // }, 14355 // "scopes": [ 14356 // "https://www.googleapis.com/auth/cloud-platform" 14357 // ] 14358 // } 14359 14360} 14361 14362// method id "container.projects.zones.clusters.nodePools.create": 14363 14364type ProjectsZonesClustersNodePoolsCreateCall struct { 14365 s *Service 14366 projectId string 14367 zone string 14368 clusterId string 14369 createnodepoolrequest *CreateNodePoolRequest 14370 urlParams_ gensupport.URLParams 14371 ctx_ context.Context 14372 header_ http.Header 14373} 14374 14375// Create: Creates a node pool for a cluster. 14376func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall { 14377 c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14378 c.projectId = projectId 14379 c.zone = zone 14380 c.clusterId = clusterId 14381 c.createnodepoolrequest = createnodepoolrequest 14382 return c 14383} 14384 14385// Fields allows partial responses to be retrieved. See 14386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14387// for more information. 14388func (c *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall { 14389 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14390 return c 14391} 14392 14393// Context sets the context to be used in this call's Do method. Any 14394// pending HTTP request will be aborted if the provided context is 14395// canceled. 14396func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { 14397 c.ctx_ = ctx 14398 return c 14399} 14400 14401// Header returns an http.Header that can be modified by the caller to 14402// add HTTP headers to the request. 14403func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { 14404 if c.header_ == nil { 14405 c.header_ = make(http.Header) 14406 } 14407 return c.header_ 14408} 14409 14410func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { 14411 reqHeaders := make(http.Header) 14412 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14413 for k, v := range c.header_ { 14414 reqHeaders[k] = v 14415 } 14416 reqHeaders.Set("User-Agent", c.s.userAgent()) 14417 var body io.Reader = nil 14418 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) 14419 if err != nil { 14420 return nil, err 14421 } 14422 reqHeaders.Set("Content-Type", "application/json") 14423 c.urlParams_.Set("alt", alt) 14424 c.urlParams_.Set("prettyPrint", "false") 14425 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") 14426 urls += "?" + c.urlParams_.Encode() 14427 req, err := http.NewRequest("POST", urls, body) 14428 if err != nil { 14429 return nil, err 14430 } 14431 req.Header = reqHeaders 14432 googleapi.Expand(req.URL, map[string]string{ 14433 "projectId": c.projectId, 14434 "zone": c.zone, 14435 "clusterId": c.clusterId, 14436 }) 14437 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14438} 14439 14440// Do executes the "container.projects.zones.clusters.nodePools.create" call. 14441// Exactly one of *Operation or error will be non-nil. Any non-2xx 14442// status code is an error. Response headers are in either 14443// *Operation.ServerResponse.Header or (if a response was returned at 14444// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14445// to check whether the returned error was because 14446// http.StatusNotModified was returned. 14447func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14448 gensupport.SetOptions(c.urlParams_, opts...) 14449 res, err := c.doRequest("json") 14450 if res != nil && res.StatusCode == http.StatusNotModified { 14451 if res.Body != nil { 14452 res.Body.Close() 14453 } 14454 return nil, &googleapi.Error{ 14455 Code: res.StatusCode, 14456 Header: res.Header, 14457 } 14458 } 14459 if err != nil { 14460 return nil, err 14461 } 14462 defer googleapi.CloseBody(res) 14463 if err := googleapi.CheckResponse(res); err != nil { 14464 return nil, err 14465 } 14466 ret := &Operation{ 14467 ServerResponse: googleapi.ServerResponse{ 14468 Header: res.Header, 14469 HTTPStatusCode: res.StatusCode, 14470 }, 14471 } 14472 target := &ret 14473 if err := gensupport.DecodeResponse(target, res); err != nil { 14474 return nil, err 14475 } 14476 return ret, nil 14477 // { 14478 // "description": "Creates a node pool for a cluster.", 14479 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 14480 // "httpMethod": "POST", 14481 // "id": "container.projects.zones.clusters.nodePools.create", 14482 // "parameterOrder": [ 14483 // "projectId", 14484 // "zone", 14485 // "clusterId" 14486 // ], 14487 // "parameters": { 14488 // "clusterId": { 14489 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", 14490 // "location": "path", 14491 // "required": true, 14492 // "type": "string" 14493 // }, 14494 // "projectId": { 14495 // "description": "Required. 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.", 14496 // "location": "path", 14497 // "required": true, 14498 // "type": "string" 14499 // }, 14500 // "zone": { 14501 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the parent\nfield.", 14502 // "location": "path", 14503 // "required": true, 14504 // "type": "string" 14505 // } 14506 // }, 14507 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 14508 // "request": { 14509 // "$ref": "CreateNodePoolRequest" 14510 // }, 14511 // "response": { 14512 // "$ref": "Operation" 14513 // }, 14514 // "scopes": [ 14515 // "https://www.googleapis.com/auth/cloud-platform" 14516 // ] 14517 // } 14518 14519} 14520 14521// method id "container.projects.zones.clusters.nodePools.delete": 14522 14523type ProjectsZonesClustersNodePoolsDeleteCall struct { 14524 s *Service 14525 projectId string 14526 zone string 14527 clusterId string 14528 nodePoolId string 14529 urlParams_ gensupport.URLParams 14530 ctx_ context.Context 14531 header_ http.Header 14532} 14533 14534// Delete: Deletes a node pool from a cluster. 14535func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall { 14536 c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14537 c.projectId = projectId 14538 c.zone = zone 14539 c.clusterId = clusterId 14540 c.nodePoolId = nodePoolId 14541 return c 14542} 14543 14544// Name sets the optional parameter "name": The name (project, location, 14545// cluster, node pool id) of the node pool to 14546// delete. Specified in the 14547// format 14548// 'projects/*/locations/*/clusters/*/nodePools/*'. 14549func (c *ProjectsZonesClustersNodePoolsDeleteCall) Name(name string) *ProjectsZonesClustersNodePoolsDeleteCall { 14550 c.urlParams_.Set("name", name) 14551 return c 14552} 14553 14554// Fields allows partial responses to be retrieved. See 14555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14556// for more information. 14557func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall { 14558 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14559 return c 14560} 14561 14562// Context sets the context to be used in this call's Do method. Any 14563// pending HTTP request will be aborted if the provided context is 14564// canceled. 14565func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { 14566 c.ctx_ = ctx 14567 return c 14568} 14569 14570// Header returns an http.Header that can be modified by the caller to 14571// add HTTP headers to the request. 14572func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { 14573 if c.header_ == nil { 14574 c.header_ = make(http.Header) 14575 } 14576 return c.header_ 14577} 14578 14579func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 14580 reqHeaders := make(http.Header) 14581 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14582 for k, v := range c.header_ { 14583 reqHeaders[k] = v 14584 } 14585 reqHeaders.Set("User-Agent", c.s.userAgent()) 14586 var body io.Reader = nil 14587 c.urlParams_.Set("alt", alt) 14588 c.urlParams_.Set("prettyPrint", "false") 14589 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") 14590 urls += "?" + c.urlParams_.Encode() 14591 req, err := http.NewRequest("DELETE", urls, body) 14592 if err != nil { 14593 return nil, err 14594 } 14595 req.Header = reqHeaders 14596 googleapi.Expand(req.URL, map[string]string{ 14597 "projectId": c.projectId, 14598 "zone": c.zone, 14599 "clusterId": c.clusterId, 14600 "nodePoolId": c.nodePoolId, 14601 }) 14602 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14603} 14604 14605// Do executes the "container.projects.zones.clusters.nodePools.delete" call. 14606// Exactly one of *Operation or error will be non-nil. Any non-2xx 14607// status code is an error. Response headers are in either 14608// *Operation.ServerResponse.Header or (if a response was returned at 14609// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14610// to check whether the returned error was because 14611// http.StatusNotModified was returned. 14612func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14613 gensupport.SetOptions(c.urlParams_, opts...) 14614 res, err := c.doRequest("json") 14615 if res != nil && res.StatusCode == http.StatusNotModified { 14616 if res.Body != nil { 14617 res.Body.Close() 14618 } 14619 return nil, &googleapi.Error{ 14620 Code: res.StatusCode, 14621 Header: res.Header, 14622 } 14623 } 14624 if err != nil { 14625 return nil, err 14626 } 14627 defer googleapi.CloseBody(res) 14628 if err := googleapi.CheckResponse(res); err != nil { 14629 return nil, err 14630 } 14631 ret := &Operation{ 14632 ServerResponse: googleapi.ServerResponse{ 14633 Header: res.Header, 14634 HTTPStatusCode: res.StatusCode, 14635 }, 14636 } 14637 target := &ret 14638 if err := gensupport.DecodeResponse(target, res); err != nil { 14639 return nil, err 14640 } 14641 return ret, nil 14642 // { 14643 // "description": "Deletes a node pool from a cluster.", 14644 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 14645 // "httpMethod": "DELETE", 14646 // "id": "container.projects.zones.clusters.nodePools.delete", 14647 // "parameterOrder": [ 14648 // "projectId", 14649 // "zone", 14650 // "clusterId", 14651 // "nodePoolId" 14652 // ], 14653 // "parameters": { 14654 // "clusterId": { 14655 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 14656 // "location": "path", 14657 // "required": true, 14658 // "type": "string" 14659 // }, 14660 // "name": { 14661 // "description": "The name (project, location, cluster, node pool id) of the node pool to\ndelete. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 14662 // "location": "query", 14663 // "type": "string" 14664 // }, 14665 // "nodePoolId": { 14666 // "description": "Required. Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", 14667 // "location": "path", 14668 // "required": true, 14669 // "type": "string" 14670 // }, 14671 // "projectId": { 14672 // "description": "Required. 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.", 14673 // "location": "path", 14674 // "required": true, 14675 // "type": "string" 14676 // }, 14677 // "zone": { 14678 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 14679 // "location": "path", 14680 // "required": true, 14681 // "type": "string" 14682 // } 14683 // }, 14684 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 14685 // "response": { 14686 // "$ref": "Operation" 14687 // }, 14688 // "scopes": [ 14689 // "https://www.googleapis.com/auth/cloud-platform" 14690 // ] 14691 // } 14692 14693} 14694 14695// method id "container.projects.zones.clusters.nodePools.get": 14696 14697type ProjectsZonesClustersNodePoolsGetCall struct { 14698 s *Service 14699 projectId string 14700 zone string 14701 clusterId string 14702 nodePoolId string 14703 urlParams_ gensupport.URLParams 14704 ifNoneMatch_ string 14705 ctx_ context.Context 14706 header_ http.Header 14707} 14708 14709// Get: Retrieves the requested node pool. 14710func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { 14711 c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14712 c.projectId = projectId 14713 c.zone = zone 14714 c.clusterId = clusterId 14715 c.nodePoolId = nodePoolId 14716 return c 14717} 14718 14719// Name sets the optional parameter "name": The name (project, location, 14720// cluster, node pool id) of the node pool to 14721// get. Specified in the 14722// format 14723// 'projects/*/locations/*/clusters/*/nodePools/*'. 14724func (c *ProjectsZonesClustersNodePoolsGetCall) Name(name string) *ProjectsZonesClustersNodePoolsGetCall { 14725 c.urlParams_.Set("name", name) 14726 return c 14727} 14728 14729// Fields allows partial responses to be retrieved. See 14730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14731// for more information. 14732func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { 14733 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14734 return c 14735} 14736 14737// IfNoneMatch sets the optional parameter which makes the operation 14738// fail if the object's ETag matches the given value. This is useful for 14739// getting updates only after the object has changed since the last 14740// request. Use googleapi.IsNotModified to check whether the response 14741// error from Do is the result of In-None-Match. 14742func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { 14743 c.ifNoneMatch_ = entityTag 14744 return c 14745} 14746 14747// Context sets the context to be used in this call's Do method. Any 14748// pending HTTP request will be aborted if the provided context is 14749// canceled. 14750func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { 14751 c.ctx_ = ctx 14752 return c 14753} 14754 14755// Header returns an http.Header that can be modified by the caller to 14756// add HTTP headers to the request. 14757func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { 14758 if c.header_ == nil { 14759 c.header_ = make(http.Header) 14760 } 14761 return c.header_ 14762} 14763 14764func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { 14765 reqHeaders := make(http.Header) 14766 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14767 for k, v := range c.header_ { 14768 reqHeaders[k] = v 14769 } 14770 reqHeaders.Set("User-Agent", c.s.userAgent()) 14771 if c.ifNoneMatch_ != "" { 14772 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14773 } 14774 var body io.Reader = nil 14775 c.urlParams_.Set("alt", alt) 14776 c.urlParams_.Set("prettyPrint", "false") 14777 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") 14778 urls += "?" + c.urlParams_.Encode() 14779 req, err := http.NewRequest("GET", urls, body) 14780 if err != nil { 14781 return nil, err 14782 } 14783 req.Header = reqHeaders 14784 googleapi.Expand(req.URL, map[string]string{ 14785 "projectId": c.projectId, 14786 "zone": c.zone, 14787 "clusterId": c.clusterId, 14788 "nodePoolId": c.nodePoolId, 14789 }) 14790 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14791} 14792 14793// Do executes the "container.projects.zones.clusters.nodePools.get" call. 14794// Exactly one of *NodePool or error will be non-nil. Any non-2xx status 14795// code is an error. Response headers are in either 14796// *NodePool.ServerResponse.Header or (if a response was returned at 14797// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14798// to check whether the returned error was because 14799// http.StatusNotModified was returned. 14800func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { 14801 gensupport.SetOptions(c.urlParams_, opts...) 14802 res, err := c.doRequest("json") 14803 if res != nil && res.StatusCode == http.StatusNotModified { 14804 if res.Body != nil { 14805 res.Body.Close() 14806 } 14807 return nil, &googleapi.Error{ 14808 Code: res.StatusCode, 14809 Header: res.Header, 14810 } 14811 } 14812 if err != nil { 14813 return nil, err 14814 } 14815 defer googleapi.CloseBody(res) 14816 if err := googleapi.CheckResponse(res); err != nil { 14817 return nil, err 14818 } 14819 ret := &NodePool{ 14820 ServerResponse: googleapi.ServerResponse{ 14821 Header: res.Header, 14822 HTTPStatusCode: res.StatusCode, 14823 }, 14824 } 14825 target := &ret 14826 if err := gensupport.DecodeResponse(target, res); err != nil { 14827 return nil, err 14828 } 14829 return ret, nil 14830 // { 14831 // "description": "Retrieves the requested node pool.", 14832 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 14833 // "httpMethod": "GET", 14834 // "id": "container.projects.zones.clusters.nodePools.get", 14835 // "parameterOrder": [ 14836 // "projectId", 14837 // "zone", 14838 // "clusterId", 14839 // "nodePoolId" 14840 // ], 14841 // "parameters": { 14842 // "clusterId": { 14843 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", 14844 // "location": "path", 14845 // "required": true, 14846 // "type": "string" 14847 // }, 14848 // "name": { 14849 // "description": "The name (project, location, cluster, node pool id) of the node pool to\nget. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", 14850 // "location": "query", 14851 // "type": "string" 14852 // }, 14853 // "nodePoolId": { 14854 // "description": "Required. Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", 14855 // "location": "path", 14856 // "required": true, 14857 // "type": "string" 14858 // }, 14859 // "projectId": { 14860 // "description": "Required. 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.", 14861 // "location": "path", 14862 // "required": true, 14863 // "type": "string" 14864 // }, 14865 // "zone": { 14866 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 14867 // "location": "path", 14868 // "required": true, 14869 // "type": "string" 14870 // } 14871 // }, 14872 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", 14873 // "response": { 14874 // "$ref": "NodePool" 14875 // }, 14876 // "scopes": [ 14877 // "https://www.googleapis.com/auth/cloud-platform" 14878 // ] 14879 // } 14880 14881} 14882 14883// method id "container.projects.zones.clusters.nodePools.list": 14884 14885type ProjectsZonesClustersNodePoolsListCall struct { 14886 s *Service 14887 projectId string 14888 zone string 14889 clusterId string 14890 urlParams_ gensupport.URLParams 14891 ifNoneMatch_ string 14892 ctx_ context.Context 14893 header_ http.Header 14894} 14895 14896// List: Lists the node pools for a cluster. 14897func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall { 14898 c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14899 c.projectId = projectId 14900 c.zone = zone 14901 c.clusterId = clusterId 14902 return c 14903} 14904 14905// Parent sets the optional parameter "parent": The parent (project, 14906// location, cluster id) where the node pools will be 14907// listed. Specified in the format 'projects/*/locations/*/clusters/*'. 14908func (c *ProjectsZonesClustersNodePoolsListCall) Parent(parent string) *ProjectsZonesClustersNodePoolsListCall { 14909 c.urlParams_.Set("parent", parent) 14910 return c 14911} 14912 14913// Fields allows partial responses to be retrieved. See 14914// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14915// for more information. 14916func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { 14917 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14918 return c 14919} 14920 14921// IfNoneMatch sets the optional parameter which makes the operation 14922// fail if the object's ETag matches the given value. This is useful for 14923// getting updates only after the object has changed since the last 14924// request. Use googleapi.IsNotModified to check whether the response 14925// error from Do is the result of In-None-Match. 14926func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { 14927 c.ifNoneMatch_ = entityTag 14928 return c 14929} 14930 14931// Context sets the context to be used in this call's Do method. Any 14932// pending HTTP request will be aborted if the provided context is 14933// canceled. 14934func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { 14935 c.ctx_ = ctx 14936 return c 14937} 14938 14939// Header returns an http.Header that can be modified by the caller to 14940// add HTTP headers to the request. 14941func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { 14942 if c.header_ == nil { 14943 c.header_ = make(http.Header) 14944 } 14945 return c.header_ 14946} 14947 14948func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { 14949 reqHeaders := make(http.Header) 14950 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14951 for k, v := range c.header_ { 14952 reqHeaders[k] = v 14953 } 14954 reqHeaders.Set("User-Agent", c.s.userAgent()) 14955 if c.ifNoneMatch_ != "" { 14956 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14957 } 14958 var body io.Reader = nil 14959 c.urlParams_.Set("alt", alt) 14960 c.urlParams_.Set("prettyPrint", "false") 14961 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") 14962 urls += "?" + c.urlParams_.Encode() 14963 req, err := http.NewRequest("GET", urls, body) 14964 if err != nil { 14965 return nil, err 14966 } 14967 req.Header = reqHeaders 14968 googleapi.Expand(req.URL, map[string]string{ 14969 "projectId": c.projectId, 14970 "zone": c.zone, 14971 "clusterId": c.clusterId, 14972 }) 14973 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14974} 14975 14976// Do executes the "container.projects.zones.clusters.nodePools.list" call. 14977// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any 14978// non-2xx status code is an error. Response headers are in either 14979// *ListNodePoolsResponse.ServerResponse.Header or (if a response was 14980// returned at all) in error.(*googleapi.Error).Header. Use 14981// googleapi.IsNotModified to check whether the returned error was 14982// because http.StatusNotModified was returned. 14983func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { 14984 gensupport.SetOptions(c.urlParams_, opts...) 14985 res, err := c.doRequest("json") 14986 if res != nil && res.StatusCode == http.StatusNotModified { 14987 if res.Body != nil { 14988 res.Body.Close() 14989 } 14990 return nil, &googleapi.Error{ 14991 Code: res.StatusCode, 14992 Header: res.Header, 14993 } 14994 } 14995 if err != nil { 14996 return nil, err 14997 } 14998 defer googleapi.CloseBody(res) 14999 if err := googleapi.CheckResponse(res); err != nil { 15000 return nil, err 15001 } 15002 ret := &ListNodePoolsResponse{ 15003 ServerResponse: googleapi.ServerResponse{ 15004 Header: res.Header, 15005 HTTPStatusCode: res.StatusCode, 15006 }, 15007 } 15008 target := &ret 15009 if err := gensupport.DecodeResponse(target, res); err != nil { 15010 return nil, err 15011 } 15012 return ret, nil 15013 // { 15014 // "description": "Lists the node pools for a cluster.", 15015 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 15016 // "httpMethod": "GET", 15017 // "id": "container.projects.zones.clusters.nodePools.list", 15018 // "parameterOrder": [ 15019 // "projectId", 15020 // "zone", 15021 // "clusterId" 15022 // ], 15023 // "parameters": { 15024 // "clusterId": { 15025 // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", 15026 // "location": "path", 15027 // "required": true, 15028 // "type": "string" 15029 // }, 15030 // "parent": { 15031 // "description": "The parent (project, location, cluster id) where the node pools will be\nlisted. Specified in the format 'projects/*/locations/*/clusters/*'.", 15032 // "location": "query", 15033 // "type": "string" 15034 // }, 15035 // "projectId": { 15036 // "description": "Required. 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.", 15037 // "location": "path", 15038 // "required": true, 15039 // "type": "string" 15040 // }, 15041 // "zone": { 15042 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the parent\nfield.", 15043 // "location": "path", 15044 // "required": true, 15045 // "type": "string" 15046 // } 15047 // }, 15048 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", 15049 // "response": { 15050 // "$ref": "ListNodePoolsResponse" 15051 // }, 15052 // "scopes": [ 15053 // "https://www.googleapis.com/auth/cloud-platform" 15054 // ] 15055 // } 15056 15057} 15058 15059// method id "container.projects.zones.clusters.nodePools.rollback": 15060 15061type ProjectsZonesClustersNodePoolsRollbackCall struct { 15062 s *Service 15063 projectId string 15064 zone string 15065 clusterId string 15066 nodePoolId string 15067 rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest 15068 urlParams_ gensupport.URLParams 15069 ctx_ context.Context 15070 header_ http.Header 15071} 15072 15073// Rollback: Rolls back a previously Aborted or Failed NodePool 15074// upgrade. 15075// This makes no changes if the last upgrade successfully completed. 15076func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { 15077 c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15078 c.projectId = projectId 15079 c.zone = zone 15080 c.clusterId = clusterId 15081 c.nodePoolId = nodePoolId 15082 c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest 15083 return c 15084} 15085 15086// Fields allows partial responses to be retrieved. See 15087// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15088// for more information. 15089func (c *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall { 15090 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15091 return c 15092} 15093 15094// Context sets the context to be used in this call's Do method. Any 15095// pending HTTP request will be aborted if the provided context is 15096// canceled. 15097func (c *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall { 15098 c.ctx_ = ctx 15099 return c 15100} 15101 15102// Header returns an http.Header that can be modified by the caller to 15103// add HTTP headers to the request. 15104func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { 15105 if c.header_ == nil { 15106 c.header_ = make(http.Header) 15107 } 15108 return c.header_ 15109} 15110 15111func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { 15112 reqHeaders := make(http.Header) 15113 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15114 for k, v := range c.header_ { 15115 reqHeaders[k] = v 15116 } 15117 reqHeaders.Set("User-Agent", c.s.userAgent()) 15118 var body io.Reader = nil 15119 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) 15120 if err != nil { 15121 return nil, err 15122 } 15123 reqHeaders.Set("Content-Type", "application/json") 15124 c.urlParams_.Set("alt", alt) 15125 c.urlParams_.Set("prettyPrint", "false") 15126 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") 15127 urls += "?" + c.urlParams_.Encode() 15128 req, err := http.NewRequest("POST", urls, body) 15129 if err != nil { 15130 return nil, err 15131 } 15132 req.Header = reqHeaders 15133 googleapi.Expand(req.URL, map[string]string{ 15134 "projectId": c.projectId, 15135 "zone": c.zone, 15136 "clusterId": c.clusterId, 15137 "nodePoolId": c.nodePoolId, 15138 }) 15139 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15140} 15141 15142// Do executes the "container.projects.zones.clusters.nodePools.rollback" call. 15143// Exactly one of *Operation or error will be non-nil. Any non-2xx 15144// status code is an error. Response headers are in either 15145// *Operation.ServerResponse.Header or (if a response was returned at 15146// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15147// to check whether the returned error was because 15148// http.StatusNotModified was returned. 15149func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15150 gensupport.SetOptions(c.urlParams_, opts...) 15151 res, err := c.doRequest("json") 15152 if res != nil && res.StatusCode == http.StatusNotModified { 15153 if res.Body != nil { 15154 res.Body.Close() 15155 } 15156 return nil, &googleapi.Error{ 15157 Code: res.StatusCode, 15158 Header: res.Header, 15159 } 15160 } 15161 if err != nil { 15162 return nil, err 15163 } 15164 defer googleapi.CloseBody(res) 15165 if err := googleapi.CheckResponse(res); err != nil { 15166 return nil, err 15167 } 15168 ret := &Operation{ 15169 ServerResponse: googleapi.ServerResponse{ 15170 Header: res.Header, 15171 HTTPStatusCode: res.StatusCode, 15172 }, 15173 } 15174 target := &ret 15175 if err := gensupport.DecodeResponse(target, res); err != nil { 15176 return nil, err 15177 } 15178 return ret, nil 15179 // { 15180 // "description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.", 15181 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", 15182 // "httpMethod": "POST", 15183 // "id": "container.projects.zones.clusters.nodePools.rollback", 15184 // "parameterOrder": [ 15185 // "projectId", 15186 // "zone", 15187 // "clusterId", 15188 // "nodePoolId" 15189 // ], 15190 // "parameters": { 15191 // "clusterId": { 15192 // "description": "Required. Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", 15193 // "location": "path", 15194 // "required": true, 15195 // "type": "string" 15196 // }, 15197 // "nodePoolId": { 15198 // "description": "Required. Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", 15199 // "location": "path", 15200 // "required": true, 15201 // "type": "string" 15202 // }, 15203 // "projectId": { 15204 // "description": "Required. 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.", 15205 // "location": "path", 15206 // "required": true, 15207 // "type": "string" 15208 // }, 15209 // "zone": { 15210 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 15211 // "location": "path", 15212 // "required": true, 15213 // "type": "string" 15214 // } 15215 // }, 15216 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", 15217 // "request": { 15218 // "$ref": "RollbackNodePoolUpgradeRequest" 15219 // }, 15220 // "response": { 15221 // "$ref": "Operation" 15222 // }, 15223 // "scopes": [ 15224 // "https://www.googleapis.com/auth/cloud-platform" 15225 // ] 15226 // } 15227 15228} 15229 15230// method id "container.projects.zones.clusters.nodePools.setManagement": 15231 15232type ProjectsZonesClustersNodePoolsSetManagementCall struct { 15233 s *Service 15234 projectId string 15235 zone string 15236 clusterId string 15237 nodePoolId string 15238 setnodepoolmanagementrequest *SetNodePoolManagementRequest 15239 urlParams_ gensupport.URLParams 15240 ctx_ context.Context 15241 header_ http.Header 15242} 15243 15244// SetManagement: Sets the NodeManagement options for a node pool. 15245func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall { 15246 c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15247 c.projectId = projectId 15248 c.zone = zone 15249 c.clusterId = clusterId 15250 c.nodePoolId = nodePoolId 15251 c.setnodepoolmanagementrequest = setnodepoolmanagementrequest 15252 return c 15253} 15254 15255// Fields allows partial responses to be retrieved. See 15256// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15257// for more information. 15258func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall { 15259 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15260 return c 15261} 15262 15263// Context sets the context to be used in this call's Do method. Any 15264// pending HTTP request will be aborted if the provided context is 15265// canceled. 15266func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall { 15267 c.ctx_ = ctx 15268 return c 15269} 15270 15271// Header returns an http.Header that can be modified by the caller to 15272// add HTTP headers to the request. 15273func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { 15274 if c.header_ == nil { 15275 c.header_ = make(http.Header) 15276 } 15277 return c.header_ 15278} 15279 15280func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { 15281 reqHeaders := make(http.Header) 15282 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15283 for k, v := range c.header_ { 15284 reqHeaders[k] = v 15285 } 15286 reqHeaders.Set("User-Agent", c.s.userAgent()) 15287 var body io.Reader = nil 15288 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) 15289 if err != nil { 15290 return nil, err 15291 } 15292 reqHeaders.Set("Content-Type", "application/json") 15293 c.urlParams_.Set("alt", alt) 15294 c.urlParams_.Set("prettyPrint", "false") 15295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") 15296 urls += "?" + c.urlParams_.Encode() 15297 req, err := http.NewRequest("POST", urls, body) 15298 if err != nil { 15299 return nil, err 15300 } 15301 req.Header = reqHeaders 15302 googleapi.Expand(req.URL, map[string]string{ 15303 "projectId": c.projectId, 15304 "zone": c.zone, 15305 "clusterId": c.clusterId, 15306 "nodePoolId": c.nodePoolId, 15307 }) 15308 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15309} 15310 15311// Do executes the "container.projects.zones.clusters.nodePools.setManagement" call. 15312// Exactly one of *Operation or error will be non-nil. Any non-2xx 15313// status code is an error. Response headers are in either 15314// *Operation.ServerResponse.Header or (if a response was returned at 15315// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15316// to check whether the returned error was because 15317// http.StatusNotModified was returned. 15318func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15319 gensupport.SetOptions(c.urlParams_, opts...) 15320 res, err := c.doRequest("json") 15321 if res != nil && res.StatusCode == http.StatusNotModified { 15322 if res.Body != nil { 15323 res.Body.Close() 15324 } 15325 return nil, &googleapi.Error{ 15326 Code: res.StatusCode, 15327 Header: res.Header, 15328 } 15329 } 15330 if err != nil { 15331 return nil, err 15332 } 15333 defer googleapi.CloseBody(res) 15334 if err := googleapi.CheckResponse(res); err != nil { 15335 return nil, err 15336 } 15337 ret := &Operation{ 15338 ServerResponse: googleapi.ServerResponse{ 15339 Header: res.Header, 15340 HTTPStatusCode: res.StatusCode, 15341 }, 15342 } 15343 target := &ret 15344 if err := gensupport.DecodeResponse(target, res); err != nil { 15345 return nil, err 15346 } 15347 return ret, nil 15348 // { 15349 // "description": "Sets the NodeManagement options for a node pool.", 15350 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", 15351 // "httpMethod": "POST", 15352 // "id": "container.projects.zones.clusters.nodePools.setManagement", 15353 // "parameterOrder": [ 15354 // "projectId", 15355 // "zone", 15356 // "clusterId", 15357 // "nodePoolId" 15358 // ], 15359 // "parameters": { 15360 // "clusterId": { 15361 // "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", 15362 // "location": "path", 15363 // "required": true, 15364 // "type": "string" 15365 // }, 15366 // "nodePoolId": { 15367 // "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", 15368 // "location": "path", 15369 // "required": true, 15370 // "type": "string" 15371 // }, 15372 // "projectId": { 15373 // "description": "Required. 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.", 15374 // "location": "path", 15375 // "required": true, 15376 // "type": "string" 15377 // }, 15378 // "zone": { 15379 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 15380 // "location": "path", 15381 // "required": true, 15382 // "type": "string" 15383 // } 15384 // }, 15385 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", 15386 // "request": { 15387 // "$ref": "SetNodePoolManagementRequest" 15388 // }, 15389 // "response": { 15390 // "$ref": "Operation" 15391 // }, 15392 // "scopes": [ 15393 // "https://www.googleapis.com/auth/cloud-platform" 15394 // ] 15395 // } 15396 15397} 15398 15399// method id "container.projects.zones.clusters.nodePools.setSize": 15400 15401type ProjectsZonesClustersNodePoolsSetSizeCall struct { 15402 s *Service 15403 projectId string 15404 zone string 15405 clusterId string 15406 nodePoolId string 15407 setnodepoolsizerequest *SetNodePoolSizeRequest 15408 urlParams_ gensupport.URLParams 15409 ctx_ context.Context 15410 header_ http.Header 15411} 15412 15413// SetSize: Sets the size for a specific node pool. 15414func (r *ProjectsZonesClustersNodePoolsService) SetSize(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsZonesClustersNodePoolsSetSizeCall { 15415 c := &ProjectsZonesClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15416 c.projectId = projectId 15417 c.zone = zone 15418 c.clusterId = clusterId 15419 c.nodePoolId = nodePoolId 15420 c.setnodepoolsizerequest = setnodepoolsizerequest 15421 return c 15422} 15423 15424// Fields allows partial responses to be retrieved. See 15425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15426// for more information. 15427func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetSizeCall { 15428 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15429 return c 15430} 15431 15432// Context sets the context to be used in this call's Do method. Any 15433// pending HTTP request will be aborted if the provided context is 15434// canceled. 15435func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetSizeCall { 15436 c.ctx_ = ctx 15437 return c 15438} 15439 15440// Header returns an http.Header that can be modified by the caller to 15441// add HTTP headers to the request. 15442func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header { 15443 if c.header_ == nil { 15444 c.header_ = make(http.Header) 15445 } 15446 return c.header_ 15447} 15448 15449func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { 15450 reqHeaders := make(http.Header) 15451 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15452 for k, v := range c.header_ { 15453 reqHeaders[k] = v 15454 } 15455 reqHeaders.Set("User-Agent", c.s.userAgent()) 15456 var body io.Reader = nil 15457 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) 15458 if err != nil { 15459 return nil, err 15460 } 15461 reqHeaders.Set("Content-Type", "application/json") 15462 c.urlParams_.Set("alt", alt) 15463 c.urlParams_.Set("prettyPrint", "false") 15464 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") 15465 urls += "?" + c.urlParams_.Encode() 15466 req, err := http.NewRequest("POST", urls, body) 15467 if err != nil { 15468 return nil, err 15469 } 15470 req.Header = reqHeaders 15471 googleapi.Expand(req.URL, map[string]string{ 15472 "projectId": c.projectId, 15473 "zone": c.zone, 15474 "clusterId": c.clusterId, 15475 "nodePoolId": c.nodePoolId, 15476 }) 15477 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15478} 15479 15480// Do executes the "container.projects.zones.clusters.nodePools.setSize" call. 15481// Exactly one of *Operation or error will be non-nil. Any non-2xx 15482// status code is an error. Response headers are in either 15483// *Operation.ServerResponse.Header or (if a response was returned at 15484// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15485// to check whether the returned error was because 15486// http.StatusNotModified was returned. 15487func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15488 gensupport.SetOptions(c.urlParams_, opts...) 15489 res, err := c.doRequest("json") 15490 if res != nil && res.StatusCode == http.StatusNotModified { 15491 if res.Body != nil { 15492 res.Body.Close() 15493 } 15494 return nil, &googleapi.Error{ 15495 Code: res.StatusCode, 15496 Header: res.Header, 15497 } 15498 } 15499 if err != nil { 15500 return nil, err 15501 } 15502 defer googleapi.CloseBody(res) 15503 if err := googleapi.CheckResponse(res); err != nil { 15504 return nil, err 15505 } 15506 ret := &Operation{ 15507 ServerResponse: googleapi.ServerResponse{ 15508 Header: res.Header, 15509 HTTPStatusCode: res.StatusCode, 15510 }, 15511 } 15512 target := &ret 15513 if err := gensupport.DecodeResponse(target, res); err != nil { 15514 return nil, err 15515 } 15516 return ret, nil 15517 // { 15518 // "description": "Sets the size for a specific node pool.", 15519 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", 15520 // "httpMethod": "POST", 15521 // "id": "container.projects.zones.clusters.nodePools.setSize", 15522 // "parameterOrder": [ 15523 // "projectId", 15524 // "zone", 15525 // "clusterId", 15526 // "nodePoolId" 15527 // ], 15528 // "parameters": { 15529 // "clusterId": { 15530 // "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", 15531 // "location": "path", 15532 // "required": true, 15533 // "type": "string" 15534 // }, 15535 // "nodePoolId": { 15536 // "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", 15537 // "location": "path", 15538 // "required": true, 15539 // "type": "string" 15540 // }, 15541 // "projectId": { 15542 // "description": "Required. 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.", 15543 // "location": "path", 15544 // "required": true, 15545 // "type": "string" 15546 // }, 15547 // "zone": { 15548 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 15549 // "location": "path", 15550 // "required": true, 15551 // "type": "string" 15552 // } 15553 // }, 15554 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", 15555 // "request": { 15556 // "$ref": "SetNodePoolSizeRequest" 15557 // }, 15558 // "response": { 15559 // "$ref": "Operation" 15560 // }, 15561 // "scopes": [ 15562 // "https://www.googleapis.com/auth/cloud-platform" 15563 // ] 15564 // } 15565 15566} 15567 15568// method id "container.projects.zones.clusters.nodePools.update": 15569 15570type ProjectsZonesClustersNodePoolsUpdateCall struct { 15571 s *Service 15572 projectId string 15573 zone string 15574 clusterId string 15575 nodePoolId string 15576 updatenodepoolrequest *UpdateNodePoolRequest 15577 urlParams_ gensupport.URLParams 15578 ctx_ context.Context 15579 header_ http.Header 15580} 15581 15582// Update: Updates the version and/or image type of a specific node 15583// pool. 15584func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall { 15585 c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15586 c.projectId = projectId 15587 c.zone = zone 15588 c.clusterId = clusterId 15589 c.nodePoolId = nodePoolId 15590 c.updatenodepoolrequest = updatenodepoolrequest 15591 return c 15592} 15593 15594// Fields allows partial responses to be retrieved. See 15595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15596// for more information. 15597func (c *ProjectsZonesClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsUpdateCall { 15598 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15599 return c 15600} 15601 15602// Context sets the context to be used in this call's Do method. Any 15603// pending HTTP request will be aborted if the provided context is 15604// canceled. 15605func (c *ProjectsZonesClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsUpdateCall { 15606 c.ctx_ = ctx 15607 return c 15608} 15609 15610// Header returns an http.Header that can be modified by the caller to 15611// add HTTP headers to the request. 15612func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header { 15613 if c.header_ == nil { 15614 c.header_ = make(http.Header) 15615 } 15616 return c.header_ 15617} 15618 15619func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { 15620 reqHeaders := make(http.Header) 15621 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15622 for k, v := range c.header_ { 15623 reqHeaders[k] = v 15624 } 15625 reqHeaders.Set("User-Agent", c.s.userAgent()) 15626 var body io.Reader = nil 15627 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) 15628 if err != nil { 15629 return nil, err 15630 } 15631 reqHeaders.Set("Content-Type", "application/json") 15632 c.urlParams_.Set("alt", alt) 15633 c.urlParams_.Set("prettyPrint", "false") 15634 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") 15635 urls += "?" + c.urlParams_.Encode() 15636 req, err := http.NewRequest("POST", urls, body) 15637 if err != nil { 15638 return nil, err 15639 } 15640 req.Header = reqHeaders 15641 googleapi.Expand(req.URL, map[string]string{ 15642 "projectId": c.projectId, 15643 "zone": c.zone, 15644 "clusterId": c.clusterId, 15645 "nodePoolId": c.nodePoolId, 15646 }) 15647 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15648} 15649 15650// Do executes the "container.projects.zones.clusters.nodePools.update" call. 15651// Exactly one of *Operation or error will be non-nil. Any non-2xx 15652// status code is an error. Response headers are in either 15653// *Operation.ServerResponse.Header or (if a response was returned at 15654// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15655// to check whether the returned error was because 15656// http.StatusNotModified was returned. 15657func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15658 gensupport.SetOptions(c.urlParams_, opts...) 15659 res, err := c.doRequest("json") 15660 if res != nil && res.StatusCode == http.StatusNotModified { 15661 if res.Body != nil { 15662 res.Body.Close() 15663 } 15664 return nil, &googleapi.Error{ 15665 Code: res.StatusCode, 15666 Header: res.Header, 15667 } 15668 } 15669 if err != nil { 15670 return nil, err 15671 } 15672 defer googleapi.CloseBody(res) 15673 if err := googleapi.CheckResponse(res); err != nil { 15674 return nil, err 15675 } 15676 ret := &Operation{ 15677 ServerResponse: googleapi.ServerResponse{ 15678 Header: res.Header, 15679 HTTPStatusCode: res.StatusCode, 15680 }, 15681 } 15682 target := &ret 15683 if err := gensupport.DecodeResponse(target, res); err != nil { 15684 return nil, err 15685 } 15686 return ret, nil 15687 // { 15688 // "description": "Updates the version and/or image type of a specific node pool.", 15689 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", 15690 // "httpMethod": "POST", 15691 // "id": "container.projects.zones.clusters.nodePools.update", 15692 // "parameterOrder": [ 15693 // "projectId", 15694 // "zone", 15695 // "clusterId", 15696 // "nodePoolId" 15697 // ], 15698 // "parameters": { 15699 // "clusterId": { 15700 // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", 15701 // "location": "path", 15702 // "required": true, 15703 // "type": "string" 15704 // }, 15705 // "nodePoolId": { 15706 // "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", 15707 // "location": "path", 15708 // "required": true, 15709 // "type": "string" 15710 // }, 15711 // "projectId": { 15712 // "description": "Required. 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.", 15713 // "location": "path", 15714 // "required": true, 15715 // "type": "string" 15716 // }, 15717 // "zone": { 15718 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 15719 // "location": "path", 15720 // "required": true, 15721 // "type": "string" 15722 // } 15723 // }, 15724 // "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", 15725 // "request": { 15726 // "$ref": "UpdateNodePoolRequest" 15727 // }, 15728 // "response": { 15729 // "$ref": "Operation" 15730 // }, 15731 // "scopes": [ 15732 // "https://www.googleapis.com/auth/cloud-platform" 15733 // ] 15734 // } 15735 15736} 15737 15738// method id "container.projects.zones.operations.cancel": 15739 15740type ProjectsZonesOperationsCancelCall struct { 15741 s *Service 15742 projectId string 15743 zone string 15744 operationId string 15745 canceloperationrequest *CancelOperationRequest 15746 urlParams_ gensupport.URLParams 15747 ctx_ context.Context 15748 header_ http.Header 15749} 15750 15751// Cancel: Cancels the specified operation. 15752func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall { 15753 c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15754 c.projectId = projectId 15755 c.zone = zone 15756 c.operationId = operationId 15757 c.canceloperationrequest = canceloperationrequest 15758 return c 15759} 15760 15761// Fields allows partial responses to be retrieved. See 15762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15763// for more information. 15764func (c *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall { 15765 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15766 return c 15767} 15768 15769// Context sets the context to be used in this call's Do method. Any 15770// pending HTTP request will be aborted if the provided context is 15771// canceled. 15772func (c *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall { 15773 c.ctx_ = ctx 15774 return c 15775} 15776 15777// Header returns an http.Header that can be modified by the caller to 15778// add HTTP headers to the request. 15779func (c *ProjectsZonesOperationsCancelCall) Header() http.Header { 15780 if c.header_ == nil { 15781 c.header_ = make(http.Header) 15782 } 15783 return c.header_ 15784} 15785 15786func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 15787 reqHeaders := make(http.Header) 15788 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15789 for k, v := range c.header_ { 15790 reqHeaders[k] = v 15791 } 15792 reqHeaders.Set("User-Agent", c.s.userAgent()) 15793 var body io.Reader = nil 15794 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 15795 if err != nil { 15796 return nil, err 15797 } 15798 reqHeaders.Set("Content-Type", "application/json") 15799 c.urlParams_.Set("alt", alt) 15800 c.urlParams_.Set("prettyPrint", "false") 15801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") 15802 urls += "?" + c.urlParams_.Encode() 15803 req, err := http.NewRequest("POST", urls, body) 15804 if err != nil { 15805 return nil, err 15806 } 15807 req.Header = reqHeaders 15808 googleapi.Expand(req.URL, map[string]string{ 15809 "projectId": c.projectId, 15810 "zone": c.zone, 15811 "operationId": c.operationId, 15812 }) 15813 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15814} 15815 15816// Do executes the "container.projects.zones.operations.cancel" call. 15817// Exactly one of *Empty or error will be non-nil. Any non-2xx status 15818// code is an error. Response headers are in either 15819// *Empty.ServerResponse.Header or (if a response was returned at all) 15820// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 15821// check whether the returned error was because http.StatusNotModified 15822// was returned. 15823func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 15824 gensupport.SetOptions(c.urlParams_, opts...) 15825 res, err := c.doRequest("json") 15826 if res != nil && res.StatusCode == http.StatusNotModified { 15827 if res.Body != nil { 15828 res.Body.Close() 15829 } 15830 return nil, &googleapi.Error{ 15831 Code: res.StatusCode, 15832 Header: res.Header, 15833 } 15834 } 15835 if err != nil { 15836 return nil, err 15837 } 15838 defer googleapi.CloseBody(res) 15839 if err := googleapi.CheckResponse(res); err != nil { 15840 return nil, err 15841 } 15842 ret := &Empty{ 15843 ServerResponse: googleapi.ServerResponse{ 15844 Header: res.Header, 15845 HTTPStatusCode: res.StatusCode, 15846 }, 15847 } 15848 target := &ret 15849 if err := gensupport.DecodeResponse(target, res); err != nil { 15850 return nil, err 15851 } 15852 return ret, nil 15853 // { 15854 // "description": "Cancels the specified operation.", 15855 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", 15856 // "httpMethod": "POST", 15857 // "id": "container.projects.zones.operations.cancel", 15858 // "parameterOrder": [ 15859 // "projectId", 15860 // "zone", 15861 // "operationId" 15862 // ], 15863 // "parameters": { 15864 // "operationId": { 15865 // "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", 15866 // "location": "path", 15867 // "required": true, 15868 // "type": "string" 15869 // }, 15870 // "projectId": { 15871 // "description": "Required. 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.", 15872 // "location": "path", 15873 // "required": true, 15874 // "type": "string" 15875 // }, 15876 // "zone": { 15877 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\noperation resides. This field has been deprecated and replaced by the name\nfield.", 15878 // "location": "path", 15879 // "required": true, 15880 // "type": "string" 15881 // } 15882 // }, 15883 // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", 15884 // "request": { 15885 // "$ref": "CancelOperationRequest" 15886 // }, 15887 // "response": { 15888 // "$ref": "Empty" 15889 // }, 15890 // "scopes": [ 15891 // "https://www.googleapis.com/auth/cloud-platform" 15892 // ] 15893 // } 15894 15895} 15896 15897// method id "container.projects.zones.operations.get": 15898 15899type ProjectsZonesOperationsGetCall struct { 15900 s *Service 15901 projectId string 15902 zone string 15903 operationId string 15904 urlParams_ gensupport.URLParams 15905 ifNoneMatch_ string 15906 ctx_ context.Context 15907 header_ http.Header 15908} 15909 15910// Get: Gets the specified operation. 15911func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall { 15912 c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15913 c.projectId = projectId 15914 c.zone = zone 15915 c.operationId = operationId 15916 return c 15917} 15918 15919// Name sets the optional parameter "name": The name (project, location, 15920// operation id) of the operation to get. 15921// Specified in the format 'projects/*/locations/*/operations/*'. 15922func (c *ProjectsZonesOperationsGetCall) Name(name string) *ProjectsZonesOperationsGetCall { 15923 c.urlParams_.Set("name", name) 15924 return c 15925} 15926 15927// Fields allows partial responses to be retrieved. See 15928// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15929// for more information. 15930func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { 15931 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15932 return c 15933} 15934 15935// IfNoneMatch sets the optional parameter which makes the operation 15936// fail if the object's ETag matches the given value. This is useful for 15937// getting updates only after the object has changed since the last 15938// request. Use googleapi.IsNotModified to check whether the response 15939// error from Do is the result of In-None-Match. 15940func (c *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall { 15941 c.ifNoneMatch_ = entityTag 15942 return c 15943} 15944 15945// Context sets the context to be used in this call's Do method. Any 15946// pending HTTP request will be aborted if the provided context is 15947// canceled. 15948func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall { 15949 c.ctx_ = ctx 15950 return c 15951} 15952 15953// Header returns an http.Header that can be modified by the caller to 15954// add HTTP headers to the request. 15955func (c *ProjectsZonesOperationsGetCall) Header() http.Header { 15956 if c.header_ == nil { 15957 c.header_ = make(http.Header) 15958 } 15959 return c.header_ 15960} 15961 15962func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { 15963 reqHeaders := make(http.Header) 15964 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15965 for k, v := range c.header_ { 15966 reqHeaders[k] = v 15967 } 15968 reqHeaders.Set("User-Agent", c.s.userAgent()) 15969 if c.ifNoneMatch_ != "" { 15970 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15971 } 15972 var body io.Reader = nil 15973 c.urlParams_.Set("alt", alt) 15974 c.urlParams_.Set("prettyPrint", "false") 15975 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}") 15976 urls += "?" + c.urlParams_.Encode() 15977 req, err := http.NewRequest("GET", urls, body) 15978 if err != nil { 15979 return nil, err 15980 } 15981 req.Header = reqHeaders 15982 googleapi.Expand(req.URL, map[string]string{ 15983 "projectId": c.projectId, 15984 "zone": c.zone, 15985 "operationId": c.operationId, 15986 }) 15987 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15988} 15989 15990// Do executes the "container.projects.zones.operations.get" call. 15991// Exactly one of *Operation or error will be non-nil. Any non-2xx 15992// status code is an error. Response headers are in either 15993// *Operation.ServerResponse.Header or (if a response was returned at 15994// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15995// to check whether the returned error was because 15996// http.StatusNotModified was returned. 15997func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15998 gensupport.SetOptions(c.urlParams_, opts...) 15999 res, err := c.doRequest("json") 16000 if res != nil && res.StatusCode == http.StatusNotModified { 16001 if res.Body != nil { 16002 res.Body.Close() 16003 } 16004 return nil, &googleapi.Error{ 16005 Code: res.StatusCode, 16006 Header: res.Header, 16007 } 16008 } 16009 if err != nil { 16010 return nil, err 16011 } 16012 defer googleapi.CloseBody(res) 16013 if err := googleapi.CheckResponse(res); err != nil { 16014 return nil, err 16015 } 16016 ret := &Operation{ 16017 ServerResponse: googleapi.ServerResponse{ 16018 Header: res.Header, 16019 HTTPStatusCode: res.StatusCode, 16020 }, 16021 } 16022 target := &ret 16023 if err := gensupport.DecodeResponse(target, res); err != nil { 16024 return nil, err 16025 } 16026 return ret, nil 16027 // { 16028 // "description": "Gets the specified operation.", 16029 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", 16030 // "httpMethod": "GET", 16031 // "id": "container.projects.zones.operations.get", 16032 // "parameterOrder": [ 16033 // "projectId", 16034 // "zone", 16035 // "operationId" 16036 // ], 16037 // "parameters": { 16038 // "name": { 16039 // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", 16040 // "location": "query", 16041 // "type": "string" 16042 // }, 16043 // "operationId": { 16044 // "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", 16045 // "location": "path", 16046 // "required": true, 16047 // "type": "string" 16048 // }, 16049 // "projectId": { 16050 // "description": "Required. 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.", 16051 // "location": "path", 16052 // "required": true, 16053 // "type": "string" 16054 // }, 16055 // "zone": { 16056 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) in which the\ncluster resides. This field has been deprecated and replaced by the name\nfield.", 16057 // "location": "path", 16058 // "required": true, 16059 // "type": "string" 16060 // } 16061 // }, 16062 // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", 16063 // "response": { 16064 // "$ref": "Operation" 16065 // }, 16066 // "scopes": [ 16067 // "https://www.googleapis.com/auth/cloud-platform" 16068 // ] 16069 // } 16070 16071} 16072 16073// method id "container.projects.zones.operations.list": 16074 16075type ProjectsZonesOperationsListCall struct { 16076 s *Service 16077 projectId string 16078 zone string 16079 urlParams_ gensupport.URLParams 16080 ifNoneMatch_ string 16081 ctx_ context.Context 16082 header_ http.Header 16083} 16084 16085// List: Lists all operations in a project in the specified zone or all 16086// zones. 16087func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { 16088 c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16089 c.projectId = projectId 16090 c.zone = zone 16091 return c 16092} 16093 16094// Parent sets the optional parameter "parent": The parent (project and 16095// location) where the operations will be listed. 16096// Specified in the format 'projects/*/locations/*'. 16097// Location "-" matches all zones and all regions. 16098func (c *ProjectsZonesOperationsListCall) Parent(parent string) *ProjectsZonesOperationsListCall { 16099 c.urlParams_.Set("parent", parent) 16100 return c 16101} 16102 16103// Fields allows partial responses to be retrieved. See 16104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16105// for more information. 16106func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { 16107 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16108 return c 16109} 16110 16111// IfNoneMatch sets the optional parameter which makes the operation 16112// fail if the object's ETag matches the given value. This is useful for 16113// getting updates only after the object has changed since the last 16114// request. Use googleapi.IsNotModified to check whether the response 16115// error from Do is the result of In-None-Match. 16116func (c *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall { 16117 c.ifNoneMatch_ = entityTag 16118 return c 16119} 16120 16121// Context sets the context to be used in this call's Do method. Any 16122// pending HTTP request will be aborted if the provided context is 16123// canceled. 16124func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall { 16125 c.ctx_ = ctx 16126 return c 16127} 16128 16129// Header returns an http.Header that can be modified by the caller to 16130// add HTTP headers to the request. 16131func (c *ProjectsZonesOperationsListCall) Header() http.Header { 16132 if c.header_ == nil { 16133 c.header_ = make(http.Header) 16134 } 16135 return c.header_ 16136} 16137 16138func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { 16139 reqHeaders := make(http.Header) 16140 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16141 for k, v := range c.header_ { 16142 reqHeaders[k] = v 16143 } 16144 reqHeaders.Set("User-Agent", c.s.userAgent()) 16145 if c.ifNoneMatch_ != "" { 16146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16147 } 16148 var body io.Reader = nil 16149 c.urlParams_.Set("alt", alt) 16150 c.urlParams_.Set("prettyPrint", "false") 16151 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations") 16152 urls += "?" + c.urlParams_.Encode() 16153 req, err := http.NewRequest("GET", urls, body) 16154 if err != nil { 16155 return nil, err 16156 } 16157 req.Header = reqHeaders 16158 googleapi.Expand(req.URL, map[string]string{ 16159 "projectId": c.projectId, 16160 "zone": c.zone, 16161 }) 16162 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16163} 16164 16165// Do executes the "container.projects.zones.operations.list" call. 16166// Exactly one of *ListOperationsResponse or error will be non-nil. Any 16167// non-2xx status code is an error. Response headers are in either 16168// *ListOperationsResponse.ServerResponse.Header or (if a response was 16169// returned at all) in error.(*googleapi.Error).Header. Use 16170// googleapi.IsNotModified to check whether the returned error was 16171// because http.StatusNotModified was returned. 16172func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 16173 gensupport.SetOptions(c.urlParams_, opts...) 16174 res, err := c.doRequest("json") 16175 if res != nil && res.StatusCode == http.StatusNotModified { 16176 if res.Body != nil { 16177 res.Body.Close() 16178 } 16179 return nil, &googleapi.Error{ 16180 Code: res.StatusCode, 16181 Header: res.Header, 16182 } 16183 } 16184 if err != nil { 16185 return nil, err 16186 } 16187 defer googleapi.CloseBody(res) 16188 if err := googleapi.CheckResponse(res); err != nil { 16189 return nil, err 16190 } 16191 ret := &ListOperationsResponse{ 16192 ServerResponse: googleapi.ServerResponse{ 16193 Header: res.Header, 16194 HTTPStatusCode: res.StatusCode, 16195 }, 16196 } 16197 target := &ret 16198 if err := gensupport.DecodeResponse(target, res); err != nil { 16199 return nil, err 16200 } 16201 return ret, nil 16202 // { 16203 // "description": "Lists all operations in a project in the specified zone or all zones.", 16204 // "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations", 16205 // "httpMethod": "GET", 16206 // "id": "container.projects.zones.operations.list", 16207 // "parameterOrder": [ 16208 // "projectId", 16209 // "zone" 16210 // ], 16211 // "parameters": { 16212 // "parent": { 16213 // "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.", 16214 // "location": "query", 16215 // "type": "string" 16216 // }, 16217 // "projectId": { 16218 // "description": "Required. 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.", 16219 // "location": "path", 16220 // "required": true, 16221 // "type": "string" 16222 // }, 16223 // "zone": { 16224 // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available) to return\noperations for, or `-` for all zones. This field has been deprecated and\nreplaced by the parent field.", 16225 // "location": "path", 16226 // "required": true, 16227 // "type": "string" 16228 // } 16229 // }, 16230 // "path": "v1beta1/projects/{projectId}/zones/{zone}/operations", 16231 // "response": { 16232 // "$ref": "ListOperationsResponse" 16233 // }, 16234 // "scopes": [ 16235 // "https://www.googleapis.com/auth/cloud-platform" 16236 // ] 16237 // } 16238 16239} 16240