1 // Copyright 2024 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 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/container/v1beta1" 27 // ... 28 // ctx := context.Background() 29 // containerService, err := container.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // containerService, err := container.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package container // import "google.golang.org/api/container/v1beta1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "container:v1beta1" 90 const apiName = "container" 91 const apiVersion = "v1beta1" 92 const basePath = "https://container.googleapis.com/" 93 const basePathTemplate = "https://container.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://container.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Projects = NewProjectsService(s) 139 return s, nil 140 } 141 142 type Service struct { 143 client *http.Client 144 BasePath string // API endpoint base URL 145 UserAgent string // optional additional User-Agent fragment 146 147 Projects *ProjectsService 148 } 149 150 func (s *Service) userAgent() string { 151 if s.UserAgent == "" { 152 return googleapi.UserAgent 153 } 154 return googleapi.UserAgent + " " + s.UserAgent 155 } 156 157 func NewProjectsService(s *Service) *ProjectsService { 158 rs := &ProjectsService{s: s} 159 rs.Aggregated = NewProjectsAggregatedService(s) 160 rs.Locations = NewProjectsLocationsService(s) 161 rs.Zones = NewProjectsZonesService(s) 162 return rs 163 } 164 165 type ProjectsService struct { 166 s *Service 167 168 Aggregated *ProjectsAggregatedService 169 170 Locations *ProjectsLocationsService 171 172 Zones *ProjectsZonesService 173 } 174 175 func NewProjectsAggregatedService(s *Service) *ProjectsAggregatedService { 176 rs := &ProjectsAggregatedService{s: s} 177 rs.UsableSubnetworks = NewProjectsAggregatedUsableSubnetworksService(s) 178 return rs 179 } 180 181 type ProjectsAggregatedService struct { 182 s *Service 183 184 UsableSubnetworks *ProjectsAggregatedUsableSubnetworksService 185 } 186 187 func NewProjectsAggregatedUsableSubnetworksService(s *Service) *ProjectsAggregatedUsableSubnetworksService { 188 rs := &ProjectsAggregatedUsableSubnetworksService{s: s} 189 return rs 190 } 191 192 type ProjectsAggregatedUsableSubnetworksService struct { 193 s *Service 194 } 195 196 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 197 rs := &ProjectsLocationsService{s: s} 198 rs.Clusters = NewProjectsLocationsClustersService(s) 199 rs.Operations = NewProjectsLocationsOperationsService(s) 200 return rs 201 } 202 203 type ProjectsLocationsService struct { 204 s *Service 205 206 Clusters *ProjectsLocationsClustersService 207 208 Operations *ProjectsLocationsOperationsService 209 } 210 211 func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { 212 rs := &ProjectsLocationsClustersService{s: s} 213 rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) 214 rs.WellKnown = NewProjectsLocationsClustersWellKnownService(s) 215 return rs 216 } 217 218 type ProjectsLocationsClustersService struct { 219 s *Service 220 221 NodePools *ProjectsLocationsClustersNodePoolsService 222 223 WellKnown *ProjectsLocationsClustersWellKnownService 224 } 225 226 func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { 227 rs := &ProjectsLocationsClustersNodePoolsService{s: s} 228 return rs 229 } 230 231 type ProjectsLocationsClustersNodePoolsService struct { 232 s *Service 233 } 234 235 func NewProjectsLocationsClustersWellKnownService(s *Service) *ProjectsLocationsClustersWellKnownService { 236 rs := &ProjectsLocationsClustersWellKnownService{s: s} 237 return rs 238 } 239 240 type ProjectsLocationsClustersWellKnownService struct { 241 s *Service 242 } 243 244 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 245 rs := &ProjectsLocationsOperationsService{s: s} 246 return rs 247 } 248 249 type ProjectsLocationsOperationsService struct { 250 s *Service 251 } 252 253 func NewProjectsZonesService(s *Service) *ProjectsZonesService { 254 rs := &ProjectsZonesService{s: s} 255 rs.Clusters = NewProjectsZonesClustersService(s) 256 rs.Operations = NewProjectsZonesOperationsService(s) 257 return rs 258 } 259 260 type ProjectsZonesService struct { 261 s *Service 262 263 Clusters *ProjectsZonesClustersService 264 265 Operations *ProjectsZonesOperationsService 266 } 267 268 func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { 269 rs := &ProjectsZonesClustersService{s: s} 270 rs.NodePools = NewProjectsZonesClustersNodePoolsService(s) 271 return rs 272 } 273 274 type ProjectsZonesClustersService struct { 275 s *Service 276 277 NodePools *ProjectsZonesClustersNodePoolsService 278 } 279 280 func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService { 281 rs := &ProjectsZonesClustersNodePoolsService{s: s} 282 return rs 283 } 284 285 type ProjectsZonesClustersNodePoolsService struct { 286 s *Service 287 } 288 289 func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { 290 rs := &ProjectsZonesOperationsService{s: s} 291 return rs 292 } 293 294 type ProjectsZonesOperationsService struct { 295 s *Service 296 } 297 298 // AcceleratorConfig: AcceleratorConfig represents a Hardware Accelerator 299 // request. 300 type AcceleratorConfig struct { 301 // AcceleratorCount: The number of the accelerator cards exposed to an 302 // instance. 303 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` 304 // AcceleratorType: The accelerator type resource name. List of supported 305 // accelerators here (https://cloud.google.com/compute/docs/gpus) 306 AcceleratorType string `json:"acceleratorType,omitempty"` 307 // GpuDriverInstallationConfig: The configuration for auto installation of GPU 308 // driver. 309 GpuDriverInstallationConfig *GPUDriverInstallationConfig `json:"gpuDriverInstallationConfig,omitempty"` 310 // GpuPartitionSize: Size of partitions to create on the GPU. Valid values are 311 // described in the NVIDIA mig user guide 312 // (https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). 313 GpuPartitionSize string `json:"gpuPartitionSize,omitempty"` 314 // GpuSharingConfig: The configuration for GPU sharing options. 315 GpuSharingConfig *GPUSharingConfig `json:"gpuSharingConfig,omitempty"` 316 // MaxTimeSharedClientsPerGpu: The number of time-shared GPU resources to 317 // expose for each physical GPU. 318 MaxTimeSharedClientsPerGpu int64 `json:"maxTimeSharedClientsPerGpu,omitempty,string"` 319 // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to 320 // unconditionally include in API requests. By default, fields with empty or 321 // default values are omitted from API requests. See 322 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 323 // details. 324 ForceSendFields []string `json:"-"` 325 // NullFields is a list of field names (e.g. "AcceleratorCount") to include in 326 // API requests with the JSON null value. By default, fields with empty values 327 // are omitted from API requests. See 328 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 329 NullFields []string `json:"-"` 330 } 331 332 func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { 333 type NoMethod AcceleratorConfig 334 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 335 } 336 337 // AdditionalNodeNetworkConfig: AdditionalNodeNetworkConfig is the 338 // configuration for additional node networks within the NodeNetworkConfig 339 // message 340 type AdditionalNodeNetworkConfig struct { 341 // Network: Name of the VPC where the additional interface belongs 342 Network string `json:"network,omitempty"` 343 // Subnetwork: Name of the subnetwork where the additional interface belongs 344 Subnetwork string `json:"subnetwork,omitempty"` 345 // ForceSendFields is a list of field names (e.g. "Network") to unconditionally 346 // include in API requests. By default, fields with empty or default values are 347 // omitted from API requests. See 348 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 349 // details. 350 ForceSendFields []string `json:"-"` 351 // NullFields is a list of field names (e.g. "Network") to include in API 352 // requests with the JSON null value. By default, fields with empty values are 353 // omitted from API requests. See 354 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 355 NullFields []string `json:"-"` 356 } 357 358 func (s *AdditionalNodeNetworkConfig) MarshalJSON() ([]byte, error) { 359 type NoMethod AdditionalNodeNetworkConfig 360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 361 } 362 363 // AdditionalPodNetworkConfig: AdditionalPodNetworkConfig is the configuration 364 // for additional pod networks within the NodeNetworkConfig message 365 type AdditionalPodNetworkConfig struct { 366 // MaxPodsPerNode: The maximum number of pods per node which use this pod 367 // network 368 MaxPodsPerNode *MaxPodsConstraint `json:"maxPodsPerNode,omitempty"` 369 // SecondaryPodRange: The name of the secondary range on the subnet which 370 // provides IP address for this pod range 371 SecondaryPodRange string `json:"secondaryPodRange,omitempty"` 372 // Subnetwork: Name of the subnetwork where the additional pod network belongs 373 Subnetwork string `json:"subnetwork,omitempty"` 374 // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to 375 // unconditionally include in API requests. By default, fields with empty or 376 // default values are omitted from API requests. See 377 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 378 // details. 379 ForceSendFields []string `json:"-"` 380 // NullFields is a list of field names (e.g. "MaxPodsPerNode") to include in 381 // API requests with the JSON null value. By default, fields with empty values 382 // are omitted from API requests. See 383 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 384 NullFields []string `json:"-"` 385 } 386 387 func (s *AdditionalPodNetworkConfig) MarshalJSON() ([]byte, error) { 388 type NoMethod AdditionalPodNetworkConfig 389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 390 } 391 392 // AdditionalPodRangesConfig: AdditionalPodRangesConfig is the configuration 393 // for additional pod secondary ranges supporting the ClusterUpdate message. 394 type AdditionalPodRangesConfig struct { 395 // PodRangeInfo: Output only. [Output only] Information for additional pod 396 // range. 397 PodRangeInfo []*RangeInfo `json:"podRangeInfo,omitempty"` 398 // PodRangeNames: Name for pod secondary ipv4 range which has the actual range 399 // defined ahead. 400 PodRangeNames []string `json:"podRangeNames,omitempty"` 401 // ForceSendFields is a list of field names (e.g. "PodRangeInfo") to 402 // unconditionally include in API requests. By default, fields with empty or 403 // default values are omitted from API requests. See 404 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 405 // details. 406 ForceSendFields []string `json:"-"` 407 // NullFields is a list of field names (e.g. "PodRangeInfo") to include in API 408 // requests with the JSON null value. By default, fields with empty values are 409 // omitted from API requests. See 410 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 411 NullFields []string `json:"-"` 412 } 413 414 func (s *AdditionalPodRangesConfig) MarshalJSON() ([]byte, error) { 415 type NoMethod AdditionalPodRangesConfig 416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 417 } 418 419 // AddonsConfig: Configuration for the addons that can be automatically spun up 420 // in the cluster, enabling additional functionality. 421 type AddonsConfig struct { 422 // CloudRunConfig: Configuration for the Cloud Run addon. The `IstioConfig` 423 // addon must be enabled in order to enable Cloud Run addon. This option can 424 // only be enabled at cluster creation time. 425 CloudRunConfig *CloudRunConfig `json:"cloudRunConfig,omitempty"` 426 // ConfigConnectorConfig: Configuration for the ConfigConnector add-on, a 427 // Kubernetes extension to manage hosted GCP services through the Kubernetes 428 // API 429 ConfigConnectorConfig *ConfigConnectorConfig `json:"configConnectorConfig,omitempty"` 430 // DnsCacheConfig: Configuration for NodeLocalDNS, a dns cache running on 431 // cluster nodes 432 DnsCacheConfig *DnsCacheConfig `json:"dnsCacheConfig,omitempty"` 433 // GcePersistentDiskCsiDriverConfig: Configuration for the Compute Engine 434 // Persistent Disk CSI driver. 435 GcePersistentDiskCsiDriverConfig *GcePersistentDiskCsiDriverConfig `json:"gcePersistentDiskCsiDriverConfig,omitempty"` 436 // GcpFilestoreCsiDriverConfig: Configuration for the GCP Filestore CSI driver. 437 GcpFilestoreCsiDriverConfig *GcpFilestoreCsiDriverConfig `json:"gcpFilestoreCsiDriverConfig,omitempty"` 438 // GcsFuseCsiDriverConfig: Configuration for the Cloud Storage Fuse CSI driver. 439 GcsFuseCsiDriverConfig *GcsFuseCsiDriverConfig `json:"gcsFuseCsiDriverConfig,omitempty"` 440 // GkeBackupAgentConfig: Configuration for the Backup for GKE agent addon. 441 GkeBackupAgentConfig *GkeBackupAgentConfig `json:"gkeBackupAgentConfig,omitempty"` 442 // HorizontalPodAutoscaling: Configuration for the horizontal pod autoscaling 443 // feature, which increases or decreases the number of replica pods a 444 // replication controller has based on the resource usage of the existing pods. 445 HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"` 446 // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing controller 447 // addon, which makes it easy to set up HTTP load balancers for services in a 448 // cluster. 449 HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` 450 // IstioConfig: Configuration for Istio, an open platform to connect, manage, 451 // and secure microservices. 452 IstioConfig *IstioConfig `json:"istioConfig,omitempty"` 453 // KalmConfig: Configuration for the KALM addon, which manages the lifecycle of 454 // k8s applications. 455 KalmConfig *KalmConfig `json:"kalmConfig,omitempty"` 456 // KubernetesDashboard: Configuration for the Kubernetes Dashboard. This addon 457 // is deprecated, and will be disabled in 1.15. It is recommended to use the 458 // Cloud Console to manage and monitor your Kubernetes clusters, workloads and 459 // applications. For more information, see: 460 // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards 461 KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` 462 // NetworkPolicyConfig: Configuration for NetworkPolicy. This only tracks 463 // whether the addon is enabled or not on the Master, it does not track whether 464 // network policy is enabled for the nodes. 465 NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` 466 // StatefulHaConfig: Optional. Configuration for the StatefulHA add-on. 467 StatefulHaConfig *StatefulHAConfig `json:"statefulHaConfig,omitempty"` 468 // ForceSendFields is a list of field names (e.g. "CloudRunConfig") to 469 // unconditionally include in API requests. By default, fields with empty or 470 // default values are omitted from API requests. See 471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 472 // details. 473 ForceSendFields []string `json:"-"` 474 // NullFields is a list of field names (e.g. "CloudRunConfig") to include in 475 // API requests with the JSON null value. By default, fields with empty values 476 // are omitted from API requests. See 477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 478 NullFields []string `json:"-"` 479 } 480 481 func (s *AddonsConfig) MarshalJSON() ([]byte, error) { 482 type NoMethod AddonsConfig 483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 484 } 485 486 // AdvancedDatapathObservabilityConfig: AdvancedDatapathObservabilityConfig 487 // specifies configuration of observability features of advanced datapath. 488 type AdvancedDatapathObservabilityConfig struct { 489 // EnableMetrics: Expose flow metrics on nodes 490 EnableMetrics bool `json:"enableMetrics,omitempty"` 491 // EnableRelay: Enable Relay component 492 EnableRelay bool `json:"enableRelay,omitempty"` 493 // RelayMode: Method used to make Relay available 494 // 495 // Possible values: 496 // "RELAY_MODE_UNSPECIFIED" - Default value. This shouldn't be used. 497 // "DISABLED" - disabled 498 // "INTERNAL_VPC_LB" - exposed via internal load balancer 499 // "EXTERNAL_LB" - exposed via external load balancer 500 RelayMode string `json:"relayMode,omitempty"` 501 // ForceSendFields is a list of field names (e.g. "EnableMetrics") to 502 // unconditionally include in API requests. By default, fields with empty or 503 // default values are omitted from API requests. See 504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 505 // details. 506 ForceSendFields []string `json:"-"` 507 // NullFields is a list of field names (e.g. "EnableMetrics") to include in API 508 // requests with the JSON null value. By default, fields with empty values are 509 // omitted from API requests. See 510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 511 NullFields []string `json:"-"` 512 } 513 514 func (s *AdvancedDatapathObservabilityConfig) MarshalJSON() ([]byte, error) { 515 type NoMethod AdvancedDatapathObservabilityConfig 516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 517 } 518 519 // AdvancedMachineFeatures: Specifies options for controlling advanced machine 520 // features. 521 type AdvancedMachineFeatures struct { 522 // EnableNestedVirtualization: Whether or not to enable nested virtualization 523 // (defaults to false). 524 EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` 525 // ThreadsPerCore: The number of threads per physical core. To disable 526 // simultaneous multithreading (SMT) set this to 1. If unset, the maximum 527 // number of threads supported per core by the underlying processor is assumed. 528 ThreadsPerCore int64 `json:"threadsPerCore,omitempty,string"` 529 // ForceSendFields is a list of field names (e.g. "EnableNestedVirtualization") 530 // to unconditionally include in API requests. By default, fields with empty or 531 // default values are omitted from API requests. See 532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 533 // details. 534 ForceSendFields []string `json:"-"` 535 // NullFields is a list of field names (e.g. "EnableNestedVirtualization") to 536 // include in API requests with the JSON null value. By default, fields with 537 // empty values are omitted from API requests. See 538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 539 NullFields []string `json:"-"` 540 } 541 542 func (s *AdvancedMachineFeatures) MarshalJSON() ([]byte, error) { 543 type NoMethod AdvancedMachineFeatures 544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 545 } 546 547 // AuthenticatorGroupsConfig: Configuration for returning group information 548 // from authenticators. 549 type AuthenticatorGroupsConfig struct { 550 // Enabled: Whether this cluster should return group membership lookups during 551 // authentication using a group of security groups. 552 Enabled bool `json:"enabled,omitempty"` 553 // SecurityGroup: The name of the security group-of-groups to be used. Only 554 // relevant if enabled = true. 555 SecurityGroup string `json:"securityGroup,omitempty"` 556 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 557 // include in API requests. By default, fields with empty or default values are 558 // omitted from API requests. See 559 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 560 // details. 561 ForceSendFields []string `json:"-"` 562 // NullFields is a list of field names (e.g. "Enabled") to include in API 563 // requests with the JSON null value. By default, fields with empty values are 564 // omitted from API requests. See 565 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 566 NullFields []string `json:"-"` 567 } 568 569 func (s *AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { 570 type NoMethod AuthenticatorGroupsConfig 571 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 572 } 573 574 // AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for the 575 // user to control how the Auto Upgrades will proceed. 576 type AutoUpgradeOptions struct { 577 // AutoUpgradeStartTime: [Output only] This field is set when upgrades are 578 // about to commence with the approximate start time for the upgrades, in 579 // RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. 580 AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` 581 // Description: [Output only] This field is set when upgrades are about to 582 // commence with the description of the upgrade. 583 Description string `json:"description,omitempty"` 584 // ForceSendFields is a list of field names (e.g. "AutoUpgradeStartTime") to 585 // unconditionally include in API requests. By default, fields with empty or 586 // default values are omitted from API requests. See 587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 588 // details. 589 ForceSendFields []string `json:"-"` 590 // NullFields is a list of field names (e.g. "AutoUpgradeStartTime") to include 591 // in API requests with the JSON null value. By default, fields with empty 592 // values are omitted from API requests. See 593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 594 NullFields []string `json:"-"` 595 } 596 597 func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { 598 type NoMethod AutoUpgradeOptions 599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 600 } 601 602 // Autopilot: Autopilot is the configuration for Autopilot settings on the 603 // cluster. 604 type Autopilot struct { 605 // ConversionStatus: Output only. ConversionStatus shows conversion status. 606 ConversionStatus *AutopilotConversionStatus `json:"conversionStatus,omitempty"` 607 // Enabled: Enable Autopilot 608 Enabled bool `json:"enabled,omitempty"` 609 // WorkloadPolicyConfig: Workload policy configuration for Autopilot. 610 WorkloadPolicyConfig *WorkloadPolicyConfig `json:"workloadPolicyConfig,omitempty"` 611 // ForceSendFields is a list of field names (e.g. "ConversionStatus") to 612 // unconditionally include in API requests. By default, fields with empty or 613 // default values are omitted from API requests. See 614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 615 // details. 616 ForceSendFields []string `json:"-"` 617 // NullFields is a list of field names (e.g. "ConversionStatus") to include in 618 // API requests with the JSON null value. By default, fields with empty values 619 // are omitted from API requests. See 620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 621 NullFields []string `json:"-"` 622 } 623 624 func (s *Autopilot) MarshalJSON() ([]byte, error) { 625 type NoMethod Autopilot 626 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 627 } 628 629 // AutopilotCompatibilityIssue: AutopilotCompatibilityIssue contains 630 // information about a specific compatibility issue with Autopilot mode. 631 type AutopilotCompatibilityIssue struct { 632 // ConstraintType: The constraint type of the issue. 633 ConstraintType string `json:"constraintType,omitempty"` 634 // Description: The description of the issue. 635 Description string `json:"description,omitempty"` 636 // DocumentationUrl: A URL to a public documnetation, which addresses resolving 637 // this issue. 638 DocumentationUrl string `json:"documentationUrl,omitempty"` 639 // IncompatibilityType: The incompatibility type of this issue. 640 // 641 // Possible values: 642 // "UNSPECIFIED" - Default value, should not be used. 643 // "INCOMPATIBILITY" - Indicates that the issue is a known incompatibility 644 // between the cluster and Autopilot mode. 645 // "ADDITIONAL_CONFIG_REQUIRED" - Indicates the issue is an incompatibility 646 // if customers take no further action to resolve. 647 // "PASSED_WITH_OPTIONAL_CONFIG" - Indicates the issue is not an 648 // incompatibility, but depending on the workloads business logic, there is a 649 // potential that they won't work on Autopilot. 650 IncompatibilityType string `json:"incompatibilityType,omitempty"` 651 // LastObservation: The last time when this issue was observed. 652 LastObservation string `json:"lastObservation,omitempty"` 653 // Subjects: The name of the resources which are subject to this issue. 654 Subjects []string `json:"subjects,omitempty"` 655 // ForceSendFields is a list of field names (e.g. "ConstraintType") to 656 // unconditionally include in API requests. By default, fields with empty or 657 // default values are omitted from API requests. See 658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 659 // details. 660 ForceSendFields []string `json:"-"` 661 // NullFields is a list of field names (e.g. "ConstraintType") to include in 662 // API requests with the JSON null value. By default, fields with empty values 663 // are omitted from API requests. See 664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 665 NullFields []string `json:"-"` 666 } 667 668 func (s *AutopilotCompatibilityIssue) MarshalJSON() ([]byte, error) { 669 type NoMethod AutopilotCompatibilityIssue 670 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 671 } 672 673 // AutopilotConversionStatus: AutopilotConversionStatus represents conversion 674 // status. 675 type AutopilotConversionStatus struct { 676 // State: Output only. The current state of the conversion. 677 // 678 // Possible values: 679 // "STATE_UNSPECIFIED" - STATE_UNSPECIFIED indicates the state is 680 // unspecified. 681 // "DONE" - DONE indicates the conversion has been completed. Old node pools 682 // will continue being deleted in the background. 683 State string `json:"state,omitempty"` 684 // ForceSendFields is a list of field names (e.g. "State") to unconditionally 685 // include in API requests. By default, fields with empty or default values are 686 // omitted from API requests. See 687 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 688 // details. 689 ForceSendFields []string `json:"-"` 690 // NullFields is a list of field names (e.g. "State") to include in API 691 // requests with the JSON null value. By default, fields with empty values are 692 // omitted from API requests. See 693 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 694 NullFields []string `json:"-"` 695 } 696 697 func (s *AutopilotConversionStatus) MarshalJSON() ([]byte, error) { 698 type NoMethod AutopilotConversionStatus 699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 700 } 701 702 // AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults contains 703 // defaults for a node pool created by NAP. 704 type AutoprovisioningNodePoolDefaults struct { 705 // BootDiskKmsKey: The Customer Managed Encryption Key used to encrypt the 706 // boot disk attached to each node in the node pool. This should be of the form 707 // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKey 708 // s/[KEY_NAME]. For more information about protecting resources with Cloud KMS 709 // Keys please see: 710 // https://cloud.google.com/compute/docs/disks/customer-managed-encryption 711 BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` 712 // DiskSizeGb: Size of the disk attached to each node, specified in GB. The 713 // smallest allowed disk size is 10GB. If unspecified, the default disk size is 714 // 100GB. 715 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 716 // DiskType: Type of the disk attached to each node (e.g. 'pd-standard', 717 // 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is 718 // 'pd-standard' 719 DiskType string `json:"diskType,omitempty"` 720 // ImageType: The image type to use for NAP created node. Please see 721 // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for 722 // available image types. 723 ImageType string `json:"imageType,omitempty"` 724 // InsecureKubeletReadonlyPortEnabled: Enable or disable Kubelet read only 725 // port. 726 InsecureKubeletReadonlyPortEnabled bool `json:"insecureKubeletReadonlyPortEnabled,omitempty"` 727 // Management: NodeManagement configuration for this NodePool. 728 Management *NodeManagement `json:"management,omitempty"` 729 // MinCpuPlatform: Deprecated. Minimum CPU platform to be used for NAP created 730 // node pools. The instance may be scheduled on the specified or newer CPU 731 // platform. Applicable values are the friendly names of CPU platforms, such as 732 // minCpuPlatform: Intel Haswell or minCpuPlatform: Intel Sandy Bridge. For 733 // more information, read how to specify min CPU platform 734 // (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). 735 // This field is deprecated, min_cpu_platform should be specified using 736 // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. To 737 // unset the min cpu platform field pass "automatic" as field value. 738 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 739 // OauthScopes: The set of Google API scopes to be made available on all of the 740 // node VMs under the "default" service account. The following scopes are 741 // recommended, but not required, and by default are not included: * 742 // `https://www.googleapis.com/auth/compute` is required for mounting 743 // persistent storage on your nodes. * 744 // `https://www.googleapis.com/auth/devstorage.read_only` is required for 745 // communicating with **gcr.io** (the Google Container Registry 746 // (https://cloud.google.com/container-registry/)). If unspecified, no scopes 747 // are added, unless Cloud Logging or Cloud Monitoring are enabled, in which 748 // case their required scopes will be added. 749 OauthScopes []string `json:"oauthScopes,omitempty"` 750 // ServiceAccount: The Google Cloud Platform Service Account to be used by the 751 // node VMs. Specify the email address of the Service Account; otherwise, if no 752 // Service Account is specified, the "default" service account is used. 753 ServiceAccount string `json:"serviceAccount,omitempty"` 754 // ShieldedInstanceConfig: Shielded Instance options. 755 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` 756 // UpgradeSettings: Upgrade settings control disruption and speed of the 757 // upgrade. 758 UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` 759 // ForceSendFields is a list of field names (e.g. "BootDiskKmsKey") to 760 // unconditionally include in API requests. By default, fields with empty or 761 // default values are omitted from API requests. See 762 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 763 // details. 764 ForceSendFields []string `json:"-"` 765 // NullFields is a list of field names (e.g. "BootDiskKmsKey") to include in 766 // API requests with the JSON null value. By default, fields with empty values 767 // are omitted from API requests. See 768 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 769 NullFields []string `json:"-"` 770 } 771 772 func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { 773 type NoMethod AutoprovisioningNodePoolDefaults 774 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 775 } 776 777 // AutoscaledRolloutPolicy: Autoscaled rollout policy uses cluster autoscaler 778 // during blue-green upgrades to scale both the green and blue pools. 779 type AutoscaledRolloutPolicy struct { 780 } 781 782 // AvailableVersion: Deprecated. 783 type AvailableVersion struct { 784 // Reason: Reason for availability. 785 Reason string `json:"reason,omitempty"` 786 // Version: Kubernetes version. 787 Version string `json:"version,omitempty"` 788 // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally 789 // include in API requests. By default, fields with empty or default values are 790 // omitted from API requests. See 791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 792 // details. 793 ForceSendFields []string `json:"-"` 794 // NullFields is a list of field names (e.g. "Reason") to include in API 795 // requests with the JSON null value. By default, fields with empty values are 796 // omitted from API requests. See 797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 798 NullFields []string `json:"-"` 799 } 800 801 func (s *AvailableVersion) MarshalJSON() ([]byte, error) { 802 type NoMethod AvailableVersion 803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 804 } 805 806 // BestEffortProvisioning: Best effort provisioning. 807 type BestEffortProvisioning struct { 808 // Enabled: When this is enabled, cluster/node pool creations will ignore 809 // non-fatal errors like stockout to best provision as many nodes as possible 810 // right now and eventually bring up all target number of nodes 811 Enabled bool `json:"enabled,omitempty"` 812 // MinProvisionNodes: Minimum number of nodes to be provisioned to be 813 // considered as succeeded, and the rest of nodes will be provisioned gradually 814 // and eventually when stockout issue has been resolved. 815 MinProvisionNodes int64 `json:"minProvisionNodes,omitempty"` 816 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 817 // include in API requests. By default, fields with empty or default values are 818 // omitted from API requests. See 819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 820 // details. 821 ForceSendFields []string `json:"-"` 822 // NullFields is a list of field names (e.g. "Enabled") to include in API 823 // requests with the JSON null value. By default, fields with empty values are 824 // omitted from API requests. See 825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 826 NullFields []string `json:"-"` 827 } 828 829 func (s *BestEffortProvisioning) MarshalJSON() ([]byte, error) { 830 type NoMethod BestEffortProvisioning 831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 832 } 833 834 // BigQueryDestination: Parameters for using BigQuery as the destination of 835 // resource usage export. 836 type BigQueryDestination struct { 837 // DatasetId: The ID of a BigQuery Dataset. 838 DatasetId string `json:"datasetId,omitempty"` 839 // ForceSendFields is a list of field names (e.g. "DatasetId") to 840 // unconditionally include in API requests. By default, fields with empty or 841 // default values are omitted from API requests. See 842 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 843 // details. 844 ForceSendFields []string `json:"-"` 845 // NullFields is a list of field names (e.g. "DatasetId") to include in API 846 // requests with the JSON null value. By default, fields with empty values are 847 // omitted from API requests. See 848 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 849 NullFields []string `json:"-"` 850 } 851 852 func (s *BigQueryDestination) MarshalJSON() ([]byte, error) { 853 type NoMethod BigQueryDestination 854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 855 } 856 857 // BinaryAuthorization: Configuration for Binary Authorization. 858 type BinaryAuthorization struct { 859 // Enabled: This field is deprecated. Leave this unset and instead configure 860 // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to 861 // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. 862 Enabled bool `json:"enabled,omitempty"` 863 // EvaluationMode: Mode of operation for binauthz policy evaluation. If 864 // unspecified, defaults to DISABLED. 865 // 866 // Possible values: 867 // "EVALUATION_MODE_UNSPECIFIED" - Default value 868 // "DISABLED" - Disable BinaryAuthorization 869 // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission requests 870 // with BinaryAuthorization using the project's singleton policy. This is 871 // equivalent to setting the enabled boolean to true. 872 // "POLICY_BINDINGS" - Use Binary Authorization Continuous Validation with 873 // the policies specified in policy_bindings. 874 // "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE" - Use Binary 875 // Authorization Continuous Validation with the policies specified in 876 // policy_bindings and enforce Kubernetes admission requests with Binary 877 // Authorization using the project's singleton policy. 878 EvaluationMode string `json:"evaluationMode,omitempty"` 879 // PolicyBindings: Optional. Binauthz policies that apply to this cluster. 880 PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"` 881 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 882 // include in API requests. By default, fields with empty or default values are 883 // omitted from API requests. See 884 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 885 // details. 886 ForceSendFields []string `json:"-"` 887 // NullFields is a list of field names (e.g. "Enabled") to include in API 888 // requests with the JSON null value. By default, fields with empty values are 889 // omitted from API requests. See 890 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 891 NullFields []string `json:"-"` 892 } 893 894 func (s *BinaryAuthorization) MarshalJSON() ([]byte, error) { 895 type NoMethod BinaryAuthorization 896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 897 } 898 899 // BlueGreenInfo: Information relevant to blue-green upgrade. 900 type BlueGreenInfo struct { 901 // BlueInstanceGroupUrls: The resource URLs of the [managed instance groups] 902 // (/compute/docs/instance-groups/creating-groups-of-managed-instances) 903 // associated with blue pool. 904 BlueInstanceGroupUrls []string `json:"blueInstanceGroupUrls,omitempty"` 905 // BluePoolDeletionStartTime: Time to start deleting blue pool to complete 906 // blue-green upgrade, in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text 907 // format. 908 BluePoolDeletionStartTime string `json:"bluePoolDeletionStartTime,omitempty"` 909 // GreenInstanceGroupUrls: The resource URLs of the [managed instance groups] 910 // (/compute/docs/instance-groups/creating-groups-of-managed-instances) 911 // associated with green pool. 912 GreenInstanceGroupUrls []string `json:"greenInstanceGroupUrls,omitempty"` 913 // GreenPoolVersion: Version of green pool. 914 GreenPoolVersion string `json:"greenPoolVersion,omitempty"` 915 // Phase: Current blue-green upgrade phase. 916 // 917 // Possible values: 918 // "PHASE_UNSPECIFIED" - Unspecified phase. 919 // "UPDATE_STARTED" - blue-green upgrade has been initiated. 920 // "CREATING_GREEN_POOL" - Start creating green pool nodes. 921 // "CORDONING_BLUE_POOL" - Start cordoning blue pool nodes. 922 // "WAITING_TO_DRAIN_BLUE_POOL" - Start waiting after cordoning the blue pool 923 // and before draining it. 924 // "DRAINING_BLUE_POOL" - Start draining blue pool nodes. 925 // "NODE_POOL_SOAKING" - Start soaking time after draining entire blue pool. 926 // "DELETING_BLUE_POOL" - Start deleting blue nodes. 927 // "ROLLBACK_STARTED" - Rollback has been initiated. 928 Phase string `json:"phase,omitempty"` 929 // ForceSendFields is a list of field names (e.g. "BlueInstanceGroupUrls") to 930 // unconditionally include in API requests. By default, fields with empty or 931 // default values are omitted from API requests. See 932 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 933 // details. 934 ForceSendFields []string `json:"-"` 935 // NullFields is a list of field names (e.g. "BlueInstanceGroupUrls") to 936 // include in API requests with the JSON null value. By default, fields with 937 // empty values are omitted from API requests. See 938 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 939 NullFields []string `json:"-"` 940 } 941 942 func (s *BlueGreenInfo) MarshalJSON() ([]byte, error) { 943 type NoMethod BlueGreenInfo 944 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 945 } 946 947 // BlueGreenSettings: Settings for blue-green upgrade. 948 type BlueGreenSettings struct { 949 // AutoscaledRolloutPolicy: Autoscaled policy for cluster autoscaler enabled 950 // blue-green upgrade. 951 AutoscaledRolloutPolicy *AutoscaledRolloutPolicy `json:"autoscaledRolloutPolicy,omitempty"` 952 // NodePoolSoakDuration: Time needed after draining entire blue pool. After 953 // this period, blue pool will be cleaned up. 954 NodePoolSoakDuration string `json:"nodePoolSoakDuration,omitempty"` 955 // StandardRolloutPolicy: Standard policy for the blue-green upgrade. 956 StandardRolloutPolicy *StandardRolloutPolicy `json:"standardRolloutPolicy,omitempty"` 957 // ForceSendFields is a list of field names (e.g. "AutoscaledRolloutPolicy") to 958 // unconditionally include in API requests. By default, fields with empty or 959 // default values are omitted from API requests. See 960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 961 // details. 962 ForceSendFields []string `json:"-"` 963 // NullFields is a list of field names (e.g. "AutoscaledRolloutPolicy") to 964 // include in API requests with the JSON null value. By default, fields with 965 // empty values are omitted from API requests. See 966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 967 NullFields []string `json:"-"` 968 } 969 970 func (s *BlueGreenSettings) MarshalJSON() ([]byte, error) { 971 type NoMethod BlueGreenSettings 972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 973 } 974 975 // CancelOperationRequest: CancelOperationRequest cancels a single operation. 976 type CancelOperationRequest struct { 977 // Name: The name (project, location, operation id) of the operation to cancel. 978 // Specified in the format `projects/*/locations/*/operations/*`. 979 Name string `json:"name,omitempty"` 980 // OperationId: Required. Deprecated. The server-assigned `name` of the 981 // operation. This field has been deprecated and replaced by the name field. 982 OperationId string `json:"operationId,omitempty"` 983 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 984 // project number 985 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 986 // This field has been deprecated and replaced by the name field. 987 ProjectId string `json:"projectId,omitempty"` 988 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 989 // (https://cloud.google.com/compute/docs/zones#available) in which the 990 // operation resides. This field has been deprecated and replaced by the name 991 // field. 992 Zone string `json:"zone,omitempty"` 993 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 994 // include in API requests. By default, fields with empty or default values are 995 // omitted from API requests. See 996 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 997 // details. 998 ForceSendFields []string `json:"-"` 999 // NullFields is a list of field names (e.g. "Name") to include in API requests 1000 // with the JSON null value. By default, fields with empty values are omitted 1001 // from API requests. See 1002 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1003 NullFields []string `json:"-"` 1004 } 1005 1006 func (s *CancelOperationRequest) MarshalJSON() ([]byte, error) { 1007 type NoMethod CancelOperationRequest 1008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1009 } 1010 1011 // CertificateAuthorityDomainConfig: CertificateAuthorityDomainConfig 1012 // configures one or more fully qualified domain names (FQDN) to a specific 1013 // certificate. 1014 type CertificateAuthorityDomainConfig struct { 1015 // Fqdns: List of fully qualified domain names (FQDN). Specifying port is 1016 // supported. Wilcards are NOT supported. Examples: - my.customdomain.com - 1017 // 10.0.1.2:5000 1018 Fqdns []string `json:"fqdns,omitempty"` 1019 // GcpSecretManagerCertificateConfig: Google Secret Manager (GCP) certificate 1020 // configuration. 1021 GcpSecretManagerCertificateConfig *GCPSecretManagerCertificateConfig `json:"gcpSecretManagerCertificateConfig,omitempty"` 1022 // ForceSendFields is a list of field names (e.g. "Fqdns") to unconditionally 1023 // include in API requests. By default, fields with empty or default values are 1024 // omitted from API requests. See 1025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1026 // details. 1027 ForceSendFields []string `json:"-"` 1028 // NullFields is a list of field names (e.g. "Fqdns") to include in API 1029 // requests with the JSON null value. By default, fields with empty values are 1030 // omitted from API requests. See 1031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1032 NullFields []string `json:"-"` 1033 } 1034 1035 func (s *CertificateAuthorityDomainConfig) MarshalJSON() ([]byte, error) { 1036 type NoMethod CertificateAuthorityDomainConfig 1037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1038 } 1039 1040 // CheckAutopilotCompatibilityResponse: CheckAutopilotCompatibilityResponse has 1041 // a list of compatibility issues. 1042 type CheckAutopilotCompatibilityResponse struct { 1043 // Issues: The list of issues for the given operation. 1044 Issues []*AutopilotCompatibilityIssue `json:"issues,omitempty"` 1045 // Summary: The summary of the autopilot compatibility response. 1046 Summary string `json:"summary,omitempty"` 1047 1048 // ServerResponse contains the HTTP response code and headers from the server. 1049 googleapi.ServerResponse `json:"-"` 1050 // ForceSendFields is a list of field names (e.g. "Issues") to unconditionally 1051 // include in API requests. By default, fields with empty or default values are 1052 // omitted from API requests. See 1053 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1054 // details. 1055 ForceSendFields []string `json:"-"` 1056 // NullFields is a list of field names (e.g. "Issues") to include in API 1057 // requests with the JSON null value. By default, fields with empty values are 1058 // omitted from API requests. See 1059 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1060 NullFields []string `json:"-"` 1061 } 1062 1063 func (s *CheckAutopilotCompatibilityResponse) MarshalJSON() ([]byte, error) { 1064 type NoMethod CheckAutopilotCompatibilityResponse 1065 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1066 } 1067 1068 // CidrBlock: CidrBlock contains an optional name and one CIDR block. 1069 type CidrBlock struct { 1070 // CidrBlock: cidr_block must be specified in CIDR notation. 1071 CidrBlock string `json:"cidrBlock,omitempty"` 1072 // DisplayName: display_name is an optional field for users to identify CIDR 1073 // blocks. 1074 DisplayName string `json:"displayName,omitempty"` 1075 // ForceSendFields is a list of field names (e.g. "CidrBlock") to 1076 // unconditionally include in API requests. By default, fields with empty or 1077 // default values are omitted from API requests. See 1078 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1079 // details. 1080 ForceSendFields []string `json:"-"` 1081 // NullFields is a list of field names (e.g. "CidrBlock") to include in API 1082 // requests with the JSON null value. By default, fields with empty values are 1083 // omitted from API requests. See 1084 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1085 NullFields []string `json:"-"` 1086 } 1087 1088 func (s *CidrBlock) MarshalJSON() ([]byte, error) { 1089 type NoMethod CidrBlock 1090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1091 } 1092 1093 // ClientCertificateConfig: Configuration for client certificates on the 1094 // cluster. 1095 type ClientCertificateConfig struct { 1096 // IssueClientCertificate: Issue a client certificate. 1097 IssueClientCertificate bool `json:"issueClientCertificate,omitempty"` 1098 // ForceSendFields is a list of field names (e.g. "IssueClientCertificate") to 1099 // unconditionally include in API requests. By default, fields with empty or 1100 // default values are omitted from API requests. See 1101 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1102 // details. 1103 ForceSendFields []string `json:"-"` 1104 // NullFields is a list of field names (e.g. "IssueClientCertificate") to 1105 // include in API requests with the JSON null value. By default, fields with 1106 // empty values are omitted from API requests. See 1107 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1108 NullFields []string `json:"-"` 1109 } 1110 1111 func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { 1112 type NoMethod ClientCertificateConfig 1113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1114 } 1115 1116 // CloudRunConfig: Configuration options for the Cloud Run feature. 1117 type CloudRunConfig struct { 1118 // Disabled: Whether Cloud Run addon is enabled for this cluster. 1119 Disabled bool `json:"disabled,omitempty"` 1120 // LoadBalancerType: Which load balancer type is installed for Cloud Run. 1121 // 1122 // Possible values: 1123 // "LOAD_BALANCER_TYPE_UNSPECIFIED" - Load balancer type for Cloud Run is 1124 // unspecified. 1125 // "LOAD_BALANCER_TYPE_EXTERNAL" - Install external load balancer for Cloud 1126 // Run. 1127 // "LOAD_BALANCER_TYPE_INTERNAL" - Install internal load balancer for Cloud 1128 // Run. 1129 LoadBalancerType string `json:"loadBalancerType,omitempty"` 1130 // ForceSendFields is a list of field names (e.g. "Disabled") to 1131 // unconditionally include in API requests. By default, fields with empty or 1132 // default values are omitted from API requests. See 1133 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1134 // details. 1135 ForceSendFields []string `json:"-"` 1136 // NullFields is a list of field names (e.g. "Disabled") to include in API 1137 // requests with the JSON null value. By default, fields with empty values are 1138 // omitted from API requests. See 1139 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1140 NullFields []string `json:"-"` 1141 } 1142 1143 func (s *CloudRunConfig) MarshalJSON() ([]byte, error) { 1144 type NoMethod CloudRunConfig 1145 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1146 } 1147 1148 // Cluster: A Google Kubernetes Engine cluster. 1149 type Cluster struct { 1150 // AddonsConfig: Configurations for the various addons available to run in the 1151 // cluster. 1152 AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` 1153 // AuthenticatorGroupsConfig: Configuration controlling RBAC group membership 1154 // information. 1155 AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"authenticatorGroupsConfig,omitempty"` 1156 // Autopilot: Autopilot configuration for the cluster. 1157 Autopilot *Autopilot `json:"autopilot,omitempty"` 1158 // Autoscaling: Cluster-level autoscaling configuration. 1159 Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"` 1160 // BinaryAuthorization: Configuration for Binary Authorization. 1161 BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` 1162 // ClusterIpv4Cidr: The IP address range of the container pods in this cluster, 1163 // in CIDR (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1164 // notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen 1165 // or specify a `/14` block in `10.0.0.0/8`. 1166 ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` 1167 // ClusterTelemetry: Telemetry integration for the cluster. 1168 ClusterTelemetry *ClusterTelemetry `json:"clusterTelemetry,omitempty"` 1169 // CompliancePostureConfig: Enable/Disable Compliance Posture features for the 1170 // cluster. 1171 CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` 1172 // Conditions: Which conditions caused the current cluster state. 1173 Conditions []*StatusCondition `json:"conditions,omitempty"` 1174 // ConfidentialNodes: Configuration of Confidential Nodes. All the nodes in the 1175 // cluster will be Confidential VM once enabled. 1176 ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` 1177 // CostManagementConfig: Configuration for the fine-grained cost management 1178 // feature. 1179 CostManagementConfig *CostManagementConfig `json:"costManagementConfig,omitempty"` 1180 // CreateTime: [Output only] The time the cluster was created, in RFC3339 1181 // (https://www.ietf.org/rfc/rfc3339.txt) text format. 1182 CreateTime string `json:"createTime,omitempty"` 1183 // CurrentMasterVersion: [Output only] The current software version of the 1184 // master endpoint. 1185 CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` 1186 // CurrentNodeCount: [Output only] The number of nodes currently in the 1187 // cluster. Deprecated. Call Kubernetes API directly to retrieve node 1188 // information. 1189 CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` 1190 // CurrentNodeVersion: [Output only] Deprecated, use NodePool.version 1191 // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) 1192 // instead. The current version of the node software components. If they are 1193 // currently at multiple versions because they're in the process of being 1194 // upgraded, this reflects the minimum version of all nodes. 1195 CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` 1196 // DatabaseEncryption: Configuration of etcd encryption. 1197 DatabaseEncryption *DatabaseEncryption `json:"databaseEncryption,omitempty"` 1198 // DefaultMaxPodsConstraint: The default constraint on the maximum number of 1199 // pods that can be run simultaneously on a node in the node pool of this 1200 // cluster. Only honored if cluster created with IP Alias support. 1201 DefaultMaxPodsConstraint *MaxPodsConstraint `json:"defaultMaxPodsConstraint,omitempty"` 1202 // Description: An optional description of this cluster. 1203 Description string `json:"description,omitempty"` 1204 // EnableK8sBetaApis: Kubernetes open source beta apis enabled on the cluster. 1205 // Only beta apis. 1206 EnableK8sBetaApis *K8sBetaAPIConfig `json:"enableK8sBetaApis,omitempty"` 1207 // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this 1208 // cluster. This includes alpha API groups (e.g. v1beta1) and features that may 1209 // not be production ready in the kubernetes version of the master and nodes. 1210 // The cluster has no SLA for uptime and master/node upgrades are disabled. 1211 // Alpha enabled clusters are automatically deleted thirty days after creation. 1212 EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` 1213 // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. This field 1214 // is deprecated, use tpu_config.enabled instead. 1215 EnableTpu bool `json:"enableTpu,omitempty"` 1216 // Endpoint: [Output only] The IP address of this cluster's master endpoint. 1217 // The endpoint can be accessed from the internet at 1218 // `https://username:password@endpoint/`. See the `masterAuth` property of this 1219 // resource for username and password information. 1220 Endpoint string `json:"endpoint,omitempty"` 1221 // EnterpriseConfig: GKE Enterprise Configuration. 1222 EnterpriseConfig *EnterpriseConfig `json:"enterpriseConfig,omitempty"` 1223 // Etag: This checksum is computed by the server based on the value of cluster 1224 // fields, and may be sent on update requests to ensure the client has an 1225 // up-to-date value before proceeding. 1226 Etag string `json:"etag,omitempty"` 1227 // ExpireTime: [Output only] The time the cluster will be automatically deleted 1228 // in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. 1229 ExpireTime string `json:"expireTime,omitempty"` 1230 // Fleet: Fleet information for the cluster. 1231 Fleet *Fleet `json:"fleet,omitempty"` 1232 // Id: Output only. Unique id for the cluster. 1233 Id string `json:"id,omitempty"` 1234 // IdentityServiceConfig: Configuration for Identity Service component. 1235 IdentityServiceConfig *IdentityServiceConfig `json:"identityServiceConfig,omitempty"` 1236 // InitialClusterVersion: The initial Kubernetes version for this cluster. 1237 // Valid versions are those found in validMasterVersions returned by 1238 // getServerConfig. The version can be upgraded over time; such upgrades are 1239 // reflected in currentMasterVersion and currentNodeVersion. Users may specify 1240 // either explicit versions offered by Kubernetes Engine or version aliases, 1241 // which have the following behavior: - "latest": picks the highest valid 1242 // Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1243 // 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y 1244 // version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "","-": 1245 // picks the default Kubernetes version 1246 InitialClusterVersion string `json:"initialClusterVersion,omitempty"` 1247 // InitialNodeCount: The number of nodes to create in this cluster. You must 1248 // ensure that your Compute Engine resource quota 1249 // (https://cloud.google.com/compute/quotas) is sufficient for this number of 1250 // instances. You must also have available firewall and routes quota. For 1251 // requests, this field should only be used in lieu of a "node_pool" object, 1252 // since this configuration (along with the "node_config") will be used to 1253 // create a "NodePool" object with an auto-generated name. Do not use this and 1254 // a node_pool at the same time. This field is deprecated, use 1255 // node_pool.initial_node_count instead. 1256 InitialNodeCount int64 `json:"initialNodeCount,omitempty"` 1257 // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls. 1258 InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` 1259 // IpAllocationPolicy: Configuration for cluster IP allocation. 1260 IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` 1261 // LabelFingerprint: The fingerprint of the set of labels for this cluster. 1262 LabelFingerprint string `json:"labelFingerprint,omitempty"` 1263 // LegacyAbac: Configuration for the legacy ABAC authorization mode. 1264 LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` 1265 // Location: [Output only] The name of the Google Compute Engine zone 1266 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) 1267 // or region 1268 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) 1269 // in which the cluster resides. 1270 Location string `json:"location,omitempty"` 1271 // Locations: The list of Google Compute Engine zones 1272 // (https://cloud.google.com/compute/docs/zones#available) in which the 1273 // cluster's nodes should be located. This field provides a default value if 1274 // NodePool.Locations 1275 // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) 1276 // are not specified during node pool creation. Warning: changing cluster 1277 // locations will update the NodePool.Locations 1278 // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) 1279 // of all node pools and will result in nodes being added and/or removed. 1280 Locations []string `json:"locations,omitempty"` 1281 // LoggingConfig: Logging configuration for the cluster. 1282 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"` 1283 // LoggingService: The logging service the cluster should use to write logs. 1284 // Currently available options: * `logging.googleapis.com/kubernetes` - The 1285 // Cloud Logging service with a Kubernetes-native resource model * 1286 // `logging.googleapis.com` - The legacy Cloud Logging service (no longer 1287 // available as of GKE 1.15). * `none` - no logs will be exported from the 1288 // cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will 1289 // be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. 1290 LoggingService string `json:"loggingService,omitempty"` 1291 // MaintenancePolicy: Configure the maintenance policy for this cluster. 1292 MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` 1293 // Master: Configuration for master components. 1294 Master *Master `json:"master,omitempty"` 1295 // MasterAuth: The authentication information for accessing the master 1296 // endpoint. If unspecified, the defaults are used: For clusters before v1.12, 1297 // if master_auth is unspecified, `username` will be set to "admin", a random 1298 // password will be generated, and a client certificate will be issued. 1299 MasterAuth *MasterAuth `json:"masterAuth,omitempty"` 1300 // MasterAuthorizedNetworksConfig: The configuration options for master 1301 // authorized networks feature. 1302 MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"` 1303 // MasterIpv4CidrBlock: The IP prefix in CIDR notation to use for the hosted 1304 // master network. This prefix will be used for assigning private IP addresses 1305 // to the master or set of masters, as well as the ILB VIP. This field is 1306 // deprecated, use private_cluster_config.master_ipv4_cidr_block instead. 1307 MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` 1308 // MeshCertificates: Configuration for issuance of mTLS keys and certificates 1309 // to Kubernetes pods. 1310 MeshCertificates *MeshCertificates `json:"meshCertificates,omitempty"` 1311 // MonitoringConfig: Monitoring configuration for the cluster. 1312 MonitoringConfig *MonitoringConfig `json:"monitoringConfig,omitempty"` 1313 // MonitoringService: The monitoring service the cluster should use to write 1314 // metrics. Currently available options: * 1315 // "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a 1316 // Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy 1317 // Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No 1318 // metrics will be exported from the cluster. If left as an empty 1319 // string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or 1320 // `monitoring.googleapis.com` for earlier versions. 1321 MonitoringService string `json:"monitoringService,omitempty"` 1322 // Name: The name of this cluster. The name must be unique within this project 1323 // and location (e.g. zone or region), and can be up to 40 characters with the 1324 // following restrictions: * Lowercase letters, numbers, and hyphens only. * 1325 // Must start with a letter. * Must end with a number or a letter. 1326 Name string `json:"name,omitempty"` 1327 // Network: The name of the Google Compute Engine network 1328 // (https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to 1329 // which the cluster is connected. If left unspecified, the `default` network 1330 // will be used. On output this shows the network ID instead of the name. 1331 Network string `json:"network,omitempty"` 1332 // NetworkConfig: Configuration for cluster networking. 1333 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` 1334 // NetworkPolicy: Configuration options for the NetworkPolicy feature. 1335 NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` 1336 // NodeConfig: Parameters used in creating the cluster's nodes. For requests, 1337 // this field should only be used in lieu of a "node_pool" object, since this 1338 // configuration (along with the "initial_node_count") will be used to create a 1339 // "NodePool" object with an auto-generated name. Do not use this and a 1340 // node_pool at the same time. For responses, this field will be populated with 1341 // the node configuration of the first node pool. (For configuration of each 1342 // node pool, see `node_pool.config`) If unspecified, the defaults are used. 1343 // This field is deprecated, use node_pool.config instead. 1344 NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` 1345 // NodeIpv4CidrSize: [Output only] The size of the address space on each node 1346 // for hosting containers. This is provisioned from within the 1347 // `container_ipv4_cidr` range. This field will only be set when cluster is in 1348 // route-based network mode. 1349 NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` 1350 // NodePoolAutoConfig: Node pool configs that apply to all auto-provisioned 1351 // node pools in autopilot clusters and node auto-provisioning enabled 1352 // clusters. 1353 NodePoolAutoConfig *NodePoolAutoConfig `json:"nodePoolAutoConfig,omitempty"` 1354 // NodePoolDefaults: Default NodePool settings for the entire cluster. These 1355 // settings are overridden if specified on the specific NodePool object. 1356 NodePoolDefaults *NodePoolDefaults `json:"nodePoolDefaults,omitempty"` 1357 // NodePools: The node pools associated with this cluster. This field should 1358 // not be set if "node_config" or "initial_node_count" are specified. 1359 NodePools []*NodePool `json:"nodePools,omitempty"` 1360 // NotificationConfig: Notification configuration of the cluster. 1361 NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` 1362 // ParentProductConfig: The configuration of the parent product of the cluster. 1363 // This field is used by Google internal products that are built on top of the 1364 // GKE cluster and take the ownership of the cluster. 1365 ParentProductConfig *ParentProductConfig `json:"parentProductConfig,omitempty"` 1366 // PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy feature. 1367 PodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"podSecurityPolicyConfig,omitempty"` 1368 // PrivateCluster: If this is a private cluster setup. Private clusters are 1369 // clusters that, by default have no external IP addresses on the nodes and 1370 // where nodes and the master communicate over private IP addresses. This field 1371 // is deprecated, use private_cluster_config.enable_private_nodes instead. 1372 PrivateCluster bool `json:"privateCluster,omitempty"` 1373 // PrivateClusterConfig: Configuration for private cluster. 1374 PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` 1375 // ProtectConfig: Deprecated: Use SecurityPostureConfig instead. Enable/Disable 1376 // Protect API features for the cluster. 1377 ProtectConfig *ProtectConfig `json:"protectConfig,omitempty"` 1378 // ReleaseChannel: Release channel configuration. If left unspecified on 1379 // cluster creation and a version is specified, the cluster is enrolled in the 1380 // most mature release channel where the version is available (first checking 1381 // STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel 1382 // configuration and no version is specified, the cluster is enrolled in the 1383 // REGULAR channel with its default version. 1384 ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` 1385 // ResourceLabels: The resource labels for the cluster to use to annotate any 1386 // related Google Compute Engine resources. 1387 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 1388 // ResourceUsageExportConfig: Configuration for exporting resource usages. 1389 // Resource usage export is disabled when this config unspecified. 1390 ResourceUsageExportConfig *ResourceUsageExportConfig `json:"resourceUsageExportConfig,omitempty"` 1391 // SatisfiesPzi: Output only. Reserved for future use. 1392 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` 1393 // SatisfiesPzs: Output only. Reserved for future use. 1394 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` 1395 // SecretManagerConfig: Secret CSI driver configuration. 1396 SecretManagerConfig *SecretManagerConfig `json:"secretManagerConfig,omitempty"` 1397 // SecurityPostureConfig: Enable/Disable Security Posture API features for the 1398 // cluster. 1399 SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` 1400 // SelfLink: [Output only] Server-defined URL for the resource. 1401 SelfLink string `json:"selfLink,omitempty"` 1402 // ServicesIpv4Cidr: [Output only] The IP address range of the Kubernetes 1403 // services in this cluster, in CIDR 1404 // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. 1405 // `1.2.3.4/29`). Service addresses are typically put in the last `/16` from 1406 // the container CIDR. 1407 ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` 1408 // ShieldedNodes: Shielded Nodes configuration. 1409 ShieldedNodes *ShieldedNodes `json:"shieldedNodes,omitempty"` 1410 // Status: [Output only] The current status of this cluster. 1411 // 1412 // Possible values: 1413 // "STATUS_UNSPECIFIED" - Not set. 1414 // "PROVISIONING" - The PROVISIONING state indicates the cluster is being 1415 // created. 1416 // "RUNNING" - The RUNNING state indicates the cluster has been created and 1417 // is fully usable. 1418 // "RECONCILING" - The RECONCILING state indicates that some work is actively 1419 // being done on the cluster, such as upgrading the master or node software. 1420 // Details can be found in the `statusMessage` field. 1421 // "STOPPING" - The STOPPING state indicates the cluster is being deleted. 1422 // "ERROR" - The ERROR state indicates the cluster may be unusable. Details 1423 // can be found in the `statusMessage` field. 1424 // "DEGRADED" - The DEGRADED state indicates the cluster requires user action 1425 // to restore full functionality. Details can be found in the `statusMessage` 1426 // field. 1427 Status string `json:"status,omitempty"` 1428 // StatusMessage: [Output only] Deprecated. Use conditions instead. Additional 1429 // information about the current status of this cluster, if available. 1430 StatusMessage string `json:"statusMessage,omitempty"` 1431 // Subnetwork: The name of the Google Compute Engine subnetwork 1432 // (https://cloud.google.com/compute/docs/subnetworks) to which the cluster is 1433 // connected. On output this shows the subnetwork ID instead of the name. 1434 Subnetwork string `json:"subnetwork,omitempty"` 1435 // TpuConfig: Configuration for Cloud TPU support; 1436 TpuConfig *TpuConfig `json:"tpuConfig,omitempty"` 1437 // TpuIpv4CidrBlock: [Output only] The IP address range of the Cloud TPUs in 1438 // this cluster, in CIDR 1439 // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. 1440 // `1.2.3.4/29`). 1441 TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` 1442 // VerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling 1443 // configuration. 1444 VerticalPodAutoscaling *VerticalPodAutoscaling `json:"verticalPodAutoscaling,omitempty"` 1445 // WorkloadAltsConfig: Configuration for direct-path (via ALTS) with workload 1446 // identity. 1447 WorkloadAltsConfig *WorkloadALTSConfig `json:"workloadAltsConfig,omitempty"` 1448 // WorkloadCertificates: Configuration for issuance of mTLS keys and 1449 // certificates to Kubernetes pods. 1450 WorkloadCertificates *WorkloadCertificates `json:"workloadCertificates,omitempty"` 1451 // WorkloadIdentityConfig: Configuration for the use of Kubernetes Service 1452 // Accounts in GCP IAM policies. 1453 WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` 1454 // Zone: [Output only] The name of the Google Compute Engine zone 1455 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 1456 // resides. This field is deprecated, use location instead. 1457 Zone string `json:"zone,omitempty"` 1458 1459 // ServerResponse contains the HTTP response code and headers from the server. 1460 googleapi.ServerResponse `json:"-"` 1461 // ForceSendFields is a list of field names (e.g. "AddonsConfig") to 1462 // unconditionally include in API requests. By default, fields with empty or 1463 // default values are omitted from API requests. See 1464 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1465 // details. 1466 ForceSendFields []string `json:"-"` 1467 // NullFields is a list of field names (e.g. "AddonsConfig") to include in API 1468 // requests with the JSON null value. By default, fields with empty values are 1469 // omitted from API requests. See 1470 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1471 NullFields []string `json:"-"` 1472 } 1473 1474 func (s *Cluster) MarshalJSON() ([]byte, error) { 1475 type NoMethod Cluster 1476 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1477 } 1478 1479 // ClusterAutoscaling: ClusterAutoscaling contains global, per-cluster 1480 // information required by Cluster Autoscaler to automatically adjust the size 1481 // of the cluster and create/delete node pools based on the current needs. 1482 type ClusterAutoscaling struct { 1483 // AutoprovisioningLocations: The list of Google Compute Engine zones 1484 // (https://cloud.google.com/compute/docs/zones#available) in which the 1485 // NodePool's nodes can be created by NAP. 1486 AutoprovisioningLocations []string `json:"autoprovisioningLocations,omitempty"` 1487 // AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults contains 1488 // defaults for a node pool created by NAP. 1489 AutoprovisioningNodePoolDefaults *AutoprovisioningNodePoolDefaults `json:"autoprovisioningNodePoolDefaults,omitempty"` 1490 // AutoscalingProfile: Defines autoscaling behaviour. 1491 // 1492 // Possible values: 1493 // "PROFILE_UNSPECIFIED" - No change to autoscaling configuration. 1494 // "OPTIMIZE_UTILIZATION" - Prioritize optimizing utilization of resources. 1495 // "BALANCED" - Use default (balanced) autoscaling configuration. 1496 AutoscalingProfile string `json:"autoscalingProfile,omitempty"` 1497 // EnableNodeAutoprovisioning: Enables automatic node pool creation and 1498 // deletion. 1499 EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` 1500 // ResourceLimits: Contains global constraints regarding minimum and maximum 1501 // amount of resources in the cluster. 1502 ResourceLimits []*ResourceLimit `json:"resourceLimits,omitempty"` 1503 // ForceSendFields is a list of field names (e.g. "AutoprovisioningLocations") 1504 // to unconditionally include in API requests. By default, fields with empty or 1505 // default values are omitted from API requests. See 1506 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1507 // details. 1508 ForceSendFields []string `json:"-"` 1509 // NullFields is a list of field names (e.g. "AutoprovisioningLocations") to 1510 // include in API requests with the JSON null value. By default, fields with 1511 // empty values are omitted from API requests. See 1512 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1513 NullFields []string `json:"-"` 1514 } 1515 1516 func (s *ClusterAutoscaling) MarshalJSON() ([]byte, error) { 1517 type NoMethod ClusterAutoscaling 1518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1519 } 1520 1521 // ClusterNetworkPerformanceConfig: Configuration of all network bandwidth 1522 // tiers 1523 type ClusterNetworkPerformanceConfig struct { 1524 // TotalEgressBandwidthTier: Specifies the total network bandwidth tier for the 1525 // NodePool. 1526 // 1527 // Possible values: 1528 // "TIER_UNSPECIFIED" - Default value 1529 // "TIER_1" - Higher bandwidth, actual values based on VM size. 1530 TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` 1531 // ForceSendFields is a list of field names (e.g. "TotalEgressBandwidthTier") 1532 // to unconditionally include in API requests. By default, fields with empty or 1533 // default values are omitted from API requests. See 1534 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1535 // details. 1536 ForceSendFields []string `json:"-"` 1537 // NullFields is a list of field names (e.g. "TotalEgressBandwidthTier") to 1538 // include in API requests with the JSON null value. By default, fields with 1539 // empty values are omitted from API requests. See 1540 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1541 NullFields []string `json:"-"` 1542 } 1543 1544 func (s *ClusterNetworkPerformanceConfig) MarshalJSON() ([]byte, error) { 1545 type NoMethod ClusterNetworkPerformanceConfig 1546 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1547 } 1548 1549 // ClusterTelemetry: Telemetry integration for the cluster. 1550 type ClusterTelemetry struct { 1551 // Type: Type of the integration. 1552 // 1553 // Possible values: 1554 // "UNSPECIFIED" - Not set. 1555 // "DISABLED" - Monitoring integration is disabled. 1556 // "ENABLED" - Monitoring integration is enabled. 1557 // "SYSTEM_ONLY" - Only system components are monitored and logged. 1558 Type string `json:"type,omitempty"` 1559 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 1560 // include in API requests. By default, fields with empty or default values are 1561 // omitted from API requests. See 1562 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1563 // details. 1564 ForceSendFields []string `json:"-"` 1565 // NullFields is a list of field names (e.g. "Type") to include in API requests 1566 // with the JSON null value. By default, fields with empty values are omitted 1567 // from API requests. See 1568 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1569 NullFields []string `json:"-"` 1570 } 1571 1572 func (s *ClusterTelemetry) MarshalJSON() ([]byte, error) { 1573 type NoMethod ClusterTelemetry 1574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1575 } 1576 1577 // ClusterUpdate: ClusterUpdate describes an update to the cluster. Exactly one 1578 // update can be applied to a cluster with each request, so at most one field 1579 // can be provided. 1580 type ClusterUpdate struct { 1581 // AdditionalPodRangesConfig: The additional pod ranges to be added to the 1582 // cluster. These pod ranges can be used by node pools to allocate pod IPs. 1583 AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"` 1584 // DesiredAddonsConfig: Configurations for the various addons available to run 1585 // in the cluster. 1586 DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` 1587 // DesiredAuthenticatorGroupsConfig: AuthenticatorGroupsConfig specifies the 1588 // config for the cluster security groups settings. 1589 DesiredAuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"desiredAuthenticatorGroupsConfig,omitempty"` 1590 // DesiredAutopilotWorkloadPolicyConfig: The desired workload policy 1591 // configuration for the autopilot cluster. 1592 DesiredAutopilotWorkloadPolicyConfig *WorkloadPolicyConfig `json:"desiredAutopilotWorkloadPolicyConfig,omitempty"` 1593 // DesiredBinaryAuthorization: The desired configuration options for the Binary 1594 // Authorization feature. 1595 DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"` 1596 // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. 1597 DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` 1598 // DesiredClusterTelemetry: The desired telemetry integration for the cluster. 1599 DesiredClusterTelemetry *ClusterTelemetry `json:"desiredClusterTelemetry,omitempty"` 1600 // DesiredContainerdConfig: The desired containerd config for the cluster. 1601 DesiredContainerdConfig *ContainerdConfig `json:"desiredContainerdConfig,omitempty"` 1602 // DesiredCostManagementConfig: The desired configuration for the fine-grained 1603 // cost management feature. 1604 DesiredCostManagementConfig *CostManagementConfig `json:"desiredCostManagementConfig,omitempty"` 1605 // DesiredDatabaseEncryption: Configuration of etcd encryption. 1606 DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` 1607 // DesiredDatapathProvider: The desired datapath provider for the cluster. 1608 // 1609 // Possible values: 1610 // "DATAPATH_PROVIDER_UNSPECIFIED" - Default value. 1611 // "LEGACY_DATAPATH" - Use the IPTables implementation based on kube-proxy. 1612 // "ADVANCED_DATAPATH" - Use the eBPF based GKE Dataplane V2 with additional 1613 // features. See the [GKE Dataplane V2 1614 // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/datapla 1615 // ne-v2) for more. 1616 DesiredDatapathProvider string `json:"desiredDatapathProvider,omitempty"` 1617 // DesiredDefaultSnatStatus: The desired status of whether to disable default 1618 // sNAT for this cluster. 1619 DesiredDefaultSnatStatus *DefaultSnatStatus `json:"desiredDefaultSnatStatus,omitempty"` 1620 // DesiredDnsConfig: DNSConfig contains clusterDNS config for this cluster. 1621 DesiredDnsConfig *DNSConfig `json:"desiredDnsConfig,omitempty"` 1622 // DesiredEnableCiliumClusterwideNetworkPolicy: Enable/Disable Cilium 1623 // Clusterwide Network Policy for the cluster. 1624 DesiredEnableCiliumClusterwideNetworkPolicy bool `json:"desiredEnableCiliumClusterwideNetworkPolicy,omitempty"` 1625 // DesiredEnableFqdnNetworkPolicy: Enable/Disable FQDN Network Policy for the 1626 // cluster. 1627 DesiredEnableFqdnNetworkPolicy bool `json:"desiredEnableFqdnNetworkPolicy,omitempty"` 1628 // DesiredEnableMultiNetworking: Enable/Disable Multi-Networking for the 1629 // cluster 1630 DesiredEnableMultiNetworking bool `json:"desiredEnableMultiNetworking,omitempty"` 1631 // DesiredEnablePrivateEndpoint: Enable/Disable private endpoint for the 1632 // cluster's master. 1633 DesiredEnablePrivateEndpoint bool `json:"desiredEnablePrivateEndpoint,omitempty"` 1634 // DesiredFleet: The desired fleet configuration for the cluster. 1635 DesiredFleet *Fleet `json:"desiredFleet,omitempty"` 1636 // DesiredGatewayApiConfig: The desired config of Gateway API on this cluster. 1637 DesiredGatewayApiConfig *GatewayAPIConfig `json:"desiredGatewayApiConfig,omitempty"` 1638 // DesiredGcfsConfig: The desired GCFS config for the cluster. 1639 DesiredGcfsConfig *GcfsConfig `json:"desiredGcfsConfig,omitempty"` 1640 // DesiredHostMaintenancePolicy: HostMaintenancePolicy contains the desired 1641 // maintenance policy for the Google Compute Engine hosts. 1642 DesiredHostMaintenancePolicy *HostMaintenancePolicy `json:"desiredHostMaintenancePolicy,omitempty"` 1643 // DesiredIdentityServiceConfig: The desired Identity Service component 1644 // configuration. 1645 DesiredIdentityServiceConfig *IdentityServiceConfig `json:"desiredIdentityServiceConfig,omitempty"` 1646 // DesiredImageType: The desired image type for the node pool. NOTE: Set the 1647 // "desired_node_pool" field as well. 1648 DesiredImageType string `json:"desiredImageType,omitempty"` 1649 // DesiredInTransitEncryptionConfig: Specify the details of in-transit 1650 // encryption. Now named inter-node transparent encryption. 1651 // 1652 // Possible values: 1653 // "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" - Unspecified, will be inferred 1654 // as default - IN_TRANSIT_ENCRYPTION_UNSPECIFIED. 1655 // "IN_TRANSIT_ENCRYPTION_DISABLED" - In-transit encryption is disabled. 1656 // "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" - Data in-transit is 1657 // encrypted using inter-node transparent encryption. 1658 DesiredInTransitEncryptionConfig string `json:"desiredInTransitEncryptionConfig,omitempty"` 1659 // DesiredIntraNodeVisibilityConfig: The desired config of Intra-node 1660 // visibility. 1661 DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"` 1662 // DesiredK8sBetaApis: Beta APIs enabled for cluster. 1663 DesiredK8sBetaApis *K8sBetaAPIConfig `json:"desiredK8sBetaApis,omitempty"` 1664 // DesiredL4ilbSubsettingConfig: The desired L4 Internal Load Balancer 1665 // Subsetting configuration. 1666 DesiredL4ilbSubsettingConfig *ILBSubsettingConfig `json:"desiredL4ilbSubsettingConfig,omitempty"` 1667 // DesiredLocations: The desired list of Google Compute Engine zones 1668 // (https://cloud.google.com/compute/docs/zones#available) in which the 1669 // cluster's nodes should be located. This list must always include the 1670 // cluster's primary zone. Warning: changing cluster locations will update the 1671 // locations of all node pools and will result in nodes being added and/or 1672 // removed. 1673 DesiredLocations []string `json:"desiredLocations,omitempty"` 1674 // DesiredLoggingConfig: The desired logging configuration. 1675 DesiredLoggingConfig *LoggingConfig `json:"desiredLoggingConfig,omitempty"` 1676 // DesiredLoggingService: The logging service the cluster should use to write 1677 // logs. Currently available options: * `logging.googleapis.com/kubernetes` - 1678 // The Cloud Logging service with a Kubernetes-native resource model * 1679 // `logging.googleapis.com` - The legacy Cloud Logging service (no longer 1680 // available as of GKE 1.15). * `none` - no logs will be exported from the 1681 // cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will 1682 // be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. 1683 DesiredLoggingService string `json:"desiredLoggingService,omitempty"` 1684 // DesiredMaster: Configuration for master components. 1685 DesiredMaster *Master `json:"desiredMaster,omitempty"` 1686 // DesiredMasterAuthorizedNetworksConfig: The desired configuration options for 1687 // master authorized networks feature. 1688 DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` 1689 // DesiredMasterVersion: The Kubernetes version to change the master to. The 1690 // only valid value is the latest supported version. Users may specify either 1691 // explicit versions offered by Kubernetes Engine or version aliases, which 1692 // have the following behavior: - "latest": picks the highest valid Kubernetes 1693 // version - "1.X": picks the highest valid patch+gke.N patch in the 1.X 1694 // version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version 1695 // - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the 1696 // default Kubernetes version 1697 DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` 1698 // DesiredMeshCertificates: Configuration for issuance of mTLS keys and 1699 // certificates to Kubernetes pods. 1700 DesiredMeshCertificates *MeshCertificates `json:"desiredMeshCertificates,omitempty"` 1701 // DesiredMonitoringConfig: The desired monitoring configuration. 1702 DesiredMonitoringConfig *MonitoringConfig `json:"desiredMonitoringConfig,omitempty"` 1703 // DesiredMonitoringService: The monitoring service the cluster should use to 1704 // write metrics. Currently available options: * 1705 // "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a 1706 // Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy 1707 // Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No 1708 // metrics will be exported from the cluster. If left as an empty 1709 // string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or 1710 // `monitoring.googleapis.com` for earlier versions. 1711 DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` 1712 // DesiredNetworkPerformanceConfig: The desired network performance config. 1713 DesiredNetworkPerformanceConfig *ClusterNetworkPerformanceConfig `json:"desiredNetworkPerformanceConfig,omitempty"` 1714 // DesiredNodeKubeletConfig: The desired node kubelet config for the cluster. 1715 DesiredNodeKubeletConfig *NodeKubeletConfig `json:"desiredNodeKubeletConfig,omitempty"` 1716 // DesiredNodePoolAutoConfigKubeletConfig: The desired node kubelet config for 1717 // all auto-provisioned node pools in autopilot clusters and node 1718 // auto-provisioning enabled clusters. 1719 DesiredNodePoolAutoConfigKubeletConfig *NodeKubeletConfig `json:"desiredNodePoolAutoConfigKubeletConfig,omitempty"` 1720 // DesiredNodePoolAutoConfigNetworkTags: The desired network tags that apply to 1721 // all auto-provisioned node pools in autopilot clusters and node 1722 // auto-provisioning enabled clusters. 1723 DesiredNodePoolAutoConfigNetworkTags *NetworkTags `json:"desiredNodePoolAutoConfigNetworkTags,omitempty"` 1724 // DesiredNodePoolAutoConfigResourceManagerTags: The desired resource manager 1725 // tags that apply to all auto-provisioned node pools in autopilot clusters and 1726 // node auto-provisioning enabled clusters. 1727 DesiredNodePoolAutoConfigResourceManagerTags *ResourceManagerTags `json:"desiredNodePoolAutoConfigResourceManagerTags,omitempty"` 1728 // DesiredNodePoolAutoscaling: Autoscaler configuration for the node pool 1729 // specified in desired_node_pool_id. If there is only one pool in the cluster 1730 // and desired_node_pool_id is not provided then the change applies to that 1731 // single node pool. 1732 DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"` 1733 // DesiredNodePoolId: The node pool to be upgraded. This field is mandatory if 1734 // "desired_node_version", "desired_image_family", 1735 // "desired_node_pool_autoscaling", or "desired_workload_metadata_config" is 1736 // specified and there is more than one node pool on the cluster. 1737 DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` 1738 // DesiredNodePoolLoggingConfig: The desired node pool logging configuration 1739 // defaults for the cluster. 1740 DesiredNodePoolLoggingConfig *NodePoolLoggingConfig `json:"desiredNodePoolLoggingConfig,omitempty"` 1741 // DesiredNodeVersion: The Kubernetes version to change the nodes to (typically 1742 // an upgrade). Users may specify either explicit versions offered by 1743 // Kubernetes Engine or version aliases, which have the following behavior: - 1744 // "latest": picks the highest valid Kubernetes version - "1.X": picks the 1745 // highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the 1746 // highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an 1747 // explicit Kubernetes version - "-": picks the Kubernetes master version 1748 DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` 1749 // DesiredNotificationConfig: The desired notification configuration. 1750 DesiredNotificationConfig *NotificationConfig `json:"desiredNotificationConfig,omitempty"` 1751 // DesiredParentProductConfig: The desired parent product config for the 1752 // cluster. 1753 DesiredParentProductConfig *ParentProductConfig `json:"desiredParentProductConfig,omitempty"` 1754 // DesiredPodSecurityPolicyConfig: The desired configuration options for the 1755 // PodSecurityPolicy feature. 1756 DesiredPodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"desiredPodSecurityPolicyConfig,omitempty"` 1757 // DesiredPrivateClusterConfig: The desired private cluster configuration. 1758 // master_global_access_config is the only field that can be changed via this 1759 // field. See also ClusterUpdate.desired_enable_private_endpoint for modifying 1760 // other fields within PrivateClusterConfig. 1761 DesiredPrivateClusterConfig *PrivateClusterConfig `json:"desiredPrivateClusterConfig,omitempty"` 1762 // DesiredPrivateIpv6GoogleAccess: The desired state of IPv6 connectivity to 1763 // Google Services. 1764 // 1765 // Possible values: 1766 // "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" - Default value. Same as DISABLED 1767 // "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" - No private access to or from 1768 // Google Services 1769 // "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" - Enables private IPv6 access to 1770 // Google Services from GKE 1771 // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access 1772 // to and from Google Services 1773 DesiredPrivateIpv6GoogleAccess string `json:"desiredPrivateIpv6GoogleAccess,omitempty"` 1774 // DesiredProtectConfig: Deprecated: Use DesiredSecurityPostureConfig instead. 1775 // Enable/Disable Protect API features for the cluster. 1776 DesiredProtectConfig *ProtectConfig `json:"desiredProtectConfig,omitempty"` 1777 // DesiredReleaseChannel: The desired release channel configuration. 1778 DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` 1779 // DesiredResourceUsageExportConfig: The desired configuration for exporting 1780 // resource usage. 1781 DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"` 1782 // DesiredSecretManagerConfig: Enable/Disable Secret Manager Config. 1783 DesiredSecretManagerConfig *SecretManagerConfig `json:"desiredSecretManagerConfig,omitempty"` 1784 // DesiredSecurityPostureConfig: Enable/Disable Security Posture API features 1785 // for the cluster. 1786 DesiredSecurityPostureConfig *SecurityPostureConfig `json:"desiredSecurityPostureConfig,omitempty"` 1787 // DesiredServiceExternalIpsConfig: ServiceExternalIPsConfig specifies the 1788 // config for the use of Services with ExternalIPs field. 1789 DesiredServiceExternalIpsConfig *ServiceExternalIPsConfig `json:"desiredServiceExternalIpsConfig,omitempty"` 1790 // DesiredShieldedNodes: Configuration for Shielded Nodes. 1791 DesiredShieldedNodes *ShieldedNodes `json:"desiredShieldedNodes,omitempty"` 1792 // DesiredStackType: The desired stack type of the cluster. If a stack type is 1793 // provided and does not match the current stack type of the cluster, update 1794 // will attempt to change the stack type to the new type. 1795 // 1796 // Possible values: 1797 // "STACK_TYPE_UNSPECIFIED" - By default, the clusters will be IPV4 only 1798 // "IPV4" - The value used if the cluster is a IPV4 only 1799 // "IPV4_IPV6" - The value used if the cluster is a dual stack cluster 1800 DesiredStackType string `json:"desiredStackType,omitempty"` 1801 // DesiredTpuConfig: The desired Cloud TPU configuration. 1802 DesiredTpuConfig *TpuConfig `json:"desiredTpuConfig,omitempty"` 1803 // DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling 1804 // configuration. 1805 DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"` 1806 // DesiredWorkloadAltsConfig: Configuration for direct-path (via ALTS) with 1807 // workload identity. 1808 DesiredWorkloadAltsConfig *WorkloadALTSConfig `json:"desiredWorkloadAltsConfig,omitempty"` 1809 // DesiredWorkloadCertificates: Configuration for issuance of mTLS keys and 1810 // certificates to Kubernetes pods. 1811 DesiredWorkloadCertificates *WorkloadCertificates `json:"desiredWorkloadCertificates,omitempty"` 1812 // DesiredWorkloadIdentityConfig: Configuration for Workload Identity. 1813 DesiredWorkloadIdentityConfig *WorkloadIdentityConfig `json:"desiredWorkloadIdentityConfig,omitempty"` 1814 // EnableK8sBetaApis: Kubernetes open source beta apis enabled on the cluster. 1815 // Only beta apis 1816 EnableK8sBetaApis *K8sBetaAPIConfig `json:"enableK8sBetaApis,omitempty"` 1817 // Etag: The current etag of the cluster. If an etag is provided and does not 1818 // match the current etag of the cluster, update will be blocked and an ABORTED 1819 // error will be returned. 1820 Etag string `json:"etag,omitempty"` 1821 // PrivateClusterConfig: The desired private cluster configuration. Has no 1822 // effect. Use desired_private_cluster_config instead. 1823 PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` 1824 // RemovedAdditionalPodRangesConfig: The additional pod ranges that are to be 1825 // removed from the cluster. The pod ranges specified here must have been 1826 // specified earlier in the 'additional_pod_ranges_config' argument. 1827 RemovedAdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"removedAdditionalPodRangesConfig,omitempty"` 1828 // ForceSendFields is a list of field names (e.g. "AdditionalPodRangesConfig") 1829 // to unconditionally include in API requests. By default, fields with empty or 1830 // default values are omitted from API requests. See 1831 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1832 // details. 1833 ForceSendFields []string `json:"-"` 1834 // NullFields is a list of field names (e.g. "AdditionalPodRangesConfig") to 1835 // include in API requests with the JSON null value. By default, fields with 1836 // empty values are omitted from API requests. See 1837 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1838 NullFields []string `json:"-"` 1839 } 1840 1841 func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { 1842 type NoMethod ClusterUpdate 1843 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1844 } 1845 1846 // CompleteIPRotationRequest: CompleteIPRotationRequest moves the cluster 1847 // master back into single-IP mode. 1848 type CompleteIPRotationRequest struct { 1849 // ClusterId: Required. Deprecated. The name of the cluster. This field has 1850 // been deprecated and replaced by the name field. 1851 ClusterId string `json:"clusterId,omitempty"` 1852 // Name: The name (project, location, cluster name) of the cluster to complete 1853 // IP rotation. Specified in the format `projects/*/locations/*/clusters/*`. 1854 Name string `json:"name,omitempty"` 1855 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 1856 // project number 1857 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 1858 // This field has been deprecated and replaced by the name field. 1859 ProjectId string `json:"projectId,omitempty"` 1860 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 1861 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 1862 // resides. This field has been deprecated and replaced by the name field. 1863 Zone string `json:"zone,omitempty"` 1864 // ForceSendFields is a list of field names (e.g. "ClusterId") to 1865 // unconditionally include in API requests. By default, fields with empty or 1866 // default values are omitted from API requests. See 1867 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1868 // details. 1869 ForceSendFields []string `json:"-"` 1870 // NullFields is a list of field names (e.g. "ClusterId") to include in API 1871 // requests with the JSON null value. By default, fields with empty values are 1872 // omitted from API requests. See 1873 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1874 NullFields []string `json:"-"` 1875 } 1876 1877 func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { 1878 type NoMethod CompleteIPRotationRequest 1879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1880 } 1881 1882 // CompleteNodePoolUpgradeRequest: CompleteNodePoolUpgradeRequest sets the name 1883 // of target node pool to complete upgrade. 1884 type CompleteNodePoolUpgradeRequest struct { 1885 } 1886 1887 // CompliancePostureConfig: CompliancePostureConfig defines the settings needed 1888 // to enable/disable features for the Compliance Posture. 1889 type CompliancePostureConfig struct { 1890 // ComplianceStandards: List of enabled compliance standards. 1891 ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` 1892 // Mode: Defines the enablement mode for Compliance Posture. 1893 // 1894 // Possible values: 1895 // "MODE_UNSPECIFIED" - Default value not specified. 1896 // "DISABLED" - Disables Compliance Posture features on the cluster. 1897 // "ENABLED" - Enables Compliance Posture features on the cluster. 1898 Mode string `json:"mode,omitempty"` 1899 // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to 1900 // unconditionally include in API requests. By default, fields with empty or 1901 // default values are omitted from API requests. See 1902 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1903 // details. 1904 ForceSendFields []string `json:"-"` 1905 // NullFields is a list of field names (e.g. "ComplianceStandards") to include 1906 // in API requests with the JSON null value. By default, fields with empty 1907 // values are omitted from API requests. See 1908 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1909 NullFields []string `json:"-"` 1910 } 1911 1912 func (s *CompliancePostureConfig) MarshalJSON() ([]byte, error) { 1913 type NoMethod CompliancePostureConfig 1914 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1915 } 1916 1917 // ComplianceStandard: Defines the details of a compliance standard. 1918 type ComplianceStandard struct { 1919 // Standard: Name of the compliance standard. 1920 Standard string `json:"standard,omitempty"` 1921 // ForceSendFields is a list of field names (e.g. "Standard") to 1922 // unconditionally include in API requests. By default, fields with empty or 1923 // default values are omitted from API requests. See 1924 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1925 // details. 1926 ForceSendFields []string `json:"-"` 1927 // NullFields is a list of field names (e.g. "Standard") to include in API 1928 // requests with the JSON null value. By default, fields with empty values are 1929 // omitted from API requests. See 1930 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1931 NullFields []string `json:"-"` 1932 } 1933 1934 func (s *ComplianceStandard) MarshalJSON() ([]byte, error) { 1935 type NoMethod ComplianceStandard 1936 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1937 } 1938 1939 // ConfidentialNodes: ConfidentialNodes is configuration for the confidential 1940 // nodes feature, which makes nodes run on confidential VMs. 1941 type ConfidentialNodes struct { 1942 // Enabled: Whether Confidential Nodes feature is enabled. 1943 Enabled bool `json:"enabled,omitempty"` 1944 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 1945 // include in API requests. By default, fields with empty or default values are 1946 // omitted from API requests. See 1947 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1948 // details. 1949 ForceSendFields []string `json:"-"` 1950 // NullFields is a list of field names (e.g. "Enabled") to include in API 1951 // requests with the JSON null value. By default, fields with empty values are 1952 // omitted from API requests. See 1953 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1954 NullFields []string `json:"-"` 1955 } 1956 1957 func (s *ConfidentialNodes) MarshalJSON() ([]byte, error) { 1958 type NoMethod ConfidentialNodes 1959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1960 } 1961 1962 // ConfigConnectorConfig: Configuration options for the Config Connector 1963 // add-on. 1964 type ConfigConnectorConfig struct { 1965 // Enabled: Whether Cloud Connector is enabled for this cluster. 1966 Enabled bool `json:"enabled,omitempty"` 1967 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 1968 // include in API requests. By default, fields with empty or default values are 1969 // omitted from API requests. See 1970 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1971 // details. 1972 ForceSendFields []string `json:"-"` 1973 // NullFields is a list of field names (e.g. "Enabled") to include in API 1974 // requests with the JSON null value. By default, fields with empty values are 1975 // omitted from API requests. See 1976 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1977 NullFields []string `json:"-"` 1978 } 1979 1980 func (s *ConfigConnectorConfig) MarshalJSON() ([]byte, error) { 1981 type NoMethod ConfigConnectorConfig 1982 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1983 } 1984 1985 // ConsumptionMeteringConfig: Parameters for controlling consumption metering. 1986 type ConsumptionMeteringConfig struct { 1987 // Enabled: Whether to enable consumption metering for this cluster. If 1988 // enabled, a second BigQuery table will be created to hold resource 1989 // consumption records. 1990 Enabled bool `json:"enabled,omitempty"` 1991 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 1992 // include in API requests. By default, fields with empty or default values are 1993 // omitted from API requests. See 1994 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1995 // details. 1996 ForceSendFields []string `json:"-"` 1997 // NullFields is a list of field names (e.g. "Enabled") to include in API 1998 // requests with the JSON null value. By default, fields with empty values are 1999 // omitted from API requests. See 2000 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2001 NullFields []string `json:"-"` 2002 } 2003 2004 func (s *ConsumptionMeteringConfig) MarshalJSON() ([]byte, error) { 2005 type NoMethod ConsumptionMeteringConfig 2006 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2007 } 2008 2009 // ContainerdConfig: ContainerdConfig contains configuration to customize 2010 // containerd. 2011 type ContainerdConfig struct { 2012 // PrivateRegistryAccessConfig: PrivateRegistryAccessConfig is used to 2013 // configure access configuration for private container registries. 2014 PrivateRegistryAccessConfig *PrivateRegistryAccessConfig `json:"privateRegistryAccessConfig,omitempty"` 2015 // ForceSendFields is a list of field names (e.g. 2016 // "PrivateRegistryAccessConfig") to unconditionally include in API requests. 2017 // By default, fields with empty or default values are omitted from API 2018 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 2019 // for more details. 2020 ForceSendFields []string `json:"-"` 2021 // NullFields is a list of field names (e.g. "PrivateRegistryAccessConfig") to 2022 // include in API requests with the JSON null value. By default, fields with 2023 // empty values are omitted from API requests. See 2024 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2025 NullFields []string `json:"-"` 2026 } 2027 2028 func (s *ContainerdConfig) MarshalJSON() ([]byte, error) { 2029 type NoMethod ContainerdConfig 2030 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2031 } 2032 2033 // CostManagementConfig: Configuration for fine-grained cost management 2034 // feature. 2035 type CostManagementConfig struct { 2036 // Enabled: Whether the feature is enabled or not. 2037 Enabled bool `json:"enabled,omitempty"` 2038 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2039 // include in API requests. By default, fields with empty or default values are 2040 // omitted from API requests. See 2041 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2042 // details. 2043 ForceSendFields []string `json:"-"` 2044 // NullFields is a list of field names (e.g. "Enabled") to include in API 2045 // requests with the JSON null value. By default, fields with empty values are 2046 // omitted from API requests. See 2047 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2048 NullFields []string `json:"-"` 2049 } 2050 2051 func (s *CostManagementConfig) MarshalJSON() ([]byte, error) { 2052 type NoMethod CostManagementConfig 2053 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2054 } 2055 2056 // CreateClusterRequest: CreateClusterRequest creates a cluster. 2057 type CreateClusterRequest struct { 2058 // Cluster: Required. A cluster resource 2059 // (https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) 2060 Cluster *Cluster `json:"cluster,omitempty"` 2061 // Parent: The parent (project and location) where the cluster will be created. 2062 // Specified in the format `projects/*/locations/*`. 2063 Parent string `json:"parent,omitempty"` 2064 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 2065 // project number 2066 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 2067 // This field has been deprecated and replaced by the parent field. 2068 ProjectId string `json:"projectId,omitempty"` 2069 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 2070 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 2071 // resides. This field has been deprecated and replaced by the parent field. 2072 Zone string `json:"zone,omitempty"` 2073 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally 2074 // include in API requests. By default, fields with empty or default values are 2075 // omitted from API requests. See 2076 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2077 // details. 2078 ForceSendFields []string `json:"-"` 2079 // NullFields is a list of field names (e.g. "Cluster") to include in API 2080 // requests with the JSON null value. By default, fields with empty values are 2081 // omitted from API requests. See 2082 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2083 NullFields []string `json:"-"` 2084 } 2085 2086 func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { 2087 type NoMethod CreateClusterRequest 2088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2089 } 2090 2091 // CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for a 2092 // cluster. 2093 type CreateNodePoolRequest struct { 2094 // ClusterId: Required. Deprecated. The name of the cluster. This field has 2095 // been deprecated and replaced by the parent field. 2096 ClusterId string `json:"clusterId,omitempty"` 2097 // NodePool: Required. The node pool to create. 2098 NodePool *NodePool `json:"nodePool,omitempty"` 2099 // Parent: The parent (project, location, cluster name) where the node pool 2100 // will be created. Specified in the format 2101 // `projects/*/locations/*/clusters/*`. 2102 Parent string `json:"parent,omitempty"` 2103 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 2104 // project number 2105 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 2106 // This field has been deprecated and replaced by the parent field. 2107 ProjectId string `json:"projectId,omitempty"` 2108 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 2109 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 2110 // resides. This field has been deprecated and replaced by the parent field. 2111 Zone string `json:"zone,omitempty"` 2112 // ForceSendFields is a list of field names (e.g. "ClusterId") to 2113 // unconditionally include in API requests. By default, fields with empty or 2114 // default values are omitted from API requests. See 2115 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2116 // details. 2117 ForceSendFields []string `json:"-"` 2118 // NullFields is a list of field names (e.g. "ClusterId") to include in API 2119 // requests with the JSON null value. By default, fields with empty values are 2120 // omitted from API requests. See 2121 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2122 NullFields []string `json:"-"` 2123 } 2124 2125 func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { 2126 type NoMethod CreateNodePoolRequest 2127 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2128 } 2129 2130 // DNSConfig: DNSConfig contains the desired set of options for configuring 2131 // clusterDNS. 2132 type DNSConfig struct { 2133 // AdditiveVpcScopeDnsDomain: Optional. The domain used in Additive VPC scope. 2134 AdditiveVpcScopeDnsDomain string `json:"additiveVpcScopeDnsDomain,omitempty"` 2135 // ClusterDns: cluster_dns indicates which in-cluster DNS provider should be 2136 // used. 2137 // 2138 // Possible values: 2139 // "PROVIDER_UNSPECIFIED" - Default value 2140 // "PLATFORM_DEFAULT" - Use GKE default DNS provider(kube-dns) for DNS 2141 // resolution. 2142 // "CLOUD_DNS" - Use CloudDNS for DNS resolution. 2143 // "KUBE_DNS" - Use KubeDNS for DNS resolution. 2144 ClusterDns string `json:"clusterDns,omitempty"` 2145 // ClusterDnsDomain: cluster_dns_domain is the suffix used for all cluster 2146 // service records. 2147 ClusterDnsDomain string `json:"clusterDnsDomain,omitempty"` 2148 // ClusterDnsScope: cluster_dns_scope indicates the scope of access to cluster 2149 // DNS records. 2150 // 2151 // Possible values: 2152 // "DNS_SCOPE_UNSPECIFIED" - Default value, will be inferred as cluster 2153 // scope. 2154 // "CLUSTER_SCOPE" - DNS records are accessible from within the cluster. 2155 // "VPC_SCOPE" - DNS records are accessible from within the VPC. 2156 ClusterDnsScope string `json:"clusterDnsScope,omitempty"` 2157 // ForceSendFields is a list of field names (e.g. "AdditiveVpcScopeDnsDomain") 2158 // to unconditionally include in API requests. By default, fields with empty or 2159 // default values are omitted from API requests. See 2160 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2161 // details. 2162 ForceSendFields []string `json:"-"` 2163 // NullFields is a list of field names (e.g. "AdditiveVpcScopeDnsDomain") to 2164 // include in API requests with the JSON null value. By default, fields with 2165 // empty values are omitted from API requests. See 2166 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2167 NullFields []string `json:"-"` 2168 } 2169 2170 func (s *DNSConfig) MarshalJSON() ([]byte, error) { 2171 type NoMethod DNSConfig 2172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2173 } 2174 2175 // DailyMaintenanceWindow: Time window specified for daily maintenance 2176 // operations. 2177 type DailyMaintenanceWindow struct { 2178 // Duration: [Output only] Duration of the time window, automatically chosen to 2179 // be smallest possible in the given scenario. 2180 Duration string `json:"duration,omitempty"` 2181 // StartTime: Time within the maintenance window to start the maintenance 2182 // operations. It must be in format "HH:MM", where HH : [00-23] and MM : 2183 // [00-59] GMT. 2184 StartTime string `json:"startTime,omitempty"` 2185 // ForceSendFields is a list of field names (e.g. "Duration") to 2186 // unconditionally include in API requests. By default, fields with empty or 2187 // default values are omitted from API requests. See 2188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2189 // details. 2190 ForceSendFields []string `json:"-"` 2191 // NullFields is a list of field names (e.g. "Duration") to include in API 2192 // requests with the JSON null value. By default, fields with empty values are 2193 // omitted from API requests. See 2194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2195 NullFields []string `json:"-"` 2196 } 2197 2198 func (s *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) { 2199 type NoMethod DailyMaintenanceWindow 2200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2201 } 2202 2203 // DatabaseEncryption: Configuration of etcd encryption. 2204 type DatabaseEncryption struct { 2205 // CurrentState: Output only. The current state of etcd encryption. 2206 // 2207 // Possible values: 2208 // "CURRENT_STATE_UNSPECIFIED" - Should never be set 2209 // "CURRENT_STATE_ENCRYPTED" - Secrets in etcd are encrypted. 2210 // "CURRENT_STATE_DECRYPTED" - Secrets in etcd are stored in plain text (at 2211 // etcd level) - this is unrelated to Compute Engine level full disk 2212 // encryption. 2213 // "CURRENT_STATE_ENCRYPTION_PENDING" - Encryption (or re-encryption with a 2214 // different CloudKMS key) of Secrets is in progress. 2215 // "CURRENT_STATE_ENCRYPTION_ERROR" - Encryption (or re-encryption with a 2216 // different CloudKMS key) of Secrets in etcd encountered an error. 2217 // "CURRENT_STATE_DECRYPTION_PENDING" - De-crypting Secrets to plain text in 2218 // etcd is in progress. 2219 // "CURRENT_STATE_DECRYPTION_ERROR" - De-crypting Secrets to plain text in 2220 // etcd encountered an error. 2221 CurrentState string `json:"currentState,omitempty"` 2222 // DecryptionKeys: Output only. Keys in use by the cluster for decrypting 2223 // existing objects, in addition to the key in `key_name`. Each item is a 2224 // CloudKMS key resource. 2225 DecryptionKeys []string `json:"decryptionKeys,omitempty"` 2226 // KeyName: Name of CloudKMS key to use for the encryption of secrets in etcd. 2227 // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key 2228 KeyName string `json:"keyName,omitempty"` 2229 // LastOperationErrors: Output only. Records errors seen during 2230 // DatabaseEncryption update operations. 2231 LastOperationErrors []*OperationError `json:"lastOperationErrors,omitempty"` 2232 // State: The desired state of etcd encryption. 2233 // 2234 // Possible values: 2235 // "UNKNOWN" - Should never be set 2236 // "ENCRYPTED" - Secrets in etcd are encrypted. 2237 // "DECRYPTED" - Secrets in etcd are stored in plain text (at etcd level) - 2238 // this is unrelated to Compute Engine level full disk encryption. 2239 State string `json:"state,omitempty"` 2240 // ForceSendFields is a list of field names (e.g. "CurrentState") to 2241 // unconditionally include in API requests. By default, fields with empty or 2242 // default values are omitted from API requests. See 2243 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2244 // details. 2245 ForceSendFields []string `json:"-"` 2246 // NullFields is a list of field names (e.g. "CurrentState") to include in API 2247 // requests with the JSON null value. By default, fields with empty values are 2248 // omitted from API requests. See 2249 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2250 NullFields []string `json:"-"` 2251 } 2252 2253 func (s *DatabaseEncryption) MarshalJSON() ([]byte, error) { 2254 type NoMethod DatabaseEncryption 2255 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2256 } 2257 2258 // Date: Represents a whole or partial calendar date, such as a birthday. The 2259 // time of day and time zone are either specified elsewhere or are 2260 // insignificant. The date is relative to the Gregorian Calendar. This can 2261 // represent one of the following: * A full date, with non-zero year, month, 2262 // and day values. * A month and day, with a zero year (for example, an 2263 // anniversary). * A year on its own, with a zero month and a zero day. * A 2264 // year and month, with a zero day (for example, a credit card expiration 2265 // date). Related types: * google.type.TimeOfDay * google.type.DateTime * 2266 // google.protobuf.Timestamp 2267 type Date struct { 2268 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, 2269 // or 0 to specify a year by itself or a year and month where the day isn't 2270 // significant. 2271 Day int64 `json:"day,omitempty"` 2272 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without 2273 // a month and day. 2274 Month int64 `json:"month,omitempty"` 2275 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date 2276 // without a year. 2277 Year int64 `json:"year,omitempty"` 2278 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally 2279 // include in API requests. By default, fields with empty or default values are 2280 // omitted from API requests. See 2281 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2282 // details. 2283 ForceSendFields []string `json:"-"` 2284 // NullFields is a list of field names (e.g. "Day") to include in API requests 2285 // with the JSON null value. By default, fields with empty values are omitted 2286 // from API requests. See 2287 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2288 NullFields []string `json:"-"` 2289 } 2290 2291 func (s *Date) MarshalJSON() ([]byte, error) { 2292 type NoMethod Date 2293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2294 } 2295 2296 // DefaultSnatStatus: DefaultSnatStatus contains the desired state of whether 2297 // default sNAT should be disabled on the cluster. 2298 type DefaultSnatStatus struct { 2299 // Disabled: Disables cluster default sNAT rules. 2300 Disabled bool `json:"disabled,omitempty"` 2301 // ForceSendFields is a list of field names (e.g. "Disabled") to 2302 // unconditionally include in API requests. By default, fields with empty or 2303 // default values are omitted from API requests. See 2304 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2305 // details. 2306 ForceSendFields []string `json:"-"` 2307 // NullFields is a list of field names (e.g. "Disabled") to include in API 2308 // requests with the JSON null value. By default, fields with empty values are 2309 // omitted from API requests. See 2310 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2311 NullFields []string `json:"-"` 2312 } 2313 2314 func (s *DefaultSnatStatus) MarshalJSON() ([]byte, error) { 2315 type NoMethod DefaultSnatStatus 2316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2317 } 2318 2319 // DnsCacheConfig: Configuration for NodeLocal DNSCache 2320 type DnsCacheConfig struct { 2321 // Enabled: Whether NodeLocal DNSCache is enabled for this cluster. 2322 Enabled bool `json:"enabled,omitempty"` 2323 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2324 // include in API requests. By default, fields with empty or default values are 2325 // omitted from API requests. See 2326 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2327 // details. 2328 ForceSendFields []string `json:"-"` 2329 // NullFields is a list of field names (e.g. "Enabled") to include in API 2330 // requests with the JSON null value. By default, fields with empty values are 2331 // omitted from API requests. See 2332 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2333 NullFields []string `json:"-"` 2334 } 2335 2336 func (s *DnsCacheConfig) MarshalJSON() ([]byte, error) { 2337 type NoMethod DnsCacheConfig 2338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2339 } 2340 2341 // Empty: A generic empty message that you can re-use to avoid defining 2342 // duplicated empty messages in your APIs. A typical example is to use it as 2343 // the request or the response type of an API method. For instance: service Foo 2344 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 2345 type Empty struct { 2346 // ServerResponse contains the HTTP response code and headers from the server. 2347 googleapi.ServerResponse `json:"-"` 2348 } 2349 2350 // EnterpriseConfig: EnterpriseConfig is the cluster enterprise configuration. 2351 type EnterpriseConfig struct { 2352 // ClusterTier: Output only. [Output only] cluster_tier specifies the premium 2353 // tier of the cluster. 2354 // 2355 // Possible values: 2356 // "CLUSTER_TIER_UNSPECIFIED" - CLUSTER_TIER_UNSPECIFIED is when cluster_tier 2357 // is not set. 2358 // "STANDARD" - STANDARD indicates a standard GKE cluster. 2359 // "ENTERPRISE" - ENTERPRISE indicates a GKE Enterprise cluster. 2360 ClusterTier string `json:"clusterTier,omitempty"` 2361 // ForceSendFields is a list of field names (e.g. "ClusterTier") to 2362 // unconditionally include in API requests. By default, fields with empty or 2363 // default values are omitted from API requests. See 2364 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2365 // details. 2366 ForceSendFields []string `json:"-"` 2367 // NullFields is a list of field names (e.g. "ClusterTier") to include in API 2368 // requests with the JSON null value. By default, fields with empty values are 2369 // omitted from API requests. See 2370 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2371 NullFields []string `json:"-"` 2372 } 2373 2374 func (s *EnterpriseConfig) MarshalJSON() ([]byte, error) { 2375 type NoMethod EnterpriseConfig 2376 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2377 } 2378 2379 // EphemeralStorageConfig: EphemeralStorageConfig contains configuration for 2380 // the ephemeral storage filesystem. 2381 type EphemeralStorageConfig struct { 2382 // LocalSsdCount: Number of local SSDs to use to back ephemeral storage. Uses 2383 // NVMe interfaces. The limit for this value is dependent upon the maximum 2384 // number of disk available on a machine per zone. See: 2385 // https://cloud.google.com/compute/docs/disks/local-ssd for more information. 2386 // A zero (or unset) value has different meanings depending on machine type 2387 // being used: 1. For pre-Gen3 machines, which support flexible numbers of 2388 // local ssds, zero (or unset) means to disable using local SSDs as ephemeral 2389 // storage. 2. For Gen3 machines which dictate a specific number of local ssds, 2390 // zero (or unset) means to use the default number of local ssds that goes with 2391 // that machine type. For example, for a c3-standard-8-lssd machine, 2 local 2392 // ssds would be provisioned. For c3-standard-8 (which doesn't support local 2393 // ssds), 0 will be provisioned. See 2394 // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds 2395 // for more info. 2396 LocalSsdCount int64 `json:"localSsdCount,omitempty"` 2397 // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to 2398 // unconditionally include in API requests. By default, fields with empty or 2399 // default values are omitted from API requests. See 2400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2401 // details. 2402 ForceSendFields []string `json:"-"` 2403 // NullFields is a list of field names (e.g. "LocalSsdCount") to include in API 2404 // requests with the JSON null value. By default, fields with empty values are 2405 // omitted from API requests. See 2406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2407 NullFields []string `json:"-"` 2408 } 2409 2410 func (s *EphemeralStorageConfig) MarshalJSON() ([]byte, error) { 2411 type NoMethod EphemeralStorageConfig 2412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2413 } 2414 2415 // EphemeralStorageLocalSsdConfig: EphemeralStorageLocalSsdConfig contains 2416 // configuration for the node ephemeral storage using Local SSDs. 2417 type EphemeralStorageLocalSsdConfig struct { 2418 // LocalSsdCount: Number of local SSDs to use to back ephemeral storage. Uses 2419 // NVMe interfaces. A zero (or unset) value has different meanings depending on 2420 // machine type being used: 1. For pre-Gen3 machines, which support flexible 2421 // numbers of local ssds, zero (or unset) means to disable using local SSDs as 2422 // ephemeral storage. The limit for this value is dependent upon the maximum 2423 // number of disk available on a machine per zone. See: 2424 // https://cloud.google.com/compute/docs/disks/local-ssd for more information. 2425 // 2. For Gen3 machines which dictate a specific number of local ssds, zero (or 2426 // unset) means to use the default number of local ssds that goes with that 2427 // machine type. For example, for a c3-standard-8-lssd machine, 2 local ssds 2428 // would be provisioned. For c3-standard-8 (which doesn't support local ssds), 2429 // 0 will be provisioned. See 2430 // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds 2431 // for more info. 2432 LocalSsdCount int64 `json:"localSsdCount,omitempty"` 2433 // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to 2434 // unconditionally include in API requests. By default, fields with empty or 2435 // default values are omitted from API requests. See 2436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2437 // details. 2438 ForceSendFields []string `json:"-"` 2439 // NullFields is a list of field names (e.g. "LocalSsdCount") to include in API 2440 // requests with the JSON null value. By default, fields with empty values are 2441 // omitted from API requests. See 2442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2443 NullFields []string `json:"-"` 2444 } 2445 2446 func (s *EphemeralStorageLocalSsdConfig) MarshalJSON() ([]byte, error) { 2447 type NoMethod EphemeralStorageLocalSsdConfig 2448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2449 } 2450 2451 // FastSocket: Configuration of Fast Socket feature. 2452 type FastSocket struct { 2453 // Enabled: Whether Fast Socket features are enabled in the node pool. 2454 Enabled bool `json:"enabled,omitempty"` 2455 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2456 // include in API requests. By default, fields with empty or default values are 2457 // omitted from API requests. See 2458 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2459 // details. 2460 ForceSendFields []string `json:"-"` 2461 // NullFields is a list of field names (e.g. "Enabled") to include in API 2462 // requests with the JSON null value. By default, fields with empty values are 2463 // omitted from API requests. See 2464 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2465 NullFields []string `json:"-"` 2466 } 2467 2468 func (s *FastSocket) MarshalJSON() ([]byte, error) { 2469 type NoMethod FastSocket 2470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2471 } 2472 2473 // Filter: Allows filtering to one or more specific event types. If event types 2474 // are present, those and only those event types will be transmitted to the 2475 // cluster. Other types will be skipped. If no filter is specified, or no event 2476 // types are present, all event types will be sent 2477 type Filter struct { 2478 // EventType: Event types to allowlist. 2479 // 2480 // Possible values: 2481 // "EVENT_TYPE_UNSPECIFIED" - Not set, will be ignored. 2482 // "UPGRADE_AVAILABLE_EVENT" - Corresponds with UpgradeAvailableEvent. 2483 // "UPGRADE_EVENT" - Corresponds with UpgradeEvent. 2484 // "SECURITY_BULLETIN_EVENT" - Corresponds with SecurityBulletinEvent. 2485 EventType []string `json:"eventType,omitempty"` 2486 // ForceSendFields is a list of field names (e.g. "EventType") to 2487 // unconditionally include in API requests. By default, fields with empty or 2488 // default values are omitted from API requests. See 2489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2490 // details. 2491 ForceSendFields []string `json:"-"` 2492 // NullFields is a list of field names (e.g. "EventType") to include in API 2493 // requests with the JSON null value. By default, fields with empty values are 2494 // omitted from API requests. See 2495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2496 NullFields []string `json:"-"` 2497 } 2498 2499 func (s *Filter) MarshalJSON() ([]byte, error) { 2500 type NoMethod Filter 2501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2502 } 2503 2504 // Fleet: Fleet is the fleet configuration for the cluster. 2505 type Fleet struct { 2506 // Membership: [Output only] The full resource name of the registered fleet 2507 // membership of the cluster, in the format 2508 // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. 2509 Membership string `json:"membership,omitempty"` 2510 // PreRegistered: [Output only] Whether the cluster has been registered through 2511 // the fleet API. 2512 PreRegistered bool `json:"preRegistered,omitempty"` 2513 // Project: The Fleet host project(project ID or project number) where this 2514 // cluster will be registered to. This field cannot be changed after the 2515 // cluster has been registered. 2516 Project string `json:"project,omitempty"` 2517 // ForceSendFields is a list of field names (e.g. "Membership") to 2518 // unconditionally include in API requests. By default, fields with empty or 2519 // default values are omitted from API requests. See 2520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2521 // details. 2522 ForceSendFields []string `json:"-"` 2523 // NullFields is a list of field names (e.g. "Membership") to include in API 2524 // requests with the JSON null value. By default, fields with empty values are 2525 // omitted from API requests. See 2526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2527 NullFields []string `json:"-"` 2528 } 2529 2530 func (s *Fleet) MarshalJSON() ([]byte, error) { 2531 type NoMethod Fleet 2532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2533 } 2534 2535 // GCPSecretManagerCertificateConfig: GCPSecretManagerCertificateConfig 2536 // configures a secret from Google Secret Manager 2537 // (https://cloud.google.com/secret-manager). 2538 type GCPSecretManagerCertificateConfig struct { 2539 // SecretUri: Secret URI, in the form 2540 // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". Version can 2541 // be fixed (e.g. "2") or "latest" 2542 SecretUri string `json:"secretUri,omitempty"` 2543 // ForceSendFields is a list of field names (e.g. "SecretUri") to 2544 // unconditionally include in API requests. By default, fields with empty or 2545 // default values are omitted from API requests. See 2546 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2547 // details. 2548 ForceSendFields []string `json:"-"` 2549 // NullFields is a list of field names (e.g. "SecretUri") to include in API 2550 // requests with the JSON null value. By default, fields with empty values are 2551 // omitted from API requests. See 2552 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2553 NullFields []string `json:"-"` 2554 } 2555 2556 func (s *GCPSecretManagerCertificateConfig) MarshalJSON() ([]byte, error) { 2557 type NoMethod GCPSecretManagerCertificateConfig 2558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2559 } 2560 2561 // GPUDriverInstallationConfig: GPUDriverInstallationConfig specifies the 2562 // version of GPU driver to be auto installed. 2563 type GPUDriverInstallationConfig struct { 2564 // GpuDriverVersion: Mode for how the GPU driver is installed. 2565 // 2566 // Possible values: 2567 // "GPU_DRIVER_VERSION_UNSPECIFIED" - Default value is to not install any GPU 2568 // driver. 2569 // "INSTALLATION_DISABLED" - Disable GPU driver auto installation and needs 2570 // manual installation 2571 // "DEFAULT" - "Default" GPU driver in COS and Ubuntu. 2572 // "LATEST" - "Latest" GPU driver in COS. 2573 GpuDriverVersion string `json:"gpuDriverVersion,omitempty"` 2574 // ForceSendFields is a list of field names (e.g. "GpuDriverVersion") to 2575 // unconditionally include in API requests. By default, fields with empty or 2576 // default values are omitted from API requests. See 2577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2578 // details. 2579 ForceSendFields []string `json:"-"` 2580 // NullFields is a list of field names (e.g. "GpuDriverVersion") to include in 2581 // API requests with the JSON null value. By default, fields with empty values 2582 // are omitted from API requests. See 2583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2584 NullFields []string `json:"-"` 2585 } 2586 2587 func (s *GPUDriverInstallationConfig) MarshalJSON() ([]byte, error) { 2588 type NoMethod GPUDriverInstallationConfig 2589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2590 } 2591 2592 // GPUSharingConfig: GPUSharingConfig represents the GPU sharing configuration 2593 // for Hardware Accelerators. 2594 type GPUSharingConfig struct { 2595 // GpuSharingStrategy: The type of GPU sharing strategy to enable on the GPU 2596 // node. 2597 // 2598 // Possible values: 2599 // "GPU_SHARING_STRATEGY_UNSPECIFIED" - Default value. 2600 // "TIME_SHARING" - GPUs are time-shared between containers. 2601 // "MPS" - GPUs are shared between containers with NVIDIA MPS. 2602 GpuSharingStrategy string `json:"gpuSharingStrategy,omitempty"` 2603 // MaxSharedClientsPerGpu: The max number of containers that can share a 2604 // physical GPU. 2605 MaxSharedClientsPerGpu int64 `json:"maxSharedClientsPerGpu,omitempty,string"` 2606 // ForceSendFields is a list of field names (e.g. "GpuSharingStrategy") to 2607 // unconditionally include in API requests. By default, fields with empty or 2608 // default values are omitted from API requests. See 2609 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2610 // details. 2611 ForceSendFields []string `json:"-"` 2612 // NullFields is a list of field names (e.g. "GpuSharingStrategy") to include 2613 // in API requests with the JSON null value. By default, fields with empty 2614 // values are omitted from API requests. See 2615 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2616 NullFields []string `json:"-"` 2617 } 2618 2619 func (s *GPUSharingConfig) MarshalJSON() ([]byte, error) { 2620 type NoMethod GPUSharingConfig 2621 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2622 } 2623 2624 // GatewayAPIConfig: GatewayAPIConfig contains the desired config of Gateway 2625 // API on this cluster. 2626 type GatewayAPIConfig struct { 2627 // Channel: The Gateway API release channel to use for Gateway API. 2628 // 2629 // Possible values: 2630 // "CHANNEL_UNSPECIFIED" - Default value. 2631 // "CHANNEL_DISABLED" - Gateway API support is disabled 2632 // "CHANNEL_EXPERIMENTAL" - Gateway API support is enabled, experimental CRDs 2633 // are installed 2634 // "CHANNEL_STANDARD" - Gateway API support is enabled, standard CRDs are 2635 // installed 2636 Channel string `json:"channel,omitempty"` 2637 // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally 2638 // include in API requests. By default, fields with empty or default values are 2639 // omitted from API requests. See 2640 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2641 // details. 2642 ForceSendFields []string `json:"-"` 2643 // NullFields is a list of field names (e.g. "Channel") to include in API 2644 // requests with the JSON null value. By default, fields with empty values are 2645 // omitted from API requests. See 2646 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2647 NullFields []string `json:"-"` 2648 } 2649 2650 func (s *GatewayAPIConfig) MarshalJSON() ([]byte, error) { 2651 type NoMethod GatewayAPIConfig 2652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2653 } 2654 2655 // GcePersistentDiskCsiDriverConfig: Configuration for the Compute Engine PD 2656 // CSI driver. 2657 type GcePersistentDiskCsiDriverConfig struct { 2658 // Enabled: Whether the Compute Engine PD CSI driver is enabled for this 2659 // cluster. 2660 Enabled bool `json:"enabled,omitempty"` 2661 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2662 // include in API requests. By default, fields with empty or default values are 2663 // omitted from API requests. See 2664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2665 // details. 2666 ForceSendFields []string `json:"-"` 2667 // NullFields is a list of field names (e.g. "Enabled") to include in API 2668 // requests with the JSON null value. By default, fields with empty values are 2669 // omitted from API requests. See 2670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2671 NullFields []string `json:"-"` 2672 } 2673 2674 func (s *GcePersistentDiskCsiDriverConfig) MarshalJSON() ([]byte, error) { 2675 type NoMethod GcePersistentDiskCsiDriverConfig 2676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2677 } 2678 2679 // GcfsConfig: GcfsConfig contains configurations of Google Container File 2680 // System. 2681 type GcfsConfig struct { 2682 // Enabled: Whether to use GCFS. 2683 Enabled bool `json:"enabled,omitempty"` 2684 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2685 // include in API requests. By default, fields with empty or default values are 2686 // omitted from API requests. See 2687 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2688 // details. 2689 ForceSendFields []string `json:"-"` 2690 // NullFields is a list of field names (e.g. "Enabled") to include in API 2691 // requests with the JSON null value. By default, fields with empty values are 2692 // omitted from API requests. See 2693 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2694 NullFields []string `json:"-"` 2695 } 2696 2697 func (s *GcfsConfig) MarshalJSON() ([]byte, error) { 2698 type NoMethod GcfsConfig 2699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2700 } 2701 2702 // GcpFilestoreCsiDriverConfig: Configuration for the GCP Filestore CSI driver. 2703 type GcpFilestoreCsiDriverConfig struct { 2704 // Enabled: Whether the GCP Filestore CSI driver is enabled for this cluster. 2705 Enabled bool `json:"enabled,omitempty"` 2706 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2707 // include in API requests. By default, fields with empty or default values are 2708 // omitted from API requests. See 2709 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2710 // details. 2711 ForceSendFields []string `json:"-"` 2712 // NullFields is a list of field names (e.g. "Enabled") to include in API 2713 // requests with the JSON null value. By default, fields with empty values are 2714 // omitted from API requests. See 2715 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2716 NullFields []string `json:"-"` 2717 } 2718 2719 func (s *GcpFilestoreCsiDriverConfig) MarshalJSON() ([]byte, error) { 2720 type NoMethod GcpFilestoreCsiDriverConfig 2721 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2722 } 2723 2724 // GcsFuseCsiDriverConfig: Configuration for the Cloud Storage Fuse CSI driver. 2725 type GcsFuseCsiDriverConfig struct { 2726 // Enabled: Whether the Cloud Storage Fuse CSI driver is enabled for this 2727 // cluster. 2728 Enabled bool `json:"enabled,omitempty"` 2729 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2730 // include in API requests. By default, fields with empty or default values are 2731 // omitted from API requests. See 2732 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2733 // details. 2734 ForceSendFields []string `json:"-"` 2735 // NullFields is a list of field names (e.g. "Enabled") to include in API 2736 // requests with the JSON null value. By default, fields with empty values are 2737 // omitted from API requests. See 2738 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2739 NullFields []string `json:"-"` 2740 } 2741 2742 func (s *GcsFuseCsiDriverConfig) MarshalJSON() ([]byte, error) { 2743 type NoMethod GcsFuseCsiDriverConfig 2744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2745 } 2746 2747 // GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web Key Set 2748 // as specififed in rfc 7517 2749 type GetJSONWebKeysResponse struct { 2750 // CacheHeader: OnePlatform automatically extracts this field and uses it to 2751 // set the HTTP Cache-Control header. 2752 CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` 2753 // Keys: The public component of the keys used by the cluster to sign token 2754 // requests. 2755 Keys []*Jwk `json:"keys,omitempty"` 2756 2757 // ServerResponse contains the HTTP response code and headers from the server. 2758 googleapi.ServerResponse `json:"-"` 2759 // ForceSendFields is a list of field names (e.g. "CacheHeader") to 2760 // unconditionally include in API requests. By default, fields with empty or 2761 // default values are omitted from API requests. See 2762 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2763 // details. 2764 ForceSendFields []string `json:"-"` 2765 // NullFields is a list of field names (e.g. "CacheHeader") to include in API 2766 // requests with the JSON null value. By default, fields with empty values are 2767 // omitted from API requests. See 2768 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2769 NullFields []string `json:"-"` 2770 } 2771 2772 func (s *GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { 2773 type NoMethod GetJSONWebKeysResponse 2774 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2775 } 2776 2777 // GetOpenIDConfigResponse: GetOpenIDConfigResponse is an OIDC discovery 2778 // document for the cluster. See the OpenID Connect Discovery 1.0 specification 2779 // for details. 2780 type GetOpenIDConfigResponse struct { 2781 // CacheHeader: OnePlatform automatically extracts this field and uses it to 2782 // set the HTTP Cache-Control header. 2783 CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` 2784 // ClaimsSupported: Supported claims. 2785 ClaimsSupported []string `json:"claims_supported,omitempty"` 2786 // GrantTypes: Supported grant types. 2787 GrantTypes []string `json:"grant_types,omitempty"` 2788 // IdTokenSigningAlgValuesSupported: supported ID Token signing Algorithms. 2789 IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` 2790 // Issuer: OIDC Issuer. 2791 Issuer string `json:"issuer,omitempty"` 2792 // JwksUri: JSON Web Key uri. 2793 JwksUri string `json:"jwks_uri,omitempty"` 2794 // ResponseTypesSupported: Supported response types. 2795 ResponseTypesSupported []string `json:"response_types_supported,omitempty"` 2796 // SubjectTypesSupported: Supported subject types. 2797 SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` 2798 2799 // ServerResponse contains the HTTP response code and headers from the server. 2800 googleapi.ServerResponse `json:"-"` 2801 // ForceSendFields is a list of field names (e.g. "CacheHeader") to 2802 // unconditionally include in API requests. By default, fields with empty or 2803 // default values are omitted from API requests. See 2804 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2805 // details. 2806 ForceSendFields []string `json:"-"` 2807 // NullFields is a list of field names (e.g. "CacheHeader") to include in API 2808 // requests with the JSON null value. By default, fields with empty values are 2809 // omitted from API requests. See 2810 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2811 NullFields []string `json:"-"` 2812 } 2813 2814 func (s *GetOpenIDConfigResponse) MarshalJSON() ([]byte, error) { 2815 type NoMethod GetOpenIDConfigResponse 2816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2817 } 2818 2819 // GkeBackupAgentConfig: Configuration for the Backup for GKE Agent. 2820 type GkeBackupAgentConfig struct { 2821 // Enabled: Whether the Backup for GKE agent is enabled for this cluster. 2822 Enabled bool `json:"enabled,omitempty"` 2823 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2824 // include in API requests. By default, fields with empty or default values are 2825 // omitted from API requests. See 2826 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2827 // details. 2828 ForceSendFields []string `json:"-"` 2829 // NullFields is a list of field names (e.g. "Enabled") to include in API 2830 // requests with the JSON null value. By default, fields with empty values are 2831 // omitted from API requests. See 2832 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2833 NullFields []string `json:"-"` 2834 } 2835 2836 func (s *GkeBackupAgentConfig) MarshalJSON() ([]byte, error) { 2837 type NoMethod GkeBackupAgentConfig 2838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2839 } 2840 2841 // HorizontalPodAutoscaling: Configuration options for the horizontal pod 2842 // autoscaling feature, which increases or decreases the number of replica pods 2843 // a replication controller has based on the resource usage of the existing 2844 // pods. 2845 type HorizontalPodAutoscaling struct { 2846 // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled in the 2847 // cluster. When enabled, it ensures that metrics are collected into 2848 // Stackdriver Monitoring. 2849 Disabled bool `json:"disabled,omitempty"` 2850 // ForceSendFields is a list of field names (e.g. "Disabled") to 2851 // unconditionally include in API requests. By default, fields with empty or 2852 // default values are omitted from API requests. See 2853 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2854 // details. 2855 ForceSendFields []string `json:"-"` 2856 // NullFields is a list of field names (e.g. "Disabled") to include in API 2857 // requests with the JSON null value. By default, fields with empty values are 2858 // omitted from API requests. See 2859 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2860 NullFields []string `json:"-"` 2861 } 2862 2863 func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { 2864 type NoMethod HorizontalPodAutoscaling 2865 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2866 } 2867 2868 // HostMaintenancePolicy: HostMaintenancePolicy contains the maintenance policy 2869 // for the hosts on which the GKE VMs run on. 2870 type HostMaintenancePolicy struct { 2871 // MaintenanceInterval: Specifies the frequency of planned maintenance events. 2872 // 2873 // Possible values: 2874 // "MAINTENANCE_INTERVAL_UNSPECIFIED" - The maintenance interval is not 2875 // explicitly specified. 2876 // "AS_NEEDED" - Nodes are eligible to receive infrastructure and hypervisor 2877 // updates as they become available. This may result in more maintenance 2878 // operations (live migrations or terminations) for the node than the PERIODIC 2879 // option. 2880 // "PERIODIC" - Nodes receive infrastructure and hypervisor updates on a 2881 // periodic basis, minimizing the number of maintenance operations (live 2882 // migrations or terminations) on an individual VM. This may mean underlying 2883 // VMs will take longer to receive an update than if it was configured for 2884 // AS_NEEDED. Security updates will still be applied as soon as they are 2885 // available. 2886 MaintenanceInterval string `json:"maintenanceInterval,omitempty"` 2887 // OpportunisticMaintenanceStrategy: Strategy that will trigger maintenance on 2888 // behalf of the customer. 2889 OpportunisticMaintenanceStrategy *OpportunisticMaintenanceStrategy `json:"opportunisticMaintenanceStrategy,omitempty"` 2890 // ForceSendFields is a list of field names (e.g. "MaintenanceInterval") to 2891 // unconditionally include in API requests. By default, fields with empty or 2892 // default values are omitted from API requests. See 2893 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2894 // details. 2895 ForceSendFields []string `json:"-"` 2896 // NullFields is a list of field names (e.g. "MaintenanceInterval") to include 2897 // in API requests with the JSON null value. By default, fields with empty 2898 // values are omitted from API requests. See 2899 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2900 NullFields []string `json:"-"` 2901 } 2902 2903 func (s *HostMaintenancePolicy) MarshalJSON() ([]byte, error) { 2904 type NoMethod HostMaintenancePolicy 2905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2906 } 2907 2908 // HttpCacheControlResponseHeader: RFC-2616: cache control support 2909 type HttpCacheControlResponseHeader struct { 2910 // Age: 14.6 response cache age, in seconds since the response is generated 2911 Age int64 `json:"age,omitempty,string"` 2912 // Directive: 14.9 request and response directives 2913 Directive string `json:"directive,omitempty"` 2914 // Expires: 14.21 response cache expires, in RFC 1123 date format 2915 Expires string `json:"expires,omitempty"` 2916 // ForceSendFields is a list of field names (e.g. "Age") to unconditionally 2917 // include in API requests. By default, fields with empty or default values are 2918 // omitted from API requests. See 2919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2920 // details. 2921 ForceSendFields []string `json:"-"` 2922 // NullFields is a list of field names (e.g. "Age") to include in API requests 2923 // with the JSON null value. By default, fields with empty values are omitted 2924 // from API requests. See 2925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2926 NullFields []string `json:"-"` 2927 } 2928 2929 func (s *HttpCacheControlResponseHeader) MarshalJSON() ([]byte, error) { 2930 type NoMethod HttpCacheControlResponseHeader 2931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2932 } 2933 2934 // HttpLoadBalancing: Configuration options for the HTTP (L7) load balancing 2935 // controller addon, which makes it easy to set up HTTP load balancers for 2936 // services in a cluster. 2937 type HttpLoadBalancing struct { 2938 // Disabled: Whether the HTTP Load Balancing controller is enabled in the 2939 // cluster. When enabled, it runs a small pod in the cluster that manages the 2940 // load balancers. 2941 Disabled bool `json:"disabled,omitempty"` 2942 // ForceSendFields is a list of field names (e.g. "Disabled") to 2943 // unconditionally include in API requests. By default, fields with empty or 2944 // default values are omitted from API requests. See 2945 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2946 // details. 2947 ForceSendFields []string `json:"-"` 2948 // NullFields is a list of field names (e.g. "Disabled") to include in API 2949 // requests with the JSON null value. By default, fields with empty values are 2950 // omitted from API requests. See 2951 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2952 NullFields []string `json:"-"` 2953 } 2954 2955 func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { 2956 type NoMethod HttpLoadBalancing 2957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2958 } 2959 2960 // HugepagesConfig: Hugepages amount in both 2m and 1g size 2961 type HugepagesConfig struct { 2962 // HugepageSize1g: Optional. Amount of 1G hugepages 2963 HugepageSize1g int64 `json:"hugepageSize1g,omitempty"` 2964 // HugepageSize2m: Optional. Amount of 2M hugepages 2965 HugepageSize2m int64 `json:"hugepageSize2m,omitempty"` 2966 // ForceSendFields is a list of field names (e.g. "HugepageSize1g") to 2967 // unconditionally include in API requests. By default, fields with empty or 2968 // default values are omitted from API requests. See 2969 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2970 // details. 2971 ForceSendFields []string `json:"-"` 2972 // NullFields is a list of field names (e.g. "HugepageSize1g") to include in 2973 // API requests with the JSON null value. By default, fields with empty values 2974 // are omitted from API requests. See 2975 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2976 NullFields []string `json:"-"` 2977 } 2978 2979 func (s *HugepagesConfig) MarshalJSON() ([]byte, error) { 2980 type NoMethod HugepagesConfig 2981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2982 } 2983 2984 // ILBSubsettingConfig: ILBSubsettingConfig contains the desired config of L4 2985 // Internal LoadBalancer subsetting on this cluster. 2986 type ILBSubsettingConfig struct { 2987 // Enabled: Enables l4 ILB subsetting for this cluster 2988 Enabled bool `json:"enabled,omitempty"` 2989 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2990 // include in API requests. By default, fields with empty or default values are 2991 // omitted from API requests. See 2992 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2993 // details. 2994 ForceSendFields []string `json:"-"` 2995 // NullFields is a list of field names (e.g. "Enabled") to include in API 2996 // requests with the JSON null value. By default, fields with empty values are 2997 // omitted from API requests. See 2998 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2999 NullFields []string `json:"-"` 3000 } 3001 3002 func (s *ILBSubsettingConfig) MarshalJSON() ([]byte, error) { 3003 type NoMethod ILBSubsettingConfig 3004 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3005 } 3006 3007 // IPAllocationPolicy: Configuration for controlling how IPs are allocated in 3008 // the cluster. 3009 type IPAllocationPolicy struct { 3010 // AdditionalPodRangesConfig: Output only. [Output only] The additional pod 3011 // ranges that are added to the cluster. These pod ranges can be used by new 3012 // node pools to allocate pod IPs automatically. Once the range is removed it 3013 // will not show up in IPAllocationPolicy. 3014 AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"` 3015 // AllowRouteOverlap: If true, allow allocation of cluster CIDR ranges that 3016 // overlap with certain kinds of network routes. By default we do not allow 3017 // cluster CIDR ranges to intersect with any user declared routes. With 3018 // allow_route_overlap == true, we allow overlapping with CIDR ranges that are 3019 // larger than the cluster CIDR range. If this field is set to true, then 3020 // cluster and services CIDRs must be fully-specified (e.g. `10.96.0.0/14`, but 3021 // not `/14`), which means: 1) When `use_ip_aliases` is true, 3022 // `cluster_ipv4_cidr_block` and `services_ipv4_cidr_block` must be 3023 // fully-specified. 2) When `use_ip_aliases` is false, 3024 // `cluster.cluster_ipv4_cidr` muse be fully-specified. 3025 AllowRouteOverlap bool `json:"allowRouteOverlap,omitempty"` 3026 // ClusterIpv4Cidr: This field is deprecated, use cluster_ipv4_cidr_block. 3027 ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` 3028 // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs. If this 3029 // field is set, then `cluster.cluster_ipv4_cidr` must be left blank. This 3030 // field is only applicable when `use_ip_aliases` is true. Set to blank to have 3031 // a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a 3032 // range chosen with a specific netmask. Set to a CIDR 3033 // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. 3034 // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, 3035 // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. 3036 ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` 3037 // ClusterSecondaryRangeName: The name of the secondary range to be used for 3038 // the cluster CIDR block. The secondary range will be used for pod IP 3039 // addresses. This must be an existing secondary range associated with the 3040 // cluster subnetwork. This field is only applicable with use_ip_aliases and 3041 // create_subnetwork is false. 3042 ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` 3043 // CreateSubnetwork: Whether a new subnetwork will be created automatically for 3044 // the cluster. This field is only applicable when `use_ip_aliases` is true. 3045 CreateSubnetwork bool `json:"createSubnetwork,omitempty"` 3046 // DefaultPodIpv4RangeUtilization: Output only. [Output only] The utilization 3047 // of the cluster default IPv4 range for the pod. The ratio is Usage/[Total 3048 // number of IPs in the secondary range], 3049 // Usage=numNodes*numZones*podIPsPerNode. 3050 DefaultPodIpv4RangeUtilization float64 `json:"defaultPodIpv4RangeUtilization,omitempty"` 3051 // Ipv6AccessType: The ipv6 access type (internal or external) when 3052 // create_subnetwork is true 3053 // 3054 // Possible values: 3055 // "IPV6_ACCESS_TYPE_UNSPECIFIED" - Default value, will be defaulted as type 3056 // external. 3057 // "INTERNAL" - Access type internal (all v6 addresses are internal IPs) 3058 // "EXTERNAL" - Access type external (all v6 addresses are external IPs) 3059 Ipv6AccessType string `json:"ipv6AccessType,omitempty"` 3060 // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block. 3061 NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` 3062 // NodeIpv4CidrBlock: The IP address range of the instance IPs in this cluster. 3063 // This is applicable only if `create_subnetwork` is true. Set to blank to have 3064 // a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a 3065 // range chosen with a specific netmask. Set to a CIDR 3066 // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. 3067 // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, 3068 // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. 3069 NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"` 3070 // PodCidrOverprovisionConfig: [PRIVATE FIELD] Pod CIDR size overprovisioning 3071 // config for the cluster. Pod CIDR size per node depends on max_pods_per_node. 3072 // By default, the value of max_pods_per_node is doubled and then rounded off 3073 // to next power of 2 to get the size of pod CIDR block per node. Example: 3074 // max_pods_per_node of 30 would result in 64 IPs (/26). This config can 3075 // disable the doubling of IPs (we still round off to next power of 2) Example: 3076 // max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is 3077 // disabled. 3078 PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `json:"podCidrOverprovisionConfig,omitempty"` 3079 // ServicesIpv4Cidr: This field is deprecated, use services_ipv4_cidr_block. 3080 ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` 3081 // ServicesIpv4CidrBlock: The IP address range of the services IPs in this 3082 // cluster. If blank, a range will be automatically chosen with the default 3083 // size. This field is only applicable when `use_ip_aliases` is true. Set to 3084 // blank to have a range chosen with the default size. Set to /netmask (e.g. 3085 // `/14`) to have a range chosen with a specific netmask. Set to a CIDR 3086 // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. 3087 // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, 3088 // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. 3089 ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` 3090 // ServicesIpv6CidrBlock: Output only. [Output only] The services IPv6 CIDR 3091 // block for the cluster. 3092 ServicesIpv6CidrBlock string `json:"servicesIpv6CidrBlock,omitempty"` 3093 // ServicesSecondaryRangeName: The name of the secondary range to be used as 3094 // for the services CIDR block. The secondary range will be used for service 3095 // ClusterIPs. This must be an existing secondary range associated with the 3096 // cluster subnetwork. This field is only applicable with use_ip_aliases and 3097 // create_subnetwork is false. 3098 ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` 3099 // StackType: IP stack type 3100 // 3101 // Possible values: 3102 // "STACK_TYPE_UNSPECIFIED" - By default, the clusters will be IPV4 only 3103 // "IPV4" - The value used if the cluster is a IPV4 only 3104 // "IPV4_IPV6" - The value used if the cluster is a dual stack cluster 3105 StackType string `json:"stackType,omitempty"` 3106 // SubnetIpv6CidrBlock: Output only. [Output only] The subnet's IPv6 CIDR block 3107 // used by nodes and pods. 3108 SubnetIpv6CidrBlock string `json:"subnetIpv6CidrBlock,omitempty"` 3109 // SubnetworkName: A custom subnetwork name to be used if `create_subnetwork` 3110 // is true. If this field is empty, then an automatic name will be chosen for 3111 // the new subnetwork. 3112 SubnetworkName string `json:"subnetworkName,omitempty"` 3113 // TpuIpv4CidrBlock: The IP address range of the Cloud TPUs in this cluster. If 3114 // unspecified, a range will be automatically chosen with the default size. 3115 // This field is only applicable when `use_ip_aliases` is true. If unspecified, 3116 // the range will use the default size. Set to /netmask (e.g. `/14`) to have a 3117 // range chosen with a specific netmask. Set to a CIDR 3118 // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. 3119 // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, 3120 // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. This 3121 // field is deprecated, use cluster.tpu_config.ipv4_cidr_block instead. 3122 TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` 3123 // UseIpAliases: Whether alias IPs will be used for pod IPs in the cluster. 3124 // This is used in conjunction with use_routes. It cannot be true if use_routes 3125 // is true. If both use_ip_aliases and use_routes are false, then the server 3126 // picks the default IP allocation mode 3127 UseIpAliases bool `json:"useIpAliases,omitempty"` 3128 // UseRoutes: Whether routes will be used for pod IPs in the cluster. This is 3129 // used in conjunction with use_ip_aliases. It cannot be true if use_ip_aliases 3130 // is true. If both use_ip_aliases and use_routes are false, then the server 3131 // picks the default IP allocation mode 3132 UseRoutes bool `json:"useRoutes,omitempty"` 3133 // ForceSendFields is a list of field names (e.g. "AdditionalPodRangesConfig") 3134 // to unconditionally include in API requests. By default, fields with empty or 3135 // default values are omitted from API requests. See 3136 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3137 // details. 3138 ForceSendFields []string `json:"-"` 3139 // NullFields is a list of field names (e.g. "AdditionalPodRangesConfig") to 3140 // include in API requests with the JSON null value. By default, fields with 3141 // empty values are omitted from API requests. See 3142 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3143 NullFields []string `json:"-"` 3144 } 3145 3146 func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { 3147 type NoMethod IPAllocationPolicy 3148 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3149 } 3150 3151 func (s *IPAllocationPolicy) UnmarshalJSON(data []byte) error { 3152 type NoMethod IPAllocationPolicy 3153 var s1 struct { 3154 DefaultPodIpv4RangeUtilization gensupport.JSONFloat64 `json:"defaultPodIpv4RangeUtilization"` 3155 *NoMethod 3156 } 3157 s1.NoMethod = (*NoMethod)(s) 3158 if err := json.Unmarshal(data, &s1); err != nil { 3159 return err 3160 } 3161 s.DefaultPodIpv4RangeUtilization = float64(s1.DefaultPodIpv4RangeUtilization) 3162 return nil 3163 } 3164 3165 // IdentityServiceConfig: IdentityServiceConfig is configuration for Identity 3166 // Service which allows customers to use external identity providers with the 3167 // K8S API 3168 type IdentityServiceConfig struct { 3169 // Enabled: Whether to enable the Identity Service component 3170 Enabled bool `json:"enabled,omitempty"` 3171 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 3172 // include in API requests. By default, fields with empty or default values are 3173 // omitted from API requests. See 3174 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3175 // details. 3176 ForceSendFields []string `json:"-"` 3177 // NullFields is a list of field names (e.g. "Enabled") to include in API 3178 // requests with the JSON null value. By default, fields with empty values are 3179 // omitted from API requests. See 3180 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3181 NullFields []string `json:"-"` 3182 } 3183 3184 func (s *IdentityServiceConfig) MarshalJSON() ([]byte, error) { 3185 type NoMethod IdentityServiceConfig 3186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3187 } 3188 3189 // IntraNodeVisibilityConfig: IntraNodeVisibilityConfig contains the desired 3190 // config of the intra-node visibility on this cluster. 3191 type IntraNodeVisibilityConfig struct { 3192 // Enabled: Enables intra node visibility for this cluster. 3193 Enabled bool `json:"enabled,omitempty"` 3194 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 3195 // include in API requests. By default, fields with empty or default values are 3196 // omitted from API requests. See 3197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3198 // details. 3199 ForceSendFields []string `json:"-"` 3200 // NullFields is a list of field names (e.g. "Enabled") to include in API 3201 // requests with the JSON null value. By default, fields with empty values are 3202 // omitted from API requests. See 3203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3204 NullFields []string `json:"-"` 3205 } 3206 3207 func (s *IntraNodeVisibilityConfig) MarshalJSON() ([]byte, error) { 3208 type NoMethod IntraNodeVisibilityConfig 3209 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3210 } 3211 3212 // IstioConfig: Configuration options for Istio addon. 3213 type IstioConfig struct { 3214 // Auth: The specified Istio auth mode, either none, or mutual TLS. 3215 // 3216 // Possible values: 3217 // "AUTH_NONE" - auth not enabled 3218 // "AUTH_MUTUAL_TLS" - auth mutual TLS enabled 3219 Auth string `json:"auth,omitempty"` 3220 // Disabled: Whether Istio is enabled for this cluster. 3221 Disabled bool `json:"disabled,omitempty"` 3222 // ForceSendFields is a list of field names (e.g. "Auth") to unconditionally 3223 // include in API requests. By default, fields with empty or default values are 3224 // omitted from API requests. See 3225 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3226 // details. 3227 ForceSendFields []string `json:"-"` 3228 // NullFields is a list of field names (e.g. "Auth") to include in API requests 3229 // with the JSON null value. By default, fields with empty values are omitted 3230 // from API requests. See 3231 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3232 NullFields []string `json:"-"` 3233 } 3234 3235 func (s *IstioConfig) MarshalJSON() ([]byte, error) { 3236 type NoMethod IstioConfig 3237 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3238 } 3239 3240 // Jwk: Jwk is a JSON Web Key as specified in RFC 7517 3241 type Jwk struct { 3242 // Alg: Algorithm. 3243 Alg string `json:"alg,omitempty"` 3244 // Crv: Used for ECDSA keys. 3245 Crv string `json:"crv,omitempty"` 3246 // E: Used for RSA keys. 3247 E string `json:"e,omitempty"` 3248 // Kid: Key ID. 3249 Kid string `json:"kid,omitempty"` 3250 // Kty: Key Type. 3251 Kty string `json:"kty,omitempty"` 3252 // N: Used for RSA keys. 3253 N string `json:"n,omitempty"` 3254 // Use: Permitted uses for the public keys. 3255 Use string `json:"use,omitempty"` 3256 // X: Used for ECDSA keys. 3257 X string `json:"x,omitempty"` 3258 // Y: Used for ECDSA keys. 3259 Y string `json:"y,omitempty"` 3260 // ForceSendFields is a list of field names (e.g. "Alg") to unconditionally 3261 // include in API requests. By default, fields with empty or default values are 3262 // omitted from API requests. See 3263 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3264 // details. 3265 ForceSendFields []string `json:"-"` 3266 // NullFields is a list of field names (e.g. "Alg") to include in API requests 3267 // with the JSON null value. By default, fields with empty values are omitted 3268 // from API requests. See 3269 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3270 NullFields []string `json:"-"` 3271 } 3272 3273 func (s *Jwk) MarshalJSON() ([]byte, error) { 3274 type NoMethod Jwk 3275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3276 } 3277 3278 // K8sBetaAPIConfig: Kubernetes open source beta apis enabled on the cluster. 3279 type K8sBetaAPIConfig struct { 3280 // EnabledApis: api name, e.g. storage.k8s.io/v1beta1/csistoragecapacities. 3281 EnabledApis []string `json:"enabledApis,omitempty"` 3282 // ForceSendFields is a list of field names (e.g. "EnabledApis") to 3283 // unconditionally include in API requests. By default, fields with empty or 3284 // default values are omitted from API requests. See 3285 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3286 // details. 3287 ForceSendFields []string `json:"-"` 3288 // NullFields is a list of field names (e.g. "EnabledApis") to include in API 3289 // requests with the JSON null value. By default, fields with empty values are 3290 // omitted from API requests. See 3291 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3292 NullFields []string `json:"-"` 3293 } 3294 3295 func (s *K8sBetaAPIConfig) MarshalJSON() ([]byte, error) { 3296 type NoMethod K8sBetaAPIConfig 3297 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3298 } 3299 3300 // KalmConfig: Configuration options for the KALM addon. 3301 type KalmConfig struct { 3302 // Enabled: Whether KALM is enabled for this cluster. 3303 Enabled bool `json:"enabled,omitempty"` 3304 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 3305 // include in API requests. By default, fields with empty or default values are 3306 // omitted from API requests. See 3307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3308 // details. 3309 ForceSendFields []string `json:"-"` 3310 // NullFields is a list of field names (e.g. "Enabled") to include in API 3311 // requests with the JSON null value. By default, fields with empty values are 3312 // omitted from API requests. See 3313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3314 NullFields []string `json:"-"` 3315 } 3316 3317 func (s *KalmConfig) MarshalJSON() ([]byte, error) { 3318 type NoMethod KalmConfig 3319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3320 } 3321 3322 // KubernetesDashboard: Configuration for the Kubernetes Dashboard. 3323 type KubernetesDashboard struct { 3324 // Disabled: Whether the Kubernetes Dashboard is enabled for this cluster. 3325 Disabled bool `json:"disabled,omitempty"` 3326 // ForceSendFields is a list of field names (e.g. "Disabled") to 3327 // unconditionally include in API requests. By default, fields with empty or 3328 // default values are omitted from API requests. See 3329 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3330 // details. 3331 ForceSendFields []string `json:"-"` 3332 // NullFields is a list of field names (e.g. "Disabled") to include in API 3333 // requests with the JSON null value. By default, fields with empty values are 3334 // omitted from API requests. See 3335 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3336 NullFields []string `json:"-"` 3337 } 3338 3339 func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) { 3340 type NoMethod KubernetesDashboard 3341 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3342 } 3343 3344 // LegacyAbac: Configuration for the legacy Attribute Based Access Control 3345 // authorization mode. 3346 type LegacyAbac struct { 3347 // Enabled: Whether the ABAC authorizer is enabled for this cluster. When 3348 // enabled, identities in the system, including service accounts, nodes, and 3349 // controllers, will have statically granted permissions beyond those provided 3350 // by the RBAC configuration or IAM. 3351 Enabled bool `json:"enabled,omitempty"` 3352 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 3353 // include in API requests. By default, fields with empty or default values are 3354 // omitted from API requests. See 3355 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3356 // details. 3357 ForceSendFields []string `json:"-"` 3358 // NullFields is a list of field names (e.g. "Enabled") to include in API 3359 // requests with the JSON null value. By default, fields with empty values are 3360 // omitted from API requests. See 3361 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3362 NullFields []string `json:"-"` 3363 } 3364 3365 func (s *LegacyAbac) MarshalJSON() ([]byte, error) { 3366 type NoMethod LegacyAbac 3367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3368 } 3369 3370 // LinuxNodeConfig: Parameters that can be configured on Linux nodes. 3371 type LinuxNodeConfig struct { 3372 // CgroupMode: cgroup_mode specifies the cgroup mode to be used on the node. 3373 // 3374 // Possible values: 3375 // "CGROUP_MODE_UNSPECIFIED" - CGROUP_MODE_UNSPECIFIED is when unspecified 3376 // cgroup configuration is used. The default for the GKE node OS image will be 3377 // used. 3378 // "CGROUP_MODE_V1" - CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup 3379 // configuration on the node image. 3380 // "CGROUP_MODE_V2" - CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup 3381 // configuration on the node image. 3382 CgroupMode string `json:"cgroupMode,omitempty"` 3383 // Hugepages: Optional. Amounts for 2M and 1G hugepages 3384 Hugepages *HugepagesConfig `json:"hugepages,omitempty"` 3385 // Sysctls: The Linux kernel parameters to be applied to the nodes and all pods 3386 // running on the nodes. The following parameters are supported. 3387 // net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog 3388 // net.core.rmem_max net.core.wmem_default net.core.wmem_max 3389 // net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem 3390 // net.ipv4.tcp_tw_reuse 3391 Sysctls map[string]string `json:"sysctls,omitempty"` 3392 // ForceSendFields is a list of field names (e.g. "CgroupMode") to 3393 // unconditionally include in API requests. By default, fields with empty or 3394 // default values are omitted from API requests. See 3395 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3396 // details. 3397 ForceSendFields []string `json:"-"` 3398 // NullFields is a list of field names (e.g. "CgroupMode") to include in API 3399 // requests with the JSON null value. By default, fields with empty values are 3400 // omitted from API requests. See 3401 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3402 NullFields []string `json:"-"` 3403 } 3404 3405 func (s *LinuxNodeConfig) MarshalJSON() ([]byte, error) { 3406 type NoMethod LinuxNodeConfig 3407 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3408 } 3409 3410 // ListClustersResponse: ListClustersResponse is the result of 3411 // ListClustersRequest. 3412 type ListClustersResponse struct { 3413 // Clusters: A list of clusters in the project in the specified zone, or across 3414 // all ones. 3415 Clusters []*Cluster `json:"clusters,omitempty"` 3416 // MissingZones: If any zones are listed here, the list of clusters returned 3417 // may be missing those zones. 3418 MissingZones []string `json:"missingZones,omitempty"` 3419 3420 // ServerResponse contains the HTTP response code and headers from the server. 3421 googleapi.ServerResponse `json:"-"` 3422 // ForceSendFields is a list of field names (e.g. "Clusters") to 3423 // unconditionally include in API requests. By default, fields with empty or 3424 // default values are omitted from API requests. See 3425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3426 // details. 3427 ForceSendFields []string `json:"-"` 3428 // NullFields is a list of field names (e.g. "Clusters") to include in API 3429 // requests with the JSON null value. By default, fields with empty values are 3430 // omitted from API requests. See 3431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3432 NullFields []string `json:"-"` 3433 } 3434 3435 func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { 3436 type NoMethod ListClustersResponse 3437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3438 } 3439 3440 // ListLocationsResponse: ListLocationsResponse returns the list of all GKE 3441 // locations and their recommendation state. 3442 type ListLocationsResponse struct { 3443 // Locations: A full list of GKE locations. 3444 Locations []*Location `json:"locations,omitempty"` 3445 // NextPageToken: Only return ListLocationsResponse that occur after the 3446 // page_token. This value should be populated from the 3447 // ListLocationsResponse.next_page_token if that response token was set (which 3448 // happens when listing more Locations than fit in a single 3449 // ListLocationsResponse). 3450 NextPageToken string `json:"nextPageToken,omitempty"` 3451 3452 // ServerResponse contains the HTTP response code and headers from the server. 3453 googleapi.ServerResponse `json:"-"` 3454 // ForceSendFields is a list of field names (e.g. "Locations") to 3455 // unconditionally include in API requests. By default, fields with empty or 3456 // default values are omitted from API requests. See 3457 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3458 // details. 3459 ForceSendFields []string `json:"-"` 3460 // NullFields is a list of field names (e.g. "Locations") to include in API 3461 // requests with the JSON null value. By default, fields with empty values are 3462 // omitted from API requests. See 3463 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3464 NullFields []string `json:"-"` 3465 } 3466 3467 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 3468 type NoMethod ListLocationsResponse 3469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3470 } 3471 3472 // ListNodePoolsResponse: ListNodePoolsResponse is the result of 3473 // ListNodePoolsRequest. 3474 type ListNodePoolsResponse struct { 3475 // NodePools: A list of node pools for a cluster. 3476 NodePools []*NodePool `json:"nodePools,omitempty"` 3477 3478 // ServerResponse contains the HTTP response code and headers from the server. 3479 googleapi.ServerResponse `json:"-"` 3480 // ForceSendFields is a list of field names (e.g. "NodePools") to 3481 // unconditionally include in API requests. By default, fields with empty or 3482 // default values are omitted from API requests. See 3483 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3484 // details. 3485 ForceSendFields []string `json:"-"` 3486 // NullFields is a list of field names (e.g. "NodePools") to include in API 3487 // requests with the JSON null value. By default, fields with empty values are 3488 // omitted from API requests. See 3489 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3490 NullFields []string `json:"-"` 3491 } 3492 3493 func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { 3494 type NoMethod ListNodePoolsResponse 3495 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3496 } 3497 3498 // ListOperationsResponse: ListOperationsResponse is the result of 3499 // ListOperationsRequest. 3500 type ListOperationsResponse struct { 3501 // MissingZones: If any zones are listed here, the list of operations returned 3502 // may be missing the operations from those zones. 3503 MissingZones []string `json:"missingZones,omitempty"` 3504 // Operations: A list of operations in the project in the specified zone. 3505 Operations []*Operation `json:"operations,omitempty"` 3506 3507 // ServerResponse contains the HTTP response code and headers from the server. 3508 googleapi.ServerResponse `json:"-"` 3509 // ForceSendFields is a list of field names (e.g. "MissingZones") to 3510 // unconditionally include in API requests. By default, fields with empty or 3511 // default values are omitted from API requests. See 3512 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3513 // details. 3514 ForceSendFields []string `json:"-"` 3515 // NullFields is a list of field names (e.g. "MissingZones") to include in API 3516 // requests with the JSON null value. By default, fields with empty values are 3517 // omitted from API requests. See 3518 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3519 NullFields []string `json:"-"` 3520 } 3521 3522 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 3523 type NoMethod ListOperationsResponse 3524 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3525 } 3526 3527 // ListUsableSubnetworksResponse: ListUsableSubnetworksResponse is the response 3528 // of ListUsableSubnetworksRequest. 3529 type ListUsableSubnetworksResponse struct { 3530 // NextPageToken: This token allows you to get the next page of results for 3531 // list requests. If the number of results is larger than `page_size`, use the 3532 // `next_page_token` as a value for the query parameter `page_token` in the 3533 // next request. The value will become empty when there are no more pages. 3534 NextPageToken string `json:"nextPageToken,omitempty"` 3535 // Subnetworks: A list of usable subnetworks in the specified network project. 3536 Subnetworks []*UsableSubnetwork `json:"subnetworks,omitempty"` 3537 3538 // ServerResponse contains the HTTP response code and headers from the server. 3539 googleapi.ServerResponse `json:"-"` 3540 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3541 // unconditionally include in API requests. By default, fields with empty or 3542 // default values are omitted from API requests. See 3543 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3544 // details. 3545 ForceSendFields []string `json:"-"` 3546 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 3547 // requests with the JSON null value. By default, fields with empty values are 3548 // omitted from API requests. See 3549 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3550 NullFields []string `json:"-"` 3551 } 3552 3553 func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { 3554 type NoMethod ListUsableSubnetworksResponse 3555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3556 } 3557 3558 // LocalNvmeSsdBlockConfig: LocalNvmeSsdBlockConfig contains configuration for 3559 // using raw-block local NVMe SSDs 3560 type LocalNvmeSsdBlockConfig struct { 3561 // LocalSsdCount: Number of local NVMe SSDs to use. The limit for this value is 3562 // dependent upon the maximum number of disk available on a machine per zone. 3563 // See: https://cloud.google.com/compute/docs/disks/local-ssd for more 3564 // information. A zero (or unset) value has different meanings depending on 3565 // machine type being used: 1. For pre-Gen3 machines, which support flexible 3566 // numbers of local ssds, zero (or unset) means to disable using local SSDs as 3567 // ephemeral storage. 2. For Gen3 machines which dictate a specific number of 3568 // local ssds, zero (or unset) means to use the default number of local ssds 3569 // that goes with that machine type. For example, for a c3-standard-8-lssd 3570 // machine, 2 local ssds would be provisioned. For c3-standard-8 (which doesn't 3571 // support local ssds), 0 will be provisioned. See 3572 // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds 3573 // for more info. 3574 LocalSsdCount int64 `json:"localSsdCount,omitempty"` 3575 // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to 3576 // unconditionally include in API requests. By default, fields with empty or 3577 // default values are omitted from API requests. See 3578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3579 // details. 3580 ForceSendFields []string `json:"-"` 3581 // NullFields is a list of field names (e.g. "LocalSsdCount") to include in API 3582 // requests with the JSON null value. By default, fields with empty values are 3583 // omitted from API requests. See 3584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3585 NullFields []string `json:"-"` 3586 } 3587 3588 func (s *LocalNvmeSsdBlockConfig) MarshalJSON() ([]byte, error) { 3589 type NoMethod LocalNvmeSsdBlockConfig 3590 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3591 } 3592 3593 // Location: Location returns the location name, and if the location is 3594 // recommended for GKE cluster scheduling. 3595 type Location struct { 3596 // Name: Contains the name of the resource requested. Specified in the format 3597 // `projects/*/locations/*`. 3598 Name string `json:"name,omitempty"` 3599 // Recommended: Whether the location is recommended for GKE cluster scheduling. 3600 Recommended bool `json:"recommended,omitempty"` 3601 // Type: Contains the type of location this Location is for. Regional or Zonal. 3602 // 3603 // Possible values: 3604 // "LOCATION_TYPE_UNSPECIFIED" - LOCATION_TYPE_UNSPECIFIED means the location 3605 // type was not determined. 3606 // "ZONE" - A GKE Location where Zonal clusters can be created. 3607 // "REGION" - A GKE Location where Regional clusters can be created. 3608 Type string `json:"type,omitempty"` 3609 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 3610 // include in API requests. By default, fields with empty or default values are 3611 // omitted from API requests. See 3612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3613 // details. 3614 ForceSendFields []string `json:"-"` 3615 // NullFields is a list of field names (e.g. "Name") to include in API requests 3616 // with the JSON null value. By default, fields with empty values are omitted 3617 // from API requests. See 3618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3619 NullFields []string `json:"-"` 3620 } 3621 3622 func (s *Location) MarshalJSON() ([]byte, error) { 3623 type NoMethod Location 3624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3625 } 3626 3627 // LoggingComponentConfig: LoggingComponentConfig is cluster logging component 3628 // configuration. 3629 type LoggingComponentConfig struct { 3630 // EnableComponents: Select components to collect logs. An empty set would 3631 // disable all logging. 3632 // 3633 // Possible values: 3634 // "COMPONENT_UNSPECIFIED" - Default value. This shouldn't be used. 3635 // "SYSTEM_COMPONENTS" - system components 3636 // "WORKLOADS" - workloads 3637 // "APISERVER" - kube-apiserver 3638 // "SCHEDULER" - kube-scheduler 3639 // "CONTROLLER_MANAGER" - kube-controller-manager 3640 EnableComponents []string `json:"enableComponents,omitempty"` 3641 // ForceSendFields is a list of field names (e.g. "EnableComponents") to 3642 // unconditionally include in API requests. By default, fields with empty or 3643 // default values are omitted from API requests. See 3644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3645 // details. 3646 ForceSendFields []string `json:"-"` 3647 // NullFields is a list of field names (e.g. "EnableComponents") to include in 3648 // API requests with the JSON null value. By default, fields with empty values 3649 // are omitted from API requests. See 3650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3651 NullFields []string `json:"-"` 3652 } 3653 3654 func (s *LoggingComponentConfig) MarshalJSON() ([]byte, error) { 3655 type NoMethod LoggingComponentConfig 3656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3657 } 3658 3659 // LoggingConfig: LoggingConfig is cluster logging configuration. 3660 type LoggingConfig struct { 3661 // ComponentConfig: Logging components configuration 3662 ComponentConfig *LoggingComponentConfig `json:"componentConfig,omitempty"` 3663 // ForceSendFields is a list of field names (e.g. "ComponentConfig") to 3664 // unconditionally include in API requests. By default, fields with empty or 3665 // default values are omitted from API requests. See 3666 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3667 // details. 3668 ForceSendFields []string `json:"-"` 3669 // NullFields is a list of field names (e.g. "ComponentConfig") to include in 3670 // API requests with the JSON null value. By default, fields with empty values 3671 // are omitted from API requests. See 3672 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3673 NullFields []string `json:"-"` 3674 } 3675 3676 func (s *LoggingConfig) MarshalJSON() ([]byte, error) { 3677 type NoMethod LoggingConfig 3678 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3679 } 3680 3681 // LoggingVariantConfig: LoggingVariantConfig specifies the behaviour of the 3682 // logging component. 3683 type LoggingVariantConfig struct { 3684 // Variant: Logging variant deployed on nodes. 3685 // 3686 // Possible values: 3687 // "VARIANT_UNSPECIFIED" - Default value. This shouldn't be used. 3688 // "DEFAULT" - default logging variant. 3689 // "MAX_THROUGHPUT" - maximum logging throughput variant. 3690 Variant string `json:"variant,omitempty"` 3691 // ForceSendFields is a list of field names (e.g. "Variant") to unconditionally 3692 // include in API requests. By default, fields with empty or default values are 3693 // omitted from API requests. See 3694 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3695 // details. 3696 ForceSendFields []string `json:"-"` 3697 // NullFields is a list of field names (e.g. "Variant") to include in API 3698 // requests with the JSON null value. By default, fields with empty values are 3699 // omitted from API requests. See 3700 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3701 NullFields []string `json:"-"` 3702 } 3703 3704 func (s *LoggingVariantConfig) MarshalJSON() ([]byte, error) { 3705 type NoMethod LoggingVariantConfig 3706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3707 } 3708 3709 // MaintenanceExclusionOptions: Represents the Maintenance exclusion option. 3710 type MaintenanceExclusionOptions struct { 3711 // Scope: Scope specifies the upgrade scope which upgrades are blocked by the 3712 // exclusion. 3713 // 3714 // Possible values: 3715 // "NO_UPGRADES" - NO_UPGRADES excludes all upgrades, including patch 3716 // upgrades and minor upgrades across control planes and nodes. This is the 3717 // default exclusion behavior. 3718 // "NO_MINOR_UPGRADES" - NO_MINOR_UPGRADES excludes all minor upgrades for 3719 // the cluster, only patches are allowed. 3720 // "NO_MINOR_OR_NODE_UPGRADES" - NO_MINOR_OR_NODE_UPGRADES excludes all minor 3721 // upgrades for the cluster, and also exclude all node pool upgrades. Only 3722 // control plane patches are allowed. 3723 Scope string `json:"scope,omitempty"` 3724 // ForceSendFields is a list of field names (e.g. "Scope") to unconditionally 3725 // include in API requests. By default, fields with empty or default values are 3726 // omitted from API requests. See 3727 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3728 // details. 3729 ForceSendFields []string `json:"-"` 3730 // NullFields is a list of field names (e.g. "Scope") to include in API 3731 // requests with the JSON null value. By default, fields with empty values are 3732 // omitted from API requests. See 3733 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3734 NullFields []string `json:"-"` 3735 } 3736 3737 func (s *MaintenanceExclusionOptions) MarshalJSON() ([]byte, error) { 3738 type NoMethod MaintenanceExclusionOptions 3739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3740 } 3741 3742 // MaintenancePolicy: MaintenancePolicy defines the maintenance policy to be 3743 // used for the cluster. 3744 type MaintenancePolicy struct { 3745 // ResourceVersion: A hash identifying the version of this policy, so that 3746 // updates to fields of the policy won't accidentally undo intermediate changes 3747 // (and so that users of the API unaware of some fields won't accidentally 3748 // remove other fields). Make a `get()` request to the cluster to get the 3749 // current resource version and include it with requests to set the policy. 3750 ResourceVersion string `json:"resourceVersion,omitempty"` 3751 // Window: Specifies the maintenance window in which maintenance may be 3752 // performed. 3753 Window *MaintenanceWindow `json:"window,omitempty"` 3754 // ForceSendFields is a list of field names (e.g. "ResourceVersion") to 3755 // unconditionally include in API requests. By default, fields with empty or 3756 // default values are omitted from API requests. See 3757 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3758 // details. 3759 ForceSendFields []string `json:"-"` 3760 // NullFields is a list of field names (e.g. "ResourceVersion") to include in 3761 // API requests with the JSON null value. By default, fields with empty values 3762 // are omitted from API requests. See 3763 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3764 NullFields []string `json:"-"` 3765 } 3766 3767 func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { 3768 type NoMethod MaintenancePolicy 3769 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3770 } 3771 3772 // MaintenanceWindow: MaintenanceWindow defines the maintenance window to be 3773 // used for the cluster. 3774 type MaintenanceWindow struct { 3775 // DailyMaintenanceWindow: DailyMaintenanceWindow specifies a daily maintenance 3776 // operation window. 3777 DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"` 3778 // MaintenanceExclusions: Exceptions to maintenance window. Non-emergency 3779 // maintenance should not occur in these windows. 3780 MaintenanceExclusions map[string]TimeWindow `json:"maintenanceExclusions,omitempty"` 3781 // RecurringWindow: RecurringWindow specifies some number of recurring time 3782 // periods for maintenance to occur. The time windows may be overlapping. If no 3783 // maintenance windows are set, maintenance can occur at any time. 3784 RecurringWindow *RecurringTimeWindow `json:"recurringWindow,omitempty"` 3785 // ForceSendFields is a list of field names (e.g. "DailyMaintenanceWindow") to 3786 // unconditionally include in API requests. By default, fields with empty or 3787 // default values are omitted from API requests. See 3788 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3789 // details. 3790 ForceSendFields []string `json:"-"` 3791 // NullFields is a list of field names (e.g. "DailyMaintenanceWindow") to 3792 // include in API requests with the JSON null value. By default, fields with 3793 // empty values are omitted from API requests. See 3794 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3795 NullFields []string `json:"-"` 3796 } 3797 3798 func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { 3799 type NoMethod MaintenanceWindow 3800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3801 } 3802 3803 // ManagedPrometheusConfig: ManagedPrometheusConfig defines the configuration 3804 // for Google Cloud Managed Service for Prometheus. 3805 type ManagedPrometheusConfig struct { 3806 // Enabled: Enable Managed Collection. 3807 Enabled bool `json:"enabled,omitempty"` 3808 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 3809 // include in API requests. By default, fields with empty or default values are 3810 // omitted from API requests. See 3811 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3812 // details. 3813 ForceSendFields []string `json:"-"` 3814 // NullFields is a list of field names (e.g. "Enabled") to include in API 3815 // requests with the JSON null value. By default, fields with empty values are 3816 // omitted from API requests. See 3817 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3818 NullFields []string `json:"-"` 3819 } 3820 3821 func (s *ManagedPrometheusConfig) MarshalJSON() ([]byte, error) { 3822 type NoMethod ManagedPrometheusConfig 3823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3824 } 3825 3826 // Master: Master is the configuration for components on master. 3827 type Master struct { 3828 } 3829 3830 // MasterAuth: The authentication information for accessing the master 3831 // endpoint. Authentication can be done using HTTP basic auth or using client 3832 // certificates. 3833 type MasterAuth struct { 3834 // ClientCertificate: [Output only] Base64-encoded public certificate used by 3835 // clients to authenticate to the cluster endpoint. 3836 ClientCertificate string `json:"clientCertificate,omitempty"` 3837 // ClientCertificateConfig: Configuration for client certificate authentication 3838 // on the cluster. For clusters before v1.12, if no configuration is specified, 3839 // a client certificate is issued. 3840 ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` 3841 // ClientKey: [Output only] Base64-encoded private key used by clients to 3842 // authenticate to the cluster endpoint. 3843 ClientKey string `json:"clientKey,omitempty"` 3844 ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` 3845 // Password: The password to use for HTTP basic authentication to the master 3846 // endpoint. Because the master endpoint is open to the Internet, you should 3847 // create a strong password. If a password is provided for cluster creation, 3848 // username must be non-empty. Warning: basic authentication is deprecated, and 3849 // will be removed in GKE control plane versions 1.19 and newer. For a list of 3850 // recommended authentication methods, see: 3851 // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication 3852 Password string `json:"password,omitempty"` 3853 // Username: The username to use for HTTP basic authentication to the master 3854 // endpoint. For clusters v1.6.0 and later, basic authentication can be 3855 // disabled by leaving username unspecified (or setting it to the empty 3856 // string). Warning: basic authentication is deprecated, and will be removed in 3857 // GKE control plane versions 1.19 and newer. For a list of recommended 3858 // authentication methods, see: 3859 // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication 3860 Username string `json:"username,omitempty"` 3861 // ForceSendFields is a list of field names (e.g. "ClientCertificate") to 3862 // unconditionally include in API requests. By default, fields with empty or 3863 // default values are omitted from API requests. See 3864 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3865 // details. 3866 ForceSendFields []string `json:"-"` 3867 // NullFields is a list of field names (e.g. "ClientCertificate") to include in 3868 // API requests with the JSON null value. By default, fields with empty values 3869 // are omitted from API requests. See 3870 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3871 NullFields []string `json:"-"` 3872 } 3873 3874 func (s *MasterAuth) MarshalJSON() ([]byte, error) { 3875 type NoMethod MasterAuth 3876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3877 } 3878 3879 // MasterAuthorizedNetworksConfig: Configuration options for the master 3880 // authorized networks feature. Enabled master authorized networks will 3881 // disallow all external traffic to access Kubernetes master through HTTPS 3882 // except traffic from the given CIDR blocks, Google Compute Engine Public IPs 3883 // and Google Prod IPs. 3884 type MasterAuthorizedNetworksConfig struct { 3885 // CidrBlocks: cidr_blocks define up to 10 external networks that could access 3886 // Kubernetes master through HTTPS. 3887 CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"` 3888 // Enabled: Whether or not master authorized networks is enabled. 3889 Enabled bool `json:"enabled,omitempty"` 3890 // GcpPublicCidrsAccessEnabled: Whether master is accessbile via Google Compute 3891 // Engine Public IP addresses. 3892 GcpPublicCidrsAccessEnabled bool `json:"gcpPublicCidrsAccessEnabled,omitempty"` 3893 // ForceSendFields is a list of field names (e.g. "CidrBlocks") to 3894 // unconditionally include in API requests. By default, fields with empty or 3895 // default values are omitted from API requests. See 3896 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3897 // details. 3898 ForceSendFields []string `json:"-"` 3899 // NullFields is a list of field names (e.g. "CidrBlocks") to include in API 3900 // requests with the JSON null value. By default, fields with empty values are 3901 // omitted from API requests. See 3902 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3903 NullFields []string `json:"-"` 3904 } 3905 3906 func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { 3907 type NoMethod MasterAuthorizedNetworksConfig 3908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3909 } 3910 3911 // MaxPodsConstraint: Constraints applied to pods. 3912 type MaxPodsConstraint struct { 3913 // MaxPodsPerNode: Constraint enforced on the max num of pods per node. 3914 MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"` 3915 // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to 3916 // unconditionally include in API requests. By default, fields with empty or 3917 // default values are omitted from API requests. See 3918 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3919 // details. 3920 ForceSendFields []string `json:"-"` 3921 // NullFields is a list of field names (e.g. "MaxPodsPerNode") to include in 3922 // API requests with the JSON null value. By default, fields with empty values 3923 // are omitted from API requests. See 3924 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3925 NullFields []string `json:"-"` 3926 } 3927 3928 func (s *MaxPodsConstraint) MarshalJSON() ([]byte, error) { 3929 type NoMethod MaxPodsConstraint 3930 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3931 } 3932 3933 // MeshCertificates: Configuration for issuance of mTLS keys and certificates 3934 // to Kubernetes pods. 3935 type MeshCertificates struct { 3936 // EnableCertificates: enable_certificates controls issuance of workload mTLS 3937 // certificates. If set, the GKE Workload Identity Certificates controller and 3938 // node agent will be deployed in the cluster, which can then be configured by 3939 // creating a WorkloadCertificateConfig Custom Resource. Requires Workload 3940 // Identity (workload_pool must be non-empty). 3941 EnableCertificates bool `json:"enableCertificates,omitempty"` 3942 // ForceSendFields is a list of field names (e.g. "EnableCertificates") to 3943 // unconditionally include in API requests. By default, fields with empty or 3944 // default values are omitted from API requests. See 3945 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3946 // details. 3947 ForceSendFields []string `json:"-"` 3948 // NullFields is a list of field names (e.g. "EnableCertificates") to include 3949 // in API requests with the JSON null value. By default, fields with empty 3950 // values are omitted from API requests. See 3951 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3952 NullFields []string `json:"-"` 3953 } 3954 3955 func (s *MeshCertificates) MarshalJSON() ([]byte, error) { 3956 type NoMethod MeshCertificates 3957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3958 } 3959 3960 // Metric: Progress metric is (string, int|float|string) pair. 3961 type Metric struct { 3962 // DoubleValue: For metrics with floating point value. 3963 DoubleValue float64 `json:"doubleValue,omitempty"` 3964 // IntValue: For metrics with integer value. 3965 IntValue int64 `json:"intValue,omitempty,string"` 3966 // Name: Required. Metric name, e.g., "nodes total", "percent done". 3967 Name string `json:"name,omitempty"` 3968 // StringValue: For metrics with custom values (ratios, visual progress, etc.). 3969 StringValue string `json:"stringValue,omitempty"` 3970 // ForceSendFields is a list of field names (e.g. "DoubleValue") to 3971 // unconditionally include in API requests. By default, fields with empty or 3972 // default values are omitted from API requests. See 3973 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3974 // details. 3975 ForceSendFields []string `json:"-"` 3976 // NullFields is a list of field names (e.g. "DoubleValue") to include in API 3977 // requests with the JSON null value. By default, fields with empty values are 3978 // omitted from API requests. See 3979 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3980 NullFields []string `json:"-"` 3981 } 3982 3983 func (s *Metric) MarshalJSON() ([]byte, error) { 3984 type NoMethod Metric 3985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3986 } 3987 3988 func (s *Metric) UnmarshalJSON(data []byte) error { 3989 type NoMethod Metric 3990 var s1 struct { 3991 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` 3992 *NoMethod 3993 } 3994 s1.NoMethod = (*NoMethod)(s) 3995 if err := json.Unmarshal(data, &s1); err != nil { 3996 return err 3997 } 3998 s.DoubleValue = float64(s1.DoubleValue) 3999 return nil 4000 } 4001 4002 // MonitoringComponentConfig: MonitoringComponentConfig is cluster monitoring 4003 // component configuration. 4004 type MonitoringComponentConfig struct { 4005 // EnableComponents: Select components to collect metrics. An empty set would 4006 // disable all monitoring. 4007 // 4008 // Possible values: 4009 // "COMPONENT_UNSPECIFIED" - Default value. This shouldn't be used. 4010 // "SYSTEM_COMPONENTS" - system components 4011 // "WORKLOADS" - Deprecated: Use Google Cloud Managed Service for Prometheus. 4012 // "APISERVER" - kube-apiserver 4013 // "SCHEDULER" - kube-scheduler 4014 // "CONTROLLER_MANAGER" - kube-controller-manager 4015 // "STORAGE" - Storage 4016 // "HPA" - Horizontal Pod Autoscaling 4017 // "POD" - Pod 4018 // "DAEMONSET" - DaemonSet 4019 // "DEPLOYMENT" - Deployment 4020 // "STATEFULSET" - Statefulset 4021 EnableComponents []string `json:"enableComponents,omitempty"` 4022 // ForceSendFields is a list of field names (e.g. "EnableComponents") to 4023 // unconditionally include in API requests. By default, fields with empty or 4024 // default values are omitted from API requests. See 4025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4026 // details. 4027 ForceSendFields []string `json:"-"` 4028 // NullFields is a list of field names (e.g. "EnableComponents") to include in 4029 // API requests with the JSON null value. By default, fields with empty values 4030 // are omitted from API requests. See 4031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4032 NullFields []string `json:"-"` 4033 } 4034 4035 func (s *MonitoringComponentConfig) MarshalJSON() ([]byte, error) { 4036 type NoMethod MonitoringComponentConfig 4037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4038 } 4039 4040 // MonitoringConfig: MonitoringConfig is cluster monitoring configuration. 4041 type MonitoringConfig struct { 4042 // AdvancedDatapathObservabilityConfig: Configuration of Advanced Datapath 4043 // Observability features. 4044 AdvancedDatapathObservabilityConfig *AdvancedDatapathObservabilityConfig `json:"advancedDatapathObservabilityConfig,omitempty"` 4045 // ComponentConfig: Monitoring components configuration 4046 ComponentConfig *MonitoringComponentConfig `json:"componentConfig,omitempty"` 4047 // ManagedPrometheusConfig: Enable Google Cloud Managed Service for Prometheus 4048 // in the cluster. 4049 ManagedPrometheusConfig *ManagedPrometheusConfig `json:"managedPrometheusConfig,omitempty"` 4050 // ForceSendFields is a list of field names (e.g. 4051 // "AdvancedDatapathObservabilityConfig") to unconditionally include in API 4052 // requests. By default, fields with empty or default values are omitted from 4053 // API requests. See 4054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4055 // details. 4056 ForceSendFields []string `json:"-"` 4057 // NullFields is a list of field names (e.g. 4058 // "AdvancedDatapathObservabilityConfig") to include in API requests with the 4059 // JSON null value. By default, fields with empty values are omitted from API 4060 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for 4061 // more details. 4062 NullFields []string `json:"-"` 4063 } 4064 4065 func (s *MonitoringConfig) MarshalJSON() ([]byte, error) { 4066 type NoMethod MonitoringConfig 4067 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4068 } 4069 4070 // NetworkConfig: NetworkConfig reports the relative names of network & 4071 // subnetwork. 4072 type NetworkConfig struct { 4073 // DatapathProvider: The desired datapath provider for this cluster. By 4074 // default, uses the IPTables-based kube-proxy implementation. 4075 // 4076 // Possible values: 4077 // "DATAPATH_PROVIDER_UNSPECIFIED" - Default value. 4078 // "LEGACY_DATAPATH" - Use the IPTables implementation based on kube-proxy. 4079 // "ADVANCED_DATAPATH" - Use the eBPF based GKE Dataplane V2 with additional 4080 // features. See the [GKE Dataplane V2 4081 // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/datapla 4082 // ne-v2) for more. 4083 DatapathProvider string `json:"datapathProvider,omitempty"` 4084 // DefaultSnatStatus: Whether the cluster disables default in-node sNAT rules. 4085 // In-node sNAT rules will be disabled when default_snat_status is disabled. 4086 // When disabled is set to false, default IP masquerade rules will be applied 4087 // to the nodes to prevent sNAT on cluster internal traffic. 4088 DefaultSnatStatus *DefaultSnatStatus `json:"defaultSnatStatus,omitempty"` 4089 // DnsConfig: DNSConfig contains clusterDNS config for this cluster. 4090 DnsConfig *DNSConfig `json:"dnsConfig,omitempty"` 4091 // EnableCiliumClusterwideNetworkPolicy: Whether CiliumClusterWideNetworkPolicy 4092 // is enabled on this cluster. 4093 EnableCiliumClusterwideNetworkPolicy bool `json:"enableCiliumClusterwideNetworkPolicy,omitempty"` 4094 // EnableFqdnNetworkPolicy: Whether FQDN Network Policy is enabled on this 4095 // cluster. 4096 EnableFqdnNetworkPolicy bool `json:"enableFqdnNetworkPolicy,omitempty"` 4097 // EnableIntraNodeVisibility: Whether Intra-node visibility is enabled for this 4098 // cluster. This makes same node pod to pod traffic visible for VPC network. 4099 EnableIntraNodeVisibility bool `json:"enableIntraNodeVisibility,omitempty"` 4100 // EnableL4ilbSubsetting: Whether L4ILB Subsetting is enabled for this cluster. 4101 EnableL4ilbSubsetting bool `json:"enableL4ilbSubsetting,omitempty"` 4102 // EnableMultiNetworking: Whether multi-networking is enabled for this cluster. 4103 EnableMultiNetworking bool `json:"enableMultiNetworking,omitempty"` 4104 // GatewayApiConfig: GatewayAPIConfig contains the desired config of Gateway 4105 // API on this cluster. 4106 GatewayApiConfig *GatewayAPIConfig `json:"gatewayApiConfig,omitempty"` 4107 // InTransitEncryptionConfig: Specify the details of in-transit encryption. 4108 // 4109 // Possible values: 4110 // "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" - Unspecified, will be inferred 4111 // as default - IN_TRANSIT_ENCRYPTION_UNSPECIFIED. 4112 // "IN_TRANSIT_ENCRYPTION_DISABLED" - In-transit encryption is disabled. 4113 // "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" - Data in-transit is 4114 // encrypted using inter-node transparent encryption. 4115 InTransitEncryptionConfig string `json:"inTransitEncryptionConfig,omitempty"` 4116 // Network: Output only. The relative name of the Google Compute Engine 4117 // network(https://cloud.google.com/compute/docs/networks-and-firewalls#networks 4118 // ) to which the cluster is connected. Example: 4119 // projects/my-project/global/networks/my-network 4120 Network string `json:"network,omitempty"` 4121 // NetworkPerformanceConfig: Network bandwidth tier configuration. 4122 NetworkPerformanceConfig *ClusterNetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` 4123 // PrivateIpv6GoogleAccess: The desired state of IPv6 connectivity to Google 4124 // Services. By default, no private IPv6 access to or from Google Services (all 4125 // access will be via IPv4) 4126 // 4127 // Possible values: 4128 // "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" - Default value. Same as DISABLED 4129 // "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" - No private access to or from 4130 // Google Services 4131 // "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" - Enables private IPv6 access to 4132 // Google Services from GKE 4133 // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access 4134 // to and from Google Services 4135 PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` 4136 // ServiceExternalIpsConfig: ServiceExternalIPsConfig specifies if services 4137 // with externalIPs field are blocked or not. 4138 ServiceExternalIpsConfig *ServiceExternalIPsConfig `json:"serviceExternalIpsConfig,omitempty"` 4139 // Subnetwork: Output only. The relative name of the Google Compute Engine 4140 // subnetwork (https://cloud.google.com/compute/docs/vpc) to which the cluster 4141 // is connected. Example: 4142 // projects/my-project/regions/us-central1/subnetworks/my-subnet 4143 Subnetwork string `json:"subnetwork,omitempty"` 4144 // ForceSendFields is a list of field names (e.g. "DatapathProvider") to 4145 // unconditionally include in API requests. By default, fields with empty or 4146 // default values are omitted from API requests. See 4147 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4148 // details. 4149 ForceSendFields []string `json:"-"` 4150 // NullFields is a list of field names (e.g. "DatapathProvider") to include in 4151 // API requests with the JSON null value. By default, fields with empty values 4152 // are omitted from API requests. See 4153 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4154 NullFields []string `json:"-"` 4155 } 4156 4157 func (s *NetworkConfig) MarshalJSON() ([]byte, error) { 4158 type NoMethod NetworkConfig 4159 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4160 } 4161 4162 // NetworkPerformanceConfig: Configuration of all network bandwidth tiers 4163 type NetworkPerformanceConfig struct { 4164 // ExternalIpEgressBandwidthTier: Specifies the network bandwidth tier for the 4165 // NodePool for traffic to external/public IP addresses. 4166 // 4167 // Possible values: 4168 // "TIER_UNSPECIFIED" - Default value 4169 // "TIER_1" - Higher bandwidth, actual values based on VM size. 4170 ExternalIpEgressBandwidthTier string `json:"externalIpEgressBandwidthTier,omitempty"` 4171 // TotalEgressBandwidthTier: Specifies the total network bandwidth tier for the 4172 // NodePool. 4173 // 4174 // Possible values: 4175 // "TIER_UNSPECIFIED" - Default value 4176 // "TIER_1" - Higher bandwidth, actual values based on VM size. 4177 TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` 4178 // ForceSendFields is a list of field names (e.g. 4179 // "ExternalIpEgressBandwidthTier") to unconditionally include in API requests. 4180 // By default, fields with empty or default values are omitted from API 4181 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 4182 // for more details. 4183 ForceSendFields []string `json:"-"` 4184 // NullFields is a list of field names (e.g. "ExternalIpEgressBandwidthTier") 4185 // to include in API requests with the JSON null value. By default, fields with 4186 // empty values are omitted from API requests. See 4187 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4188 NullFields []string `json:"-"` 4189 } 4190 4191 func (s *NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { 4192 type NoMethod NetworkPerformanceConfig 4193 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4194 } 4195 4196 // NetworkPolicy: Configuration options for the NetworkPolicy feature. 4197 // https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ 4198 type NetworkPolicy struct { 4199 // Enabled: Whether network policy is enabled on the cluster. 4200 Enabled bool `json:"enabled,omitempty"` 4201 // Provider: The selected network policy provider. 4202 // 4203 // Possible values: 4204 // "PROVIDER_UNSPECIFIED" - Not set 4205 // "CALICO" - Tigera (Calico Felix). 4206 Provider string `json:"provider,omitempty"` 4207 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 4208 // include in API requests. By default, fields with empty or default values are 4209 // omitted from API requests. See 4210 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4211 // details. 4212 ForceSendFields []string `json:"-"` 4213 // NullFields is a list of field names (e.g. "Enabled") to include in API 4214 // requests with the JSON null value. By default, fields with empty values are 4215 // omitted from API requests. See 4216 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4217 NullFields []string `json:"-"` 4218 } 4219 4220 func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { 4221 type NoMethod NetworkPolicy 4222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4223 } 4224 4225 // NetworkPolicyConfig: Configuration for NetworkPolicy. This only tracks 4226 // whether the addon is enabled or not on the Master, it does not track whether 4227 // network policy is enabled for the nodes. 4228 type NetworkPolicyConfig struct { 4229 // Disabled: Whether NetworkPolicy is enabled for this cluster. 4230 Disabled bool `json:"disabled,omitempty"` 4231 // ForceSendFields is a list of field names (e.g. "Disabled") to 4232 // unconditionally include in API requests. By default, fields with empty or 4233 // default values are omitted from API requests. See 4234 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4235 // details. 4236 ForceSendFields []string `json:"-"` 4237 // NullFields is a list of field names (e.g. "Disabled") to include in API 4238 // requests with the JSON null value. By default, fields with empty values are 4239 // omitted from API requests. See 4240 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4241 NullFields []string `json:"-"` 4242 } 4243 4244 func (s *NetworkPolicyConfig) MarshalJSON() ([]byte, error) { 4245 type NoMethod NetworkPolicyConfig 4246 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4247 } 4248 4249 // NetworkTags: Collection of Compute Engine network tags that can be applied 4250 // to a node's underlying VM instance. (See `tags` field in `NodeConfig` 4251 // (/kubernetes-engine/docs/reference/rest/v1/NodeConfig)). 4252 type NetworkTags struct { 4253 // Tags: List of network tags. 4254 Tags []string `json:"tags,omitempty"` 4255 // ForceSendFields is a list of field names (e.g. "Tags") to unconditionally 4256 // include in API requests. By default, fields with empty or default values are 4257 // omitted from API requests. See 4258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4259 // details. 4260 ForceSendFields []string `json:"-"` 4261 // NullFields is a list of field names (e.g. "Tags") to include in API requests 4262 // with the JSON null value. By default, fields with empty values are omitted 4263 // from API requests. See 4264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4265 NullFields []string `json:"-"` 4266 } 4267 4268 func (s *NetworkTags) MarshalJSON() ([]byte, error) { 4269 type NoMethod NetworkTags 4270 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4271 } 4272 4273 // NodeAffinity: Specifies the NodeAffinity key, values, and affinity operator 4274 // according to shared sole tenant node group affinities 4275 // (https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). 4276 type NodeAffinity struct { 4277 // Key: Key for NodeAffinity. 4278 Key string `json:"key,omitempty"` 4279 // Operator: Operator for NodeAffinity. 4280 // 4281 // Possible values: 4282 // "OPERATOR_UNSPECIFIED" - Invalid or unspecified affinity operator. 4283 // "IN" - Affinity operator. 4284 // "NOT_IN" - Anti-affinity operator. 4285 Operator string `json:"operator,omitempty"` 4286 // Values: Values for NodeAffinity. 4287 Values []string `json:"values,omitempty"` 4288 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 4289 // include in API requests. By default, fields with empty or default values are 4290 // omitted from API requests. See 4291 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4292 // details. 4293 ForceSendFields []string `json:"-"` 4294 // NullFields is a list of field names (e.g. "Key") to include in API requests 4295 // with the JSON null value. By default, fields with empty values are omitted 4296 // from API requests. See 4297 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4298 NullFields []string `json:"-"` 4299 } 4300 4301 func (s *NodeAffinity) MarshalJSON() ([]byte, error) { 4302 type NoMethod NodeAffinity 4303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4304 } 4305 4306 // NodeConfig: Parameters that describe the nodes in a cluster. GKE Autopilot 4307 // clusters do not recognize parameters in `NodeConfig`. Use 4308 // AutoprovisioningNodePoolDefaults instead. 4309 type NodeConfig struct { 4310 // Accelerators: A list of hardware accelerators to be attached to each node. 4311 // See https://cloud.google.com/compute/docs/gpus for more information about 4312 // support for GPUs. 4313 Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` 4314 // AdvancedMachineFeatures: Advanced features for the Compute Engine VM. 4315 AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` 4316 // BootDiskKmsKey: The Customer Managed Encryption Key used to encrypt the 4317 // boot disk attached to each node in the node pool. This should be of the form 4318 // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKey 4319 // s/[KEY_NAME]. For more information about protecting resources with Cloud KMS 4320 // Keys please see: 4321 // https://cloud.google.com/compute/docs/disks/customer-managed-encryption 4322 BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` 4323 // ConfidentialNodes: Confidential nodes config. All the nodes in the node pool 4324 // will be Confidential VM once enabled. 4325 ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` 4326 // ContainerdConfig: Parameters for containerd customization. 4327 ContainerdConfig *ContainerdConfig `json:"containerdConfig,omitempty"` 4328 // DiskSizeGb: Size of the disk attached to each node, specified in GB. The 4329 // smallest allowed disk size is 10GB. If unspecified, the default disk size is 4330 // 100GB. 4331 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 4332 // DiskType: Type of the disk attached to each node (e.g. 'pd-standard', 4333 // 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is 4334 // 'pd-standard' 4335 DiskType string `json:"diskType,omitempty"` 4336 // EnableConfidentialStorage: Optional. Reserved for future use. 4337 EnableConfidentialStorage bool `json:"enableConfidentialStorage,omitempty"` 4338 // EphemeralStorageConfig: Parameters for the ephemeral storage filesystem. If 4339 // unspecified, ephemeral storage is backed by the boot disk. 4340 EphemeralStorageConfig *EphemeralStorageConfig `json:"ephemeralStorageConfig,omitempty"` 4341 // EphemeralStorageLocalSsdConfig: Parameters for the node ephemeral storage 4342 // using Local SSDs. If unspecified, ephemeral storage is backed by the boot 4343 // disk. This field is functionally equivalent to the ephemeral_storage_config 4344 EphemeralStorageLocalSsdConfig *EphemeralStorageLocalSsdConfig `json:"ephemeralStorageLocalSsdConfig,omitempty"` 4345 // FastSocket: Enable or disable NCCL fast socket for the node pool. 4346 FastSocket *FastSocket `json:"fastSocket,omitempty"` 4347 // GcfsConfig: GCFS (Google Container File System) configs. 4348 GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` 4349 // Gvnic: Enable or disable gvnic on the node pool. 4350 Gvnic *VirtualNIC `json:"gvnic,omitempty"` 4351 // HostMaintenancePolicy: HostMaintenancePolicy contains the desired 4352 // maintenance policy for the Google Compute Engine hosts. 4353 HostMaintenancePolicy *HostMaintenancePolicy `json:"hostMaintenancePolicy,omitempty"` 4354 // ImageType: The image type to use for this node. Note that for a given image 4355 // type, the latest version of it will be used. Please see 4356 // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for 4357 // available image types. 4358 ImageType string `json:"imageType,omitempty"` 4359 // KubeletConfig: Node kubelet configs. 4360 KubeletConfig *NodeKubeletConfig `json:"kubeletConfig,omitempty"` 4361 // Labels: The map of Kubernetes labels (key/value pairs) to be applied to each 4362 // node. These will added in addition to any default label(s) that Kubernetes 4363 // may apply to the node. In case of conflict in label keys, the applied set 4364 // may differ depending on the Kubernetes version -- it's best to assume the 4365 // behavior is undefined and conflicts should be avoided. For more information, 4366 // including usage and the valid values, see: 4367 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ 4368 Labels map[string]string `json:"labels,omitempty"` 4369 // LinuxNodeConfig: Parameters that can be configured on Linux nodes. 4370 LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"` 4371 // LocalNvmeSsdBlockConfig: Parameters for using raw-block Local NVMe SSDs. 4372 LocalNvmeSsdBlockConfig *LocalNvmeSsdBlockConfig `json:"localNvmeSsdBlockConfig,omitempty"` 4373 // LocalSsdCount: The number of local SSD disks to be attached to the node. The 4374 // limit for this value is dependent upon the maximum number of disks available 4375 // on a machine per zone. See: 4376 // https://cloud.google.com/compute/docs/disks/local-ssd for more information. 4377 LocalSsdCount int64 `json:"localSsdCount,omitempty"` 4378 // LoggingConfig: Logging configuration. 4379 LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` 4380 // MachineType: The name of a Google Compute Engine machine type 4381 // (https://cloud.google.com/compute/docs/machine-types). If unspecified, the 4382 // default machine type is `e2-medium`. 4383 MachineType string `json:"machineType,omitempty"` 4384 // Metadata: The metadata key/value pairs assigned to instances in the cluster. 4385 // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes 4386 // in length. These are reflected as part of a URL in the metadata server. 4387 // Additionally, to avoid ambiguity, keys must not conflict with any other 4388 // metadata keys for the project or be one of the reserved keys: - 4389 // "cluster-location" - "cluster-name" - "cluster-uid" - "configure-sh" - 4390 // "containerd-configure-sh" - "enable-oslogin" - "gci-ensure-gke-docker" - 4391 // "gci-metrics-enabled" - "gci-update-strategy" - "instance-template" - 4392 // "kube-env" - "startup-script" - "user-data" - "disable-address-manager" - 4393 // "windows-startup-script-ps1" - "common-psm1" - "k8s-node-setup-psm1" - 4394 // "install-ssh-psm1" - "user-profile-psm1" Values are free-form strings, and 4395 // only have meaning as interpreted by the image running in the instance. The 4396 // only restriction placed on them is that each value's size must be less than 4397 // or equal to 32 KB. The total size of all keys and values must be less than 4398 // 512 KB. 4399 Metadata map[string]string `json:"metadata,omitempty"` 4400 // MinCpuPlatform: Minimum CPU platform to be used by this instance. The 4401 // instance may be scheduled on the specified or newer CPU platform. Applicable 4402 // values are the friendly names of CPU platforms, such as `minCpuPlatform: 4403 // "Intel Haswell" or `minCpuPlatform: "Intel Sandy Bridge". For more 4404 // information, read how to specify min CPU platform 4405 // (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). 4406 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 4407 // NodeGroup: Setting this field will assign instances of this pool to run on 4408 // the specified node group. This is useful for running workloads on sole 4409 // tenant nodes 4410 // (https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). 4411 NodeGroup string `json:"nodeGroup,omitempty"` 4412 // OauthScopes: The set of Google API scopes to be made available on all of the 4413 // node VMs under the "default" service account. The following scopes are 4414 // recommended, but not required, and by default are not included: * 4415 // `https://www.googleapis.com/auth/compute` is required for mounting 4416 // persistent storage on your nodes. * 4417 // `https://www.googleapis.com/auth/devstorage.read_only` is required for 4418 // communicating with **gcr.io** (the Google Container Registry 4419 // (https://cloud.google.com/container-registry/)). If unspecified, no scopes 4420 // are added, unless Cloud Logging or Cloud Monitoring are enabled, in which 4421 // case their required scopes will be added. 4422 OauthScopes []string `json:"oauthScopes,omitempty"` 4423 // Preemptible: Whether the nodes are created as preemptible VM instances. See: 4424 // https://cloud.google.com/compute/docs/instances/preemptible for more 4425 // information about preemptible VM instances. 4426 Preemptible bool `json:"preemptible,omitempty"` 4427 // ReservationAffinity: The optional reservation affinity. Setting this field 4428 // will apply the specified Zonal Compute Reservation 4429 // (https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 4430 // to this node pool. 4431 ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` 4432 // ResourceLabels: The resource labels for the node pool to use to annotate any 4433 // related Google Compute Engine resources. 4434 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 4435 // ResourceManagerTags: A map of resource manager tag keys and values to be 4436 // attached to the nodes. 4437 ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` 4438 // SandboxConfig: Sandbox configuration for this node. 4439 SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` 4440 // SecondaryBootDiskUpdateStrategy: Secondary boot disk update strategy. 4441 SecondaryBootDiskUpdateStrategy *SecondaryBootDiskUpdateStrategy `json:"secondaryBootDiskUpdateStrategy,omitempty"` 4442 // SecondaryBootDisks: List of secondary boot disks attached to the nodes. 4443 SecondaryBootDisks []*SecondaryBootDisk `json:"secondaryBootDisks,omitempty"` 4444 // ServiceAccount: The Google Cloud Platform Service Account to be used by the 4445 // node VMs. Specify the email address of the Service Account; otherwise, if no 4446 // Service Account is specified, the "default" service account is used. 4447 ServiceAccount string `json:"serviceAccount,omitempty"` 4448 // ShieldedInstanceConfig: Shielded Instance options. 4449 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` 4450 // SoleTenantConfig: Parameters for node pools to be backed by shared sole 4451 // tenant node groups. 4452 SoleTenantConfig *SoleTenantConfig `json:"soleTenantConfig,omitempty"` 4453 // Spot: Spot flag for enabling Spot VM, which is a rebrand of the existing 4454 // preemptible flag. 4455 Spot bool `json:"spot,omitempty"` 4456 // Tags: The list of instance tags applied to all nodes. Tags are used to 4457 // identify valid sources or targets for network firewalls and are specified by 4458 // the client during cluster or node pool creation. Each tag within the list 4459 // must comply with RFC1035. 4460 Tags []string `json:"tags,omitempty"` 4461 // Taints: List of kubernetes taints to be applied to each node. For more 4462 // information, including usage and the valid values, see: 4463 // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ 4464 Taints []*NodeTaint `json:"taints,omitempty"` 4465 // WindowsNodeConfig: Parameters that can be configured on Windows nodes. 4466 WindowsNodeConfig *WindowsNodeConfig `json:"windowsNodeConfig,omitempty"` 4467 // WorkloadMetadataConfig: The workload metadata configuration for this node. 4468 WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` 4469 // ForceSendFields is a list of field names (e.g. "Accelerators") to 4470 // unconditionally include in API requests. By default, fields with empty or 4471 // default values are omitted from API requests. See 4472 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4473 // details. 4474 ForceSendFields []string `json:"-"` 4475 // NullFields is a list of field names (e.g. "Accelerators") to include in API 4476 // requests with the JSON null value. By default, fields with empty values are 4477 // omitted from API requests. See 4478 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4479 NullFields []string `json:"-"` 4480 } 4481 4482 func (s *NodeConfig) MarshalJSON() ([]byte, error) { 4483 type NoMethod NodeConfig 4484 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4485 } 4486 4487 // NodeConfigDefaults: Subset of NodeConfig message that has defaults. 4488 type NodeConfigDefaults struct { 4489 // ContainerdConfig: Parameters for containerd customization. 4490 ContainerdConfig *ContainerdConfig `json:"containerdConfig,omitempty"` 4491 // GcfsConfig: GCFS (Google Container File System, also known as Riptide) 4492 // options. 4493 GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` 4494 // HostMaintenancePolicy: HostMaintenancePolicy contains the desired 4495 // maintenance policy for the Google Compute Engine hosts. 4496 HostMaintenancePolicy *HostMaintenancePolicy `json:"hostMaintenancePolicy,omitempty"` 4497 // LoggingConfig: Logging configuration for node pools. 4498 LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` 4499 // NodeKubeletConfig: NodeKubeletConfig controls the defaults for new 4500 // node-pools. Currently only `insecure_kubelet_readonly_port_enabled` can be 4501 // set here. 4502 NodeKubeletConfig *NodeKubeletConfig `json:"nodeKubeletConfig,omitempty"` 4503 // ForceSendFields is a list of field names (e.g. "ContainerdConfig") to 4504 // unconditionally include in API requests. By default, fields with empty or 4505 // default values are omitted from API requests. See 4506 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4507 // details. 4508 ForceSendFields []string `json:"-"` 4509 // NullFields is a list of field names (e.g. "ContainerdConfig") to include in 4510 // API requests with the JSON null value. By default, fields with empty values 4511 // are omitted from API requests. See 4512 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4513 NullFields []string `json:"-"` 4514 } 4515 4516 func (s *NodeConfigDefaults) MarshalJSON() ([]byte, error) { 4517 type NoMethod NodeConfigDefaults 4518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4519 } 4520 4521 // NodeKubeletConfig: Node kubelet configs. 4522 type NodeKubeletConfig struct { 4523 // CpuCfsQuota: Enable CPU CFS quota enforcement for containers that specify 4524 // CPU limits. This option is enabled by default which makes kubelet use CFS 4525 // quota (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to 4526 // enforce container CPU limits. Otherwise, CPU limits will not be enforced at 4527 // all. Disable this option to mitigate CPU throttling problems while still 4528 // having your pods to be in Guaranteed QoS class by specifying the CPU limits. 4529 // The default value is 'true' if unspecified. 4530 CpuCfsQuota bool `json:"cpuCfsQuota,omitempty"` 4531 // CpuCfsQuotaPeriod: Set the CPU CFS quota period value 'cpu.cfs_period_us'. 4532 // The string must be a sequence of decimal numbers, each with optional 4533 // fraction and a unit suffix, such as "300ms". Valid time units are "ns", "us" 4534 // (or "µs"), "ms", "s", "m", "h". The value must be a positive duration. 4535 CpuCfsQuotaPeriod string `json:"cpuCfsQuotaPeriod,omitempty"` 4536 // CpuManagerPolicy: Control the CPU management policy on the node. See 4537 // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ 4538 // The following values are allowed. * "none": the default, which represents 4539 // the existing scheduling behavior. * "static": allows pods with certain 4540 // resource characteristics to be granted increased CPU affinity and 4541 // exclusivity on the node. The default value is 'none' if unspecified. 4542 CpuManagerPolicy string `json:"cpuManagerPolicy,omitempty"` 4543 // InsecureKubeletReadonlyPortEnabled: Enable or disable Kubelet read only 4544 // port. 4545 InsecureKubeletReadonlyPortEnabled bool `json:"insecureKubeletReadonlyPortEnabled,omitempty"` 4546 // PodPidsLimit: Set the Pod PID limits. See 4547 // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits 4548 // Controls the maximum number of processes allowed to run in a pod. The value 4549 // must be greater than or equal to 1024 and less than 4194304. 4550 PodPidsLimit int64 `json:"podPidsLimit,omitempty,string"` 4551 // ForceSendFields is a list of field names (e.g. "CpuCfsQuota") to 4552 // unconditionally include in API requests. By default, fields with empty or 4553 // default values are omitted from API requests. See 4554 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4555 // details. 4556 ForceSendFields []string `json:"-"` 4557 // NullFields is a list of field names (e.g. "CpuCfsQuota") to include in API 4558 // requests with the JSON null value. By default, fields with empty values are 4559 // omitted from API requests. See 4560 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4561 NullFields []string `json:"-"` 4562 } 4563 4564 func (s *NodeKubeletConfig) MarshalJSON() ([]byte, error) { 4565 type NoMethod NodeKubeletConfig 4566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4567 } 4568 4569 // NodeLabels: Collection of node-level Kubernetes labels 4570 // (https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). 4571 type NodeLabels struct { 4572 // Labels: Map of node label keys and node label values. 4573 Labels map[string]string `json:"labels,omitempty"` 4574 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally 4575 // include in API requests. By default, fields with empty or default values are 4576 // omitted from API requests. See 4577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4578 // details. 4579 ForceSendFields []string `json:"-"` 4580 // NullFields is a list of field names (e.g. "Labels") to include in API 4581 // requests with the JSON null value. By default, fields with empty values are 4582 // omitted from API requests. See 4583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4584 NullFields []string `json:"-"` 4585 } 4586 4587 func (s *NodeLabels) MarshalJSON() ([]byte, error) { 4588 type NoMethod NodeLabels 4589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4590 } 4591 4592 // NodeManagement: NodeManagement defines the set of node management services 4593 // turned on for the node pool. 4594 type NodeManagement struct { 4595 // AutoRepair: Whether the nodes will be automatically repaired. 4596 AutoRepair bool `json:"autoRepair,omitempty"` 4597 // AutoUpgrade: Whether the nodes will be automatically upgraded. 4598 AutoUpgrade bool `json:"autoUpgrade,omitempty"` 4599 // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool. 4600 UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"` 4601 // ForceSendFields is a list of field names (e.g. "AutoRepair") to 4602 // unconditionally include in API requests. By default, fields with empty or 4603 // default values are omitted from API requests. See 4604 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4605 // details. 4606 ForceSendFields []string `json:"-"` 4607 // NullFields is a list of field names (e.g. "AutoRepair") to include in API 4608 // requests with the JSON null value. By default, fields with empty values are 4609 // omitted from API requests. See 4610 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4611 NullFields []string `json:"-"` 4612 } 4613 4614 func (s *NodeManagement) MarshalJSON() ([]byte, error) { 4615 type NoMethod NodeManagement 4616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4617 } 4618 4619 // NodeNetworkConfig: Parameters for node pool-level network config. 4620 type NodeNetworkConfig struct { 4621 // AdditionalNodeNetworkConfigs: We specify the additional node networks for 4622 // this node pool using this list. Each node network corresponds to an 4623 // additional interface 4624 AdditionalNodeNetworkConfigs []*AdditionalNodeNetworkConfig `json:"additionalNodeNetworkConfigs,omitempty"` 4625 // AdditionalPodNetworkConfigs: We specify the additional pod networks for this 4626 // node pool using this list. Each pod network corresponds to an additional 4627 // alias IP range for the node 4628 AdditionalPodNetworkConfigs []*AdditionalPodNetworkConfig `json:"additionalPodNetworkConfigs,omitempty"` 4629 // CreatePodRange: Input only. Whether to create a new range for pod IPs in 4630 // this node pool. Defaults are provided for `pod_range` and 4631 // `pod_ipv4_cidr_block` if they are not specified. If neither 4632 // `create_pod_range` or `pod_range` are specified, the cluster-level default 4633 // (`ip_allocation_policy.cluster_ipv4_cidr_block`) is used. Only applicable if 4634 // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed 4635 // after the node pool has been created. 4636 CreatePodRange bool `json:"createPodRange,omitempty"` 4637 // EnablePrivateNodes: Whether nodes have internal IP addresses only. If 4638 // enable_private_nodes is not specified, then the value is derived from 4639 // cluster.privateClusterConfig.enablePrivateNodes 4640 EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` 4641 // NetworkPerformanceConfig: Network bandwidth tier configuration. 4642 NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` 4643 // PodCidrOverprovisionConfig: [PRIVATE FIELD] Pod CIDR size overprovisioning 4644 // config for the nodepool. Pod CIDR size per node depends on 4645 // max_pods_per_node. By default, the value of max_pods_per_node is rounded off 4646 // to next power of 2 and we then double that to get the size of pod CIDR block 4647 // per node. Example: max_pods_per_node of 30 would result in 64 IPs (/26). 4648 // This config can disable the doubling of IPs (we still round off to next 4649 // power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) 4650 // when overprovisioning is disabled. 4651 PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `json:"podCidrOverprovisionConfig,omitempty"` 4652 // PodIpv4CidrBlock: The IP address range for pod IPs in this node pool. Only 4653 // applicable if `create_pod_range` is true. Set to blank to have a range 4654 // chosen with the default size. Set to /netmask (e.g. `/14`) to have a range 4655 // chosen with a specific netmask. Set to a CIDR 4656 // (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation 4657 // (e.g. `10.96.0.0/14`) to pick a specific range to use. Only applicable if 4658 // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed 4659 // after the node pool has been created. 4660 PodIpv4CidrBlock string `json:"podIpv4CidrBlock,omitempty"` 4661 // PodIpv4RangeUtilization: Output only. [Output only] The utilization of the 4662 // IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the 4663 // secondary range], Usage=numNodes*numZones*podIPsPerNode. 4664 PodIpv4RangeUtilization float64 `json:"podIpv4RangeUtilization,omitempty"` 4665 // PodRange: The ID of the secondary range for pod IPs. If `create_pod_range` 4666 // is true, this ID is used for the new range. If `create_pod_range` is false, 4667 // uses an existing secondary range with this ID. Only applicable if 4668 // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed 4669 // after the node pool has been created. 4670 PodRange string `json:"podRange,omitempty"` 4671 // ForceSendFields is a list of field names (e.g. 4672 // "AdditionalNodeNetworkConfigs") to unconditionally include in API requests. 4673 // By default, fields with empty or default values are omitted from API 4674 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 4675 // for more details. 4676 ForceSendFields []string `json:"-"` 4677 // NullFields is a list of field names (e.g. "AdditionalNodeNetworkConfigs") to 4678 // include in API requests with the JSON null value. By default, fields with 4679 // empty values are omitted from API requests. See 4680 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4681 NullFields []string `json:"-"` 4682 } 4683 4684 func (s *NodeNetworkConfig) MarshalJSON() ([]byte, error) { 4685 type NoMethod NodeNetworkConfig 4686 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4687 } 4688 4689 func (s *NodeNetworkConfig) UnmarshalJSON(data []byte) error { 4690 type NoMethod NodeNetworkConfig 4691 var s1 struct { 4692 PodIpv4RangeUtilization gensupport.JSONFloat64 `json:"podIpv4RangeUtilization"` 4693 *NoMethod 4694 } 4695 s1.NoMethod = (*NoMethod)(s) 4696 if err := json.Unmarshal(data, &s1); err != nil { 4697 return err 4698 } 4699 s.PodIpv4RangeUtilization = float64(s1.PodIpv4RangeUtilization) 4700 return nil 4701 } 4702 4703 // NodePool: NodePool contains the name and configuration for a cluster's node 4704 // pool. Node pools are a set of nodes (i.e. VM's), with a common configuration 4705 // and specification, under the control of the cluster master. They may have a 4706 // set of Kubernetes labels applied to them, which may be used to reference 4707 // them during pod scheduling. They may also be resized up or down, to 4708 // accommodate the workload. 4709 type NodePool struct { 4710 // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler is 4711 // enabled only if a valid configuration is present. 4712 Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` 4713 // BestEffortProvisioning: Enable best effort provisioning for nodes 4714 BestEffortProvisioning *BestEffortProvisioning `json:"bestEffortProvisioning,omitempty"` 4715 // Conditions: Which conditions caused the current node pool state. 4716 Conditions []*StatusCondition `json:"conditions,omitempty"` 4717 // Config: The node configuration of the pool. 4718 Config *NodeConfig `json:"config,omitempty"` 4719 // Etag: This checksum is computed by the server based on the value of node 4720 // pool fields, and may be sent on update requests to ensure the client has an 4721 // up-to-date value before proceeding. 4722 Etag string `json:"etag,omitempty"` 4723 // InitialNodeCount: The initial node count for the pool. You must ensure that 4724 // your Compute Engine resource quota (https://cloud.google.com/compute/quotas) 4725 // is sufficient for this number of instances. You must also have available 4726 // firewall and routes quota. 4727 InitialNodeCount int64 `json:"initialNodeCount,omitempty"` 4728 // InstanceGroupUrls: [Output only] The resource URLs of the managed instance 4729 // groups 4730 // (https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) 4731 // associated with this node pool. During the node pool blue-green upgrade 4732 // operation, the URLs contain both blue and green resources. 4733 InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` 4734 // Locations: The list of Google Compute Engine zones 4735 // (https://cloud.google.com/compute/docs/zones#available) in which the 4736 // NodePool's nodes should be located. If this value is unspecified during node 4737 // pool creation, the Cluster.Locations 4738 // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) 4739 // value will be used, instead. Warning: changing node pool locations will 4740 // result in nodes being added and/or removed. 4741 Locations []string `json:"locations,omitempty"` 4742 // Management: NodeManagement configuration for this NodePool. 4743 Management *NodeManagement `json:"management,omitempty"` 4744 // MaxPodsConstraint: The constraint on the maximum number of pods that can be 4745 // run simultaneously on a node in the node pool. 4746 MaxPodsConstraint *MaxPodsConstraint `json:"maxPodsConstraint,omitempty"` 4747 // Name: The name of the node pool. 4748 Name string `json:"name,omitempty"` 4749 // NetworkConfig: Networking configuration for this NodePool. If specified, it 4750 // overrides the cluster-level defaults. 4751 NetworkConfig *NodeNetworkConfig `json:"networkConfig,omitempty"` 4752 // PlacementPolicy: Specifies the node placement policy. 4753 PlacementPolicy *PlacementPolicy `json:"placementPolicy,omitempty"` 4754 // PodIpv4CidrSize: [Output only] The pod CIDR block size per node in this node 4755 // pool. 4756 PodIpv4CidrSize int64 `json:"podIpv4CidrSize,omitempty"` 4757 // QueuedProvisioning: Specifies the configuration of queued provisioning. 4758 QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` 4759 // SelfLink: [Output only] Server-defined URL for the resource. 4760 SelfLink string `json:"selfLink,omitempty"` 4761 // Status: [Output only] The status of the nodes in this pool instance. 4762 // 4763 // Possible values: 4764 // "STATUS_UNSPECIFIED" - Not set. 4765 // "PROVISIONING" - The PROVISIONING state indicates the node pool is being 4766 // created. 4767 // "RUNNING" - The RUNNING state indicates the node pool has been created and 4768 // is fully usable. 4769 // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the node 4770 // pool has been created and is partially usable. Some error state has occurred 4771 // and some functionality may be impaired. Customer may need to reissue a 4772 // request or trigger a new update. 4773 // "RECONCILING" - The RECONCILING state indicates that some work is actively 4774 // being done on the node pool, such as upgrading node software. Details can be 4775 // found in the `statusMessage` field. 4776 // "STOPPING" - The STOPPING state indicates the node pool is being deleted. 4777 // "ERROR" - The ERROR state indicates the node pool may be unusable. Details 4778 // can be found in the `statusMessage` field. 4779 Status string `json:"status,omitempty"` 4780 // StatusMessage: [Output only] Deprecated. Use conditions instead. Additional 4781 // information about the current status of this node pool instance, if 4782 // available. 4783 StatusMessage string `json:"statusMessage,omitempty"` 4784 // UpdateInfo: Output only. [Output only] Update info contains relevant 4785 // information during a node pool update. 4786 UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` 4787 // UpgradeSettings: Upgrade settings control disruption and speed of the 4788 // upgrade. 4789 UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` 4790 // Version: The version of Kubernetes running on this NodePool's nodes. If 4791 // unspecified, it defaults as described here 4792 // (https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). 4793 Version string `json:"version,omitempty"` 4794 4795 // ServerResponse contains the HTTP response code and headers from the server. 4796 googleapi.ServerResponse `json:"-"` 4797 // ForceSendFields is a list of field names (e.g. "Autoscaling") to 4798 // unconditionally include in API requests. By default, fields with empty or 4799 // default values are omitted from API requests. See 4800 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4801 // details. 4802 ForceSendFields []string `json:"-"` 4803 // NullFields is a list of field names (e.g. "Autoscaling") to include in API 4804 // requests with the JSON null value. By default, fields with empty values are 4805 // omitted from API requests. See 4806 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4807 NullFields []string `json:"-"` 4808 } 4809 4810 func (s *NodePool) MarshalJSON() ([]byte, error) { 4811 type NoMethod NodePool 4812 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4813 } 4814 4815 // NodePoolAutoConfig: node pool configs that apply to all auto-provisioned 4816 // node pools in autopilot clusters and node auto-provisioning enabled clusters 4817 type NodePoolAutoConfig struct { 4818 // NetworkTags: The list of instance tags applied to all nodes. Tags are used 4819 // to identify valid sources or targets for network firewalls and are specified 4820 // by the client during cluster creation. Each tag within the list must comply 4821 // with RFC1035. 4822 NetworkTags *NetworkTags `json:"networkTags,omitempty"` 4823 // NodeKubeletConfig: NodeKubeletConfig controls the defaults for 4824 // autoprovisioned node-pools. Currently only 4825 // `insecure_kubelet_readonly_port_enabled` can be set here. 4826 NodeKubeletConfig *NodeKubeletConfig `json:"nodeKubeletConfig,omitempty"` 4827 // ResourceManagerTags: Resource manager tag keys and values to be attached to 4828 // the nodes for managing Compute Engine firewalls using Network Firewall 4829 // Policies. 4830 ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` 4831 // ForceSendFields is a list of field names (e.g. "NetworkTags") to 4832 // unconditionally include in API requests. By default, fields with empty or 4833 // default values are omitted from API requests. See 4834 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4835 // details. 4836 ForceSendFields []string `json:"-"` 4837 // NullFields is a list of field names (e.g. "NetworkTags") to include in API 4838 // requests with the JSON null value. By default, fields with empty values are 4839 // omitted from API requests. See 4840 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4841 NullFields []string `json:"-"` 4842 } 4843 4844 func (s *NodePoolAutoConfig) MarshalJSON() ([]byte, error) { 4845 type NoMethod NodePoolAutoConfig 4846 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4847 } 4848 4849 // NodePoolAutoscaling: NodePoolAutoscaling contains information required by 4850 // cluster autoscaler to adjust the size of the node pool to the current 4851 // cluster usage. 4852 type NodePoolAutoscaling struct { 4853 // Autoprovisioned: Can this node pool be deleted automatically. 4854 Autoprovisioned bool `json:"autoprovisioned,omitempty"` 4855 // Enabled: Is autoscaling enabled for this node pool. 4856 Enabled bool `json:"enabled,omitempty"` 4857 // LocationPolicy: Location policy used when scaling up a nodepool. 4858 // 4859 // Possible values: 4860 // "LOCATION_POLICY_UNSPECIFIED" - Not set. 4861 // "BALANCED" - BALANCED is a best effort policy that aims to balance the 4862 // sizes of different zones. 4863 // "ANY" - ANY policy picks zones that have the highest capacity available. 4864 LocationPolicy string `json:"locationPolicy,omitempty"` 4865 // MaxNodeCount: Maximum number of nodes for one location in the NodePool. Must 4866 // be >= min_node_count. There has to be enough quota to scale up the cluster. 4867 MaxNodeCount int64 `json:"maxNodeCount,omitempty"` 4868 // MinNodeCount: Minimum number of nodes for one location in the NodePool. Must 4869 // be >= 1 and <= max_node_count. 4870 MinNodeCount int64 `json:"minNodeCount,omitempty"` 4871 // TotalMaxNodeCount: Maximum number of nodes in the node pool. Must be greater 4872 // than total_min_node_count. There has to be enough quota to scale up the 4873 // cluster. The total_*_node_count fields are mutually exclusive with the 4874 // *_node_count fields. 4875 TotalMaxNodeCount int64 `json:"totalMaxNodeCount,omitempty"` 4876 // TotalMinNodeCount: Minimum number of nodes in the node pool. Must be greater 4877 // than 1 less than total_max_node_count. The total_*_node_count fields are 4878 // mutually exclusive with the *_node_count fields. 4879 TotalMinNodeCount int64 `json:"totalMinNodeCount,omitempty"` 4880 // ForceSendFields is a list of field names (e.g. "Autoprovisioned") to 4881 // unconditionally include in API requests. By default, fields with empty or 4882 // default values are omitted from API requests. See 4883 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4884 // details. 4885 ForceSendFields []string `json:"-"` 4886 // NullFields is a list of field names (e.g. "Autoprovisioned") to include in 4887 // API requests with the JSON null value. By default, fields with empty values 4888 // are omitted from API requests. See 4889 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4890 NullFields []string `json:"-"` 4891 } 4892 4893 func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) { 4894 type NoMethod NodePoolAutoscaling 4895 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4896 } 4897 4898 // NodePoolDefaults: Subset of Nodepool message that has defaults. 4899 type NodePoolDefaults struct { 4900 // NodeConfigDefaults: Subset of NodeConfig message that has defaults. 4901 NodeConfigDefaults *NodeConfigDefaults `json:"nodeConfigDefaults,omitempty"` 4902 // ForceSendFields is a list of field names (e.g. "NodeConfigDefaults") to 4903 // unconditionally include in API requests. By default, fields with empty or 4904 // default values are omitted from API requests. See 4905 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4906 // details. 4907 ForceSendFields []string `json:"-"` 4908 // NullFields is a list of field names (e.g. "NodeConfigDefaults") to include 4909 // in API requests with the JSON null value. By default, fields with empty 4910 // values are omitted from API requests. See 4911 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4912 NullFields []string `json:"-"` 4913 } 4914 4915 func (s *NodePoolDefaults) MarshalJSON() ([]byte, error) { 4916 type NoMethod NodePoolDefaults 4917 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4918 } 4919 4920 // NodePoolLoggingConfig: NodePoolLoggingConfig specifies logging configuration 4921 // for nodepools. 4922 type NodePoolLoggingConfig struct { 4923 // VariantConfig: Logging variant configuration. 4924 VariantConfig *LoggingVariantConfig `json:"variantConfig,omitempty"` 4925 // ForceSendFields is a list of field names (e.g. "VariantConfig") to 4926 // unconditionally include in API requests. By default, fields with empty or 4927 // default values are omitted from API requests. See 4928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4929 // details. 4930 ForceSendFields []string `json:"-"` 4931 // NullFields is a list of field names (e.g. "VariantConfig") to include in API 4932 // requests with the JSON null value. By default, fields with empty values are 4933 // omitted from API requests. See 4934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4935 NullFields []string `json:"-"` 4936 } 4937 4938 func (s *NodePoolLoggingConfig) MarshalJSON() ([]byte, error) { 4939 type NoMethod NodePoolLoggingConfig 4940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4941 } 4942 4943 // NodeTaint: Kubernetes taint is composed of three fields: key, value, and 4944 // effect. Effect can only be one of three types: NoSchedule, PreferNoSchedule 4945 // or NoExecute. See here 4946 // (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) for 4947 // more information, including usage and the valid values. 4948 type NodeTaint struct { 4949 // Effect: Effect for taint. 4950 // 4951 // Possible values: 4952 // "EFFECT_UNSPECIFIED" - Not set 4953 // "NO_SCHEDULE" - NoSchedule 4954 // "PREFER_NO_SCHEDULE" - PreferNoSchedule 4955 // "NO_EXECUTE" - NoExecute 4956 Effect string `json:"effect,omitempty"` 4957 // Key: Key for taint. 4958 Key string `json:"key,omitempty"` 4959 // Value: Value for taint. 4960 Value string `json:"value,omitempty"` 4961 // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally 4962 // include in API requests. By default, fields with empty or default values are 4963 // omitted from API requests. See 4964 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4965 // details. 4966 ForceSendFields []string `json:"-"` 4967 // NullFields is a list of field names (e.g. "Effect") to include in API 4968 // requests with the JSON null value. By default, fields with empty values are 4969 // omitted from API requests. See 4970 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4971 NullFields []string `json:"-"` 4972 } 4973 4974 func (s *NodeTaint) MarshalJSON() ([]byte, error) { 4975 type NoMethod NodeTaint 4976 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4977 } 4978 4979 // NodeTaints: Collection of Kubernetes node taints 4980 // (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). 4981 type NodeTaints struct { 4982 // Taints: List of node taints. 4983 Taints []*NodeTaint `json:"taints,omitempty"` 4984 // ForceSendFields is a list of field names (e.g. "Taints") to unconditionally 4985 // include in API requests. By default, fields with empty or default values are 4986 // omitted from API requests. See 4987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4988 // details. 4989 ForceSendFields []string `json:"-"` 4990 // NullFields is a list of field names (e.g. "Taints") to include in API 4991 // requests with the JSON null value. By default, fields with empty values are 4992 // omitted from API requests. See 4993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4994 NullFields []string `json:"-"` 4995 } 4996 4997 func (s *NodeTaints) MarshalJSON() ([]byte, error) { 4998 type NoMethod NodeTaints 4999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5000 } 5001 5002 // NotificationConfig: NotificationConfig is the configuration of 5003 // notifications. 5004 type NotificationConfig struct { 5005 // Pubsub: Notification config for Pub/Sub. 5006 Pubsub *PubSub `json:"pubsub,omitempty"` 5007 // ForceSendFields is a list of field names (e.g. "Pubsub") to unconditionally 5008 // include in API requests. By default, fields with empty or default values are 5009 // omitted from API requests. See 5010 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5011 // details. 5012 ForceSendFields []string `json:"-"` 5013 // NullFields is a list of field names (e.g. "Pubsub") to include in API 5014 // requests with the JSON null value. By default, fields with empty values are 5015 // omitted from API requests. See 5016 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5017 NullFields []string `json:"-"` 5018 } 5019 5020 func (s *NotificationConfig) MarshalJSON() ([]byte, error) { 5021 type NoMethod NotificationConfig 5022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5023 } 5024 5025 // Operation: This operation resource represents operations that may have 5026 // happened or are happening on the cluster. All fields are output only. 5027 type Operation struct { 5028 // ClusterConditions: Which conditions caused the current cluster state. 5029 // Deprecated. Use field error instead. 5030 ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"` 5031 // Detail: Detailed operation progress, if available. 5032 Detail string `json:"detail,omitempty"` 5033 // EndTime: [Output only] The time the operation completed, in RFC3339 5034 // (https://www.ietf.org/rfc/rfc3339.txt) text format. 5035 EndTime string `json:"endTime,omitempty"` 5036 // Error: The error result of the operation in case of failure. 5037 Error *Status `json:"error,omitempty"` 5038 // Location: [Output only] The name of the Google Compute Engine zone 5039 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) 5040 // or region 5041 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) 5042 // in which the cluster resides. 5043 Location string `json:"location,omitempty"` 5044 // Name: The server-assigned ID for the operation. 5045 Name string `json:"name,omitempty"` 5046 // NodepoolConditions: Which conditions caused the current node pool state. 5047 // Deprecated. Use field error instead. 5048 NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"` 5049 // OperationType: The operation type. 5050 // 5051 // Possible values: 5052 // "TYPE_UNSPECIFIED" - Not set. 5053 // "CREATE_CLUSTER" - The cluster is being created. The cluster should be 5054 // assumed to be unusable until the operation finishes. In the event of the 5055 // operation failing, the cluster will enter the ERROR state and eventually be 5056 // deleted. 5057 // "DELETE_CLUSTER" - The cluster is being deleted. The cluster should be 5058 // assumed to be unusable as soon as this operation starts. In the event of the 5059 // operation failing, the cluster will enter the ERROR state and the deletion 5060 // will be automatically retried until completed. 5061 // "UPGRADE_MASTER" - The cluster version is being updated. Note that this 5062 // includes "upgrades" to the same version, which are simply a recreation. This 5063 // also includes 5064 // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/clus 5065 // ter-upgrades#upgrading_automatically). For more details, see [documentation 5066 // on cluster 5067 // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-up 5068 // grades#cluster_upgrades). 5069 // "UPGRADE_NODES" - A node pool is being updated. Despite calling this an 5070 // "upgrade", this includes most forms of updates to node pools. This also 5071 // includes 5072 // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-a 5073 // uto-upgrades). This operation sets the progress field and may be canceled. 5074 // The upgrade strategy depends on [node pool 5075 // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node- 5076 // pool-upgrade-strategies). The nodes are generally still usable during this 5077 // operation. 5078 // "REPAIR_CLUSTER" - A problem has been detected with the control plane and 5079 // is being repaired. This operation type is initiated by GKE. For more 5080 // details, see [documentation on 5081 // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance 5082 // -windows-and-exclusions#repairs). 5083 // "UPDATE_CLUSTER" - The cluster is being updated. This is a broad category 5084 // of operations and includes operations that only change metadata as well as 5085 // those that must recreate the entire cluster. If the control plane must be 5086 // recreated, this will cause temporary downtime for zonal clusters. Some 5087 // features require recreating the nodes as well. Those will be recreated as 5088 // separate operations and the update may not be completely functional until 5089 // the node pools recreations finish. Node recreations will generally follow 5090 // [maintenance 5091 // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenanc 5092 // e-windows-and-exclusions). Some GKE-initiated operations use this type. This 5093 // includes certain types of auto-upgrades and incident mitigations. 5094 // "CREATE_NODE_POOL" - A node pool is being created. The node pool should be 5095 // assumed to be unusable until this operation finishes. In the event of an 5096 // error, the node pool may be partially created. If enabled, [node 5097 // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node 5098 // -auto-provisioning) may have automatically initiated such operations. 5099 // "DELETE_NODE_POOL" - The node pool is being deleted. The node pool should 5100 // be assumed to be unusable as soon as this operation starts. 5101 // "SET_NODE_POOL_MANAGEMENT" - The node pool's manamagent field is being 5102 // updated. These operations only update metadata and may be concurrent with 5103 // most other operations. 5104 // "AUTO_REPAIR_NODES" - A problem has been detected with nodes and [they are 5105 // being 5106 // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-re 5107 // pair). This operation type is initiated by GKE, typically automatically. 5108 // This operation may be concurrent with other operations and there may be 5109 // multiple repairs occurring on the same node pool. 5110 // "AUTO_UPGRADE_NODES" - Unused. Automatic node upgrade uses UPGRADE_NODES. 5111 // "SET_LABELS" - Unused. Updating labels uses UPDATE_CLUSTER. 5112 // "SET_MASTER_AUTH" - Unused. Updating master auth uses UPDATE_CLUSTER. 5113 // "SET_NODE_POOL_SIZE" - The node pool is being resized. With the exception 5114 // of resizing to or from size zero, the node pool is generally usable during 5115 // this operation. 5116 // "SET_NETWORK_POLICY" - Unused. Updating network policy uses 5117 // UPDATE_CLUSTER. 5118 // "SET_MAINTENANCE_POLICY" - Unused. Updating maintenance policy uses 5119 // UPDATE_CLUSTER. 5120 // "RESIZE_CLUSTER" - The control plane is being resized. This operation type 5121 // is initiated by GKE. These operations are often performed preemptively to 5122 // ensure that the control plane has sufficient resources and is not typically 5123 // an indication of issues. For more details, see [documentation on 5124 // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance 5125 // -windows-and-exclusions#repairs). 5126 // "FLEET_FEATURE_UPGRADE" - Fleet features of GKE Enterprise are being 5127 // upgraded. The cluster should be assumed to be blocked for other upgrades 5128 // until the operation finishes. 5129 OperationType string `json:"operationType,omitempty"` 5130 // Progress: Output only. [Output only] Progress information for an operation. 5131 Progress *OperationProgress `json:"progress,omitempty"` 5132 // SelfLink: Server-defined URI for the operation. Example: 5133 // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1 5134 // /operations/operation-123`. 5135 SelfLink string `json:"selfLink,omitempty"` 5136 // StartTime: [Output only] The time the operation started, in RFC3339 5137 // (https://www.ietf.org/rfc/rfc3339.txt) text format. 5138 StartTime string `json:"startTime,omitempty"` 5139 // Status: The current status of the operation. 5140 // 5141 // Possible values: 5142 // "STATUS_UNSPECIFIED" - Not set. 5143 // "PENDING" - The operation has been created. 5144 // "RUNNING" - The operation is currently running. 5145 // "DONE" - The operation is done, either cancelled or completed. 5146 // "ABORTING" - The operation is aborting. 5147 Status string `json:"status,omitempty"` 5148 // StatusMessage: Output only. If an error has occurred, a textual description 5149 // of the error. Deprecated. Use field error instead. 5150 StatusMessage string `json:"statusMessage,omitempty"` 5151 // TargetLink: Server-defined URI for the target of the operation. The format 5152 // of this is a URI to the resource being modified (such as a cluster, node 5153 // pool, or node). For node pool repairs, there may be multiple nodes being 5154 // repaired, but only one will be the target. Examples: - ## 5155 // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clust 5156 // ers/my-cluster` ## 5157 // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster 5158 // s/my-cluster/nodePools/my-np` 5159 // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster 5160 // s/my-cluster/nodePools/my-np/node/my-node` 5161 TargetLink string `json:"targetLink,omitempty"` 5162 // Zone: The name of the Google Compute Engine zone 5163 // (https://cloud.google.com/compute/docs/zones#available) in which the 5164 // operation is taking place. This field is deprecated, use location instead. 5165 Zone string `json:"zone,omitempty"` 5166 5167 // ServerResponse contains the HTTP response code and headers from the server. 5168 googleapi.ServerResponse `json:"-"` 5169 // ForceSendFields is a list of field names (e.g. "ClusterConditions") to 5170 // unconditionally include in API requests. By default, fields with empty or 5171 // default values are omitted from API requests. See 5172 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5173 // details. 5174 ForceSendFields []string `json:"-"` 5175 // NullFields is a list of field names (e.g. "ClusterConditions") to include in 5176 // API requests with the JSON null value. By default, fields with empty values 5177 // are omitted from API requests. See 5178 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5179 NullFields []string `json:"-"` 5180 } 5181 5182 func (s *Operation) MarshalJSON() ([]byte, error) { 5183 type NoMethod Operation 5184 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5185 } 5186 5187 // OperationError: OperationError records errors seen from CloudKMS keys 5188 // encountered during updates to DatabaseEncryption configuration. 5189 type OperationError struct { 5190 // ErrorMessage: Description of the error seen during the operation. 5191 ErrorMessage string `json:"errorMessage,omitempty"` 5192 // KeyName: CloudKMS key resource that had the error. 5193 KeyName string `json:"keyName,omitempty"` 5194 // Timestamp: Time when the CloudKMS error was seen. 5195 Timestamp string `json:"timestamp,omitempty"` 5196 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to 5197 // unconditionally include in API requests. By default, fields with empty or 5198 // default values are omitted from API requests. See 5199 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5200 // details. 5201 ForceSendFields []string `json:"-"` 5202 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API 5203 // requests with the JSON null value. By default, fields with empty values are 5204 // omitted from API requests. See 5205 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5206 NullFields []string `json:"-"` 5207 } 5208 5209 func (s *OperationError) MarshalJSON() ([]byte, error) { 5210 type NoMethod OperationError 5211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5212 } 5213 5214 // OperationProgress: Information about operation (or operation stage) 5215 // progress. 5216 type OperationProgress struct { 5217 // Metrics: Progress metric bundle, for example: metrics: [{name: "nodes done", 5218 // int_value: 15}, {name: "nodes total", int_value: 32}] or metrics: [{name: 5219 // "progress", double_value: 0.56}, {name: "progress scale", double_value: 5220 // 1.0}] 5221 Metrics []*Metric `json:"metrics,omitempty"` 5222 // Name: A non-parameterized string describing an operation stage. Unset for 5223 // single-stage operations. 5224 Name string `json:"name,omitempty"` 5225 // Stages: Substages of an operation or a stage. 5226 Stages []*OperationProgress `json:"stages,omitempty"` 5227 // Status: Status of an operation stage. Unset for single-stage operations. 5228 // 5229 // Possible values: 5230 // "STATUS_UNSPECIFIED" - Not set. 5231 // "PENDING" - The operation has been created. 5232 // "RUNNING" - The operation is currently running. 5233 // "DONE" - The operation is done, either cancelled or completed. 5234 // "ABORTING" - The operation is aborting. 5235 Status string `json:"status,omitempty"` 5236 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally 5237 // include in API requests. By default, fields with empty or default values are 5238 // omitted from API requests. See 5239 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5240 // details. 5241 ForceSendFields []string `json:"-"` 5242 // NullFields is a list of field names (e.g. "Metrics") to include in API 5243 // requests with the JSON null value. By default, fields with empty values are 5244 // omitted from API requests. See 5245 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5246 NullFields []string `json:"-"` 5247 } 5248 5249 func (s *OperationProgress) MarshalJSON() ([]byte, error) { 5250 type NoMethod OperationProgress 5251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5252 } 5253 5254 // OpportunisticMaintenanceStrategy: Strategy that will trigger maintenance on 5255 // behalf of the customer. 5256 type OpportunisticMaintenanceStrategy struct { 5257 // MaintenanceAvailabilityWindow: The window of time that opportunistic 5258 // maintenance can run. Example: A setting of 14 days implies that 5259 // opportunistic maintenance can only be ran in the 2 weeks leading up to the 5260 // scheduled maintenance date. Setting 28 days allows opportunistic maintenance 5261 // to run at any time in the scheduled maintenance window (all `PERIODIC` 5262 // maintenance is set 28 days in advance). 5263 MaintenanceAvailabilityWindow string `json:"maintenanceAvailabilityWindow,omitempty"` 5264 // MinNodesPerPool: The minimum nodes required to be available in a pool. 5265 // Blocks maintenance if it would cause the number of running nodes to dip 5266 // below this value. 5267 MinNodesPerPool int64 `json:"minNodesPerPool,omitempty,string"` 5268 // NodeIdleTimeWindow: The amount of time that a node can remain idle (no 5269 // customer owned workloads running), before triggering maintenance. 5270 NodeIdleTimeWindow string `json:"nodeIdleTimeWindow,omitempty"` 5271 // ForceSendFields is a list of field names (e.g. 5272 // "MaintenanceAvailabilityWindow") to unconditionally include in API requests. 5273 // By default, fields with empty or default values are omitted from API 5274 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 5275 // for more details. 5276 ForceSendFields []string `json:"-"` 5277 // NullFields is a list of field names (e.g. "MaintenanceAvailabilityWindow") 5278 // to include in API requests with the JSON null value. By default, fields with 5279 // empty values are omitted from API requests. See 5280 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5281 NullFields []string `json:"-"` 5282 } 5283 5284 func (s *OpportunisticMaintenanceStrategy) MarshalJSON() ([]byte, error) { 5285 type NoMethod OpportunisticMaintenanceStrategy 5286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5287 } 5288 5289 // ParentProductConfig: ParentProductConfig is the configuration of the parent 5290 // product of the cluster. This field is used by Google internal products that 5291 // are built on top of a GKE cluster and take the ownership of the cluster. 5292 type ParentProductConfig struct { 5293 // Labels: Labels contain the configuration of the parent product. 5294 Labels map[string]string `json:"labels,omitempty"` 5295 // ProductName: Name of the parent product associated with the cluster. 5296 ProductName string `json:"productName,omitempty"` 5297 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally 5298 // include in API requests. By default, fields with empty or default values are 5299 // omitted from API requests. See 5300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5301 // details. 5302 ForceSendFields []string `json:"-"` 5303 // NullFields is a list of field names (e.g. "Labels") to include in API 5304 // requests with the JSON null value. By default, fields with empty values are 5305 // omitted from API requests. See 5306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5307 NullFields []string `json:"-"` 5308 } 5309 5310 func (s *ParentProductConfig) MarshalJSON() ([]byte, error) { 5311 type NoMethod ParentProductConfig 5312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5313 } 5314 5315 // PlacementPolicy: PlacementPolicy defines the placement policy used by the 5316 // node pool. 5317 type PlacementPolicy struct { 5318 // PolicyName: If set, refers to the name of a custom resource policy supplied 5319 // by the user. The resource policy must be in the same project and region as 5320 // the node pool. If not found, InvalidArgument error is returned. 5321 PolicyName string `json:"policyName,omitempty"` 5322 // TpuTopology: TPU placement topology for pod slice node pool. 5323 // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies 5324 TpuTopology string `json:"tpuTopology,omitempty"` 5325 // Type: The type of placement. 5326 // 5327 // Possible values: 5328 // "TYPE_UNSPECIFIED" - TYPE_UNSPECIFIED specifies no requirements on nodes 5329 // placement. 5330 // "COMPACT" - COMPACT specifies node placement in the same availability 5331 // domain to ensure low communication latency. 5332 Type string `json:"type,omitempty"` 5333 // ForceSendFields is a list of field names (e.g. "PolicyName") to 5334 // unconditionally include in API requests. By default, fields with empty or 5335 // default values are omitted from API requests. See 5336 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5337 // details. 5338 ForceSendFields []string `json:"-"` 5339 // NullFields is a list of field names (e.g. "PolicyName") to include in API 5340 // requests with the JSON null value. By default, fields with empty values are 5341 // omitted from API requests. See 5342 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5343 NullFields []string `json:"-"` 5344 } 5345 5346 func (s *PlacementPolicy) MarshalJSON() ([]byte, error) { 5347 type NoMethod PlacementPolicy 5348 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5349 } 5350 5351 // PodCIDROverprovisionConfig: [PRIVATE FIELD] Config for pod CIDR size 5352 // overprovisioning. 5353 type PodCIDROverprovisionConfig struct { 5354 // Disable: Whether Pod CIDR overprovisioning is disabled. Note: Pod CIDR 5355 // overprovisioning is enabled by default. 5356 Disable bool `json:"disable,omitempty"` 5357 // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally 5358 // include in API requests. By default, fields with empty or default values are 5359 // omitted from API requests. See 5360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5361 // details. 5362 ForceSendFields []string `json:"-"` 5363 // NullFields is a list of field names (e.g. "Disable") to include in API 5364 // requests with the JSON null value. By default, fields with empty values are 5365 // omitted from API requests. See 5366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5367 NullFields []string `json:"-"` 5368 } 5369 5370 func (s *PodCIDROverprovisionConfig) MarshalJSON() ([]byte, error) { 5371 type NoMethod PodCIDROverprovisionConfig 5372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5373 } 5374 5375 // PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy feature. 5376 type PodSecurityPolicyConfig struct { 5377 // Enabled: Enable the PodSecurityPolicy controller for this cluster. If 5378 // enabled, pods must be valid under a PodSecurityPolicy to be created. 5379 Enabled bool `json:"enabled,omitempty"` 5380 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 5381 // include in API requests. By default, fields with empty or default values are 5382 // omitted from API requests. See 5383 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5384 // details. 5385 ForceSendFields []string `json:"-"` 5386 // NullFields is a list of field names (e.g. "Enabled") to include in API 5387 // requests with the JSON null value. By default, fields with empty values are 5388 // omitted from API requests. See 5389 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5390 NullFields []string `json:"-"` 5391 } 5392 5393 func (s *PodSecurityPolicyConfig) MarshalJSON() ([]byte, error) { 5394 type NoMethod PodSecurityPolicyConfig 5395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5396 } 5397 5398 // PolicyBinding: Binauthz policy that applies to this cluster. 5399 type PolicyBinding struct { 5400 // Name: The relative resource name of the binauthz platform policy to 5401 // evaluate. GKE platform policies have the following format: 5402 // `projects/{project_number}/platforms/gke/policies/{policy_id}`. 5403 Name string `json:"name,omitempty"` 5404 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5405 // include in API requests. By default, fields with empty or default values are 5406 // omitted from API requests. See 5407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5408 // details. 5409 ForceSendFields []string `json:"-"` 5410 // NullFields is a list of field names (e.g. "Name") to include in API requests 5411 // with the JSON null value. By default, fields with empty values are omitted 5412 // from API requests. See 5413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5414 NullFields []string `json:"-"` 5415 } 5416 5417 func (s *PolicyBinding) MarshalJSON() ([]byte, error) { 5418 type NoMethod PolicyBinding 5419 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5420 } 5421 5422 // PrivateClusterConfig: Configuration options for private clusters. 5423 type PrivateClusterConfig struct { 5424 // EnablePrivateEndpoint: Whether the master's internal IP address is used as 5425 // the cluster endpoint. 5426 EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` 5427 // EnablePrivateNodes: Whether nodes have internal IP addresses only. If 5428 // enabled, all nodes are given only RFC 1918 private addresses and communicate 5429 // with the master via private networking. 5430 EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` 5431 // MasterGlobalAccessConfig: Controls master global access settings. 5432 MasterGlobalAccessConfig *PrivateClusterMasterGlobalAccessConfig `json:"masterGlobalAccessConfig,omitempty"` 5433 // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the hosted 5434 // master network. This range will be used for assigning internal IP addresses 5435 // to the master or set of masters, as well as the ILB VIP. This range must not 5436 // overlap with any other ranges in use within the cluster's network. 5437 MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` 5438 // PeeringName: Output only. The peering name in the customer VPC used by this 5439 // cluster. 5440 PeeringName string `json:"peeringName,omitempty"` 5441 // PrivateEndpoint: Output only. The internal IP address of this cluster's 5442 // master endpoint. 5443 PrivateEndpoint string `json:"privateEndpoint,omitempty"` 5444 // PrivateEndpointSubnetwork: Subnet to provision the master's private endpoint 5445 // during cluster creation. Specified in projects/*/regions/*/subnetworks/* 5446 // format. 5447 PrivateEndpointSubnetwork string `json:"privateEndpointSubnetwork,omitempty"` 5448 // PublicEndpoint: Output only. The external IP address of this cluster's 5449 // master endpoint. 5450 PublicEndpoint string `json:"publicEndpoint,omitempty"` 5451 // ForceSendFields is a list of field names (e.g. "EnablePrivateEndpoint") to 5452 // unconditionally include in API requests. By default, fields with empty or 5453 // default values are omitted from API requests. See 5454 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5455 // details. 5456 ForceSendFields []string `json:"-"` 5457 // NullFields is a list of field names (e.g. "EnablePrivateEndpoint") to 5458 // include in API requests with the JSON null value. By default, fields with 5459 // empty values are omitted from API requests. See 5460 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5461 NullFields []string `json:"-"` 5462 } 5463 5464 func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { 5465 type NoMethod PrivateClusterConfig 5466 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5467 } 5468 5469 // PrivateClusterMasterGlobalAccessConfig: Configuration for controlling master 5470 // global access settings. 5471 type PrivateClusterMasterGlobalAccessConfig struct { 5472 // Enabled: Whenever master is accessible globally or not. 5473 Enabled bool `json:"enabled,omitempty"` 5474 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 5475 // include in API requests. By default, fields with empty or default values are 5476 // omitted from API requests. See 5477 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5478 // details. 5479 ForceSendFields []string `json:"-"` 5480 // NullFields is a list of field names (e.g. "Enabled") to include in API 5481 // requests with the JSON null value. By default, fields with empty values are 5482 // omitted from API requests. See 5483 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5484 NullFields []string `json:"-"` 5485 } 5486 5487 func (s *PrivateClusterMasterGlobalAccessConfig) MarshalJSON() ([]byte, error) { 5488 type NoMethod PrivateClusterMasterGlobalAccessConfig 5489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5490 } 5491 5492 // PrivateRegistryAccessConfig: PrivateRegistryAccessConfig contains access 5493 // configuration for private container registries. 5494 type PrivateRegistryAccessConfig struct { 5495 // CertificateAuthorityDomainConfig: Private registry access configuration. 5496 CertificateAuthorityDomainConfig []*CertificateAuthorityDomainConfig `json:"certificateAuthorityDomainConfig,omitempty"` 5497 // Enabled: Private registry access is enabled. 5498 Enabled bool `json:"enabled,omitempty"` 5499 // ForceSendFields is a list of field names (e.g. 5500 // "CertificateAuthorityDomainConfig") to unconditionally include in API 5501 // requests. By default, fields with empty or default values are omitted from 5502 // API requests. See 5503 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5504 // details. 5505 ForceSendFields []string `json:"-"` 5506 // NullFields is a list of field names (e.g. 5507 // "CertificateAuthorityDomainConfig") to include in API requests with the JSON 5508 // null value. By default, fields with empty values are omitted from API 5509 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for 5510 // more details. 5511 NullFields []string `json:"-"` 5512 } 5513 5514 func (s *PrivateRegistryAccessConfig) MarshalJSON() ([]byte, error) { 5515 type NoMethod PrivateRegistryAccessConfig 5516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5517 } 5518 5519 // ProtectConfig: ProtectConfig defines the flags needed to enable/disable 5520 // features for the Protect API. 5521 type ProtectConfig struct { 5522 // WorkloadConfig: WorkloadConfig defines which actions are enabled for a 5523 // cluster's workload configurations. 5524 WorkloadConfig *WorkloadConfig `json:"workloadConfig,omitempty"` 5525 // WorkloadVulnerabilityMode: Sets which mode to use for Protect workload 5526 // vulnerability scanning feature. 5527 // 5528 // Possible values: 5529 // "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED" - Default value not specified. 5530 // "DISABLED" - Disables Workload Vulnerability Scanning feature on the 5531 // cluster. 5532 // "BASIC" - Applies basic vulnerability scanning settings for cluster 5533 // workloads. 5534 WorkloadVulnerabilityMode string `json:"workloadVulnerabilityMode,omitempty"` 5535 // ForceSendFields is a list of field names (e.g. "WorkloadConfig") to 5536 // unconditionally include in API requests. By default, fields with empty or 5537 // default values are omitted from API requests. See 5538 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5539 // details. 5540 ForceSendFields []string `json:"-"` 5541 // NullFields is a list of field names (e.g. "WorkloadConfig") to include in 5542 // API requests with the JSON null value. By default, fields with empty values 5543 // are omitted from API requests. See 5544 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5545 NullFields []string `json:"-"` 5546 } 5547 5548 func (s *ProtectConfig) MarshalJSON() ([]byte, error) { 5549 type NoMethod ProtectConfig 5550 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5551 } 5552 5553 // PubSub: Pub/Sub specific notification config. 5554 type PubSub struct { 5555 // Enabled: Enable notifications for Pub/Sub. 5556 Enabled bool `json:"enabled,omitempty"` 5557 // Filter: Allows filtering to one or more specific event types. If no filter 5558 // is specified, or if a filter is specified with no event types, all event 5559 // types will be sent 5560 Filter *Filter `json:"filter,omitempty"` 5561 // Topic: The desired Pub/Sub topic to which notifications will be sent by GKE. 5562 // Format is `projects/{project}/topics/{topic}`. 5563 Topic string `json:"topic,omitempty"` 5564 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 5565 // include in API requests. By default, fields with empty or default values are 5566 // omitted from API requests. See 5567 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5568 // details. 5569 ForceSendFields []string `json:"-"` 5570 // NullFields is a list of field names (e.g. "Enabled") to include in API 5571 // requests with the JSON null value. By default, fields with empty values are 5572 // omitted from API requests. See 5573 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5574 NullFields []string `json:"-"` 5575 } 5576 5577 func (s *PubSub) MarshalJSON() ([]byte, error) { 5578 type NoMethod PubSub 5579 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5580 } 5581 5582 // QueuedProvisioning: QueuedProvisioning defines the queued provisioning used 5583 // by the node pool. 5584 type QueuedProvisioning struct { 5585 // Enabled: Denotes that this nodepool is QRM specific, meaning nodes can be 5586 // only obtained through queuing via the Cluster Autoscaler ProvisioningRequest 5587 // API. 5588 Enabled bool `json:"enabled,omitempty"` 5589 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 5590 // include in API requests. By default, fields with empty or default values are 5591 // omitted from API requests. See 5592 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5593 // details. 5594 ForceSendFields []string `json:"-"` 5595 // NullFields is a list of field names (e.g. "Enabled") to include in API 5596 // requests with the JSON null value. By default, fields with empty values are 5597 // omitted from API requests. See 5598 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5599 NullFields []string `json:"-"` 5600 } 5601 5602 func (s *QueuedProvisioning) MarshalJSON() ([]byte, error) { 5603 type NoMethod QueuedProvisioning 5604 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5605 } 5606 5607 // RangeInfo: RangeInfo contains the range name and the range utilization by 5608 // this cluster. 5609 type RangeInfo struct { 5610 // RangeName: Output only. [Output only] Name of a range. 5611 RangeName string `json:"rangeName,omitempty"` 5612 // Utilization: Output only. [Output only] The utilization of the range. 5613 Utilization float64 `json:"utilization,omitempty"` 5614 // ForceSendFields is a list of field names (e.g. "RangeName") to 5615 // unconditionally include in API requests. By default, fields with empty or 5616 // default values are omitted from API requests. See 5617 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5618 // details. 5619 ForceSendFields []string `json:"-"` 5620 // NullFields is a list of field names (e.g. "RangeName") to include in API 5621 // requests with the JSON null value. By default, fields with empty values are 5622 // omitted from API requests. See 5623 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5624 NullFields []string `json:"-"` 5625 } 5626 5627 func (s *RangeInfo) MarshalJSON() ([]byte, error) { 5628 type NoMethod RangeInfo 5629 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5630 } 5631 5632 func (s *RangeInfo) UnmarshalJSON(data []byte) error { 5633 type NoMethod RangeInfo 5634 var s1 struct { 5635 Utilization gensupport.JSONFloat64 `json:"utilization"` 5636 *NoMethod 5637 } 5638 s1.NoMethod = (*NoMethod)(s) 5639 if err := json.Unmarshal(data, &s1); err != nil { 5640 return err 5641 } 5642 s.Utilization = float64(s1.Utilization) 5643 return nil 5644 } 5645 5646 // RecurringTimeWindow: Represents an arbitrary window of time that recurs. 5647 type RecurringTimeWindow struct { 5648 // Recurrence: An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) 5649 // for how this window reccurs. They go on for the span of time between the 5650 // start and end time. For example, to have something repeat every weekday, 5651 // you'd use: `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` To repeat some window daily 5652 // (equivalent to the DailyMaintenanceWindow): `FREQ=DAILY` For the first 5653 // weekend of every month: `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` This specifies 5654 // how frequently the window starts. Eg, if you wanted to have a 9-5 UTC-4 5655 // window every weekday, you'd use something like: ``` start time = 5656 // 2019-01-01T09:00:00-0400 end time = 2019-01-01T17:00:00-0400 recurrence = 5657 // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ``` Windows can span multiple days. Eg, to 5658 // make the window encompass every weekend from midnight Saturday till the last 5659 // minute of Sunday UTC: ``` start time = 2019-01-05T00:00:00Z end time = 5660 // 2019-01-07T23:59:00Z recurrence = FREQ=WEEKLY;BYDAY=SA ``` Note the start 5661 // and end time's specific dates are largely arbitrary except to specify 5662 // duration of the window and when it first starts. The FREQ values of HOURLY, 5663 // MINUTELY, and SECONDLY are not supported. 5664 Recurrence string `json:"recurrence,omitempty"` 5665 // Window: The window of the first recurrence. 5666 Window *TimeWindow `json:"window,omitempty"` 5667 // ForceSendFields is a list of field names (e.g. "Recurrence") to 5668 // unconditionally include in API requests. By default, fields with empty or 5669 // default values are omitted from API requests. See 5670 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5671 // details. 5672 ForceSendFields []string `json:"-"` 5673 // NullFields is a list of field names (e.g. "Recurrence") to include in API 5674 // requests with the JSON null value. By default, fields with empty values are 5675 // omitted from API requests. See 5676 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5677 NullFields []string `json:"-"` 5678 } 5679 5680 func (s *RecurringTimeWindow) MarshalJSON() ([]byte, error) { 5681 type NoMethod RecurringTimeWindow 5682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5683 } 5684 5685 // ReleaseChannel: ReleaseChannel indicates which release channel a cluster is 5686 // subscribed to. Release channels are arranged in order of risk. When a 5687 // cluster is subscribed to a release channel, Google maintains both the master 5688 // version and the node version. Node auto-upgrade defaults to true and cannot 5689 // be disabled. 5690 type ReleaseChannel struct { 5691 // Channel: channel specifies which release channel the cluster is subscribed 5692 // to. 5693 // 5694 // Possible values: 5695 // "UNSPECIFIED" - No channel specified. 5696 // "RAPID" - RAPID channel is offered on an early access basis for customers 5697 // who want to test new releases. WARNING: Versions available in the RAPID 5698 // Channel may be subject to unresolved issues with no known workaround and are 5699 // not subject to any SLAs. 5700 // "REGULAR" - Clusters subscribed to REGULAR receive versions that are 5701 // considered GA quality. REGULAR is intended for production users who want to 5702 // take advantage of new features. 5703 // "STABLE" - Clusters subscribed to STABLE receive versions that are known 5704 // to be stable and reliable in production. 5705 Channel string `json:"channel,omitempty"` 5706 // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally 5707 // include in API requests. By default, fields with empty or default values are 5708 // omitted from API requests. See 5709 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5710 // details. 5711 ForceSendFields []string `json:"-"` 5712 // NullFields is a list of field names (e.g. "Channel") to include in API 5713 // requests with the JSON null value. By default, fields with empty values are 5714 // omitted from API requests. See 5715 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5716 NullFields []string `json:"-"` 5717 } 5718 5719 func (s *ReleaseChannel) MarshalJSON() ([]byte, error) { 5720 type NoMethod ReleaseChannel 5721 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5722 } 5723 5724 // ReleaseChannelConfig: ReleaseChannelConfig exposes configuration for a 5725 // release channel. 5726 type ReleaseChannelConfig struct { 5727 // AvailableVersions: Deprecated. This field has been deprecated and replaced 5728 // with the valid_versions field. 5729 AvailableVersions []*AvailableVersion `json:"availableVersions,omitempty"` 5730 // Channel: The release channel this configuration applies to. 5731 // 5732 // Possible values: 5733 // "UNSPECIFIED" - No channel specified. 5734 // "RAPID" - RAPID channel is offered on an early access basis for customers 5735 // who want to test new releases. WARNING: Versions available in the RAPID 5736 // Channel may be subject to unresolved issues with no known workaround and are 5737 // not subject to any SLAs. 5738 // "REGULAR" - Clusters subscribed to REGULAR receive versions that are 5739 // considered GA quality. REGULAR is intended for production users who want to 5740 // take advantage of new features. 5741 // "STABLE" - Clusters subscribed to STABLE receive versions that are known 5742 // to be stable and reliable in production. 5743 Channel string `json:"channel,omitempty"` 5744 // DefaultVersion: The default version for newly created clusters on the 5745 // channel. 5746 DefaultVersion string `json:"defaultVersion,omitempty"` 5747 // ValidVersions: List of valid versions for the channel. 5748 ValidVersions []string `json:"validVersions,omitempty"` 5749 // ForceSendFields is a list of field names (e.g. "AvailableVersions") to 5750 // unconditionally include in API requests. By default, fields with empty or 5751 // default values are omitted from API requests. See 5752 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5753 // details. 5754 ForceSendFields []string `json:"-"` 5755 // NullFields is a list of field names (e.g. "AvailableVersions") to include in 5756 // API requests with the JSON null value. By default, fields with empty values 5757 // are omitted from API requests. See 5758 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5759 NullFields []string `json:"-"` 5760 } 5761 5762 func (s *ReleaseChannelConfig) MarshalJSON() ([]byte, error) { 5763 type NoMethod ReleaseChannelConfig 5764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5765 } 5766 5767 // ReservationAffinity: ReservationAffinity 5768 // (https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 5769 // is the configuration of desired reservation which instances could take 5770 // capacity from. 5771 type ReservationAffinity struct { 5772 // ConsumeReservationType: Corresponds to the type of reservation consumption. 5773 // 5774 // Possible values: 5775 // "UNSPECIFIED" - Default value. This should not be used. 5776 // "NO_RESERVATION" - Do not consume from any reserved capacity. 5777 // "ANY_RESERVATION" - Consume any reservation available. 5778 // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. Must 5779 // specify key value fields for specifying the reservations. 5780 ConsumeReservationType string `json:"consumeReservationType,omitempty"` 5781 // Key: Corresponds to the label key of a reservation resource. To target a 5782 // SPECIFIC_RESERVATION by name, specify 5783 // "compute.googleapis.com/reservation-name" as the key and specify the name of 5784 // your reservation as its value. 5785 Key string `json:"key,omitempty"` 5786 // Values: Corresponds to the label value(s) of reservation resource(s). 5787 Values []string `json:"values,omitempty"` 5788 // ForceSendFields is a list of field names (e.g. "ConsumeReservationType") to 5789 // unconditionally include in API requests. By default, fields with empty or 5790 // default values are omitted from API requests. See 5791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5792 // details. 5793 ForceSendFields []string `json:"-"` 5794 // NullFields is a list of field names (e.g. "ConsumeReservationType") to 5795 // include in API requests with the JSON null value. By default, fields with 5796 // empty values are omitted from API requests. See 5797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5798 NullFields []string `json:"-"` 5799 } 5800 5801 func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { 5802 type NoMethod ReservationAffinity 5803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5804 } 5805 5806 // ResourceLabels: Collection of GCP labels 5807 // (https://cloud.google.com/resource-manager/docs/creating-managing-labels). 5808 type ResourceLabels struct { 5809 // Labels: Map of node label keys and node label values. 5810 Labels map[string]string `json:"labels,omitempty"` 5811 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally 5812 // include in API requests. By default, fields with empty or default values are 5813 // omitted from API requests. See 5814 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5815 // details. 5816 ForceSendFields []string `json:"-"` 5817 // NullFields is a list of field names (e.g. "Labels") to include in API 5818 // requests with the JSON null value. By default, fields with empty values are 5819 // omitted from API requests. See 5820 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5821 NullFields []string `json:"-"` 5822 } 5823 5824 func (s *ResourceLabels) MarshalJSON() ([]byte, error) { 5825 type NoMethod ResourceLabels 5826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5827 } 5828 5829 // ResourceLimit: Contains information about amount of some resource in the 5830 // cluster. For memory, value should be in GB. 5831 type ResourceLimit struct { 5832 // Maximum: Maximum amount of the resource in the cluster. 5833 Maximum int64 `json:"maximum,omitempty,string"` 5834 // Minimum: Minimum amount of the resource in the cluster. 5835 Minimum int64 `json:"minimum,omitempty,string"` 5836 // ResourceType: Resource name "cpu", "memory" or gpu-specific string. 5837 ResourceType string `json:"resourceType,omitempty"` 5838 // ForceSendFields is a list of field names (e.g. "Maximum") to unconditionally 5839 // include in API requests. By default, fields with empty or default values are 5840 // omitted from API requests. See 5841 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5842 // details. 5843 ForceSendFields []string `json:"-"` 5844 // NullFields is a list of field names (e.g. "Maximum") to include in API 5845 // requests with the JSON null value. By default, fields with empty values are 5846 // omitted from API requests. See 5847 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5848 NullFields []string `json:"-"` 5849 } 5850 5851 func (s *ResourceLimit) MarshalJSON() ([]byte, error) { 5852 type NoMethod ResourceLimit 5853 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5854 } 5855 5856 // ResourceManagerTags: A map of resource manager tag keys and values to be 5857 // attached to the nodes for managing Compute Engine firewalls using Network 5858 // Firewall Policies. Tags must be according to specifications in 5859 // https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. A 5860 // maximum of 5 tag key-value pairs can be specified. Existing tags will be 5861 // replaced with new values. 5862 type ResourceManagerTags struct { 5863 // Tags: Tags must be in one of the following formats ([KEY]=[VALUE]) 1. 5864 // `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` 2. 5865 // `{org_id}/{tag_key_name}={tag_value_name}` 3. 5866 // `{project_id}/{tag_key_name}={tag_value_name}` 5867 Tags map[string]string `json:"tags,omitempty"` 5868 // ForceSendFields is a list of field names (e.g. "Tags") to unconditionally 5869 // include in API requests. By default, fields with empty or default values are 5870 // omitted from API requests. See 5871 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5872 // details. 5873 ForceSendFields []string `json:"-"` 5874 // NullFields is a list of field names (e.g. "Tags") to include in API requests 5875 // with the JSON null value. By default, fields with empty values are omitted 5876 // from API requests. See 5877 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5878 NullFields []string `json:"-"` 5879 } 5880 5881 func (s *ResourceManagerTags) MarshalJSON() ([]byte, error) { 5882 type NoMethod ResourceManagerTags 5883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5884 } 5885 5886 // ResourceUsageExportConfig: Configuration for exporting cluster resource 5887 // usages. 5888 type ResourceUsageExportConfig struct { 5889 // BigqueryDestination: Configuration to use BigQuery as usage export 5890 // destination. 5891 BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"` 5892 // ConsumptionMeteringConfig: Configuration to enable resource consumption 5893 // metering. 5894 ConsumptionMeteringConfig *ConsumptionMeteringConfig `json:"consumptionMeteringConfig,omitempty"` 5895 // EnableNetworkEgressMetering: Whether to enable network egress metering for 5896 // this cluster. If enabled, a daemonset will be created in the cluster to 5897 // meter network egress traffic. 5898 EnableNetworkEgressMetering bool `json:"enableNetworkEgressMetering,omitempty"` 5899 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to 5900 // unconditionally include in API requests. By default, fields with empty or 5901 // default values are omitted from API requests. See 5902 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5903 // details. 5904 ForceSendFields []string `json:"-"` 5905 // NullFields is a list of field names (e.g. "BigqueryDestination") to include 5906 // in API requests with the JSON null value. By default, fields with empty 5907 // values are omitted from API requests. See 5908 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5909 NullFields []string `json:"-"` 5910 } 5911 5912 func (s *ResourceUsageExportConfig) MarshalJSON() ([]byte, error) { 5913 type NoMethod ResourceUsageExportConfig 5914 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5915 } 5916 5917 // RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest rollbacks the 5918 // previously Aborted or Failed NodePool upgrade. This will be an no-op if the 5919 // last upgrade successfully completed. 5920 type RollbackNodePoolUpgradeRequest struct { 5921 // ClusterId: Required. Deprecated. The name of the cluster to rollback. This 5922 // field has been deprecated and replaced by the name field. 5923 ClusterId string `json:"clusterId,omitempty"` 5924 // Name: The name (project, location, cluster, node pool id) of the node poll 5925 // to rollback upgrade. Specified in the format 5926 // `projects/*/locations/*/clusters/*/nodePools/*`. 5927 Name string `json:"name,omitempty"` 5928 // NodePoolId: Required. Deprecated. The name of the node pool to rollback. 5929 // This field has been deprecated and replaced by the name field. 5930 NodePoolId string `json:"nodePoolId,omitempty"` 5931 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 5932 // project number 5933 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 5934 // This field has been deprecated and replaced by the name field. 5935 ProjectId string `json:"projectId,omitempty"` 5936 // RespectPdb: Option for rollback to ignore the PodDisruptionBudget. Default 5937 // value is false. 5938 RespectPdb bool `json:"respectPdb,omitempty"` 5939 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 5940 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 5941 // resides. This field has been deprecated and replaced by the name field. 5942 Zone string `json:"zone,omitempty"` 5943 // ForceSendFields is a list of field names (e.g. "ClusterId") to 5944 // unconditionally include in API requests. By default, fields with empty or 5945 // default values are omitted from API requests. See 5946 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5947 // details. 5948 ForceSendFields []string `json:"-"` 5949 // NullFields is a list of field names (e.g. "ClusterId") to include in API 5950 // requests with the JSON null value. By default, fields with empty values are 5951 // omitted from API requests. See 5952 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5953 NullFields []string `json:"-"` 5954 } 5955 5956 func (s *RollbackNodePoolUpgradeRequest) MarshalJSON() ([]byte, error) { 5957 type NoMethod RollbackNodePoolUpgradeRequest 5958 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5959 } 5960 5961 // SandboxConfig: SandboxConfig contains configurations of the sandbox to use 5962 // for the node. 5963 type SandboxConfig struct { 5964 // SandboxType: Type of the sandbox to use for the node (e.g. 'gvisor') 5965 SandboxType string `json:"sandboxType,omitempty"` 5966 // Type: Type of the sandbox to use for the node. 5967 // 5968 // Possible values: 5969 // "UNSPECIFIED" - Default value. This should not be used. 5970 // "GVISOR" - Run sandbox using gvisor. 5971 Type string `json:"type,omitempty"` 5972 // ForceSendFields is a list of field names (e.g. "SandboxType") to 5973 // unconditionally include in API requests. By default, fields with empty or 5974 // default values are omitted from API requests. See 5975 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5976 // details. 5977 ForceSendFields []string `json:"-"` 5978 // NullFields is a list of field names (e.g. "SandboxType") to include in API 5979 // requests with the JSON null value. By default, fields with empty values are 5980 // omitted from API requests. See 5981 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5982 NullFields []string `json:"-"` 5983 } 5984 5985 func (s *SandboxConfig) MarshalJSON() ([]byte, error) { 5986 type NoMethod SandboxConfig 5987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5988 } 5989 5990 // SecondaryBootDisk: SecondaryBootDisk represents a persistent disk attached 5991 // to a node with special configurations based on its mode. 5992 type SecondaryBootDisk struct { 5993 // DiskImage: Fully-qualified resource ID for an existing disk image. 5994 DiskImage string `json:"diskImage,omitempty"` 5995 // Mode: Disk mode (container image cache, etc.) 5996 // 5997 // Possible values: 5998 // "MODE_UNSPECIFIED" - MODE_UNSPECIFIED is when mode is not set. 5999 // "CONTAINER_IMAGE_CACHE" - CONTAINER_IMAGE_CACHE is for using the secondary 6000 // boot disk as a container image cache. 6001 Mode string `json:"mode,omitempty"` 6002 // ForceSendFields is a list of field names (e.g. "DiskImage") to 6003 // unconditionally include in API requests. By default, fields with empty or 6004 // default values are omitted from API requests. See 6005 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6006 // details. 6007 ForceSendFields []string `json:"-"` 6008 // NullFields is a list of field names (e.g. "DiskImage") to include in API 6009 // requests with the JSON null value. By default, fields with empty values are 6010 // omitted from API requests. See 6011 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6012 NullFields []string `json:"-"` 6013 } 6014 6015 func (s *SecondaryBootDisk) MarshalJSON() ([]byte, error) { 6016 type NoMethod SecondaryBootDisk 6017 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6018 } 6019 6020 // SecondaryBootDiskUpdateStrategy: SecondaryBootDiskUpdateStrategy is a 6021 // placeholder which will be extended in the future to define different options 6022 // for updating secondary boot disks. 6023 type SecondaryBootDiskUpdateStrategy struct { 6024 } 6025 6026 // SecretManagerConfig: SecretManagerConfig is config for secret manager 6027 // enablement. 6028 type SecretManagerConfig struct { 6029 // Enabled: Whether the cluster is configured to use secret manager CSI 6030 // component. 6031 Enabled bool `json:"enabled,omitempty"` 6032 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 6033 // include in API requests. By default, fields with empty or default values are 6034 // omitted from API requests. See 6035 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6036 // details. 6037 ForceSendFields []string `json:"-"` 6038 // NullFields is a list of field names (e.g. "Enabled") to include in API 6039 // requests with the JSON null value. By default, fields with empty values are 6040 // omitted from API requests. See 6041 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6042 NullFields []string `json:"-"` 6043 } 6044 6045 func (s *SecretManagerConfig) MarshalJSON() ([]byte, error) { 6046 type NoMethod SecretManagerConfig 6047 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6048 } 6049 6050 // SecurityBulletinEvent: SecurityBulletinEvent is a notification sent to 6051 // customers when a security bulletin has been posted that they are vulnerable 6052 // to. 6053 type SecurityBulletinEvent struct { 6054 // AffectedSupportedMinors: The GKE minor versions affected by this 6055 // vulnerability. 6056 AffectedSupportedMinors []string `json:"affectedSupportedMinors,omitempty"` 6057 // BriefDescription: A brief description of the bulletin. See the bulletin 6058 // pointed to by the bulletin_uri field for an expanded description. 6059 BriefDescription string `json:"briefDescription,omitempty"` 6060 // BulletinId: The ID of the bulletin corresponding to the vulnerability. 6061 BulletinId string `json:"bulletinId,omitempty"` 6062 // BulletinUri: The URI link to the bulletin on the website for more 6063 // information. 6064 BulletinUri string `json:"bulletinUri,omitempty"` 6065 // CveIds: The CVEs associated with this bulletin. 6066 CveIds []string `json:"cveIds,omitempty"` 6067 // ManualStepsRequired: If this field is specified, it means there are manual 6068 // steps that the user must take to make their clusters safe. 6069 ManualStepsRequired bool `json:"manualStepsRequired,omitempty"` 6070 // PatchedVersions: The GKE versions where this vulnerability is patched. 6071 PatchedVersions []string `json:"patchedVersions,omitempty"` 6072 // ResourceTypeAffected: The resource type (node/control plane) that has the 6073 // vulnerability. Multiple notifications (1 notification per resource type) 6074 // will be sent for a vulnerability that affects > 1 resource type. 6075 ResourceTypeAffected string `json:"resourceTypeAffected,omitempty"` 6076 // Severity: The severity of this bulletin as it relates to GKE. 6077 Severity string `json:"severity,omitempty"` 6078 // SuggestedUpgradeTarget: This represents a version selected from the 6079 // patched_versions field that the cluster receiving this notification should 6080 // most likely want to upgrade to based on its current version. Note that if 6081 // this notification is being received by a given cluster, it means that this 6082 // version is currently available as an upgrade target in that cluster's 6083 // location. 6084 SuggestedUpgradeTarget string `json:"suggestedUpgradeTarget,omitempty"` 6085 // ForceSendFields is a list of field names (e.g. "AffectedSupportedMinors") to 6086 // unconditionally include in API requests. By default, fields with empty or 6087 // default values are omitted from API requests. See 6088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6089 // details. 6090 ForceSendFields []string `json:"-"` 6091 // NullFields is a list of field names (e.g. "AffectedSupportedMinors") to 6092 // include in API requests with the JSON null value. By default, fields with 6093 // empty values are omitted from API requests. See 6094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6095 NullFields []string `json:"-"` 6096 } 6097 6098 func (s *SecurityBulletinEvent) MarshalJSON() ([]byte, error) { 6099 type NoMethod SecurityBulletinEvent 6100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6101 } 6102 6103 // SecurityPostureConfig: SecurityPostureConfig defines the flags needed to 6104 // enable/disable features for the Security Posture API. 6105 type SecurityPostureConfig struct { 6106 // Mode: Sets which mode to use for Security Posture features. 6107 // 6108 // Possible values: 6109 // "MODE_UNSPECIFIED" - Default value not specified. 6110 // "DISABLED" - Disables Security Posture features on the cluster. 6111 // "BASIC" - Applies Security Posture features on the cluster. 6112 // "ENTERPRISE" - Applies the Security Posture off cluster Enterprise level 6113 // features. 6114 Mode string `json:"mode,omitempty"` 6115 // VulnerabilityMode: Sets which mode to use for vulnerability scanning. 6116 // 6117 // Possible values: 6118 // "VULNERABILITY_MODE_UNSPECIFIED" - Default value not specified. 6119 // "VULNERABILITY_DISABLED" - Disables vulnerability scanning on the cluster. 6120 // "VULNERABILITY_BASIC" - Applies basic vulnerability scanning on the 6121 // cluster. 6122 // "VULNERABILITY_ENTERPRISE" - Applies the Security Posture's vulnerability 6123 // on cluster Enterprise level features. 6124 VulnerabilityMode string `json:"vulnerabilityMode,omitempty"` 6125 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally 6126 // include in API requests. By default, fields with empty or default values are 6127 // omitted from API requests. See 6128 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6129 // details. 6130 ForceSendFields []string `json:"-"` 6131 // NullFields is a list of field names (e.g. "Mode") to include in API requests 6132 // with the JSON null value. By default, fields with empty values are omitted 6133 // from API requests. See 6134 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6135 NullFields []string `json:"-"` 6136 } 6137 6138 func (s *SecurityPostureConfig) MarshalJSON() ([]byte, error) { 6139 type NoMethod SecurityPostureConfig 6140 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6141 } 6142 6143 // ServerConfig: Kubernetes Engine service configuration. 6144 type ServerConfig struct { 6145 // Channels: List of release channel configurations. 6146 Channels []*ReleaseChannelConfig `json:"channels,omitempty"` 6147 // DefaultClusterVersion: Version of Kubernetes the service deploys by default. 6148 DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` 6149 // DefaultImageType: Default image type. 6150 DefaultImageType string `json:"defaultImageType,omitempty"` 6151 // ValidImageTypes: List of valid image types. 6152 ValidImageTypes []string `json:"validImageTypes,omitempty"` 6153 // ValidMasterVersions: List of valid master versions, in descending order. 6154 ValidMasterVersions []string `json:"validMasterVersions,omitempty"` 6155 // ValidNodeVersions: List of valid node upgrade target versions, in descending 6156 // order. 6157 ValidNodeVersions []string `json:"validNodeVersions,omitempty"` 6158 // WindowsVersionMaps: Maps of Kubernetes version and supported Windows server 6159 // versions. 6160 WindowsVersionMaps map[string]WindowsVersions `json:"windowsVersionMaps,omitempty"` 6161 6162 // ServerResponse contains the HTTP response code and headers from the server. 6163 googleapi.ServerResponse `json:"-"` 6164 // ForceSendFields is a list of field names (e.g. "Channels") to 6165 // unconditionally include in API requests. By default, fields with empty or 6166 // default values are omitted from API requests. See 6167 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6168 // details. 6169 ForceSendFields []string `json:"-"` 6170 // NullFields is a list of field names (e.g. "Channels") to include in API 6171 // requests with the JSON null value. By default, fields with empty values are 6172 // omitted from API requests. See 6173 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6174 NullFields []string `json:"-"` 6175 } 6176 6177 func (s *ServerConfig) MarshalJSON() ([]byte, error) { 6178 type NoMethod ServerConfig 6179 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6180 } 6181 6182 // ServiceExternalIPsConfig: Config to block services with externalIPs field. 6183 type ServiceExternalIPsConfig struct { 6184 // Enabled: Whether Services with ExternalIPs field are allowed or not. 6185 Enabled bool `json:"enabled,omitempty"` 6186 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 6187 // include in API requests. By default, fields with empty or default values are 6188 // omitted from API requests. See 6189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6190 // details. 6191 ForceSendFields []string `json:"-"` 6192 // NullFields is a list of field names (e.g. "Enabled") to include in API 6193 // requests with the JSON null value. By default, fields with empty values are 6194 // omitted from API requests. See 6195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6196 NullFields []string `json:"-"` 6197 } 6198 6199 func (s *ServiceExternalIPsConfig) MarshalJSON() ([]byte, error) { 6200 type NoMethod ServiceExternalIPsConfig 6201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6202 } 6203 6204 // SetAddonsConfigRequest: SetAddonsRequest sets the addons associated with the 6205 // cluster. 6206 type SetAddonsConfigRequest struct { 6207 // AddonsConfig: Required. The desired configurations for the various addons 6208 // available to run in the cluster. 6209 AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` 6210 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 6211 // field has been deprecated and replaced by the name field. 6212 ClusterId string `json:"clusterId,omitempty"` 6213 // Name: The name (project, location, cluster) of the cluster to set addons. 6214 // Specified in the format `projects/*/locations/*/clusters/*`. 6215 Name string `json:"name,omitempty"` 6216 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6217 // project number 6218 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6219 // This field has been deprecated and replaced by the name field. 6220 ProjectId string `json:"projectId,omitempty"` 6221 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6222 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6223 // resides. This field has been deprecated and replaced by the name field. 6224 Zone string `json:"zone,omitempty"` 6225 // ForceSendFields is a list of field names (e.g. "AddonsConfig") to 6226 // unconditionally include in API requests. By default, fields with empty or 6227 // default values are omitted from API requests. See 6228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6229 // details. 6230 ForceSendFields []string `json:"-"` 6231 // NullFields is a list of field names (e.g. "AddonsConfig") to include in API 6232 // requests with the JSON null value. By default, fields with empty values are 6233 // omitted from API requests. See 6234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6235 NullFields []string `json:"-"` 6236 } 6237 6238 func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { 6239 type NoMethod SetAddonsConfigRequest 6240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6241 } 6242 6243 // SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform labels on 6244 // a Google Container Engine cluster, which will in turn set them for Google 6245 // Compute Engine resources used by that cluster 6246 type SetLabelsRequest struct { 6247 // ClusterId: Required. Deprecated. The name of the cluster. This field has 6248 // been deprecated and replaced by the name field. 6249 ClusterId string `json:"clusterId,omitempty"` 6250 // LabelFingerprint: Required. The fingerprint of the previous set of labels 6251 // for this resource, used to detect conflicts. The fingerprint is initially 6252 // generated by Kubernetes Engine and changes after every request to modify or 6253 // update labels. You must always provide an up-to-date fingerprint hash when 6254 // updating or changing labels. Make a `get()` request to the resource to get 6255 // the latest fingerprint. 6256 LabelFingerprint string `json:"labelFingerprint,omitempty"` 6257 // Name: The name (project, location, cluster name) of the cluster to set 6258 // labels. Specified in the format `projects/*/locations/*/clusters/*`. 6259 Name string `json:"name,omitempty"` 6260 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6261 // project number 6262 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6263 // This field has been deprecated and replaced by the name field. 6264 ProjectId string `json:"projectId,omitempty"` 6265 // ResourceLabels: Required. The labels to set for that cluster. 6266 ResourceLabels map[string]string `json:"resourceLabels,omitempty"` 6267 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6268 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6269 // resides. This field has been deprecated and replaced by the name field. 6270 Zone string `json:"zone,omitempty"` 6271 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6272 // unconditionally include in API requests. By default, fields with empty or 6273 // default values are omitted from API requests. See 6274 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6275 // details. 6276 ForceSendFields []string `json:"-"` 6277 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6278 // requests with the JSON null value. By default, fields with empty values are 6279 // omitted from API requests. See 6280 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6281 NullFields []string `json:"-"` 6282 } 6283 6284 func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { 6285 type NoMethod SetLabelsRequest 6286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6287 } 6288 6289 // SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the ABAC 6290 // authorization mechanism for a cluster. 6291 type SetLegacyAbacRequest struct { 6292 // ClusterId: Required. Deprecated. The name of the cluster to update. This 6293 // field has been deprecated and replaced by the name field. 6294 ClusterId string `json:"clusterId,omitempty"` 6295 // Enabled: Required. Whether ABAC authorization will be enabled in the 6296 // cluster. 6297 Enabled bool `json:"enabled,omitempty"` 6298 // Name: The name (project, location, cluster name) of the cluster to set 6299 // legacy abac. Specified in the format `projects/*/locations/*/clusters/*`. 6300 Name string `json:"name,omitempty"` 6301 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6302 // project number 6303 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6304 // This field has been deprecated and replaced by the name field. 6305 ProjectId string `json:"projectId,omitempty"` 6306 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6307 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6308 // resides. This field has been deprecated and replaced by the name field. 6309 Zone string `json:"zone,omitempty"` 6310 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6311 // unconditionally include in API requests. By default, fields with empty or 6312 // default values are omitted from API requests. See 6313 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6314 // details. 6315 ForceSendFields []string `json:"-"` 6316 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6317 // requests with the JSON null value. By default, fields with empty values are 6318 // omitted from API requests. See 6319 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6320 NullFields []string `json:"-"` 6321 } 6322 6323 func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { 6324 type NoMethod SetLegacyAbacRequest 6325 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6326 } 6327 6328 // SetLocationsRequest: SetLocationsRequest sets the locations of the cluster. 6329 type SetLocationsRequest struct { 6330 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 6331 // field has been deprecated and replaced by the name field. 6332 ClusterId string `json:"clusterId,omitempty"` 6333 // Locations: Required. The desired list of Google Compute Engine zones 6334 // (https://cloud.google.com/compute/docs/zones#available) in which the 6335 // cluster's nodes should be located. Changing the locations a cluster is in 6336 // will result in nodes being either created or removed from the cluster, 6337 // depending on whether locations are being added or removed. This list must 6338 // always include the cluster's primary zone. 6339 Locations []string `json:"locations,omitempty"` 6340 // Name: The name (project, location, cluster) of the cluster to set locations. 6341 // Specified in the format `projects/*/locations/*/clusters/*`. 6342 Name string `json:"name,omitempty"` 6343 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6344 // project number 6345 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6346 // This field has been deprecated and replaced by the name field. 6347 ProjectId string `json:"projectId,omitempty"` 6348 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6349 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6350 // resides. This field has been deprecated and replaced by the name field. 6351 Zone string `json:"zone,omitempty"` 6352 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6353 // unconditionally include in API requests. By default, fields with empty or 6354 // default values are omitted from API requests. See 6355 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6356 // details. 6357 ForceSendFields []string `json:"-"` 6358 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6359 // requests with the JSON null value. By default, fields with empty values are 6360 // omitted from API requests. See 6361 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6362 NullFields []string `json:"-"` 6363 } 6364 6365 func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) { 6366 type NoMethod SetLocationsRequest 6367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6368 } 6369 6370 // SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging service 6371 // of a cluster. 6372 type SetLoggingServiceRequest struct { 6373 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 6374 // field has been deprecated and replaced by the name field. 6375 ClusterId string `json:"clusterId,omitempty"` 6376 // LoggingService: Required. The logging service the cluster should use to 6377 // write logs. Currently available options: * 6378 // `logging.googleapis.com/kubernetes` - The Cloud Logging service with a 6379 // Kubernetes-native resource model * `logging.googleapis.com` - The legacy 6380 // Cloud Logging service (no longer available as of GKE 1.15). * `none` - no 6381 // logs will be exported from the cluster. If left as an empty 6382 // string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or 6383 // `logging.googleapis.com` for earlier versions. 6384 LoggingService string `json:"loggingService,omitempty"` 6385 // Name: The name (project, location, cluster) of the cluster to set logging. 6386 // Specified in the format `projects/*/locations/*/clusters/*`. 6387 Name string `json:"name,omitempty"` 6388 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6389 // project number 6390 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6391 // This field has been deprecated and replaced by the name field. 6392 ProjectId string `json:"projectId,omitempty"` 6393 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6394 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6395 // resides. This field has been deprecated and replaced by the name field. 6396 Zone string `json:"zone,omitempty"` 6397 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6398 // unconditionally include in API requests. By default, fields with empty or 6399 // default values are omitted from API requests. See 6400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6401 // details. 6402 ForceSendFields []string `json:"-"` 6403 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6404 // requests with the JSON null value. By default, fields with empty values are 6405 // omitted from API requests. See 6406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6407 NullFields []string `json:"-"` 6408 } 6409 6410 func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { 6411 type NoMethod SetLoggingServiceRequest 6412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6413 } 6414 6415 // SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the 6416 // maintenance policy for a cluster. 6417 type SetMaintenancePolicyRequest struct { 6418 // ClusterId: Required. The name of the cluster to update. 6419 ClusterId string `json:"clusterId,omitempty"` 6420 // MaintenancePolicy: Required. The maintenance policy to be set for the 6421 // cluster. An empty field clears the existing maintenance policy. 6422 MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` 6423 // Name: The name (project, location, cluster name) of the cluster to set 6424 // maintenance policy. Specified in the format 6425 // `projects/*/locations/*/clusters/*`. 6426 Name string `json:"name,omitempty"` 6427 // ProjectId: Required. The Google Developers Console project ID or project 6428 // number 6429 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6430 ProjectId string `json:"projectId,omitempty"` 6431 // Zone: Required. The name of the Google Compute Engine zone 6432 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6433 // resides. 6434 Zone string `json:"zone,omitempty"` 6435 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6436 // unconditionally include in API requests. By default, fields with empty or 6437 // default values are omitted from API requests. See 6438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6439 // details. 6440 ForceSendFields []string `json:"-"` 6441 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6442 // requests with the JSON null value. By default, fields with empty values are 6443 // omitted from API requests. See 6444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6445 NullFields []string `json:"-"` 6446 } 6447 6448 func (s *SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) { 6449 type NoMethod SetMaintenancePolicyRequest 6450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6451 } 6452 6453 // SetMasterAuthRequest: SetMasterAuthRequest updates the admin password of a 6454 // cluster. 6455 type SetMasterAuthRequest struct { 6456 // Action: Required. The exact form of action to be taken on the master auth. 6457 // 6458 // Possible values: 6459 // "UNKNOWN" - Operation is unknown and will error out. 6460 // "SET_PASSWORD" - Set the password to a user generated value. 6461 // "GENERATE_PASSWORD" - Generate a new password and set it to that. 6462 // "SET_USERNAME" - Set the username. If an empty username is provided, basic 6463 // authentication is disabled for the cluster. If a non-empty username is 6464 // provided, basic authentication is enabled, with either a provided password 6465 // or a generated one. 6466 Action string `json:"action,omitempty"` 6467 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 6468 // field has been deprecated and replaced by the name field. 6469 ClusterId string `json:"clusterId,omitempty"` 6470 // Name: The name (project, location, cluster) of the cluster to set auth. 6471 // Specified in the format `projects/*/locations/*/clusters/*`. 6472 Name string `json:"name,omitempty"` 6473 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6474 // project number 6475 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6476 // This field has been deprecated and replaced by the name field. 6477 ProjectId string `json:"projectId,omitempty"` 6478 // Update: Required. A description of the update. 6479 Update *MasterAuth `json:"update,omitempty"` 6480 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6481 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6482 // resides. This field has been deprecated and replaced by the name field. 6483 Zone string `json:"zone,omitempty"` 6484 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally 6485 // include in API requests. By default, fields with empty or default values are 6486 // omitted from API requests. See 6487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6488 // details. 6489 ForceSendFields []string `json:"-"` 6490 // NullFields is a list of field names (e.g. "Action") to include in API 6491 // requests with the JSON null value. By default, fields with empty values are 6492 // omitted from API requests. See 6493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6494 NullFields []string `json:"-"` 6495 } 6496 6497 func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { 6498 type NoMethod SetMasterAuthRequest 6499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6500 } 6501 6502 // SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the monitoring 6503 // service of a cluster. 6504 type SetMonitoringServiceRequest struct { 6505 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 6506 // field has been deprecated and replaced by the name field. 6507 ClusterId string `json:"clusterId,omitempty"` 6508 // MonitoringService: Required. The monitoring service the cluster should use 6509 // to write metrics. Currently available options: * 6510 // "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a 6511 // Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy 6512 // Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No 6513 // metrics will be exported from the cluster. If left as an empty 6514 // string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or 6515 // `monitoring.googleapis.com` for earlier versions. 6516 MonitoringService string `json:"monitoringService,omitempty"` 6517 // Name: The name (project, location, cluster) of the cluster to set 6518 // monitoring. Specified in the format `projects/*/locations/*/clusters/*`. 6519 Name string `json:"name,omitempty"` 6520 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6521 // project number 6522 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6523 // This field has been deprecated and replaced by the name field. 6524 ProjectId string `json:"projectId,omitempty"` 6525 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6526 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6527 // resides. This field has been deprecated and replaced by the name field. 6528 Zone string `json:"zone,omitempty"` 6529 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6530 // unconditionally include in API requests. By default, fields with empty or 6531 // default values are omitted from API requests. See 6532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6533 // details. 6534 ForceSendFields []string `json:"-"` 6535 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6536 // requests with the JSON null value. By default, fields with empty values are 6537 // omitted from API requests. See 6538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6539 NullFields []string `json:"-"` 6540 } 6541 6542 func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { 6543 type NoMethod SetMonitoringServiceRequest 6544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6545 } 6546 6547 // SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables network 6548 // policy for a cluster. 6549 type SetNetworkPolicyRequest struct { 6550 // ClusterId: Required. Deprecated. The name of the cluster. This field has 6551 // been deprecated and replaced by the name field. 6552 ClusterId string `json:"clusterId,omitempty"` 6553 // Name: The name (project, location, cluster name) of the cluster to set 6554 // networking policy. Specified in the format 6555 // `projects/*/locations/*/clusters/*`. 6556 Name string `json:"name,omitempty"` 6557 // NetworkPolicy: Required. Configuration options for the NetworkPolicy 6558 // feature. 6559 NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` 6560 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6561 // project number 6562 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6563 // This field has been deprecated and replaced by the name field. 6564 ProjectId string `json:"projectId,omitempty"` 6565 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6566 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6567 // resides. This field has been deprecated and replaced by the name field. 6568 Zone string `json:"zone,omitempty"` 6569 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6570 // unconditionally include in API requests. By default, fields with empty or 6571 // default values are omitted from API requests. See 6572 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6573 // details. 6574 ForceSendFields []string `json:"-"` 6575 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6576 // requests with the JSON null value. By default, fields with empty values are 6577 // omitted from API requests. See 6578 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6579 NullFields []string `json:"-"` 6580 } 6581 6582 func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { 6583 type NoMethod SetNetworkPolicyRequest 6584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6585 } 6586 6587 // SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the 6588 // autoscaler settings of a node pool. 6589 type SetNodePoolAutoscalingRequest struct { 6590 // Autoscaling: Required. Autoscaling configuration for the node pool. 6591 Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` 6592 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 6593 // field has been deprecated and replaced by the name field. 6594 ClusterId string `json:"clusterId,omitempty"` 6595 // Name: The name (project, location, cluster, node pool) of the node pool to 6596 // set autoscaler settings. Specified in the format 6597 // `projects/*/locations/*/clusters/*/nodePools/*`. 6598 Name string `json:"name,omitempty"` 6599 // NodePoolId: Required. Deprecated. The name of the node pool to upgrade. This 6600 // field has been deprecated and replaced by the name field. 6601 NodePoolId string `json:"nodePoolId,omitempty"` 6602 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6603 // project number 6604 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6605 // This field has been deprecated and replaced by the name field. 6606 ProjectId string `json:"projectId,omitempty"` 6607 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6608 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6609 // resides. This field has been deprecated and replaced by the name field. 6610 Zone string `json:"zone,omitempty"` 6611 // ForceSendFields is a list of field names (e.g. "Autoscaling") to 6612 // unconditionally include in API requests. By default, fields with empty or 6613 // default values are omitted from API requests. See 6614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6615 // details. 6616 ForceSendFields []string `json:"-"` 6617 // NullFields is a list of field names (e.g. "Autoscaling") to include in API 6618 // requests with the JSON null value. By default, fields with empty values are 6619 // omitted from API requests. See 6620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6621 NullFields []string `json:"-"` 6622 } 6623 6624 func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { 6625 type NoMethod SetNodePoolAutoscalingRequest 6626 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6627 } 6628 6629 // SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the node 6630 // management properties of a node pool. 6631 type SetNodePoolManagementRequest struct { 6632 // ClusterId: Required. Deprecated. The name of the cluster to update. This 6633 // field has been deprecated and replaced by the name field. 6634 ClusterId string `json:"clusterId,omitempty"` 6635 // Management: Required. NodeManagement configuration for the node pool. 6636 Management *NodeManagement `json:"management,omitempty"` 6637 // Name: The name (project, location, cluster, node pool id) of the node pool 6638 // to set management properties. Specified in the format 6639 // `projects/*/locations/*/clusters/*/nodePools/*`. 6640 Name string `json:"name,omitempty"` 6641 // NodePoolId: Required. Deprecated. The name of the node pool to update. This 6642 // field has been deprecated and replaced by the name field. 6643 NodePoolId string `json:"nodePoolId,omitempty"` 6644 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6645 // project number 6646 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6647 // This field has been deprecated and replaced by the name field. 6648 ProjectId string `json:"projectId,omitempty"` 6649 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6650 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6651 // resides. This field has been deprecated and replaced by the name field. 6652 Zone string `json:"zone,omitempty"` 6653 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6654 // unconditionally include in API requests. By default, fields with empty or 6655 // default values are omitted from API requests. See 6656 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6657 // details. 6658 ForceSendFields []string `json:"-"` 6659 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6660 // requests with the JSON null value. By default, fields with empty values are 6661 // omitted from API requests. See 6662 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6663 NullFields []string `json:"-"` 6664 } 6665 6666 func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { 6667 type NoMethod SetNodePoolManagementRequest 6668 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6669 } 6670 6671 // SetNodePoolSizeRequest: SetNodePoolSizeRequest sets the size of a node pool. 6672 type SetNodePoolSizeRequest struct { 6673 // ClusterId: Required. Deprecated. The name of the cluster to update. This 6674 // field has been deprecated and replaced by the name field. 6675 ClusterId string `json:"clusterId,omitempty"` 6676 // Name: The name (project, location, cluster, node pool id) of the node pool 6677 // to set size. Specified in the format 6678 // `projects/*/locations/*/clusters/*/nodePools/*`. 6679 Name string `json:"name,omitempty"` 6680 // NodeCount: Required. The desired node count for the pool. 6681 NodeCount int64 `json:"nodeCount,omitempty"` 6682 // NodePoolId: Required. Deprecated. The name of the node pool to update. This 6683 // field has been deprecated and replaced by the name field. 6684 NodePoolId string `json:"nodePoolId,omitempty"` 6685 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6686 // project number 6687 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6688 // This field has been deprecated and replaced by the name field. 6689 ProjectId string `json:"projectId,omitempty"` 6690 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6691 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6692 // resides. This field has been deprecated and replaced by the name field. 6693 Zone string `json:"zone,omitempty"` 6694 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6695 // unconditionally include in API requests. By default, fields with empty or 6696 // default values are omitted from API requests. See 6697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6698 // details. 6699 ForceSendFields []string `json:"-"` 6700 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6701 // requests with the JSON null value. By default, fields with empty values are 6702 // omitted from API requests. See 6703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6704 NullFields []string `json:"-"` 6705 } 6706 6707 func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { 6708 type NoMethod SetNodePoolSizeRequest 6709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6710 } 6711 6712 // ShieldedInstanceConfig: A set of Shielded Instance options. 6713 type ShieldedInstanceConfig struct { 6714 // EnableIntegrityMonitoring: Defines whether the instance has integrity 6715 // monitoring enabled. Enables monitoring and attestation of the boot integrity 6716 // of the instance. The attestation is performed against the integrity policy 6717 // baseline. This baseline is initially derived from the implicitly trusted 6718 // boot image when the instance is created. 6719 EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` 6720 // EnableSecureBoot: Defines whether the instance has Secure Boot enabled. 6721 // Secure Boot helps ensure that the system only runs authentic software by 6722 // verifying the digital signature of all boot components, and halting the boot 6723 // process if signature verification fails. 6724 EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` 6725 // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") 6726 // to unconditionally include in API requests. By default, fields with empty or 6727 // default values are omitted from API requests. See 6728 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6729 // details. 6730 ForceSendFields []string `json:"-"` 6731 // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to 6732 // include in API requests with the JSON null value. By default, fields with 6733 // empty values are omitted from API requests. See 6734 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6735 NullFields []string `json:"-"` 6736 } 6737 6738 func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { 6739 type NoMethod ShieldedInstanceConfig 6740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6741 } 6742 6743 // ShieldedNodes: Configuration of Shielded Nodes feature. 6744 type ShieldedNodes struct { 6745 // Enabled: Whether Shielded Nodes features are enabled on all nodes in this 6746 // cluster. 6747 Enabled bool `json:"enabled,omitempty"` 6748 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 6749 // include in API requests. By default, fields with empty or default values are 6750 // omitted from API requests. See 6751 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6752 // details. 6753 ForceSendFields []string `json:"-"` 6754 // NullFields is a list of field names (e.g. "Enabled") to include in API 6755 // requests with the JSON null value. By default, fields with empty values are 6756 // omitted from API requests. See 6757 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6758 NullFields []string `json:"-"` 6759 } 6760 6761 func (s *ShieldedNodes) MarshalJSON() ([]byte, error) { 6762 type NoMethod ShieldedNodes 6763 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6764 } 6765 6766 // SoleTenantConfig: SoleTenantConfig contains the NodeAffinities to specify 6767 // what shared sole tenant node groups should back the node pool. 6768 type SoleTenantConfig struct { 6769 // NodeAffinities: NodeAffinities used to match to a shared sole tenant node 6770 // group. 6771 NodeAffinities []*NodeAffinity `json:"nodeAffinities,omitempty"` 6772 // ForceSendFields is a list of field names (e.g. "NodeAffinities") to 6773 // unconditionally include in API requests. By default, fields with empty or 6774 // default values are omitted from API requests. See 6775 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6776 // details. 6777 ForceSendFields []string `json:"-"` 6778 // NullFields is a list of field names (e.g. "NodeAffinities") to include in 6779 // API requests with the JSON null value. By default, fields with empty values 6780 // are omitted from API requests. See 6781 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6782 NullFields []string `json:"-"` 6783 } 6784 6785 func (s *SoleTenantConfig) MarshalJSON() ([]byte, error) { 6786 type NoMethod SoleTenantConfig 6787 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6788 } 6789 6790 // StandardRolloutPolicy: Standard rollout policy is the default policy for 6791 // blue-green. 6792 type StandardRolloutPolicy struct { 6793 // BatchNodeCount: Number of blue nodes to drain in a batch. 6794 BatchNodeCount int64 `json:"batchNodeCount,omitempty"` 6795 // BatchPercentage: Percentage of the blue pool nodes to drain in a batch. The 6796 // range of this field should be (0.0, 1.0]. 6797 BatchPercentage float64 `json:"batchPercentage,omitempty"` 6798 // BatchSoakDuration: Soak time after each batch gets drained. Default to zero. 6799 BatchSoakDuration string `json:"batchSoakDuration,omitempty"` 6800 // ForceSendFields is a list of field names (e.g. "BatchNodeCount") to 6801 // unconditionally include in API requests. By default, fields with empty or 6802 // default values are omitted from API requests. See 6803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6804 // details. 6805 ForceSendFields []string `json:"-"` 6806 // NullFields is a list of field names (e.g. "BatchNodeCount") to include in 6807 // API requests with the JSON null value. By default, fields with empty values 6808 // are omitted from API requests. See 6809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6810 NullFields []string `json:"-"` 6811 } 6812 6813 func (s *StandardRolloutPolicy) MarshalJSON() ([]byte, error) { 6814 type NoMethod StandardRolloutPolicy 6815 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6816 } 6817 6818 func (s *StandardRolloutPolicy) UnmarshalJSON(data []byte) error { 6819 type NoMethod StandardRolloutPolicy 6820 var s1 struct { 6821 BatchPercentage gensupport.JSONFloat64 `json:"batchPercentage"` 6822 *NoMethod 6823 } 6824 s1.NoMethod = (*NoMethod)(s) 6825 if err := json.Unmarshal(data, &s1); err != nil { 6826 return err 6827 } 6828 s.BatchPercentage = float64(s1.BatchPercentage) 6829 return nil 6830 } 6831 6832 // StartIPRotationRequest: StartIPRotationRequest creates a new IP for the 6833 // cluster and then performs a node upgrade on each node pool to point to the 6834 // new IP. 6835 type StartIPRotationRequest struct { 6836 // ClusterId: Required. Deprecated. The name of the cluster. This field has 6837 // been deprecated and replaced by the name field. 6838 ClusterId string `json:"clusterId,omitempty"` 6839 // Name: The name (project, location, cluster name) of the cluster to start IP 6840 // rotation. Specified in the format `projects/*/locations/*/clusters/*`. 6841 Name string `json:"name,omitempty"` 6842 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 6843 // project number 6844 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 6845 // This field has been deprecated and replaced by the name field. 6846 ProjectId string `json:"projectId,omitempty"` 6847 // RotateCredentials: Whether to rotate credentials during IP rotation. 6848 RotateCredentials bool `json:"rotateCredentials,omitempty"` 6849 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 6850 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 6851 // resides. This field has been deprecated and replaced by the name field. 6852 Zone string `json:"zone,omitempty"` 6853 // ForceSendFields is a list of field names (e.g. "ClusterId") to 6854 // unconditionally include in API requests. By default, fields with empty or 6855 // default values are omitted from API requests. See 6856 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6857 // details. 6858 ForceSendFields []string `json:"-"` 6859 // NullFields is a list of field names (e.g. "ClusterId") to include in API 6860 // requests with the JSON null value. By default, fields with empty values are 6861 // omitted from API requests. See 6862 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6863 NullFields []string `json:"-"` 6864 } 6865 6866 func (s *StartIPRotationRequest) MarshalJSON() ([]byte, error) { 6867 type NoMethod StartIPRotationRequest 6868 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6869 } 6870 6871 // StatefulHAConfig: Configuration for the Stateful HA add-on. 6872 type StatefulHAConfig struct { 6873 // Enabled: Whether the Stateful HA add-on is enabled for this cluster. 6874 Enabled bool `json:"enabled,omitempty"` 6875 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 6876 // include in API requests. By default, fields with empty or default values are 6877 // omitted from API requests. See 6878 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6879 // details. 6880 ForceSendFields []string `json:"-"` 6881 // NullFields is a list of field names (e.g. "Enabled") to include in API 6882 // requests with the JSON null value. By default, fields with empty values are 6883 // omitted from API requests. See 6884 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6885 NullFields []string `json:"-"` 6886 } 6887 6888 func (s *StatefulHAConfig) MarshalJSON() ([]byte, error) { 6889 type NoMethod StatefulHAConfig 6890 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6891 } 6892 6893 // Status: The `Status` type defines a logical error model that is suitable for 6894 // different programming environments, including REST APIs and RPC APIs. It is 6895 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 6896 // pieces of data: error code, error message, and error details. You can find 6897 // out more about this error model and how to work with it in the API Design 6898 // Guide (https://cloud.google.com/apis/design/errors). 6899 type Status struct { 6900 // Code: The status code, which should be an enum value of google.rpc.Code. 6901 Code int64 `json:"code,omitempty"` 6902 // Details: A list of messages that carry the error details. There is a common 6903 // set of message types for APIs to use. 6904 Details []googleapi.RawMessage `json:"details,omitempty"` 6905 // Message: A developer-facing error message, which should be in English. Any 6906 // user-facing error message should be localized and sent in the 6907 // google.rpc.Status.details field, or localized by the client. 6908 Message string `json:"message,omitempty"` 6909 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 6910 // include in API requests. By default, fields with empty or default values are 6911 // omitted from API requests. See 6912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6913 // details. 6914 ForceSendFields []string `json:"-"` 6915 // NullFields is a list of field names (e.g. "Code") to include in API requests 6916 // with the JSON null value. By default, fields with empty values are omitted 6917 // from API requests. See 6918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6919 NullFields []string `json:"-"` 6920 } 6921 6922 func (s *Status) MarshalJSON() ([]byte, error) { 6923 type NoMethod Status 6924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6925 } 6926 6927 // StatusCondition: StatusCondition describes why a cluster or a node pool has 6928 // a certain status (e.g., ERROR or DEGRADED). 6929 type StatusCondition struct { 6930 // CanonicalCode: Canonical code of the condition. 6931 // 6932 // Possible values: 6933 // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK 6934 // "CANCELLED" - The operation was cancelled, typically by the caller. HTTP 6935 // Mapping: 499 Client Closed Request 6936 // "UNKNOWN" - Unknown error. For example, this error may be returned when a 6937 // `Status` value received from another address space belongs to an error space 6938 // that is not known in this address space. Also errors raised by APIs that do 6939 // not return enough error information may be converted to this error. HTTP 6940 // Mapping: 500 Internal Server Error 6941 // "INVALID_ARGUMENT" - The client specified an invalid argument. Note that 6942 // this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates 6943 // arguments that are problematic regardless of the state of the system (e.g., 6944 // a malformed file name). HTTP Mapping: 400 Bad Request 6945 // "DEADLINE_EXCEEDED" - The deadline expired before the operation could 6946 // complete. For operations that change the state of the system, this error may 6947 // be returned even if the operation has completed successfully. For example, a 6948 // successful response from a server could have been delayed long enough for 6949 // the deadline to expire. HTTP Mapping: 504 Gateway Timeout 6950 // "NOT_FOUND" - Some requested entity (e.g., file or directory) was not 6951 // found. Note to server developers: if a request is denied for an entire class 6952 // of users, such as gradual feature rollout or undocumented allowlist, 6953 // `NOT_FOUND` may be used. If a request is denied for some users within a 6954 // class of users, such as user-based access control, `PERMISSION_DENIED` must 6955 // be used. HTTP Mapping: 404 Not Found 6956 // "ALREADY_EXISTS" - The entity that a client attempted to create (e.g., 6957 // file or directory) already exists. HTTP Mapping: 409 Conflict 6958 // "PERMISSION_DENIED" - The caller does not have permission to execute the 6959 // specified operation. `PERMISSION_DENIED` must not be used for rejections 6960 // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for 6961 // those errors). `PERMISSION_DENIED` must not be used if the caller can not be 6962 // identified (use `UNAUTHENTICATED` instead for those errors). This error code 6963 // does not imply the request is valid or the requested entity exists or 6964 // satisfies other pre-conditions. HTTP Mapping: 403 Forbidden 6965 // "UNAUTHENTICATED" - The request does not have valid authentication 6966 // credentials for the operation. HTTP Mapping: 401 Unauthorized 6967 // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a 6968 // per-user quota, or perhaps the entire file system is out of space. HTTP 6969 // Mapping: 429 Too Many Requests 6970 // "FAILED_PRECONDITION" - The operation was rejected because the system is 6971 // not in a state required for the operation's execution. For example, the 6972 // directory to be deleted is non-empty, an rmdir operation is applied to a 6973 // non-directory, etc. Service implementors can use the following guidelines to 6974 // decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use 6975 // `UNAVAILABLE` if the client can retry just the failing call. (b) Use 6976 // `ABORTED` if the client should retry at a higher level. For example, when a 6977 // client-specified test-and-set fails, indicating the client should restart a 6978 // read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client 6979 // should not retry until the system state has been explicitly fixed. For 6980 // example, if an "rmdir" fails because the directory is non-empty, 6981 // `FAILED_PRECONDITION` should be returned since the client should not retry 6982 // unless the files are deleted from the directory. HTTP Mapping: 400 Bad 6983 // Request 6984 // "ABORTED" - The operation was aborted, typically due to a concurrency 6985 // issue such as a sequencer check failure or transaction abort. See the 6986 // guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and 6987 // `UNAVAILABLE`. HTTP Mapping: 409 Conflict 6988 // "OUT_OF_RANGE" - The operation was attempted past the valid range. E.g., 6989 // seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error 6990 // indicates a problem that may be fixed if the system state changes. For 6991 // example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to 6992 // read at an offset that is not in the range [0,2^32-1], but it will generate 6993 // `OUT_OF_RANGE` if asked to read from an offset past the current file size. 6994 // There is a fair bit of overlap between `FAILED_PRECONDITION` and 6995 // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) 6996 // when it applies so that callers who are iterating through a space can easily 6997 // look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 6998 // 400 Bad Request 6999 // "UNIMPLEMENTED" - The operation is not implemented or is not 7000 // supported/enabled in this service. HTTP Mapping: 501 Not Implemented 7001 // "INTERNAL" - Internal errors. This means that some invariants expected by 7002 // the underlying system have been broken. This error code is reserved for 7003 // serious errors. HTTP Mapping: 500 Internal Server Error 7004 // "UNAVAILABLE" - The service is currently unavailable. This is most likely 7005 // a transient condition, which can be corrected by retrying with a backoff. 7006 // Note that it is not always safe to retry non-idempotent operations. See the 7007 // guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and 7008 // `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable 7009 // "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: 500 7010 // Internal Server Error 7011 CanonicalCode string `json:"canonicalCode,omitempty"` 7012 // Code: Machine-friendly representation of the condition Deprecated. Use 7013 // canonical_code instead. 7014 // 7015 // Possible values: 7016 // "UNKNOWN" - UNKNOWN indicates a generic condition. 7017 // "GCE_STOCKOUT" - GCE_STOCKOUT indicates that Google Compute Engine 7018 // resources are temporarily unavailable. 7019 // "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED indicates that 7020 // the user deleted their robot service account. 7021 // "GCE_QUOTA_EXCEEDED" - Google Compute Engine quota was exceeded. 7022 // "SET_BY_OPERATOR" - Cluster state was manually changed by an SRE due to a 7023 // system logic error. 7024 // "CLOUD_KMS_KEY_ERROR" - Unable to perform an encrypt operation against the 7025 // CloudKMS key used for etcd level encryption. 7026 // "CA_EXPIRING" - Cluster CA is expiring soon. More codes TBA 7027 Code string `json:"code,omitempty"` 7028 // Message: Human-friendly representation of the condition 7029 Message string `json:"message,omitempty"` 7030 // ForceSendFields is a list of field names (e.g. "CanonicalCode") to 7031 // unconditionally include in API requests. By default, fields with empty or 7032 // default values are omitted from API requests. See 7033 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7034 // details. 7035 ForceSendFields []string `json:"-"` 7036 // NullFields is a list of field names (e.g. "CanonicalCode") to include in API 7037 // requests with the JSON null value. By default, fields with empty values are 7038 // omitted from API requests. See 7039 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7040 NullFields []string `json:"-"` 7041 } 7042 7043 func (s *StatusCondition) MarshalJSON() ([]byte, error) { 7044 type NoMethod StatusCondition 7045 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7046 } 7047 7048 // TimeWindow: Represents an arbitrary window of time. 7049 type TimeWindow struct { 7050 // EndTime: The time that the window ends. The end time should take place after 7051 // the start time. 7052 EndTime string `json:"endTime,omitempty"` 7053 // MaintenanceExclusionOptions: MaintenanceExclusionOptions provides 7054 // maintenance exclusion related options. 7055 MaintenanceExclusionOptions *MaintenanceExclusionOptions `json:"maintenanceExclusionOptions,omitempty"` 7056 // StartTime: The time that the window first starts. 7057 StartTime string `json:"startTime,omitempty"` 7058 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 7059 // include in API requests. By default, fields with empty or default values are 7060 // omitted from API requests. See 7061 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7062 // details. 7063 ForceSendFields []string `json:"-"` 7064 // NullFields is a list of field names (e.g. "EndTime") to include in API 7065 // requests with the JSON null value. By default, fields with empty values are 7066 // omitted from API requests. See 7067 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7068 NullFields []string `json:"-"` 7069 } 7070 7071 func (s *TimeWindow) MarshalJSON() ([]byte, error) { 7072 type NoMethod TimeWindow 7073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7074 } 7075 7076 // TpuConfig: Configuration for Cloud TPU. 7077 type TpuConfig struct { 7078 // Enabled: Whether Cloud TPU integration is enabled or not. 7079 Enabled bool `json:"enabled,omitempty"` 7080 // Ipv4CidrBlock: IPv4 CIDR block reserved for Cloud TPU in the VPC. 7081 Ipv4CidrBlock string `json:"ipv4CidrBlock,omitempty"` 7082 // UseServiceNetworking: Whether to use service networking for Cloud TPU or 7083 // not. 7084 UseServiceNetworking bool `json:"useServiceNetworking,omitempty"` 7085 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 7086 // include in API requests. By default, fields with empty or default values are 7087 // omitted from API requests. See 7088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7089 // details. 7090 ForceSendFields []string `json:"-"` 7091 // NullFields is a list of field names (e.g. "Enabled") to include in API 7092 // requests with the JSON null value. By default, fields with empty values are 7093 // omitted from API requests. See 7094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7095 NullFields []string `json:"-"` 7096 } 7097 7098 func (s *TpuConfig) MarshalJSON() ([]byte, error) { 7099 type NoMethod TpuConfig 7100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7101 } 7102 7103 // UpdateClusterRequest: UpdateClusterRequest updates the settings of a 7104 // cluster. 7105 type UpdateClusterRequest struct { 7106 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 7107 // field has been deprecated and replaced by the name field. 7108 ClusterId string `json:"clusterId,omitempty"` 7109 // Name: The name (project, location, cluster) of the cluster to update. 7110 // Specified in the format `projects/*/locations/*/clusters/*`. 7111 Name string `json:"name,omitempty"` 7112 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 7113 // project number 7114 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 7115 // This field has been deprecated and replaced by the name field. 7116 ProjectId string `json:"projectId,omitempty"` 7117 // Update: Required. A description of the update. 7118 Update *ClusterUpdate `json:"update,omitempty"` 7119 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 7120 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 7121 // resides. This field has been deprecated and replaced by the name field. 7122 Zone string `json:"zone,omitempty"` 7123 // ForceSendFields is a list of field names (e.g. "ClusterId") to 7124 // unconditionally include in API requests. By default, fields with empty or 7125 // default values are omitted from API requests. See 7126 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7127 // details. 7128 ForceSendFields []string `json:"-"` 7129 // NullFields is a list of field names (e.g. "ClusterId") to include in API 7130 // requests with the JSON null value. By default, fields with empty values are 7131 // omitted from API requests. See 7132 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7133 NullFields []string `json:"-"` 7134 } 7135 7136 func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { 7137 type NoMethod UpdateClusterRequest 7138 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7139 } 7140 7141 // UpdateInfo: UpdateInfo contains resource (instance groups, etc), status and 7142 // other intermediate information relevant to a node pool upgrade. 7143 type UpdateInfo struct { 7144 // BlueGreenInfo: Information of a blue-green upgrade. 7145 BlueGreenInfo *BlueGreenInfo `json:"blueGreenInfo,omitempty"` 7146 // ForceSendFields is a list of field names (e.g. "BlueGreenInfo") to 7147 // unconditionally include in API requests. By default, fields with empty or 7148 // default values are omitted from API requests. See 7149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7150 // details. 7151 ForceSendFields []string `json:"-"` 7152 // NullFields is a list of field names (e.g. "BlueGreenInfo") to include in API 7153 // requests with the JSON null value. By default, fields with empty values are 7154 // omitted from API requests. See 7155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7156 NullFields []string `json:"-"` 7157 } 7158 7159 func (s *UpdateInfo) MarshalJSON() ([]byte, error) { 7160 type NoMethod UpdateInfo 7161 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7162 } 7163 7164 // UpdateMasterRequest: UpdateMasterRequest updates the master of the cluster. 7165 type UpdateMasterRequest struct { 7166 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 7167 // field has been deprecated and replaced by the name field. 7168 ClusterId string `json:"clusterId,omitempty"` 7169 // MasterVersion: Required. The Kubernetes version to change the master to. 7170 // Users may specify either explicit versions offered by Kubernetes Engine or 7171 // version aliases, which have the following behavior: - "latest": picks the 7172 // highest valid Kubernetes version - "1.X": picks the highest valid 7173 // patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid 7174 // gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit 7175 // Kubernetes version - "-": picks the default Kubernetes version 7176 MasterVersion string `json:"masterVersion,omitempty"` 7177 // Name: The name (project, location, cluster) of the cluster to update. 7178 // Specified in the format `projects/*/locations/*/clusters/*`. 7179 Name string `json:"name,omitempty"` 7180 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 7181 // project number 7182 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 7183 // This field has been deprecated and replaced by the name field. 7184 ProjectId string `json:"projectId,omitempty"` 7185 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 7186 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 7187 // resides. This field has been deprecated and replaced by the name field. 7188 Zone string `json:"zone,omitempty"` 7189 // ForceSendFields is a list of field names (e.g. "ClusterId") to 7190 // unconditionally include in API requests. By default, fields with empty or 7191 // default values are omitted from API requests. See 7192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7193 // details. 7194 ForceSendFields []string `json:"-"` 7195 // NullFields is a list of field names (e.g. "ClusterId") to include in API 7196 // requests with the JSON null value. By default, fields with empty values are 7197 // omitted from API requests. See 7198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7199 NullFields []string `json:"-"` 7200 } 7201 7202 func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) { 7203 type NoMethod UpdateMasterRequest 7204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7205 } 7206 7207 // UpdateNodePoolRequest: SetNodePoolVersionRequest updates the version of a 7208 // node pool. 7209 type UpdateNodePoolRequest struct { 7210 // Accelerators: A list of hardware accelerators to be attached to each node. 7211 // See https://cloud.google.com/compute/docs/gpus for more information about 7212 // support for GPUs. 7213 Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` 7214 // ClusterId: Required. Deprecated. The name of the cluster to upgrade. This 7215 // field has been deprecated and replaced by the name field. 7216 ClusterId string `json:"clusterId,omitempty"` 7217 // ConfidentialNodes: Confidential nodes config. All the nodes in the node pool 7218 // will be Confidential VM once enabled. 7219 ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` 7220 // ContainerdConfig: The desired containerd config for nodes in the node pool. 7221 // Initiates an upgrade operation that recreates the nodes with the new config. 7222 ContainerdConfig *ContainerdConfig `json:"containerdConfig,omitempty"` 7223 // DiskSizeGb: Optional. The desired disk size for nodes in the node pool. 7224 // Initiates an upgrade operation that migrates the nodes in the node pool to 7225 // the specified disk size. 7226 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 7227 // DiskType: Optional. The desired disk type for nodes in the node pool. 7228 // Initiates an upgrade operation that migrates the nodes in the node pool to 7229 // the specified disk type. 7230 DiskType string `json:"diskType,omitempty"` 7231 // Etag: The current etag of the node pool. If an etag is provided and does not 7232 // match the current etag of the node pool, update will be blocked and an 7233 // ABORTED error will be returned. 7234 Etag string `json:"etag,omitempty"` 7235 // FastSocket: Enable or disable NCCL fast socket for the node pool. 7236 FastSocket *FastSocket `json:"fastSocket,omitempty"` 7237 // GcfsConfig: GCFS config. 7238 GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` 7239 // Gvnic: Enable or disable gvnic on the node pool. 7240 Gvnic *VirtualNIC `json:"gvnic,omitempty"` 7241 // ImageType: Required. The desired image type for the node pool. Please see 7242 // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for 7243 // available image types. 7244 ImageType string `json:"imageType,omitempty"` 7245 // KubeletConfig: Node kubelet configs. 7246 KubeletConfig *NodeKubeletConfig `json:"kubeletConfig,omitempty"` 7247 // Labels: The desired node labels to be applied to all nodes in the node pool. 7248 // If this field is not present, the labels will not be changed. Otherwise, the 7249 // existing node labels will be *replaced* with the provided labels. 7250 Labels *NodeLabels `json:"labels,omitempty"` 7251 // LinuxNodeConfig: Parameters that can be configured on Linux nodes. 7252 LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"` 7253 // Locations: The desired list of Google Compute Engine zones 7254 // (https://cloud.google.com/compute/docs/zones#available) in which the node 7255 // pool's nodes should be located. Changing the locations for a node pool will 7256 // result in nodes being either created or removed from the node pool, 7257 // depending on whether locations are being added or removed. 7258 Locations []string `json:"locations,omitempty"` 7259 // LoggingConfig: Logging configuration. 7260 LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` 7261 // MachineType: Optional. The desired machine type for nodes in the node pool. 7262 // Initiates an upgrade operation that migrates the nodes in the node pool to 7263 // the specified machine type. 7264 MachineType string `json:"machineType,omitempty"` 7265 // Name: The name (project, location, cluster, node pool) of the node pool to 7266 // update. Specified in the format 7267 // `projects/*/locations/*/clusters/*/nodePools/*`. 7268 Name string `json:"name,omitempty"` 7269 // NodeNetworkConfig: Node network config. 7270 NodeNetworkConfig *NodeNetworkConfig `json:"nodeNetworkConfig,omitempty"` 7271 // NodePoolId: Required. Deprecated. The name of the node pool to upgrade. This 7272 // field has been deprecated and replaced by the name field. 7273 NodePoolId string `json:"nodePoolId,omitempty"` 7274 // NodeVersion: Required. The Kubernetes version to change the nodes to 7275 // (typically an upgrade). Users may specify either explicit versions offered 7276 // by Kubernetes Engine or version aliases, which have the following behavior: 7277 // - "latest": picks the highest valid Kubernetes version - "1.X": picks the 7278 // highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the 7279 // highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an 7280 // explicit Kubernetes version - "-": picks the Kubernetes master version 7281 NodeVersion string `json:"nodeVersion,omitempty"` 7282 // ProjectId: Required. Deprecated. The Google Developers Console project ID or 7283 // project number 7284 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 7285 // This field has been deprecated and replaced by the name field. 7286 ProjectId string `json:"projectId,omitempty"` 7287 // QueuedProvisioning: Specifies the configuration of queued provisioning. 7288 QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` 7289 // ResourceLabels: The resource labels for the node pool to use to annotate any 7290 // related Google Compute Engine resources. 7291 ResourceLabels *ResourceLabels `json:"resourceLabels,omitempty"` 7292 // ResourceManagerTags: Desired resource manager tag keys and values to be 7293 // attached to the nodes for managing Compute Engine firewalls using Network 7294 // Firewall Policies. Existing tags will be replaced with new values. 7295 ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` 7296 // Tags: The desired network tags to be applied to all nodes in the node pool. 7297 // If this field is not present, the tags will not be changed. Otherwise, the 7298 // existing network tags will be *replaced* with the provided tags. 7299 Tags *NetworkTags `json:"tags,omitempty"` 7300 // Taints: The desired node taints to be applied to all nodes in the node pool. 7301 // If this field is not present, the taints will not be changed. Otherwise, the 7302 // existing node taints will be *replaced* with the provided taints. 7303 Taints *NodeTaints `json:"taints,omitempty"` 7304 // UpgradeSettings: Upgrade settings control disruption and speed of the 7305 // upgrade. 7306 UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` 7307 // WindowsNodeConfig: Parameters that can be configured on Windows nodes. 7308 WindowsNodeConfig *WindowsNodeConfig `json:"windowsNodeConfig,omitempty"` 7309 // WorkloadMetadataConfig: The desired workload metadata config for the node 7310 // pool. 7311 WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` 7312 // Zone: Required. Deprecated. The name of the Google Compute Engine zone 7313 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 7314 // resides. This field has been deprecated and replaced by the name field. 7315 Zone string `json:"zone,omitempty"` 7316 // ForceSendFields is a list of field names (e.g. "Accelerators") to 7317 // unconditionally include in API requests. By default, fields with empty or 7318 // default values are omitted from API requests. See 7319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7320 // details. 7321 ForceSendFields []string `json:"-"` 7322 // NullFields is a list of field names (e.g. "Accelerators") to include in API 7323 // requests with the JSON null value. By default, fields with empty values are 7324 // omitted from API requests. See 7325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7326 NullFields []string `json:"-"` 7327 } 7328 7329 func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { 7330 type NoMethod UpdateNodePoolRequest 7331 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7332 } 7333 7334 // UpgradeAvailableEvent: UpgradeAvailableEvent is a notification sent to 7335 // customers when a new available version is released. 7336 type UpgradeAvailableEvent struct { 7337 // ReleaseChannel: The release channel of the version. If empty, it means a 7338 // non-channel release. 7339 ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` 7340 // Resource: Optional relative path to the resource. For example, the relative 7341 // path of the node pool. 7342 Resource string `json:"resource,omitempty"` 7343 // ResourceType: The resource type of the release version. 7344 // 7345 // Possible values: 7346 // "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" - Default value. This shouldn't be 7347 // used. 7348 // "MASTER" - Master / control plane 7349 // "NODE_POOL" - Node pool 7350 ResourceType string `json:"resourceType,omitempty"` 7351 // Version: The release version available for upgrade. 7352 Version string `json:"version,omitempty"` 7353 // WindowsVersions: Windows node versions info. 7354 WindowsVersions *WindowsVersions `json:"windowsVersions,omitempty"` 7355 // ForceSendFields is a list of field names (e.g. "ReleaseChannel") to 7356 // unconditionally include in API requests. By default, fields with empty or 7357 // default values are omitted from API requests. See 7358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7359 // details. 7360 ForceSendFields []string `json:"-"` 7361 // NullFields is a list of field names (e.g. "ReleaseChannel") to include in 7362 // API requests with the JSON null value. By default, fields with empty values 7363 // are omitted from API requests. See 7364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7365 NullFields []string `json:"-"` 7366 } 7367 7368 func (s *UpgradeAvailableEvent) MarshalJSON() ([]byte, error) { 7369 type NoMethod UpgradeAvailableEvent 7370 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7371 } 7372 7373 // UpgradeEvent: UpgradeEvent is a notification sent to customers by the 7374 // cluster server when a resource is upgrading. 7375 type UpgradeEvent struct { 7376 // CurrentVersion: The current version before the upgrade. 7377 CurrentVersion string `json:"currentVersion,omitempty"` 7378 // Operation: The operation associated with this upgrade. 7379 Operation string `json:"operation,omitempty"` 7380 // OperationStartTime: The time when the operation was started. 7381 OperationStartTime string `json:"operationStartTime,omitempty"` 7382 // Resource: Optional relative path to the resource. For example in node pool 7383 // upgrades, the relative path of the node pool. 7384 Resource string `json:"resource,omitempty"` 7385 // ResourceType: The resource type that is upgrading. 7386 // 7387 // Possible values: 7388 // "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" - Default value. This shouldn't be 7389 // used. 7390 // "MASTER" - Master / control plane 7391 // "NODE_POOL" - Node pool 7392 ResourceType string `json:"resourceType,omitempty"` 7393 // TargetVersion: The target version for the upgrade. 7394 TargetVersion string `json:"targetVersion,omitempty"` 7395 // ForceSendFields is a list of field names (e.g. "CurrentVersion") to 7396 // unconditionally include in API requests. By default, fields with empty or 7397 // default values are omitted from API requests. See 7398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7399 // details. 7400 ForceSendFields []string `json:"-"` 7401 // NullFields is a list of field names (e.g. "CurrentVersion") to include in 7402 // API requests with the JSON null value. By default, fields with empty values 7403 // are omitted from API requests. See 7404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7405 NullFields []string `json:"-"` 7406 } 7407 7408 func (s *UpgradeEvent) MarshalJSON() ([]byte, error) { 7409 type NoMethod UpgradeEvent 7410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7411 } 7412 7413 // UpgradeSettings: These upgrade settings control the level of parallelism and 7414 // the level of disruption caused by an upgrade. maxUnavailable controls the 7415 // number of nodes that can be simultaneously unavailable. maxSurge controls 7416 // the number of additional nodes that can be added to the node pool 7417 // temporarily for the time of the upgrade to increase the number of available 7418 // nodes. (maxUnavailable + maxSurge) determines the level of parallelism (how 7419 // many nodes are being upgraded at the same time). Note: upgrades inevitably 7420 // introduce some disruption since workloads need to be moved from old nodes to 7421 // new, upgraded ones. Even if maxUnavailable=0, this holds true. (Disruption 7422 // stays within the limits of PodDisruptionBudget, if it is configured.) 7423 // Consider a hypothetical node pool with 5 nodes having maxSurge=2, 7424 // maxUnavailable=1. This means the upgrade process upgrades 3 nodes 7425 // simultaneously. It creates 2 additional (upgraded) nodes, then it brings 7426 // down 3 old (not yet upgraded) nodes at the same time. This ensures that 7427 // there are always at least 4 nodes available. These upgrade settings 7428 // configure the upgrade strategy for the node pool. Use strategy to switch 7429 // between the strategies applied to the node pool. If the strategy is SURGE, 7430 // use max_surge and max_unavailable to control the level of parallelism and 7431 // the level of disruption caused by upgrade. 1. maxSurge controls the number 7432 // of additional nodes that can be added to the node pool temporarily for the 7433 // time of the upgrade to increase the number of available nodes. 2. 7434 // maxUnavailable controls the number of nodes that can be simultaneously 7435 // unavailable. 3. (maxUnavailable + maxSurge) determines the level of 7436 // parallelism (how many nodes are being upgraded at the same time). If the 7437 // strategy is BLUE_GREEN, use blue_green_settings to configure the blue-green 7438 // upgrade related settings. 1. standard_rollout_policy is the default policy. 7439 // The policy is used to control the way blue pool gets drained. The draining 7440 // is executed in the batch mode. The batch size could be specified as either 7441 // percentage of the node pool size or the number of nodes. batch_soak_duration 7442 // is the soak time after each batch gets drained. 2. node_pool_soak_duration 7443 // is the soak time after all blue nodes are drained. After this period, the 7444 // blue pool nodes will be deleted. 7445 type UpgradeSettings struct { 7446 // BlueGreenSettings: Settings for blue-green upgrade strategy. 7447 BlueGreenSettings *BlueGreenSettings `json:"blueGreenSettings,omitempty"` 7448 // MaxSurge: The maximum number of nodes that can be created beyond the current 7449 // size of the node pool during the upgrade process. 7450 MaxSurge int64 `json:"maxSurge,omitempty"` 7451 // MaxUnavailable: The maximum number of nodes that can be simultaneously 7452 // unavailable during the upgrade process. A node is considered available if 7453 // its status is Ready. 7454 MaxUnavailable int64 `json:"maxUnavailable,omitempty"` 7455 // Strategy: Update strategy of the node pool. 7456 // 7457 // Possible values: 7458 // "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" - Default value if unset. GKE 7459 // internally defaults the update strategy to SURGE for unspecified strategies. 7460 // "BLUE_GREEN" - blue-green upgrade. 7461 // "SURGE" - SURGE is the traditional way of upgrading a node pool. max_surge 7462 // and max_unavailable determines the level of upgrade parallelism. 7463 Strategy string `json:"strategy,omitempty"` 7464 // ForceSendFields is a list of field names (e.g. "BlueGreenSettings") to 7465 // unconditionally include in API requests. By default, fields with empty or 7466 // default values are omitted from API requests. See 7467 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7468 // details. 7469 ForceSendFields []string `json:"-"` 7470 // NullFields is a list of field names (e.g. "BlueGreenSettings") to include in 7471 // API requests with the JSON null value. By default, fields with empty values 7472 // are omitted from API requests. See 7473 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7474 NullFields []string `json:"-"` 7475 } 7476 7477 func (s *UpgradeSettings) MarshalJSON() ([]byte, error) { 7478 type NoMethod UpgradeSettings 7479 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7480 } 7481 7482 // UsableSubnetwork: UsableSubnetwork resource returns the subnetwork name, its 7483 // associated network and the primary CIDR range. 7484 type UsableSubnetwork struct { 7485 // IpCidrRange: The range of internal addresses that are owned by this 7486 // subnetwork. 7487 IpCidrRange string `json:"ipCidrRange,omitempty"` 7488 // Network: Network Name. Example: 7489 // projects/my-project/global/networks/my-network 7490 Network string `json:"network,omitempty"` 7491 // SecondaryIpRanges: Secondary IP ranges. 7492 SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` 7493 // StatusMessage: A human readable status message representing the reasons for 7494 // cases where the caller cannot use the secondary ranges under the subnet. For 7495 // example if the secondary_ip_ranges is empty due to a permission issue, an 7496 // insufficient permission message will be given by status_message. 7497 StatusMessage string `json:"statusMessage,omitempty"` 7498 // Subnetwork: Subnetwork Name. Example: 7499 // projects/my-project/regions/us-central1/subnetworks/my-subnet 7500 Subnetwork string `json:"subnetwork,omitempty"` 7501 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 7502 // unconditionally include in API requests. By default, fields with empty or 7503 // default values are omitted from API requests. See 7504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7505 // details. 7506 ForceSendFields []string `json:"-"` 7507 // NullFields is a list of field names (e.g. "IpCidrRange") to include in API 7508 // requests with the JSON null value. By default, fields with empty values are 7509 // omitted from API requests. See 7510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7511 NullFields []string `json:"-"` 7512 } 7513 7514 func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) { 7515 type NoMethod UsableSubnetwork 7516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7517 } 7518 7519 // UsableSubnetworkSecondaryRange: Secondary IP range of a usable subnetwork. 7520 type UsableSubnetworkSecondaryRange struct { 7521 // IpCidrRange: The range of IP addresses belonging to this subnetwork 7522 // secondary range. 7523 IpCidrRange string `json:"ipCidrRange,omitempty"` 7524 // RangeName: The name associated with this subnetwork secondary range, used 7525 // when adding an alias IP range to a VM instance. 7526 RangeName string `json:"rangeName,omitempty"` 7527 // Status: This field is to determine the status of the secondary range 7528 // programmably. 7529 // 7530 // Possible values: 7531 // "UNKNOWN" - UNKNOWN is the zero value of the Status enum. It's not a valid 7532 // status. 7533 // "UNUSED" - UNUSED denotes that this range is unclaimed by any cluster. 7534 // "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is claimed by a 7535 // cluster for services. It cannot be used for other clusters. 7536 // "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range was 7537 // created by the network admin and is currently claimed by a cluster for pods. 7538 // It can only be used by other clusters as a pod range. 7539 // "IN_USE_MANAGED_POD" - IN_USE_MANAGED_POD denotes this range was created 7540 // by GKE and is claimed for pods. It cannot be used for other clusters. 7541 Status string `json:"status,omitempty"` 7542 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 7543 // unconditionally include in API requests. By default, fields with empty or 7544 // default values are omitted from API requests. See 7545 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7546 // details. 7547 ForceSendFields []string `json:"-"` 7548 // NullFields is a list of field names (e.g. "IpCidrRange") to include in API 7549 // requests with the JSON null value. By default, fields with empty values are 7550 // omitted from API requests. See 7551 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7552 NullFields []string `json:"-"` 7553 } 7554 7555 func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { 7556 type NoMethod UsableSubnetworkSecondaryRange 7557 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7558 } 7559 7560 // VerticalPodAutoscaling: VerticalPodAutoscaling contains global, per-cluster 7561 // information required by Vertical Pod Autoscaler to automatically adjust the 7562 // resources of pods controlled by it. 7563 type VerticalPodAutoscaling struct { 7564 // Enabled: Enables vertical pod autoscaling. 7565 Enabled bool `json:"enabled,omitempty"` 7566 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 7567 // include in API requests. By default, fields with empty or default values are 7568 // omitted from API requests. See 7569 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7570 // details. 7571 ForceSendFields []string `json:"-"` 7572 // NullFields is a list of field names (e.g. "Enabled") to include in API 7573 // requests with the JSON null value. By default, fields with empty values are 7574 // omitted from API requests. See 7575 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7576 NullFields []string `json:"-"` 7577 } 7578 7579 func (s *VerticalPodAutoscaling) MarshalJSON() ([]byte, error) { 7580 type NoMethod VerticalPodAutoscaling 7581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7582 } 7583 7584 // VirtualNIC: Configuration of gVNIC feature. 7585 type VirtualNIC struct { 7586 // Enabled: Whether gVNIC features are enabled in the node pool. 7587 Enabled bool `json:"enabled,omitempty"` 7588 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 7589 // include in API requests. By default, fields with empty or default values are 7590 // omitted from API requests. See 7591 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7592 // details. 7593 ForceSendFields []string `json:"-"` 7594 // NullFields is a list of field names (e.g. "Enabled") to include in API 7595 // requests with the JSON null value. By default, fields with empty values are 7596 // omitted from API requests. See 7597 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7598 NullFields []string `json:"-"` 7599 } 7600 7601 func (s *VirtualNIC) MarshalJSON() ([]byte, error) { 7602 type NoMethod VirtualNIC 7603 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7604 } 7605 7606 // WindowsNodeConfig: Parameters that can be configured on Windows nodes. 7607 // Windows Node Config that define the parameters that will be used to 7608 // configure the Windows node pool settings 7609 type WindowsNodeConfig struct { 7610 // OsVersion: OSVersion specifies the Windows node config to be used on the 7611 // node 7612 // 7613 // Possible values: 7614 // "OS_VERSION_UNSPECIFIED" - When OSVersion is not specified 7615 // "OS_VERSION_LTSC2019" - LTSC2019 specifies to use LTSC2019 as the Windows 7616 // Servercore Base Image 7617 // "OS_VERSION_LTSC2022" - LTSC2022 specifies to use LTSC2022 as the Windows 7618 // Servercore Base Image 7619 OsVersion string `json:"osVersion,omitempty"` 7620 // ForceSendFields is a list of field names (e.g. "OsVersion") to 7621 // unconditionally include in API requests. By default, fields with empty or 7622 // default values are omitted from API requests. See 7623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7624 // details. 7625 ForceSendFields []string `json:"-"` 7626 // NullFields is a list of field names (e.g. "OsVersion") to include in API 7627 // requests with the JSON null value. By default, fields with empty values are 7628 // omitted from API requests. See 7629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7630 NullFields []string `json:"-"` 7631 } 7632 7633 func (s *WindowsNodeConfig) MarshalJSON() ([]byte, error) { 7634 type NoMethod WindowsNodeConfig 7635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7636 } 7637 7638 // WindowsVersion: Windows server version. 7639 type WindowsVersion struct { 7640 // ImageType: Windows server image type 7641 ImageType string `json:"imageType,omitempty"` 7642 // OsVersion: Windows server build number 7643 OsVersion string `json:"osVersion,omitempty"` 7644 // SupportEndDate: Mainstream support end date 7645 SupportEndDate *Date `json:"supportEndDate,omitempty"` 7646 // ForceSendFields is a list of field names (e.g. "ImageType") to 7647 // unconditionally include in API requests. By default, fields with empty or 7648 // default values are omitted from API requests. See 7649 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7650 // details. 7651 ForceSendFields []string `json:"-"` 7652 // NullFields is a list of field names (e.g. "ImageType") to include in API 7653 // requests with the JSON null value. By default, fields with empty values are 7654 // omitted from API requests. See 7655 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7656 NullFields []string `json:"-"` 7657 } 7658 7659 func (s *WindowsVersion) MarshalJSON() ([]byte, error) { 7660 type NoMethod WindowsVersion 7661 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7662 } 7663 7664 // WindowsVersions: Windows server versions. 7665 type WindowsVersions struct { 7666 // WindowsVersions: List of Windows server versions. 7667 WindowsVersions []*WindowsVersion `json:"windowsVersions,omitempty"` 7668 // ForceSendFields is a list of field names (e.g. "WindowsVersions") to 7669 // unconditionally include in API requests. By default, fields with empty or 7670 // default values are omitted from API requests. See 7671 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7672 // details. 7673 ForceSendFields []string `json:"-"` 7674 // NullFields is a list of field names (e.g. "WindowsVersions") to include in 7675 // API requests with the JSON null value. By default, fields with empty values 7676 // are omitted from API requests. See 7677 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7678 NullFields []string `json:"-"` 7679 } 7680 7681 func (s *WindowsVersions) MarshalJSON() ([]byte, error) { 7682 type NoMethod WindowsVersions 7683 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7684 } 7685 7686 // WorkloadALTSConfig: Configuration for direct-path (via ALTS) with workload 7687 // identity. 7688 type WorkloadALTSConfig struct { 7689 // EnableAlts: enable_alts controls whether the alts handshaker should be 7690 // enabled or not for direct-path. Requires Workload Identity (workload_pool 7691 // must be non-empty). 7692 EnableAlts bool `json:"enableAlts,omitempty"` 7693 // ForceSendFields is a list of field names (e.g. "EnableAlts") to 7694 // unconditionally include in API requests. By default, fields with empty or 7695 // default values are omitted from API requests. See 7696 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7697 // details. 7698 ForceSendFields []string `json:"-"` 7699 // NullFields is a list of field names (e.g. "EnableAlts") to include in API 7700 // requests with the JSON null value. By default, fields with empty values are 7701 // omitted from API requests. See 7702 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7703 NullFields []string `json:"-"` 7704 } 7705 7706 func (s *WorkloadALTSConfig) MarshalJSON() ([]byte, error) { 7707 type NoMethod WorkloadALTSConfig 7708 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7709 } 7710 7711 // WorkloadCertificates: Configuration for issuance of mTLS keys and 7712 // certificates to Kubernetes pods. 7713 type WorkloadCertificates struct { 7714 // EnableCertificates: enable_certificates controls issuance of workload mTLS 7715 // certificates. If set, the GKE Workload Identity Certificates controller and 7716 // node agent will be deployed in the cluster, which can then be configured by 7717 // creating a WorkloadCertificateConfig Custom Resource. Requires Workload 7718 // Identity (workload_pool must be non-empty). 7719 EnableCertificates bool `json:"enableCertificates,omitempty"` 7720 // ForceSendFields is a list of field names (e.g. "EnableCertificates") to 7721 // unconditionally include in API requests. By default, fields with empty or 7722 // default values are omitted from API requests. See 7723 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7724 // details. 7725 ForceSendFields []string `json:"-"` 7726 // NullFields is a list of field names (e.g. "EnableCertificates") to include 7727 // in API requests with the JSON null value. By default, fields with empty 7728 // values are omitted from API requests. See 7729 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7730 NullFields []string `json:"-"` 7731 } 7732 7733 func (s *WorkloadCertificates) MarshalJSON() ([]byte, error) { 7734 type NoMethod WorkloadCertificates 7735 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7736 } 7737 7738 // WorkloadConfig: WorkloadConfig defines the flags to enable or disable the 7739 // workload configurations for the cluster. 7740 type WorkloadConfig struct { 7741 // AuditMode: Sets which mode of auditing should be used for the cluster's 7742 // workloads. 7743 // 7744 // Possible values: 7745 // "MODE_UNSPECIFIED" - Default value meaning that no mode has been 7746 // specified. 7747 // "DISABLED" - This disables Workload Configuration auditing on the cluster, 7748 // meaning that nothing is surfaced. 7749 // "BASIC" - Applies the default set of policy auditing to a cluster's 7750 // workloads. 7751 // "BASELINE" - Surfaces configurations that are not in line with the Pod 7752 // Security Standard Baseline policy. 7753 // "RESTRICTED" - Surfaces configurations that are not in line with the Pod 7754 // Security Standard Restricted policy. 7755 AuditMode string `json:"auditMode,omitempty"` 7756 // ForceSendFields is a list of field names (e.g. "AuditMode") to 7757 // unconditionally include in API requests. By default, fields with empty or 7758 // default values are omitted from API requests. See 7759 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7760 // details. 7761 ForceSendFields []string `json:"-"` 7762 // NullFields is a list of field names (e.g. "AuditMode") to include in API 7763 // requests with the JSON null value. By default, fields with empty values are 7764 // omitted from API requests. See 7765 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7766 NullFields []string `json:"-"` 7767 } 7768 7769 func (s *WorkloadConfig) MarshalJSON() ([]byte, error) { 7770 type NoMethod WorkloadConfig 7771 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7772 } 7773 7774 // WorkloadIdentityConfig: Configuration for the use of Kubernetes Service 7775 // Accounts in GCP IAM policies. 7776 type WorkloadIdentityConfig struct { 7777 // IdentityNamespace: IAM Identity Namespace to attach all Kubernetes Service 7778 // Accounts to. 7779 IdentityNamespace string `json:"identityNamespace,omitempty"` 7780 // IdentityProvider: identity provider is the third party identity provider. 7781 IdentityProvider string `json:"identityProvider,omitempty"` 7782 // WorkloadPool: The workload pool to attach all Kubernetes service accounts 7783 // to. 7784 WorkloadPool string `json:"workloadPool,omitempty"` 7785 // ForceSendFields is a list of field names (e.g. "IdentityNamespace") to 7786 // unconditionally include in API requests. By default, fields with empty or 7787 // default values are omitted from API requests. See 7788 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7789 // details. 7790 ForceSendFields []string `json:"-"` 7791 // NullFields is a list of field names (e.g. "IdentityNamespace") to include in 7792 // API requests with the JSON null value. By default, fields with empty values 7793 // are omitted from API requests. See 7794 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7795 NullFields []string `json:"-"` 7796 } 7797 7798 func (s *WorkloadIdentityConfig) MarshalJSON() ([]byte, error) { 7799 type NoMethod WorkloadIdentityConfig 7800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7801 } 7802 7803 // WorkloadMetadataConfig: WorkloadMetadataConfig defines the metadata 7804 // configuration to expose to workloads on the node pool. 7805 type WorkloadMetadataConfig struct { 7806 // Mode: Mode is the configuration for how to expose metadata to workloads 7807 // running on the node pool. 7808 // 7809 // Possible values: 7810 // "MODE_UNSPECIFIED" - Not set. 7811 // "GCE_METADATA" - Expose all Compute Engine metadata to pods. 7812 // "GKE_METADATA" - Run the GKE Metadata Server on this node. The GKE 7813 // Metadata Server exposes a metadata API to workloads that is compatible with 7814 // the V1 Compute Metadata APIs exposed by the Compute Engine and App Engine 7815 // Metadata Servers. This feature can only be enabled if Workload Identity is 7816 // enabled at the cluster level. 7817 Mode string `json:"mode,omitempty"` 7818 // NodeMetadata: NodeMetadata is the configuration for how to expose metadata 7819 // to the workloads running on the node. 7820 // 7821 // Possible values: 7822 // "UNSPECIFIED" - Not set. 7823 // "SECURE" - Prevent workloads not in hostNetwork from accessing certain VM 7824 // metadata, specifically kube-env, which contains Kubelet credentials, and the 7825 // instance identity token. Metadata concealment is a temporary security 7826 // solution available while the bootstrapping process for cluster nodes is 7827 // being redesigned with significant security improvements. This feature is 7828 // scheduled to be deprecated in the future and later removed. 7829 // "EXPOSE" - Expose all VM metadata to pods. 7830 // "GKE_METADATA_SERVER" - Run the GKE Metadata Server on this node. The GKE 7831 // Metadata Server exposes a metadata API to workloads that is compatible with 7832 // the V1 Compute Metadata APIs exposed by the Compute Engine and App Engine 7833 // Metadata Servers. This feature can only be enabled if Workload Identity is 7834 // enabled at the cluster level. 7835 NodeMetadata string `json:"nodeMetadata,omitempty"` 7836 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally 7837 // include in API requests. By default, fields with empty or default values are 7838 // omitted from API requests. See 7839 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7840 // details. 7841 ForceSendFields []string `json:"-"` 7842 // NullFields is a list of field names (e.g. "Mode") to include in API requests 7843 // with the JSON null value. By default, fields with empty values are omitted 7844 // from API requests. See 7845 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7846 NullFields []string `json:"-"` 7847 } 7848 7849 func (s *WorkloadMetadataConfig) MarshalJSON() ([]byte, error) { 7850 type NoMethod WorkloadMetadataConfig 7851 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7852 } 7853 7854 // WorkloadPolicyConfig: WorkloadPolicyConfig is the configuration of workload 7855 // policy for autopilot clusters. 7856 type WorkloadPolicyConfig struct { 7857 // AllowNetAdmin: If true, workloads can use NET_ADMIN capability. 7858 AllowNetAdmin bool `json:"allowNetAdmin,omitempty"` 7859 // ForceSendFields is a list of field names (e.g. "AllowNetAdmin") to 7860 // unconditionally include in API requests. By default, fields with empty or 7861 // default values are omitted from API requests. See 7862 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7863 // details. 7864 ForceSendFields []string `json:"-"` 7865 // NullFields is a list of field names (e.g. "AllowNetAdmin") to include in API 7866 // requests with the JSON null value. By default, fields with empty values are 7867 // omitted from API requests. See 7868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7869 NullFields []string `json:"-"` 7870 } 7871 7872 func (s *WorkloadPolicyConfig) MarshalJSON() ([]byte, error) { 7873 type NoMethod WorkloadPolicyConfig 7874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7875 } 7876 7877 type ProjectsAggregatedUsableSubnetworksListCall struct { 7878 s *Service 7879 parent string 7880 urlParams_ gensupport.URLParams 7881 ifNoneMatch_ string 7882 ctx_ context.Context 7883 header_ http.Header 7884 } 7885 7886 // List: Lists subnetworks that can be used for creating clusters in a project. 7887 // 7888 // - parent: The parent project where subnetworks are usable. Specified in the 7889 // format `projects/*`. 7890 func (r *ProjectsAggregatedUsableSubnetworksService) List(parent string) *ProjectsAggregatedUsableSubnetworksListCall { 7891 c := &ProjectsAggregatedUsableSubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7892 c.parent = parent 7893 return c 7894 } 7895 7896 // Filter sets the optional parameter "filter": Filtering currently only 7897 // supports equality on the networkProjectId and must be in the form: 7898 // "networkProjectId=[PROJECTID]", where `networkProjectId` is the project 7899 // which owns the listed subnetworks. This defaults to the parent project ID. 7900 func (c *ProjectsAggregatedUsableSubnetworksListCall) Filter(filter string) *ProjectsAggregatedUsableSubnetworksListCall { 7901 c.urlParams_.Set("filter", filter) 7902 return c 7903 } 7904 7905 // PageSize sets the optional parameter "pageSize": The max number of results 7906 // per page that should be returned. If the number of available results is 7907 // larger than `page_size`, a `next_page_token` is returned which can be used 7908 // to get the next page of results in subsequent requests. Acceptable values 7909 // are 0 to 500, inclusive. (Default: 500) 7910 func (c *ProjectsAggregatedUsableSubnetworksListCall) PageSize(pageSize int64) *ProjectsAggregatedUsableSubnetworksListCall { 7911 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7912 return c 7913 } 7914 7915 // PageToken sets the optional parameter "pageToken": Specifies a page token to 7916 // use. Set this to the nextPageToken returned by previous list requests to get 7917 // the next page of results. 7918 func (c *ProjectsAggregatedUsableSubnetworksListCall) PageToken(pageToken string) *ProjectsAggregatedUsableSubnetworksListCall { 7919 c.urlParams_.Set("pageToken", pageToken) 7920 return c 7921 } 7922 7923 // Fields allows partial responses to be retrieved. See 7924 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7925 // details. 7926 func (c *ProjectsAggregatedUsableSubnetworksListCall) Fields(s ...googleapi.Field) *ProjectsAggregatedUsableSubnetworksListCall { 7927 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7928 return c 7929 } 7930 7931 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7932 // object's ETag matches the given value. This is useful for getting updates 7933 // only after the object has changed since the last request. 7934 func (c *ProjectsAggregatedUsableSubnetworksListCall) IfNoneMatch(entityTag string) *ProjectsAggregatedUsableSubnetworksListCall { 7935 c.ifNoneMatch_ = entityTag 7936 return c 7937 } 7938 7939 // Context sets the context to be used in this call's Do method. 7940 func (c *ProjectsAggregatedUsableSubnetworksListCall) Context(ctx context.Context) *ProjectsAggregatedUsableSubnetworksListCall { 7941 c.ctx_ = ctx 7942 return c 7943 } 7944 7945 // Header returns a http.Header that can be modified by the caller to add 7946 // headers to the request. 7947 func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header { 7948 if c.header_ == nil { 7949 c.header_ = make(http.Header) 7950 } 7951 return c.header_ 7952 } 7953 7954 func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) { 7955 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7956 if c.ifNoneMatch_ != "" { 7957 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7958 } 7959 var body io.Reader = nil 7960 c.urlParams_.Set("alt", alt) 7961 c.urlParams_.Set("prettyPrint", "false") 7962 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/aggregated/usableSubnetworks") 7963 urls += "?" + c.urlParams_.Encode() 7964 req, err := http.NewRequest("GET", urls, body) 7965 if err != nil { 7966 return nil, err 7967 } 7968 req.Header = reqHeaders 7969 googleapi.Expand(req.URL, map[string]string{ 7970 "parent": c.parent, 7971 }) 7972 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7973 } 7974 7975 // Do executes the "container.projects.aggregated.usableSubnetworks.list" call. 7976 // Any non-2xx status code is an error. Response headers are in either 7977 // *ListUsableSubnetworksResponse.ServerResponse.Header or (if a response was 7978 // returned at all) in error.(*googleapi.Error).Header. Use 7979 // googleapi.IsNotModified to check whether the returned error was because 7980 // http.StatusNotModified was returned. 7981 func (c *ProjectsAggregatedUsableSubnetworksListCall) Do(opts ...googleapi.CallOption) (*ListUsableSubnetworksResponse, error) { 7982 gensupport.SetOptions(c.urlParams_, opts...) 7983 res, err := c.doRequest("json") 7984 if res != nil && res.StatusCode == http.StatusNotModified { 7985 if res.Body != nil { 7986 res.Body.Close() 7987 } 7988 return nil, gensupport.WrapError(&googleapi.Error{ 7989 Code: res.StatusCode, 7990 Header: res.Header, 7991 }) 7992 } 7993 if err != nil { 7994 return nil, err 7995 } 7996 defer googleapi.CloseBody(res) 7997 if err := googleapi.CheckResponse(res); err != nil { 7998 return nil, gensupport.WrapError(err) 7999 } 8000 ret := &ListUsableSubnetworksResponse{ 8001 ServerResponse: googleapi.ServerResponse{ 8002 Header: res.Header, 8003 HTTPStatusCode: res.StatusCode, 8004 }, 8005 } 8006 target := &ret 8007 if err := gensupport.DecodeResponse(target, res); err != nil { 8008 return nil, err 8009 } 8010 return ret, nil 8011 } 8012 8013 // Pages invokes f for each page of results. 8014 // A non-nil error returned from f will halt the iteration. 8015 // The provided context supersedes any context provided to the Context method. 8016 func (c *ProjectsAggregatedUsableSubnetworksListCall) Pages(ctx context.Context, f func(*ListUsableSubnetworksResponse) error) error { 8017 c.ctx_ = ctx 8018 defer c.PageToken(c.urlParams_.Get("pageToken")) 8019 for { 8020 x, err := c.Do() 8021 if err != nil { 8022 return err 8023 } 8024 if err := f(x); err != nil { 8025 return err 8026 } 8027 if x.NextPageToken == "" { 8028 return nil 8029 } 8030 c.PageToken(x.NextPageToken) 8031 } 8032 } 8033 8034 type ProjectsLocationsGetServerConfigCall struct { 8035 s *Service 8036 name string 8037 urlParams_ gensupport.URLParams 8038 ifNoneMatch_ string 8039 ctx_ context.Context 8040 header_ http.Header 8041 } 8042 8043 // GetServerConfig: Returns configuration info about the Google Kubernetes 8044 // Engine service. 8045 // 8046 // - name: The name (project and location) of the server config to get, 8047 // specified in the format `projects/*/locations/*`. 8048 func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { 8049 c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8050 c.name = name 8051 return c 8052 } 8053 8054 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 8055 // Google Developers Console project ID or project number 8056 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 8057 // This field has been deprecated and replaced by the name field. 8058 func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *ProjectsLocationsGetServerConfigCall { 8059 c.urlParams_.Set("projectId", projectId) 8060 return c 8061 } 8062 8063 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 8064 // the Google Compute Engine zone 8065 // (https://cloud.google.com/compute/docs/zones#available) to return operations 8066 // for. This field has been deprecated and replaced by the name field. 8067 func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall { 8068 c.urlParams_.Set("zone", zone) 8069 return c 8070 } 8071 8072 // Fields allows partial responses to be retrieved. See 8073 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8074 // details. 8075 func (c *ProjectsLocationsGetServerConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetServerConfigCall { 8076 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8077 return c 8078 } 8079 8080 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8081 // object's ETag matches the given value. This is useful for getting updates 8082 // only after the object has changed since the last request. 8083 func (c *ProjectsLocationsGetServerConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetServerConfigCall { 8084 c.ifNoneMatch_ = entityTag 8085 return c 8086 } 8087 8088 // Context sets the context to be used in this call's Do method. 8089 func (c *ProjectsLocationsGetServerConfigCall) Context(ctx context.Context) *ProjectsLocationsGetServerConfigCall { 8090 c.ctx_ = ctx 8091 return c 8092 } 8093 8094 // Header returns a http.Header that can be modified by the caller to add 8095 // headers to the request. 8096 func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header { 8097 if c.header_ == nil { 8098 c.header_ = make(http.Header) 8099 } 8100 return c.header_ 8101 } 8102 8103 func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) { 8104 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8105 if c.ifNoneMatch_ != "" { 8106 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8107 } 8108 var body io.Reader = nil 8109 c.urlParams_.Set("alt", alt) 8110 c.urlParams_.Set("prettyPrint", "false") 8111 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/serverConfig") 8112 urls += "?" + c.urlParams_.Encode() 8113 req, err := http.NewRequest("GET", urls, body) 8114 if err != nil { 8115 return nil, err 8116 } 8117 req.Header = reqHeaders 8118 googleapi.Expand(req.URL, map[string]string{ 8119 "name": c.name, 8120 }) 8121 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8122 } 8123 8124 // Do executes the "container.projects.locations.getServerConfig" call. 8125 // Any non-2xx status code is an error. Response headers are in either 8126 // *ServerConfig.ServerResponse.Header or (if a response was returned at all) 8127 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8128 // whether the returned error was because http.StatusNotModified was returned. 8129 func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { 8130 gensupport.SetOptions(c.urlParams_, opts...) 8131 res, err := c.doRequest("json") 8132 if res != nil && res.StatusCode == http.StatusNotModified { 8133 if res.Body != nil { 8134 res.Body.Close() 8135 } 8136 return nil, gensupport.WrapError(&googleapi.Error{ 8137 Code: res.StatusCode, 8138 Header: res.Header, 8139 }) 8140 } 8141 if err != nil { 8142 return nil, err 8143 } 8144 defer googleapi.CloseBody(res) 8145 if err := googleapi.CheckResponse(res); err != nil { 8146 return nil, gensupport.WrapError(err) 8147 } 8148 ret := &ServerConfig{ 8149 ServerResponse: googleapi.ServerResponse{ 8150 Header: res.Header, 8151 HTTPStatusCode: res.StatusCode, 8152 }, 8153 } 8154 target := &ret 8155 if err := gensupport.DecodeResponse(target, res); err != nil { 8156 return nil, err 8157 } 8158 return ret, nil 8159 } 8160 8161 type ProjectsLocationsListCall struct { 8162 s *Service 8163 parent string 8164 urlParams_ gensupport.URLParams 8165 ifNoneMatch_ string 8166 ctx_ context.Context 8167 header_ http.Header 8168 } 8169 8170 // List: Fetches locations that offer Google Kubernetes Engine. 8171 // 8172 // - parent: Contains the name of the resource requested. Specified in the 8173 // format `projects/*`. 8174 func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall { 8175 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8176 c.parent = parent 8177 return c 8178 } 8179 8180 // Fields allows partial responses to be retrieved. See 8181 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8182 // details. 8183 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 8184 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8185 return c 8186 } 8187 8188 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8189 // object's ETag matches the given value. This is useful for getting updates 8190 // only after the object has changed since the last request. 8191 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 8192 c.ifNoneMatch_ = entityTag 8193 return c 8194 } 8195 8196 // Context sets the context to be used in this call's Do method. 8197 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 8198 c.ctx_ = ctx 8199 return c 8200 } 8201 8202 // Header returns a http.Header that can be modified by the caller to add 8203 // headers to the request. 8204 func (c *ProjectsLocationsListCall) Header() http.Header { 8205 if c.header_ == nil { 8206 c.header_ = make(http.Header) 8207 } 8208 return c.header_ 8209 } 8210 8211 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 8212 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8213 if c.ifNoneMatch_ != "" { 8214 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8215 } 8216 var body io.Reader = nil 8217 c.urlParams_.Set("alt", alt) 8218 c.urlParams_.Set("prettyPrint", "false") 8219 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/locations") 8220 urls += "?" + c.urlParams_.Encode() 8221 req, err := http.NewRequest("GET", urls, body) 8222 if err != nil { 8223 return nil, err 8224 } 8225 req.Header = reqHeaders 8226 googleapi.Expand(req.URL, map[string]string{ 8227 "parent": c.parent, 8228 }) 8229 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8230 } 8231 8232 // Do executes the "container.projects.locations.list" call. 8233 // Any non-2xx status code is an error. Response headers are in either 8234 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned 8235 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8236 // check whether the returned error was because http.StatusNotModified was 8237 // returned. 8238 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 8239 gensupport.SetOptions(c.urlParams_, opts...) 8240 res, err := c.doRequest("json") 8241 if res != nil && res.StatusCode == http.StatusNotModified { 8242 if res.Body != nil { 8243 res.Body.Close() 8244 } 8245 return nil, gensupport.WrapError(&googleapi.Error{ 8246 Code: res.StatusCode, 8247 Header: res.Header, 8248 }) 8249 } 8250 if err != nil { 8251 return nil, err 8252 } 8253 defer googleapi.CloseBody(res) 8254 if err := googleapi.CheckResponse(res); err != nil { 8255 return nil, gensupport.WrapError(err) 8256 } 8257 ret := &ListLocationsResponse{ 8258 ServerResponse: googleapi.ServerResponse{ 8259 Header: res.Header, 8260 HTTPStatusCode: res.StatusCode, 8261 }, 8262 } 8263 target := &ret 8264 if err := gensupport.DecodeResponse(target, res); err != nil { 8265 return nil, err 8266 } 8267 return ret, nil 8268 } 8269 8270 type ProjectsLocationsClustersCheckAutopilotCompatibilityCall struct { 8271 s *Service 8272 name string 8273 urlParams_ gensupport.URLParams 8274 ifNoneMatch_ string 8275 ctx_ context.Context 8276 header_ http.Header 8277 } 8278 8279 // CheckAutopilotCompatibility: Checks the cluster compatibility with Autopilot 8280 // mode, and returns a list of compatibility issues. 8281 // 8282 // - name: The name (project, location, cluster) of the cluster to retrieve. 8283 // Specified in the format `projects/*/locations/*/clusters/*`. 8284 func (r *ProjectsLocationsClustersService) CheckAutopilotCompatibility(name string) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { 8285 c := &ProjectsLocationsClustersCheckAutopilotCompatibilityCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8286 c.name = name 8287 return c 8288 } 8289 8290 // Fields allows partial responses to be retrieved. See 8291 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8292 // details. 8293 func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { 8294 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8295 return c 8296 } 8297 8298 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8299 // object's ETag matches the given value. This is useful for getting updates 8300 // only after the object has changed since the last request. 8301 func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { 8302 c.ifNoneMatch_ = entityTag 8303 return c 8304 } 8305 8306 // Context sets the context to be used in this call's Do method. 8307 func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Context(ctx context.Context) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { 8308 c.ctx_ = ctx 8309 return c 8310 } 8311 8312 // Header returns a http.Header that can be modified by the caller to add 8313 // headers to the request. 8314 func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Header() http.Header { 8315 if c.header_ == nil { 8316 c.header_ = make(http.Header) 8317 } 8318 return c.header_ 8319 } 8320 8321 func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) doRequest(alt string) (*http.Response, error) { 8322 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8323 if c.ifNoneMatch_ != "" { 8324 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8325 } 8326 var body io.Reader = nil 8327 c.urlParams_.Set("alt", alt) 8328 c.urlParams_.Set("prettyPrint", "false") 8329 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:checkAutopilotCompatibility") 8330 urls += "?" + c.urlParams_.Encode() 8331 req, err := http.NewRequest("GET", urls, body) 8332 if err != nil { 8333 return nil, err 8334 } 8335 req.Header = reqHeaders 8336 googleapi.Expand(req.URL, map[string]string{ 8337 "name": c.name, 8338 }) 8339 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8340 } 8341 8342 // Do executes the "container.projects.locations.clusters.checkAutopilotCompatibility" call. 8343 // Any non-2xx status code is an error. Response headers are in either 8344 // *CheckAutopilotCompatibilityResponse.ServerResponse.Header or (if a response 8345 // was returned at all) in error.(*googleapi.Error).Header. Use 8346 // googleapi.IsNotModified to check whether the returned error was because 8347 // http.StatusNotModified was returned. 8348 func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Do(opts ...googleapi.CallOption) (*CheckAutopilotCompatibilityResponse, error) { 8349 gensupport.SetOptions(c.urlParams_, opts...) 8350 res, err := c.doRequest("json") 8351 if res != nil && res.StatusCode == http.StatusNotModified { 8352 if res.Body != nil { 8353 res.Body.Close() 8354 } 8355 return nil, gensupport.WrapError(&googleapi.Error{ 8356 Code: res.StatusCode, 8357 Header: res.Header, 8358 }) 8359 } 8360 if err != nil { 8361 return nil, err 8362 } 8363 defer googleapi.CloseBody(res) 8364 if err := googleapi.CheckResponse(res); err != nil { 8365 return nil, gensupport.WrapError(err) 8366 } 8367 ret := &CheckAutopilotCompatibilityResponse{ 8368 ServerResponse: googleapi.ServerResponse{ 8369 Header: res.Header, 8370 HTTPStatusCode: res.StatusCode, 8371 }, 8372 } 8373 target := &ret 8374 if err := gensupport.DecodeResponse(target, res); err != nil { 8375 return nil, err 8376 } 8377 return ret, nil 8378 } 8379 8380 type ProjectsLocationsClustersCompleteIpRotationCall struct { 8381 s *Service 8382 name string 8383 completeiprotationrequest *CompleteIPRotationRequest 8384 urlParams_ gensupport.URLParams 8385 ctx_ context.Context 8386 header_ http.Header 8387 } 8388 8389 // CompleteIpRotation: Completes master IP rotation. 8390 // 8391 // - name: The name (project, location, cluster name) of the cluster to 8392 // complete IP rotation. Specified in the format 8393 // `projects/*/locations/*/clusters/*`. 8394 func (r *ProjectsLocationsClustersService) CompleteIpRotation(name string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsLocationsClustersCompleteIpRotationCall { 8395 c := &ProjectsLocationsClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8396 c.name = name 8397 c.completeiprotationrequest = completeiprotationrequest 8398 return c 8399 } 8400 8401 // Fields allows partial responses to be retrieved. See 8402 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8403 // details. 8404 func (c *ProjectsLocationsClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCompleteIpRotationCall { 8405 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8406 return c 8407 } 8408 8409 // Context sets the context to be used in this call's Do method. 8410 func (c *ProjectsLocationsClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersCompleteIpRotationCall { 8411 c.ctx_ = ctx 8412 return c 8413 } 8414 8415 // Header returns a http.Header that can be modified by the caller to add 8416 // headers to the request. 8417 func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header { 8418 if c.header_ == nil { 8419 c.header_ = make(http.Header) 8420 } 8421 return c.header_ 8422 } 8423 8424 func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { 8425 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8426 var body io.Reader = nil 8427 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) 8428 if err != nil { 8429 return nil, err 8430 } 8431 c.urlParams_.Set("alt", alt) 8432 c.urlParams_.Set("prettyPrint", "false") 8433 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeIpRotation") 8434 urls += "?" + c.urlParams_.Encode() 8435 req, err := http.NewRequest("POST", urls, body) 8436 if err != nil { 8437 return nil, err 8438 } 8439 req.Header = reqHeaders 8440 googleapi.Expand(req.URL, map[string]string{ 8441 "name": c.name, 8442 }) 8443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8444 } 8445 8446 // Do executes the "container.projects.locations.clusters.completeIpRotation" call. 8447 // Any non-2xx status code is an error. Response headers are in either 8448 // *Operation.ServerResponse.Header or (if a response was returned at all) in 8449 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8450 // whether the returned error was because http.StatusNotModified was returned. 8451 func (c *ProjectsLocationsClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8452 gensupport.SetOptions(c.urlParams_, opts...) 8453 res, err := c.doRequest("json") 8454 if res != nil && res.StatusCode == http.StatusNotModified { 8455 if res.Body != nil { 8456 res.Body.Close() 8457 } 8458 return nil, gensupport.WrapError(&googleapi.Error{ 8459 Code: res.StatusCode, 8460 Header: res.Header, 8461 }) 8462 } 8463 if err != nil { 8464 return nil, err 8465 } 8466 defer googleapi.CloseBody(res) 8467 if err := googleapi.CheckResponse(res); err != nil { 8468 return nil, gensupport.WrapError(err) 8469 } 8470 ret := &Operation{ 8471 ServerResponse: googleapi.ServerResponse{ 8472 Header: res.Header, 8473 HTTPStatusCode: res.StatusCode, 8474 }, 8475 } 8476 target := &ret 8477 if err := gensupport.DecodeResponse(target, res); err != nil { 8478 return nil, err 8479 } 8480 return ret, nil 8481 } 8482 8483 type ProjectsLocationsClustersCreateCall struct { 8484 s *Service 8485 parent string 8486 createclusterrequest *CreateClusterRequest 8487 urlParams_ gensupport.URLParams 8488 ctx_ context.Context 8489 header_ http.Header 8490 } 8491 8492 // Create: Creates a cluster, consisting of the specified number and type of 8493 // Google Compute Engine instances. By default, the cluster is created in the 8494 // project's default network 8495 // (https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One 8496 // firewall is added for the cluster. After cluster creation, the Kubelet 8497 // creates routes for each node to allow the containers on that node to 8498 // communicate with all other instances in the cluster. Finally, an entry is 8499 // added to the project's global metadata indicating which CIDR range the 8500 // cluster is using. 8501 // 8502 // - parent: The parent (project and location) where the cluster will be 8503 // created. Specified in the format `projects/*/locations/*`. 8504 func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { 8505 c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8506 c.parent = parent 8507 c.createclusterrequest = createclusterrequest 8508 return c 8509 } 8510 8511 // Fields allows partial responses to be retrieved. See 8512 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8513 // details. 8514 func (c *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { 8515 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8516 return c 8517 } 8518 8519 // Context sets the context to be used in this call's Do method. 8520 func (c *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { 8521 c.ctx_ = ctx 8522 return c 8523 } 8524 8525 // Header returns a http.Header that can be modified by the caller to add 8526 // headers to the request. 8527 func (c *ProjectsLocationsClustersCreateCall) Header() http.Header { 8528 if c.header_ == nil { 8529 c.header_ = make(http.Header) 8530 } 8531 return c.header_ 8532 } 8533 8534 func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) { 8535 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8536 var body io.Reader = nil 8537 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) 8538 if err != nil { 8539 return nil, err 8540 } 8541 c.urlParams_.Set("alt", alt) 8542 c.urlParams_.Set("prettyPrint", "false") 8543 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") 8544 urls += "?" + c.urlParams_.Encode() 8545 req, err := http.NewRequest("POST", urls, body) 8546 if err != nil { 8547 return nil, err 8548 } 8549 req.Header = reqHeaders 8550 googleapi.Expand(req.URL, map[string]string{ 8551 "parent": c.parent, 8552 }) 8553 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8554 } 8555 8556 // Do executes the "container.projects.locations.clusters.create" call. 8557 // Any non-2xx status code is an error. Response headers are in either 8558 // *Operation.ServerResponse.Header or (if a response was returned at all) in 8559 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8560 // whether the returned error was because http.StatusNotModified was returned. 8561 func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8562 gensupport.SetOptions(c.urlParams_, opts...) 8563 res, err := c.doRequest("json") 8564 if res != nil && res.StatusCode == http.StatusNotModified { 8565 if res.Body != nil { 8566 res.Body.Close() 8567 } 8568 return nil, gensupport.WrapError(&googleapi.Error{ 8569 Code: res.StatusCode, 8570 Header: res.Header, 8571 }) 8572 } 8573 if err != nil { 8574 return nil, err 8575 } 8576 defer googleapi.CloseBody(res) 8577 if err := googleapi.CheckResponse(res); err != nil { 8578 return nil, gensupport.WrapError(err) 8579 } 8580 ret := &Operation{ 8581 ServerResponse: googleapi.ServerResponse{ 8582 Header: res.Header, 8583 HTTPStatusCode: res.StatusCode, 8584 }, 8585 } 8586 target := &ret 8587 if err := gensupport.DecodeResponse(target, res); err != nil { 8588 return nil, err 8589 } 8590 return ret, nil 8591 } 8592 8593 type ProjectsLocationsClustersDeleteCall struct { 8594 s *Service 8595 name string 8596 urlParams_ gensupport.URLParams 8597 ctx_ context.Context 8598 header_ http.Header 8599 } 8600 8601 // Delete: Deletes the cluster, including the Kubernetes endpoint and all 8602 // worker nodes. Firewalls and routes that were configured during cluster 8603 // creation are also deleted. Other Google Compute Engine resources that might 8604 // be in use by the cluster, such as load balancer resources, are not deleted 8605 // if they weren't present when the cluster was initially created. 8606 // 8607 // - name: The name (project, location, cluster) of the cluster to delete. 8608 // Specified in the format `projects/*/locations/*/clusters/*`. 8609 func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { 8610 c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8611 c.name = name 8612 return c 8613 } 8614 8615 // ClusterId sets the optional parameter "clusterId": Required. Deprecated. The 8616 // name of the cluster to delete. This field has been deprecated and replaced 8617 // by the name field. 8618 func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall { 8619 c.urlParams_.Set("clusterId", clusterId) 8620 return c 8621 } 8622 8623 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 8624 // Google Developers Console project ID or project number 8625 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 8626 // This field has been deprecated and replaced by the name field. 8627 func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersDeleteCall { 8628 c.urlParams_.Set("projectId", projectId) 8629 return c 8630 } 8631 8632 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 8633 // the Google Compute Engine zone 8634 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 8635 // resides. This field has been deprecated and replaced by the name field. 8636 func (c *ProjectsLocationsClustersDeleteCall) Zone(zone string) *ProjectsLocationsClustersDeleteCall { 8637 c.urlParams_.Set("zone", zone) 8638 return c 8639 } 8640 8641 // Fields allows partial responses to be retrieved. See 8642 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8643 // details. 8644 func (c *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { 8645 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8646 return c 8647 } 8648 8649 // Context sets the context to be used in this call's Do method. 8650 func (c *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { 8651 c.ctx_ = ctx 8652 return c 8653 } 8654 8655 // Header returns a http.Header that can be modified by the caller to add 8656 // headers to the request. 8657 func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header { 8658 if c.header_ == nil { 8659 c.header_ = make(http.Header) 8660 } 8661 return c.header_ 8662 } 8663 8664 func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) { 8665 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8666 var body io.Reader = nil 8667 c.urlParams_.Set("alt", alt) 8668 c.urlParams_.Set("prettyPrint", "false") 8669 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8670 urls += "?" + c.urlParams_.Encode() 8671 req, err := http.NewRequest("DELETE", urls, body) 8672 if err != nil { 8673 return nil, err 8674 } 8675 req.Header = reqHeaders 8676 googleapi.Expand(req.URL, map[string]string{ 8677 "name": c.name, 8678 }) 8679 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8680 } 8681 8682 // Do executes the "container.projects.locations.clusters.delete" call. 8683 // Any non-2xx status code is an error. Response headers are in either 8684 // *Operation.ServerResponse.Header or (if a response was returned at all) in 8685 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8686 // whether the returned error was because http.StatusNotModified was returned. 8687 func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8688 gensupport.SetOptions(c.urlParams_, opts...) 8689 res, err := c.doRequest("json") 8690 if res != nil && res.StatusCode == http.StatusNotModified { 8691 if res.Body != nil { 8692 res.Body.Close() 8693 } 8694 return nil, gensupport.WrapError(&googleapi.Error{ 8695 Code: res.StatusCode, 8696 Header: res.Header, 8697 }) 8698 } 8699 if err != nil { 8700 return nil, err 8701 } 8702 defer googleapi.CloseBody(res) 8703 if err := googleapi.CheckResponse(res); err != nil { 8704 return nil, gensupport.WrapError(err) 8705 } 8706 ret := &Operation{ 8707 ServerResponse: googleapi.ServerResponse{ 8708 Header: res.Header, 8709 HTTPStatusCode: res.StatusCode, 8710 }, 8711 } 8712 target := &ret 8713 if err := gensupport.DecodeResponse(target, res); err != nil { 8714 return nil, err 8715 } 8716 return ret, nil 8717 } 8718 8719 type ProjectsLocationsClustersGetCall struct { 8720 s *Service 8721 name string 8722 urlParams_ gensupport.URLParams 8723 ifNoneMatch_ string 8724 ctx_ context.Context 8725 header_ http.Header 8726 } 8727 8728 // Get: Gets the details for a specific cluster. 8729 // 8730 // - name: The name (project, location, cluster) of the cluster to retrieve. 8731 // Specified in the format `projects/*/locations/*/clusters/*`. 8732 func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { 8733 c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8734 c.name = name 8735 return c 8736 } 8737 8738 // ClusterId sets the optional parameter "clusterId": Required. Deprecated. The 8739 // name of the cluster to retrieve. This field has been deprecated and replaced 8740 // by the name field. 8741 func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall { 8742 c.urlParams_.Set("clusterId", clusterId) 8743 return c 8744 } 8745 8746 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 8747 // Google Developers Console project ID or project number 8748 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 8749 // This field has been deprecated and replaced by the name field. 8750 func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *ProjectsLocationsClustersGetCall { 8751 c.urlParams_.Set("projectId", projectId) 8752 return c 8753 } 8754 8755 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 8756 // the Google Compute Engine zone 8757 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 8758 // resides. This field has been deprecated and replaced by the name field. 8759 func (c *ProjectsLocationsClustersGetCall) Zone(zone string) *ProjectsLocationsClustersGetCall { 8760 c.urlParams_.Set("zone", zone) 8761 return c 8762 } 8763 8764 // Fields allows partial responses to be retrieved. See 8765 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8766 // details. 8767 func (c *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { 8768 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8769 return c 8770 } 8771 8772 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8773 // object's ETag matches the given value. This is useful for getting updates 8774 // only after the object has changed since the last request. 8775 func (c *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { 8776 c.ifNoneMatch_ = entityTag 8777 return c 8778 } 8779 8780 // Context sets the context to be used in this call's Do method. 8781 func (c *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { 8782 c.ctx_ = ctx 8783 return c 8784 } 8785 8786 // Header returns a http.Header that can be modified by the caller to add 8787 // headers to the request. 8788 func (c *ProjectsLocationsClustersGetCall) Header() http.Header { 8789 if c.header_ == nil { 8790 c.header_ = make(http.Header) 8791 } 8792 return c.header_ 8793 } 8794 8795 func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) { 8796 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8797 if c.ifNoneMatch_ != "" { 8798 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8799 } 8800 var body io.Reader = nil 8801 c.urlParams_.Set("alt", alt) 8802 c.urlParams_.Set("prettyPrint", "false") 8803 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8804 urls += "?" + c.urlParams_.Encode() 8805 req, err := http.NewRequest("GET", urls, body) 8806 if err != nil { 8807 return nil, err 8808 } 8809 req.Header = reqHeaders 8810 googleapi.Expand(req.URL, map[string]string{ 8811 "name": c.name, 8812 }) 8813 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8814 } 8815 8816 // Do executes the "container.projects.locations.clusters.get" call. 8817 // Any non-2xx status code is an error. Response headers are in either 8818 // *Cluster.ServerResponse.Header or (if a response was returned at all) in 8819 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8820 // whether the returned error was because http.StatusNotModified was returned. 8821 func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { 8822 gensupport.SetOptions(c.urlParams_, opts...) 8823 res, err := c.doRequest("json") 8824 if res != nil && res.StatusCode == http.StatusNotModified { 8825 if res.Body != nil { 8826 res.Body.Close() 8827 } 8828 return nil, gensupport.WrapError(&googleapi.Error{ 8829 Code: res.StatusCode, 8830 Header: res.Header, 8831 }) 8832 } 8833 if err != nil { 8834 return nil, err 8835 } 8836 defer googleapi.CloseBody(res) 8837 if err := googleapi.CheckResponse(res); err != nil { 8838 return nil, gensupport.WrapError(err) 8839 } 8840 ret := &Cluster{ 8841 ServerResponse: googleapi.ServerResponse{ 8842 Header: res.Header, 8843 HTTPStatusCode: res.StatusCode, 8844 }, 8845 } 8846 target := &ret 8847 if err := gensupport.DecodeResponse(target, res); err != nil { 8848 return nil, err 8849 } 8850 return ret, nil 8851 } 8852 8853 type ProjectsLocationsClustersGetJwksCall struct { 8854 s *Service 8855 parent string 8856 urlParams_ gensupport.URLParams 8857 ifNoneMatch_ string 8858 ctx_ context.Context 8859 header_ http.Header 8860 } 8861 8862 // GetJwks: Gets the public component of the cluster signing keys in JSON Web 8863 // Key format. 8864 // 8865 // - parent: The cluster (project, location, cluster name) to get keys for. 8866 // Specified in the format `projects/*/locations/*/clusters/*`. 8867 func (r *ProjectsLocationsClustersService) GetJwks(parent string) *ProjectsLocationsClustersGetJwksCall { 8868 c := &ProjectsLocationsClustersGetJwksCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8869 c.parent = parent 8870 return c 8871 } 8872 8873 // Fields allows partial responses to be retrieved. See 8874 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8875 // details. 8876 func (c *ProjectsLocationsClustersGetJwksCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetJwksCall { 8877 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8878 return c 8879 } 8880 8881 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8882 // object's ETag matches the given value. This is useful for getting updates 8883 // only after the object has changed since the last request. 8884 func (c *ProjectsLocationsClustersGetJwksCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetJwksCall { 8885 c.ifNoneMatch_ = entityTag 8886 return c 8887 } 8888 8889 // Context sets the context to be used in this call's Do method. 8890 func (c *ProjectsLocationsClustersGetJwksCall) Context(ctx context.Context) *ProjectsLocationsClustersGetJwksCall { 8891 c.ctx_ = ctx 8892 return c 8893 } 8894 8895 // Header returns a http.Header that can be modified by the caller to add 8896 // headers to the request. 8897 func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { 8898 if c.header_ == nil { 8899 c.header_ = make(http.Header) 8900 } 8901 return c.header_ 8902 } 8903 8904 func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { 8905 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8906 if c.ifNoneMatch_ != "" { 8907 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8908 } 8909 var body io.Reader = nil 8910 c.urlParams_.Set("alt", alt) 8911 c.urlParams_.Set("prettyPrint", "false") 8912 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/jwks") 8913 urls += "?" + c.urlParams_.Encode() 8914 req, err := http.NewRequest("GET", urls, body) 8915 if err != nil { 8916 return nil, err 8917 } 8918 req.Header = reqHeaders 8919 googleapi.Expand(req.URL, map[string]string{ 8920 "parent": c.parent, 8921 }) 8922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8923 } 8924 8925 // Do executes the "container.projects.locations.clusters.getJwks" call. 8926 // Any non-2xx status code is an error. Response headers are in either 8927 // *GetJSONWebKeysResponse.ServerResponse.Header or (if a response was returned 8928 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8929 // check whether the returned error was because http.StatusNotModified was 8930 // returned. 8931 func (c *ProjectsLocationsClustersGetJwksCall) Do(opts ...googleapi.CallOption) (*GetJSONWebKeysResponse, error) { 8932 gensupport.SetOptions(c.urlParams_, opts...) 8933 res, err := c.doRequest("json") 8934 if res != nil && res.StatusCode == http.StatusNotModified { 8935 if res.Body != nil { 8936 res.Body.Close() 8937 } 8938 return nil, gensupport.WrapError(&googleapi.Error{ 8939 Code: res.StatusCode, 8940 Header: res.Header, 8941 }) 8942 } 8943 if err != nil { 8944 return nil, err 8945 } 8946 defer googleapi.CloseBody(res) 8947 if err := googleapi.CheckResponse(res); err != nil { 8948 return nil, gensupport.WrapError(err) 8949 } 8950 ret := &GetJSONWebKeysResponse{ 8951 ServerResponse: googleapi.ServerResponse{ 8952 Header: res.Header, 8953 HTTPStatusCode: res.StatusCode, 8954 }, 8955 } 8956 target := &ret 8957 if err := gensupport.DecodeResponse(target, res); err != nil { 8958 return nil, err 8959 } 8960 return ret, nil 8961 } 8962 8963 type ProjectsLocationsClustersListCall struct { 8964 s *Service 8965 parent string 8966 urlParams_ gensupport.URLParams 8967 ifNoneMatch_ string 8968 ctx_ context.Context 8969 header_ http.Header 8970 } 8971 8972 // List: Lists all clusters owned by a project in either the specified zone or 8973 // all zones. 8974 // 8975 // - parent: The parent (project and location) where the clusters will be 8976 // listed. Specified in the format `projects/*/locations/*`. Location "-" 8977 // matches all zones and all regions. 8978 func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { 8979 c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8980 c.parent = parent 8981 return c 8982 } 8983 8984 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 8985 // Google Developers Console project ID or project number 8986 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 8987 // This field has been deprecated and replaced by the parent field. 8988 func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *ProjectsLocationsClustersListCall { 8989 c.urlParams_.Set("projectId", projectId) 8990 return c 8991 } 8992 8993 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 8994 // the Google Compute Engine zone 8995 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 8996 // resides, or "-" for all zones. This field has been deprecated and replaced 8997 // by the parent field. 8998 func (c *ProjectsLocationsClustersListCall) Zone(zone string) *ProjectsLocationsClustersListCall { 8999 c.urlParams_.Set("zone", zone) 9000 return c 9001 } 9002 9003 // Fields allows partial responses to be retrieved. See 9004 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9005 // details. 9006 func (c *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { 9007 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9008 return c 9009 } 9010 9011 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9012 // object's ETag matches the given value. This is useful for getting updates 9013 // only after the object has changed since the last request. 9014 func (c *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { 9015 c.ifNoneMatch_ = entityTag 9016 return c 9017 } 9018 9019 // Context sets the context to be used in this call's Do method. 9020 func (c *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { 9021 c.ctx_ = ctx 9022 return c 9023 } 9024 9025 // Header returns a http.Header that can be modified by the caller to add 9026 // headers to the request. 9027 func (c *ProjectsLocationsClustersListCall) Header() http.Header { 9028 if c.header_ == nil { 9029 c.header_ = make(http.Header) 9030 } 9031 return c.header_ 9032 } 9033 9034 func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) { 9035 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9036 if c.ifNoneMatch_ != "" { 9037 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9038 } 9039 var body io.Reader = nil 9040 c.urlParams_.Set("alt", alt) 9041 c.urlParams_.Set("prettyPrint", "false") 9042 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") 9043 urls += "?" + c.urlParams_.Encode() 9044 req, err := http.NewRequest("GET", urls, body) 9045 if err != nil { 9046 return nil, err 9047 } 9048 req.Header = reqHeaders 9049 googleapi.Expand(req.URL, map[string]string{ 9050 "parent": c.parent, 9051 }) 9052 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9053 } 9054 9055 // Do executes the "container.projects.locations.clusters.list" call. 9056 // Any non-2xx status code is an error. Response headers are in either 9057 // *ListClustersResponse.ServerResponse.Header or (if a response was returned 9058 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9059 // check whether the returned error was because http.StatusNotModified was 9060 // returned. 9061 func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { 9062 gensupport.SetOptions(c.urlParams_, opts...) 9063 res, err := c.doRequest("json") 9064 if res != nil && res.StatusCode == http.StatusNotModified { 9065 if res.Body != nil { 9066 res.Body.Close() 9067 } 9068 return nil, gensupport.WrapError(&googleapi.Error{ 9069 Code: res.StatusCode, 9070 Header: res.Header, 9071 }) 9072 } 9073 if err != nil { 9074 return nil, err 9075 } 9076 defer googleapi.CloseBody(res) 9077 if err := googleapi.CheckResponse(res); err != nil { 9078 return nil, gensupport.WrapError(err) 9079 } 9080 ret := &ListClustersResponse{ 9081 ServerResponse: googleapi.ServerResponse{ 9082 Header: res.Header, 9083 HTTPStatusCode: res.StatusCode, 9084 }, 9085 } 9086 target := &ret 9087 if err := gensupport.DecodeResponse(target, res); err != nil { 9088 return nil, err 9089 } 9090 return ret, nil 9091 } 9092 9093 type ProjectsLocationsClustersSetAddonsCall struct { 9094 s *Service 9095 name string 9096 setaddonsconfigrequest *SetAddonsConfigRequest 9097 urlParams_ gensupport.URLParams 9098 ctx_ context.Context 9099 header_ http.Header 9100 } 9101 9102 // SetAddons: Sets the addons for a specific cluster. 9103 // 9104 // - name: The name (project, location, cluster) of the cluster to set addons. 9105 // Specified in the format `projects/*/locations/*/clusters/*`. 9106 func (r *ProjectsLocationsClustersService) SetAddons(name string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsLocationsClustersSetAddonsCall { 9107 c := &ProjectsLocationsClustersSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9108 c.name = name 9109 c.setaddonsconfigrequest = setaddonsconfigrequest 9110 return c 9111 } 9112 9113 // Fields allows partial responses to be retrieved. See 9114 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9115 // details. 9116 func (c *ProjectsLocationsClustersSetAddonsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetAddonsCall { 9117 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9118 return c 9119 } 9120 9121 // Context sets the context to be used in this call's Do method. 9122 func (c *ProjectsLocationsClustersSetAddonsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetAddonsCall { 9123 c.ctx_ = ctx 9124 return c 9125 } 9126 9127 // Header returns a http.Header that can be modified by the caller to add 9128 // headers to the request. 9129 func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header { 9130 if c.header_ == nil { 9131 c.header_ = make(http.Header) 9132 } 9133 return c.header_ 9134 } 9135 9136 func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) { 9137 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9138 var body io.Reader = nil 9139 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) 9140 if err != nil { 9141 return nil, err 9142 } 9143 c.urlParams_.Set("alt", alt) 9144 c.urlParams_.Set("prettyPrint", "false") 9145 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAddons") 9146 urls += "?" + c.urlParams_.Encode() 9147 req, err := http.NewRequest("POST", urls, body) 9148 if err != nil { 9149 return nil, err 9150 } 9151 req.Header = reqHeaders 9152 googleapi.Expand(req.URL, map[string]string{ 9153 "name": c.name, 9154 }) 9155 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9156 } 9157 9158 // Do executes the "container.projects.locations.clusters.setAddons" call. 9159 // Any non-2xx status code is an error. Response headers are in either 9160 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9161 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9162 // whether the returned error was because http.StatusNotModified was returned. 9163 func (c *ProjectsLocationsClustersSetAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9164 gensupport.SetOptions(c.urlParams_, opts...) 9165 res, err := c.doRequest("json") 9166 if res != nil && res.StatusCode == http.StatusNotModified { 9167 if res.Body != nil { 9168 res.Body.Close() 9169 } 9170 return nil, gensupport.WrapError(&googleapi.Error{ 9171 Code: res.StatusCode, 9172 Header: res.Header, 9173 }) 9174 } 9175 if err != nil { 9176 return nil, err 9177 } 9178 defer googleapi.CloseBody(res) 9179 if err := googleapi.CheckResponse(res); err != nil { 9180 return nil, gensupport.WrapError(err) 9181 } 9182 ret := &Operation{ 9183 ServerResponse: googleapi.ServerResponse{ 9184 Header: res.Header, 9185 HTTPStatusCode: res.StatusCode, 9186 }, 9187 } 9188 target := &ret 9189 if err := gensupport.DecodeResponse(target, res); err != nil { 9190 return nil, err 9191 } 9192 return ret, nil 9193 } 9194 9195 type ProjectsLocationsClustersSetLegacyAbacCall struct { 9196 s *Service 9197 name string 9198 setlegacyabacrequest *SetLegacyAbacRequest 9199 urlParams_ gensupport.URLParams 9200 ctx_ context.Context 9201 header_ http.Header 9202 } 9203 9204 // SetLegacyAbac: Enables or disables the ABAC authorization mechanism on a 9205 // cluster. 9206 // 9207 // - name: The name (project, location, cluster name) of the cluster to set 9208 // legacy abac. Specified in the format `projects/*/locations/*/clusters/*`. 9209 func (r *ProjectsLocationsClustersService) SetLegacyAbac(name string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsLocationsClustersSetLegacyAbacCall { 9210 c := &ProjectsLocationsClustersSetLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9211 c.name = name 9212 c.setlegacyabacrequest = setlegacyabacrequest 9213 return c 9214 } 9215 9216 // Fields allows partial responses to be retrieved. See 9217 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9218 // details. 9219 func (c *ProjectsLocationsClustersSetLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLegacyAbacCall { 9220 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9221 return c 9222 } 9223 9224 // Context sets the context to be used in this call's Do method. 9225 func (c *ProjectsLocationsClustersSetLegacyAbacCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLegacyAbacCall { 9226 c.ctx_ = ctx 9227 return c 9228 } 9229 9230 // Header returns a http.Header that can be modified by the caller to add 9231 // headers to the request. 9232 func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header { 9233 if c.header_ == nil { 9234 c.header_ = make(http.Header) 9235 } 9236 return c.header_ 9237 } 9238 9239 func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) { 9240 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9241 var body io.Reader = nil 9242 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) 9243 if err != nil { 9244 return nil, err 9245 } 9246 c.urlParams_.Set("alt", alt) 9247 c.urlParams_.Set("prettyPrint", "false") 9248 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLegacyAbac") 9249 urls += "?" + c.urlParams_.Encode() 9250 req, err := http.NewRequest("POST", urls, body) 9251 if err != nil { 9252 return nil, err 9253 } 9254 req.Header = reqHeaders 9255 googleapi.Expand(req.URL, map[string]string{ 9256 "name": c.name, 9257 }) 9258 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9259 } 9260 9261 // Do executes the "container.projects.locations.clusters.setLegacyAbac" call. 9262 // Any non-2xx status code is an error. Response headers are in either 9263 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9264 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9265 // whether the returned error was because http.StatusNotModified was returned. 9266 func (c *ProjectsLocationsClustersSetLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9267 gensupport.SetOptions(c.urlParams_, opts...) 9268 res, err := c.doRequest("json") 9269 if res != nil && res.StatusCode == http.StatusNotModified { 9270 if res.Body != nil { 9271 res.Body.Close() 9272 } 9273 return nil, gensupport.WrapError(&googleapi.Error{ 9274 Code: res.StatusCode, 9275 Header: res.Header, 9276 }) 9277 } 9278 if err != nil { 9279 return nil, err 9280 } 9281 defer googleapi.CloseBody(res) 9282 if err := googleapi.CheckResponse(res); err != nil { 9283 return nil, gensupport.WrapError(err) 9284 } 9285 ret := &Operation{ 9286 ServerResponse: googleapi.ServerResponse{ 9287 Header: res.Header, 9288 HTTPStatusCode: res.StatusCode, 9289 }, 9290 } 9291 target := &ret 9292 if err := gensupport.DecodeResponse(target, res); err != nil { 9293 return nil, err 9294 } 9295 return ret, nil 9296 } 9297 9298 type ProjectsLocationsClustersSetLocationsCall struct { 9299 s *Service 9300 name string 9301 setlocationsrequest *SetLocationsRequest 9302 urlParams_ gensupport.URLParams 9303 ctx_ context.Context 9304 header_ http.Header 9305 } 9306 9307 // SetLocations: Sets the locations for a specific cluster. Deprecated. Use 9308 // projects.locations.clusters.update 9309 // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) 9310 // instead. 9311 // 9312 // - name: The name (project, location, cluster) of the cluster to set 9313 // locations. Specified in the format `projects/*/locations/*/clusters/*`. 9314 func (r *ProjectsLocationsClustersService) SetLocations(name string, setlocationsrequest *SetLocationsRequest) *ProjectsLocationsClustersSetLocationsCall { 9315 c := &ProjectsLocationsClustersSetLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9316 c.name = name 9317 c.setlocationsrequest = setlocationsrequest 9318 return c 9319 } 9320 9321 // Fields allows partial responses to be retrieved. See 9322 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9323 // details. 9324 func (c *ProjectsLocationsClustersSetLocationsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLocationsCall { 9325 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9326 return c 9327 } 9328 9329 // Context sets the context to be used in this call's Do method. 9330 func (c *ProjectsLocationsClustersSetLocationsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLocationsCall { 9331 c.ctx_ = ctx 9332 return c 9333 } 9334 9335 // Header returns a http.Header that can be modified by the caller to add 9336 // headers to the request. 9337 func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header { 9338 if c.header_ == nil { 9339 c.header_ = make(http.Header) 9340 } 9341 return c.header_ 9342 } 9343 9344 func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) { 9345 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9346 var body io.Reader = nil 9347 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) 9348 if err != nil { 9349 return nil, err 9350 } 9351 c.urlParams_.Set("alt", alt) 9352 c.urlParams_.Set("prettyPrint", "false") 9353 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLocations") 9354 urls += "?" + c.urlParams_.Encode() 9355 req, err := http.NewRequest("POST", urls, body) 9356 if err != nil { 9357 return nil, err 9358 } 9359 req.Header = reqHeaders 9360 googleapi.Expand(req.URL, map[string]string{ 9361 "name": c.name, 9362 }) 9363 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9364 } 9365 9366 // Do executes the "container.projects.locations.clusters.setLocations" call. 9367 // Any non-2xx status code is an error. Response headers are in either 9368 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9369 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9370 // whether the returned error was because http.StatusNotModified was returned. 9371 func (c *ProjectsLocationsClustersSetLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9372 gensupport.SetOptions(c.urlParams_, opts...) 9373 res, err := c.doRequest("json") 9374 if res != nil && res.StatusCode == http.StatusNotModified { 9375 if res.Body != nil { 9376 res.Body.Close() 9377 } 9378 return nil, gensupport.WrapError(&googleapi.Error{ 9379 Code: res.StatusCode, 9380 Header: res.Header, 9381 }) 9382 } 9383 if err != nil { 9384 return nil, err 9385 } 9386 defer googleapi.CloseBody(res) 9387 if err := googleapi.CheckResponse(res); err != nil { 9388 return nil, gensupport.WrapError(err) 9389 } 9390 ret := &Operation{ 9391 ServerResponse: googleapi.ServerResponse{ 9392 Header: res.Header, 9393 HTTPStatusCode: res.StatusCode, 9394 }, 9395 } 9396 target := &ret 9397 if err := gensupport.DecodeResponse(target, res); err != nil { 9398 return nil, err 9399 } 9400 return ret, nil 9401 } 9402 9403 type ProjectsLocationsClustersSetLoggingCall struct { 9404 s *Service 9405 name string 9406 setloggingservicerequest *SetLoggingServiceRequest 9407 urlParams_ gensupport.URLParams 9408 ctx_ context.Context 9409 header_ http.Header 9410 } 9411 9412 // SetLogging: Sets the logging service for a specific cluster. 9413 // 9414 // - name: The name (project, location, cluster) of the cluster to set logging. 9415 // Specified in the format `projects/*/locations/*/clusters/*`. 9416 func (r *ProjectsLocationsClustersService) SetLogging(name string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsLocationsClustersSetLoggingCall { 9417 c := &ProjectsLocationsClustersSetLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9418 c.name = name 9419 c.setloggingservicerequest = setloggingservicerequest 9420 return c 9421 } 9422 9423 // Fields allows partial responses to be retrieved. See 9424 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9425 // details. 9426 func (c *ProjectsLocationsClustersSetLoggingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLoggingCall { 9427 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9428 return c 9429 } 9430 9431 // Context sets the context to be used in this call's Do method. 9432 func (c *ProjectsLocationsClustersSetLoggingCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLoggingCall { 9433 c.ctx_ = ctx 9434 return c 9435 } 9436 9437 // Header returns a http.Header that can be modified by the caller to add 9438 // headers to the request. 9439 func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header { 9440 if c.header_ == nil { 9441 c.header_ = make(http.Header) 9442 } 9443 return c.header_ 9444 } 9445 9446 func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) { 9447 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9448 var body io.Reader = nil 9449 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) 9450 if err != nil { 9451 return nil, err 9452 } 9453 c.urlParams_.Set("alt", alt) 9454 c.urlParams_.Set("prettyPrint", "false") 9455 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLogging") 9456 urls += "?" + c.urlParams_.Encode() 9457 req, err := http.NewRequest("POST", urls, body) 9458 if err != nil { 9459 return nil, err 9460 } 9461 req.Header = reqHeaders 9462 googleapi.Expand(req.URL, map[string]string{ 9463 "name": c.name, 9464 }) 9465 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9466 } 9467 9468 // Do executes the "container.projects.locations.clusters.setLogging" call. 9469 // Any non-2xx status code is an error. Response headers are in either 9470 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9471 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9472 // whether the returned error was because http.StatusNotModified was returned. 9473 func (c *ProjectsLocationsClustersSetLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9474 gensupport.SetOptions(c.urlParams_, opts...) 9475 res, err := c.doRequest("json") 9476 if res != nil && res.StatusCode == http.StatusNotModified { 9477 if res.Body != nil { 9478 res.Body.Close() 9479 } 9480 return nil, gensupport.WrapError(&googleapi.Error{ 9481 Code: res.StatusCode, 9482 Header: res.Header, 9483 }) 9484 } 9485 if err != nil { 9486 return nil, err 9487 } 9488 defer googleapi.CloseBody(res) 9489 if err := googleapi.CheckResponse(res); err != nil { 9490 return nil, gensupport.WrapError(err) 9491 } 9492 ret := &Operation{ 9493 ServerResponse: googleapi.ServerResponse{ 9494 Header: res.Header, 9495 HTTPStatusCode: res.StatusCode, 9496 }, 9497 } 9498 target := &ret 9499 if err := gensupport.DecodeResponse(target, res); err != nil { 9500 return nil, err 9501 } 9502 return ret, nil 9503 } 9504 9505 type ProjectsLocationsClustersSetMaintenancePolicyCall struct { 9506 s *Service 9507 name string 9508 setmaintenancepolicyrequest *SetMaintenancePolicyRequest 9509 urlParams_ gensupport.URLParams 9510 ctx_ context.Context 9511 header_ http.Header 9512 } 9513 9514 // SetMaintenancePolicy: Sets the maintenance policy for a cluster. 9515 // 9516 // - name: The name (project, location, cluster name) of the cluster to set 9517 // maintenance policy. Specified in the format 9518 // `projects/*/locations/*/clusters/*`. 9519 func (r *ProjectsLocationsClustersService) SetMaintenancePolicy(name string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsLocationsClustersSetMaintenancePolicyCall { 9520 c := &ProjectsLocationsClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9521 c.name = name 9522 c.setmaintenancepolicyrequest = setmaintenancepolicyrequest 9523 return c 9524 } 9525 9526 // Fields allows partial responses to be retrieved. See 9527 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9528 // details. 9529 func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMaintenancePolicyCall { 9530 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9531 return c 9532 } 9533 9534 // Context sets the context to be used in this call's Do method. 9535 func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMaintenancePolicyCall { 9536 c.ctx_ = ctx 9537 return c 9538 } 9539 9540 // Header returns a http.Header that can be modified by the caller to add 9541 // headers to the request. 9542 func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header { 9543 if c.header_ == nil { 9544 c.header_ = make(http.Header) 9545 } 9546 return c.header_ 9547 } 9548 9549 func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { 9550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9551 var body io.Reader = nil 9552 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest) 9553 if err != nil { 9554 return nil, err 9555 } 9556 c.urlParams_.Set("alt", alt) 9557 c.urlParams_.Set("prettyPrint", "false") 9558 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMaintenancePolicy") 9559 urls += "?" + c.urlParams_.Encode() 9560 req, err := http.NewRequest("POST", urls, body) 9561 if err != nil { 9562 return nil, err 9563 } 9564 req.Header = reqHeaders 9565 googleapi.Expand(req.URL, map[string]string{ 9566 "name": c.name, 9567 }) 9568 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9569 } 9570 9571 // Do executes the "container.projects.locations.clusters.setMaintenancePolicy" call. 9572 // Any non-2xx status code is an error. Response headers are in either 9573 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9574 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9575 // whether the returned error was because http.StatusNotModified was returned. 9576 func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9577 gensupport.SetOptions(c.urlParams_, opts...) 9578 res, err := c.doRequest("json") 9579 if res != nil && res.StatusCode == http.StatusNotModified { 9580 if res.Body != nil { 9581 res.Body.Close() 9582 } 9583 return nil, gensupport.WrapError(&googleapi.Error{ 9584 Code: res.StatusCode, 9585 Header: res.Header, 9586 }) 9587 } 9588 if err != nil { 9589 return nil, err 9590 } 9591 defer googleapi.CloseBody(res) 9592 if err := googleapi.CheckResponse(res); err != nil { 9593 return nil, gensupport.WrapError(err) 9594 } 9595 ret := &Operation{ 9596 ServerResponse: googleapi.ServerResponse{ 9597 Header: res.Header, 9598 HTTPStatusCode: res.StatusCode, 9599 }, 9600 } 9601 target := &ret 9602 if err := gensupport.DecodeResponse(target, res); err != nil { 9603 return nil, err 9604 } 9605 return ret, nil 9606 } 9607 9608 type ProjectsLocationsClustersSetMasterAuthCall struct { 9609 s *Service 9610 name string 9611 setmasterauthrequest *SetMasterAuthRequest 9612 urlParams_ gensupport.URLParams 9613 ctx_ context.Context 9614 header_ http.Header 9615 } 9616 9617 // SetMasterAuth: Sets master auth materials. Currently supports changing the 9618 // admin password or a specific cluster, either via password generation or 9619 // explicitly setting the password. 9620 // 9621 // - name: The name (project, location, cluster) of the cluster to set auth. 9622 // Specified in the format `projects/*/locations/*/clusters/*`. 9623 func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { 9624 c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9625 c.name = name 9626 c.setmasterauthrequest = setmasterauthrequest 9627 return c 9628 } 9629 9630 // Fields allows partial responses to be retrieved. See 9631 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9632 // details. 9633 func (c *ProjectsLocationsClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMasterAuthCall { 9634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9635 return c 9636 } 9637 9638 // Context sets the context to be used in this call's Do method. 9639 func (c *ProjectsLocationsClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMasterAuthCall { 9640 c.ctx_ = ctx 9641 return c 9642 } 9643 9644 // Header returns a http.Header that can be modified by the caller to add 9645 // headers to the request. 9646 func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header { 9647 if c.header_ == nil { 9648 c.header_ = make(http.Header) 9649 } 9650 return c.header_ 9651 } 9652 9653 func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { 9654 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9655 var body io.Reader = nil 9656 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) 9657 if err != nil { 9658 return nil, err 9659 } 9660 c.urlParams_.Set("alt", alt) 9661 c.urlParams_.Set("prettyPrint", "false") 9662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMasterAuth") 9663 urls += "?" + c.urlParams_.Encode() 9664 req, err := http.NewRequest("POST", urls, body) 9665 if err != nil { 9666 return nil, err 9667 } 9668 req.Header = reqHeaders 9669 googleapi.Expand(req.URL, map[string]string{ 9670 "name": c.name, 9671 }) 9672 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9673 } 9674 9675 // Do executes the "container.projects.locations.clusters.setMasterAuth" call. 9676 // Any non-2xx status code is an error. Response headers are in either 9677 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9678 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9679 // whether the returned error was because http.StatusNotModified was returned. 9680 func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9681 gensupport.SetOptions(c.urlParams_, opts...) 9682 res, err := c.doRequest("json") 9683 if res != nil && res.StatusCode == http.StatusNotModified { 9684 if res.Body != nil { 9685 res.Body.Close() 9686 } 9687 return nil, gensupport.WrapError(&googleapi.Error{ 9688 Code: res.StatusCode, 9689 Header: res.Header, 9690 }) 9691 } 9692 if err != nil { 9693 return nil, err 9694 } 9695 defer googleapi.CloseBody(res) 9696 if err := googleapi.CheckResponse(res); err != nil { 9697 return nil, gensupport.WrapError(err) 9698 } 9699 ret := &Operation{ 9700 ServerResponse: googleapi.ServerResponse{ 9701 Header: res.Header, 9702 HTTPStatusCode: res.StatusCode, 9703 }, 9704 } 9705 target := &ret 9706 if err := gensupport.DecodeResponse(target, res); err != nil { 9707 return nil, err 9708 } 9709 return ret, nil 9710 } 9711 9712 type ProjectsLocationsClustersSetMonitoringCall struct { 9713 s *Service 9714 name string 9715 setmonitoringservicerequest *SetMonitoringServiceRequest 9716 urlParams_ gensupport.URLParams 9717 ctx_ context.Context 9718 header_ http.Header 9719 } 9720 9721 // SetMonitoring: Sets the monitoring service for a specific cluster. 9722 // 9723 // - name: The name (project, location, cluster) of the cluster to set 9724 // monitoring. Specified in the format `projects/*/locations/*/clusters/*`. 9725 func (r *ProjectsLocationsClustersService) SetMonitoring(name string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsLocationsClustersSetMonitoringCall { 9726 c := &ProjectsLocationsClustersSetMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9727 c.name = name 9728 c.setmonitoringservicerequest = setmonitoringservicerequest 9729 return c 9730 } 9731 9732 // Fields allows partial responses to be retrieved. See 9733 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9734 // details. 9735 func (c *ProjectsLocationsClustersSetMonitoringCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMonitoringCall { 9736 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9737 return c 9738 } 9739 9740 // Context sets the context to be used in this call's Do method. 9741 func (c *ProjectsLocationsClustersSetMonitoringCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMonitoringCall { 9742 c.ctx_ = ctx 9743 return c 9744 } 9745 9746 // Header returns a http.Header that can be modified by the caller to add 9747 // headers to the request. 9748 func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header { 9749 if c.header_ == nil { 9750 c.header_ = make(http.Header) 9751 } 9752 return c.header_ 9753 } 9754 9755 func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) { 9756 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9757 var body io.Reader = nil 9758 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) 9759 if err != nil { 9760 return nil, err 9761 } 9762 c.urlParams_.Set("alt", alt) 9763 c.urlParams_.Set("prettyPrint", "false") 9764 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMonitoring") 9765 urls += "?" + c.urlParams_.Encode() 9766 req, err := http.NewRequest("POST", urls, body) 9767 if err != nil { 9768 return nil, err 9769 } 9770 req.Header = reqHeaders 9771 googleapi.Expand(req.URL, map[string]string{ 9772 "name": c.name, 9773 }) 9774 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9775 } 9776 9777 // Do executes the "container.projects.locations.clusters.setMonitoring" call. 9778 // Any non-2xx status code is an error. Response headers are in either 9779 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9780 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9781 // whether the returned error was because http.StatusNotModified was returned. 9782 func (c *ProjectsLocationsClustersSetMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9783 gensupport.SetOptions(c.urlParams_, opts...) 9784 res, err := c.doRequest("json") 9785 if res != nil && res.StatusCode == http.StatusNotModified { 9786 if res.Body != nil { 9787 res.Body.Close() 9788 } 9789 return nil, gensupport.WrapError(&googleapi.Error{ 9790 Code: res.StatusCode, 9791 Header: res.Header, 9792 }) 9793 } 9794 if err != nil { 9795 return nil, err 9796 } 9797 defer googleapi.CloseBody(res) 9798 if err := googleapi.CheckResponse(res); err != nil { 9799 return nil, gensupport.WrapError(err) 9800 } 9801 ret := &Operation{ 9802 ServerResponse: googleapi.ServerResponse{ 9803 Header: res.Header, 9804 HTTPStatusCode: res.StatusCode, 9805 }, 9806 } 9807 target := &ret 9808 if err := gensupport.DecodeResponse(target, res); err != nil { 9809 return nil, err 9810 } 9811 return ret, nil 9812 } 9813 9814 type ProjectsLocationsClustersSetNetworkPolicyCall struct { 9815 s *Service 9816 name string 9817 setnetworkpolicyrequest *SetNetworkPolicyRequest 9818 urlParams_ gensupport.URLParams 9819 ctx_ context.Context 9820 header_ http.Header 9821 } 9822 9823 // SetNetworkPolicy: Enables or disables Network Policy for a cluster. 9824 // 9825 // - name: The name (project, location, cluster name) of the cluster to set 9826 // networking policy. Specified in the format 9827 // `projects/*/locations/*/clusters/*`. 9828 func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { 9829 c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9830 c.name = name 9831 c.setnetworkpolicyrequest = setnetworkpolicyrequest 9832 return c 9833 } 9834 9835 // Fields allows partial responses to be retrieved. See 9836 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9837 // details. 9838 func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetNetworkPolicyCall { 9839 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9840 return c 9841 } 9842 9843 // Context sets the context to be used in this call's Do method. 9844 func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetNetworkPolicyCall { 9845 c.ctx_ = ctx 9846 return c 9847 } 9848 9849 // Header returns a http.Header that can be modified by the caller to add 9850 // headers to the request. 9851 func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header { 9852 if c.header_ == nil { 9853 c.header_ = make(http.Header) 9854 } 9855 return c.header_ 9856 } 9857 9858 func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { 9859 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9860 var body io.Reader = nil 9861 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) 9862 if err != nil { 9863 return nil, err 9864 } 9865 c.urlParams_.Set("alt", alt) 9866 c.urlParams_.Set("prettyPrint", "false") 9867 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setNetworkPolicy") 9868 urls += "?" + c.urlParams_.Encode() 9869 req, err := http.NewRequest("POST", urls, body) 9870 if err != nil { 9871 return nil, err 9872 } 9873 req.Header = reqHeaders 9874 googleapi.Expand(req.URL, map[string]string{ 9875 "name": c.name, 9876 }) 9877 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9878 } 9879 9880 // Do executes the "container.projects.locations.clusters.setNetworkPolicy" call. 9881 // Any non-2xx status code is an error. Response headers are in either 9882 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9883 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9884 // whether the returned error was because http.StatusNotModified was returned. 9885 func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9886 gensupport.SetOptions(c.urlParams_, opts...) 9887 res, err := c.doRequest("json") 9888 if res != nil && res.StatusCode == http.StatusNotModified { 9889 if res.Body != nil { 9890 res.Body.Close() 9891 } 9892 return nil, gensupport.WrapError(&googleapi.Error{ 9893 Code: res.StatusCode, 9894 Header: res.Header, 9895 }) 9896 } 9897 if err != nil { 9898 return nil, err 9899 } 9900 defer googleapi.CloseBody(res) 9901 if err := googleapi.CheckResponse(res); err != nil { 9902 return nil, gensupport.WrapError(err) 9903 } 9904 ret := &Operation{ 9905 ServerResponse: googleapi.ServerResponse{ 9906 Header: res.Header, 9907 HTTPStatusCode: res.StatusCode, 9908 }, 9909 } 9910 target := &ret 9911 if err := gensupport.DecodeResponse(target, res); err != nil { 9912 return nil, err 9913 } 9914 return ret, nil 9915 } 9916 9917 type ProjectsLocationsClustersSetResourceLabelsCall struct { 9918 s *Service 9919 name string 9920 setlabelsrequest *SetLabelsRequest 9921 urlParams_ gensupport.URLParams 9922 ctx_ context.Context 9923 header_ http.Header 9924 } 9925 9926 // SetResourceLabels: Sets labels on a cluster. 9927 // 9928 // - name: The name (project, location, cluster name) of the cluster to set 9929 // labels. Specified in the format `projects/*/locations/*/clusters/*`. 9930 func (r *ProjectsLocationsClustersService) SetResourceLabels(name string, setlabelsrequest *SetLabelsRequest) *ProjectsLocationsClustersSetResourceLabelsCall { 9931 c := &ProjectsLocationsClustersSetResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9932 c.name = name 9933 c.setlabelsrequest = setlabelsrequest 9934 return c 9935 } 9936 9937 // Fields allows partial responses to be retrieved. See 9938 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9939 // details. 9940 func (c *ProjectsLocationsClustersSetResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetResourceLabelsCall { 9941 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9942 return c 9943 } 9944 9945 // Context sets the context to be used in this call's Do method. 9946 func (c *ProjectsLocationsClustersSetResourceLabelsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetResourceLabelsCall { 9947 c.ctx_ = ctx 9948 return c 9949 } 9950 9951 // Header returns a http.Header that can be modified by the caller to add 9952 // headers to the request. 9953 func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header { 9954 if c.header_ == nil { 9955 c.header_ = make(http.Header) 9956 } 9957 return c.header_ 9958 } 9959 9960 func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) { 9961 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9962 var body io.Reader = nil 9963 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) 9964 if err != nil { 9965 return nil, err 9966 } 9967 c.urlParams_.Set("alt", alt) 9968 c.urlParams_.Set("prettyPrint", "false") 9969 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setResourceLabels") 9970 urls += "?" + c.urlParams_.Encode() 9971 req, err := http.NewRequest("POST", urls, body) 9972 if err != nil { 9973 return nil, err 9974 } 9975 req.Header = reqHeaders 9976 googleapi.Expand(req.URL, map[string]string{ 9977 "name": c.name, 9978 }) 9979 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9980 } 9981 9982 // Do executes the "container.projects.locations.clusters.setResourceLabels" call. 9983 // Any non-2xx status code is an error. Response headers are in either 9984 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9985 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9986 // whether the returned error was because http.StatusNotModified was returned. 9987 func (c *ProjectsLocationsClustersSetResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9988 gensupport.SetOptions(c.urlParams_, opts...) 9989 res, err := c.doRequest("json") 9990 if res != nil && res.StatusCode == http.StatusNotModified { 9991 if res.Body != nil { 9992 res.Body.Close() 9993 } 9994 return nil, gensupport.WrapError(&googleapi.Error{ 9995 Code: res.StatusCode, 9996 Header: res.Header, 9997 }) 9998 } 9999 if err != nil { 10000 return nil, err 10001 } 10002 defer googleapi.CloseBody(res) 10003 if err := googleapi.CheckResponse(res); err != nil { 10004 return nil, gensupport.WrapError(err) 10005 } 10006 ret := &Operation{ 10007 ServerResponse: googleapi.ServerResponse{ 10008 Header: res.Header, 10009 HTTPStatusCode: res.StatusCode, 10010 }, 10011 } 10012 target := &ret 10013 if err := gensupport.DecodeResponse(target, res); err != nil { 10014 return nil, err 10015 } 10016 return ret, nil 10017 } 10018 10019 type ProjectsLocationsClustersStartIpRotationCall struct { 10020 s *Service 10021 name string 10022 startiprotationrequest *StartIPRotationRequest 10023 urlParams_ gensupport.URLParams 10024 ctx_ context.Context 10025 header_ http.Header 10026 } 10027 10028 // StartIpRotation: Starts master IP rotation. 10029 // 10030 // - name: The name (project, location, cluster name) of the cluster to start 10031 // IP rotation. Specified in the format `projects/*/locations/*/clusters/*`. 10032 func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { 10033 c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10034 c.name = name 10035 c.startiprotationrequest = startiprotationrequest 10036 return c 10037 } 10038 10039 // Fields allows partial responses to be retrieved. See 10040 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10041 // details. 10042 func (c *ProjectsLocationsClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersStartIpRotationCall { 10043 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10044 return c 10045 } 10046 10047 // Context sets the context to be used in this call's Do method. 10048 func (c *ProjectsLocationsClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersStartIpRotationCall { 10049 c.ctx_ = ctx 10050 return c 10051 } 10052 10053 // Header returns a http.Header that can be modified by the caller to add 10054 // headers to the request. 10055 func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header { 10056 if c.header_ == nil { 10057 c.header_ = make(http.Header) 10058 } 10059 return c.header_ 10060 } 10061 10062 func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { 10063 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10064 var body io.Reader = nil 10065 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) 10066 if err != nil { 10067 return nil, err 10068 } 10069 c.urlParams_.Set("alt", alt) 10070 c.urlParams_.Set("prettyPrint", "false") 10071 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:startIpRotation") 10072 urls += "?" + c.urlParams_.Encode() 10073 req, err := http.NewRequest("POST", urls, body) 10074 if err != nil { 10075 return nil, err 10076 } 10077 req.Header = reqHeaders 10078 googleapi.Expand(req.URL, map[string]string{ 10079 "name": c.name, 10080 }) 10081 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10082 } 10083 10084 // Do executes the "container.projects.locations.clusters.startIpRotation" call. 10085 // Any non-2xx status code is an error. Response headers are in either 10086 // *Operation.ServerResponse.Header or (if a response was returned at all) in 10087 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10088 // whether the returned error was because http.StatusNotModified was returned. 10089 func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10090 gensupport.SetOptions(c.urlParams_, opts...) 10091 res, err := c.doRequest("json") 10092 if res != nil && res.StatusCode == http.StatusNotModified { 10093 if res.Body != nil { 10094 res.Body.Close() 10095 } 10096 return nil, gensupport.WrapError(&googleapi.Error{ 10097 Code: res.StatusCode, 10098 Header: res.Header, 10099 }) 10100 } 10101 if err != nil { 10102 return nil, err 10103 } 10104 defer googleapi.CloseBody(res) 10105 if err := googleapi.CheckResponse(res); err != nil { 10106 return nil, gensupport.WrapError(err) 10107 } 10108 ret := &Operation{ 10109 ServerResponse: googleapi.ServerResponse{ 10110 Header: res.Header, 10111 HTTPStatusCode: res.StatusCode, 10112 }, 10113 } 10114 target := &ret 10115 if err := gensupport.DecodeResponse(target, res); err != nil { 10116 return nil, err 10117 } 10118 return ret, nil 10119 } 10120 10121 type ProjectsLocationsClustersUpdateCall struct { 10122 s *Service 10123 name string 10124 updateclusterrequest *UpdateClusterRequest 10125 urlParams_ gensupport.URLParams 10126 ctx_ context.Context 10127 header_ http.Header 10128 } 10129 10130 // Update: Updates the settings for a specific cluster. 10131 // 10132 // - name: The name (project, location, cluster) of the cluster to update. 10133 // Specified in the format `projects/*/locations/*/clusters/*`. 10134 func (r *ProjectsLocationsClustersService) Update(name string, updateclusterrequest *UpdateClusterRequest) *ProjectsLocationsClustersUpdateCall { 10135 c := &ProjectsLocationsClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10136 c.name = name 10137 c.updateclusterrequest = updateclusterrequest 10138 return c 10139 } 10140 10141 // Fields allows partial responses to be retrieved. See 10142 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10143 // details. 10144 func (c *ProjectsLocationsClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateCall { 10145 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10146 return c 10147 } 10148 10149 // Context sets the context to be used in this call's Do method. 10150 func (c *ProjectsLocationsClustersUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateCall { 10151 c.ctx_ = ctx 10152 return c 10153 } 10154 10155 // Header returns a http.Header that can be modified by the caller to add 10156 // headers to the request. 10157 func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header { 10158 if c.header_ == nil { 10159 c.header_ = make(http.Header) 10160 } 10161 return c.header_ 10162 } 10163 10164 func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) { 10165 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10166 var body io.Reader = nil 10167 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) 10168 if err != nil { 10169 return nil, err 10170 } 10171 c.urlParams_.Set("alt", alt) 10172 c.urlParams_.Set("prettyPrint", "false") 10173 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10174 urls += "?" + c.urlParams_.Encode() 10175 req, err := http.NewRequest("PUT", urls, body) 10176 if err != nil { 10177 return nil, err 10178 } 10179 req.Header = reqHeaders 10180 googleapi.Expand(req.URL, map[string]string{ 10181 "name": c.name, 10182 }) 10183 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10184 } 10185 10186 // Do executes the "container.projects.locations.clusters.update" call. 10187 // Any non-2xx status code is an error. Response headers are in either 10188 // *Operation.ServerResponse.Header or (if a response was returned at all) in 10189 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10190 // whether the returned error was because http.StatusNotModified was returned. 10191 func (c *ProjectsLocationsClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10192 gensupport.SetOptions(c.urlParams_, opts...) 10193 res, err := c.doRequest("json") 10194 if res != nil && res.StatusCode == http.StatusNotModified { 10195 if res.Body != nil { 10196 res.Body.Close() 10197 } 10198 return nil, gensupport.WrapError(&googleapi.Error{ 10199 Code: res.StatusCode, 10200 Header: res.Header, 10201 }) 10202 } 10203 if err != nil { 10204 return nil, err 10205 } 10206 defer googleapi.CloseBody(res) 10207 if err := googleapi.CheckResponse(res); err != nil { 10208 return nil, gensupport.WrapError(err) 10209 } 10210 ret := &Operation{ 10211 ServerResponse: googleapi.ServerResponse{ 10212 Header: res.Header, 10213 HTTPStatusCode: res.StatusCode, 10214 }, 10215 } 10216 target := &ret 10217 if err := gensupport.DecodeResponse(target, res); err != nil { 10218 return nil, err 10219 } 10220 return ret, nil 10221 } 10222 10223 type ProjectsLocationsClustersUpdateMasterCall struct { 10224 s *Service 10225 name string 10226 updatemasterrequest *UpdateMasterRequest 10227 urlParams_ gensupport.URLParams 10228 ctx_ context.Context 10229 header_ http.Header 10230 } 10231 10232 // UpdateMaster: Updates the master for a specific cluster. 10233 // 10234 // - name: The name (project, location, cluster) of the cluster to update. 10235 // Specified in the format `projects/*/locations/*/clusters/*`. 10236 func (r *ProjectsLocationsClustersService) UpdateMaster(name string, updatemasterrequest *UpdateMasterRequest) *ProjectsLocationsClustersUpdateMasterCall { 10237 c := &ProjectsLocationsClustersUpdateMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10238 c.name = name 10239 c.updatemasterrequest = updatemasterrequest 10240 return c 10241 } 10242 10243 // Fields allows partial responses to be retrieved. See 10244 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10245 // details. 10246 func (c *ProjectsLocationsClustersUpdateMasterCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateMasterCall { 10247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10248 return c 10249 } 10250 10251 // Context sets the context to be used in this call's Do method. 10252 func (c *ProjectsLocationsClustersUpdateMasterCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateMasterCall { 10253 c.ctx_ = ctx 10254 return c 10255 } 10256 10257 // Header returns a http.Header that can be modified by the caller to add 10258 // headers to the request. 10259 func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header { 10260 if c.header_ == nil { 10261 c.header_ = make(http.Header) 10262 } 10263 return c.header_ 10264 } 10265 10266 func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) { 10267 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10268 var body io.Reader = nil 10269 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) 10270 if err != nil { 10271 return nil, err 10272 } 10273 c.urlParams_.Set("alt", alt) 10274 c.urlParams_.Set("prettyPrint", "false") 10275 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:updateMaster") 10276 urls += "?" + c.urlParams_.Encode() 10277 req, err := http.NewRequest("POST", urls, body) 10278 if err != nil { 10279 return nil, err 10280 } 10281 req.Header = reqHeaders 10282 googleapi.Expand(req.URL, map[string]string{ 10283 "name": c.name, 10284 }) 10285 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10286 } 10287 10288 // Do executes the "container.projects.locations.clusters.updateMaster" call. 10289 // Any non-2xx status code is an error. Response headers are in either 10290 // *Operation.ServerResponse.Header or (if a response was returned at all) in 10291 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10292 // whether the returned error was because http.StatusNotModified was returned. 10293 func (c *ProjectsLocationsClustersUpdateMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10294 gensupport.SetOptions(c.urlParams_, opts...) 10295 res, err := c.doRequest("json") 10296 if res != nil && res.StatusCode == http.StatusNotModified { 10297 if res.Body != nil { 10298 res.Body.Close() 10299 } 10300 return nil, gensupport.WrapError(&googleapi.Error{ 10301 Code: res.StatusCode, 10302 Header: res.Header, 10303 }) 10304 } 10305 if err != nil { 10306 return nil, err 10307 } 10308 defer googleapi.CloseBody(res) 10309 if err := googleapi.CheckResponse(res); err != nil { 10310 return nil, gensupport.WrapError(err) 10311 } 10312 ret := &Operation{ 10313 ServerResponse: googleapi.ServerResponse{ 10314 Header: res.Header, 10315 HTTPStatusCode: res.StatusCode, 10316 }, 10317 } 10318 target := &ret 10319 if err := gensupport.DecodeResponse(target, res); err != nil { 10320 return nil, err 10321 } 10322 return ret, nil 10323 } 10324 10325 type ProjectsLocationsClustersNodePoolsCompleteUpgradeCall struct { 10326 s *Service 10327 name string 10328 completenodepoolupgraderequest *CompleteNodePoolUpgradeRequest 10329 urlParams_ gensupport.URLParams 10330 ctx_ context.Context 10331 header_ http.Header 10332 } 10333 10334 // CompleteUpgrade: CompleteNodePoolUpgrade will signal an on-going node pool 10335 // upgrade to complete. 10336 // 10337 // - name: The name (project, location, cluster, node pool id) of the node pool 10338 // to complete upgrade. Specified in the format 10339 // `projects/*/locations/*/clusters/*/nodePools/*`. 10340 func (r *ProjectsLocationsClustersNodePoolsService) CompleteUpgrade(name string, completenodepoolupgraderequest *CompleteNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { 10341 c := &ProjectsLocationsClustersNodePoolsCompleteUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10342 c.name = name 10343 c.completenodepoolupgraderequest = completenodepoolupgraderequest 10344 return c 10345 } 10346 10347 // Fields allows partial responses to be retrieved. See 10348 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10349 // details. 10350 func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { 10351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10352 return c 10353 } 10354 10355 // Context sets the context to be used in this call's Do method. 10356 func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { 10357 c.ctx_ = ctx 10358 return c 10359 } 10360 10361 // Header returns a http.Header that can be modified by the caller to add 10362 // headers to the request. 10363 func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Header() http.Header { 10364 if c.header_ == nil { 10365 c.header_ = make(http.Header) 10366 } 10367 return c.header_ 10368 } 10369 10370 func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) doRequest(alt string) (*http.Response, error) { 10371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10372 var body io.Reader = nil 10373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completenodepoolupgraderequest) 10374 if err != nil { 10375 return nil, err 10376 } 10377 c.urlParams_.Set("alt", alt) 10378 c.urlParams_.Set("prettyPrint", "false") 10379 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeUpgrade") 10380 urls += "?" + c.urlParams_.Encode() 10381 req, err := http.NewRequest("POST", urls, body) 10382 if err != nil { 10383 return nil, err 10384 } 10385 req.Header = reqHeaders 10386 googleapi.Expand(req.URL, map[string]string{ 10387 "name": c.name, 10388 }) 10389 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10390 } 10391 10392 // Do executes the "container.projects.locations.clusters.nodePools.completeUpgrade" call. 10393 // Any non-2xx status code is an error. Response headers are in either 10394 // *Empty.ServerResponse.Header or (if a response was returned at all) in 10395 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10396 // whether the returned error was because http.StatusNotModified was returned. 10397 func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10398 gensupport.SetOptions(c.urlParams_, opts...) 10399 res, err := c.doRequest("json") 10400 if res != nil && res.StatusCode == http.StatusNotModified { 10401 if res.Body != nil { 10402 res.Body.Close() 10403 } 10404 return nil, gensupport.WrapError(&googleapi.Error{ 10405 Code: res.StatusCode, 10406 Header: res.Header, 10407 }) 10408 } 10409 if err != nil { 10410 return nil, err 10411 } 10412 defer googleapi.CloseBody(res) 10413 if err := googleapi.CheckResponse(res); err != nil { 10414 return nil, gensupport.WrapError(err) 10415 } 10416 ret := &Empty{ 10417 ServerResponse: googleapi.ServerResponse{ 10418 Header: res.Header, 10419 HTTPStatusCode: res.StatusCode, 10420 }, 10421 } 10422 target := &ret 10423 if err := gensupport.DecodeResponse(target, res); err != nil { 10424 return nil, err 10425 } 10426 return ret, nil 10427 } 10428 10429 type ProjectsLocationsClustersNodePoolsCreateCall struct { 10430 s *Service 10431 parent string 10432 createnodepoolrequest *CreateNodePoolRequest 10433 urlParams_ gensupport.URLParams 10434 ctx_ context.Context 10435 header_ http.Header 10436 } 10437 10438 // Create: Creates a node pool for a cluster. 10439 // 10440 // - parent: The parent (project, location, cluster name) where the node pool 10441 // will be created. Specified in the format 10442 // `projects/*/locations/*/clusters/*`. 10443 func (r *ProjectsLocationsClustersNodePoolsService) Create(parent string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsLocationsClustersNodePoolsCreateCall { 10444 c := &ProjectsLocationsClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10445 c.parent = parent 10446 c.createnodepoolrequest = createnodepoolrequest 10447 return c 10448 } 10449 10450 // Fields allows partial responses to be retrieved. See 10451 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10452 // details. 10453 func (c *ProjectsLocationsClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCreateCall { 10454 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10455 return c 10456 } 10457 10458 // Context sets the context to be used in this call's Do method. 10459 func (c *ProjectsLocationsClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCreateCall { 10460 c.ctx_ = ctx 10461 return c 10462 } 10463 10464 // Header returns a http.Header that can be modified by the caller to add 10465 // headers to the request. 10466 func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header { 10467 if c.header_ == nil { 10468 c.header_ = make(http.Header) 10469 } 10470 return c.header_ 10471 } 10472 10473 func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { 10474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10475 var body io.Reader = nil 10476 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) 10477 if err != nil { 10478 return nil, err 10479 } 10480 c.urlParams_.Set("alt", alt) 10481 c.urlParams_.Set("prettyPrint", "false") 10482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") 10483 urls += "?" + c.urlParams_.Encode() 10484 req, err := http.NewRequest("POST", urls, body) 10485 if err != nil { 10486 return nil, err 10487 } 10488 req.Header = reqHeaders 10489 googleapi.Expand(req.URL, map[string]string{ 10490 "parent": c.parent, 10491 }) 10492 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10493 } 10494 10495 // Do executes the "container.projects.locations.clusters.nodePools.create" call. 10496 // Any non-2xx status code is an error. Response headers are in either 10497 // *Operation.ServerResponse.Header or (if a response was returned at all) in 10498 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10499 // whether the returned error was because http.StatusNotModified was returned. 10500 func (c *ProjectsLocationsClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10501 gensupport.SetOptions(c.urlParams_, opts...) 10502 res, err := c.doRequest("json") 10503 if res != nil && res.StatusCode == http.StatusNotModified { 10504 if res.Body != nil { 10505 res.Body.Close() 10506 } 10507 return nil, gensupport.WrapError(&googleapi.Error{ 10508 Code: res.StatusCode, 10509 Header: res.Header, 10510 }) 10511 } 10512 if err != nil { 10513 return nil, err 10514 } 10515 defer googleapi.CloseBody(res) 10516 if err := googleapi.CheckResponse(res); err != nil { 10517 return nil, gensupport.WrapError(err) 10518 } 10519 ret := &Operation{ 10520 ServerResponse: googleapi.ServerResponse{ 10521 Header: res.Header, 10522 HTTPStatusCode: res.StatusCode, 10523 }, 10524 } 10525 target := &ret 10526 if err := gensupport.DecodeResponse(target, res); err != nil { 10527 return nil, err 10528 } 10529 return ret, nil 10530 } 10531 10532 type ProjectsLocationsClustersNodePoolsDeleteCall struct { 10533 s *Service 10534 name string 10535 urlParams_ gensupport.URLParams 10536 ctx_ context.Context 10537 header_ http.Header 10538 } 10539 10540 // Delete: Deletes a node pool from a cluster. 10541 // 10542 // - name: The name (project, location, cluster, node pool id) of the node pool 10543 // to delete. Specified in the format 10544 // `projects/*/locations/*/clusters/*/nodePools/*`. 10545 func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *ProjectsLocationsClustersNodePoolsDeleteCall { 10546 c := &ProjectsLocationsClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10547 c.name = name 10548 return c 10549 } 10550 10551 // ClusterId sets the optional parameter "clusterId": Required. Deprecated. The 10552 // name of the cluster. This field has been deprecated and replaced by the name 10553 // field. 10554 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 10555 c.urlParams_.Set("clusterId", clusterId) 10556 return c 10557 } 10558 10559 // NodePoolId sets the optional parameter "nodePoolId": Required. Deprecated. 10560 // The name of the node pool to delete. This field has been deprecated and 10561 // replaced by the name field. 10562 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 10563 c.urlParams_.Set("nodePoolId", nodePoolId) 10564 return c 10565 } 10566 10567 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 10568 // Google Developers Console project ID or project number 10569 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 10570 // This field has been deprecated and replaced by the name field. 10571 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsDeleteCall { 10572 c.urlParams_.Set("projectId", projectId) 10573 return c 10574 } 10575 10576 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 10577 // the Google Compute Engine zone 10578 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 10579 // resides. This field has been deprecated and replaced by the name field. 10580 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsDeleteCall { 10581 c.urlParams_.Set("zone", zone) 10582 return c 10583 } 10584 10585 // Fields allows partial responses to be retrieved. See 10586 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10587 // details. 10588 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsDeleteCall { 10589 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10590 return c 10591 } 10592 10593 // Context sets the context to be used in this call's Do method. 10594 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsDeleteCall { 10595 c.ctx_ = ctx 10596 return c 10597 } 10598 10599 // Header returns a http.Header that can be modified by the caller to add 10600 // headers to the request. 10601 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header { 10602 if c.header_ == nil { 10603 c.header_ = make(http.Header) 10604 } 10605 return c.header_ 10606 } 10607 10608 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 10609 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10610 var body io.Reader = nil 10611 c.urlParams_.Set("alt", alt) 10612 c.urlParams_.Set("prettyPrint", "false") 10613 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10614 urls += "?" + c.urlParams_.Encode() 10615 req, err := http.NewRequest("DELETE", urls, body) 10616 if err != nil { 10617 return nil, err 10618 } 10619 req.Header = reqHeaders 10620 googleapi.Expand(req.URL, map[string]string{ 10621 "name": c.name, 10622 }) 10623 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10624 } 10625 10626 // Do executes the "container.projects.locations.clusters.nodePools.delete" call. 10627 // Any non-2xx status code is an error. Response headers are in either 10628 // *Operation.ServerResponse.Header or (if a response was returned at all) in 10629 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10630 // whether the returned error was because http.StatusNotModified was returned. 10631 func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10632 gensupport.SetOptions(c.urlParams_, opts...) 10633 res, err := c.doRequest("json") 10634 if res != nil && res.StatusCode == http.StatusNotModified { 10635 if res.Body != nil { 10636 res.Body.Close() 10637 } 10638 return nil, gensupport.WrapError(&googleapi.Error{ 10639 Code: res.StatusCode, 10640 Header: res.Header, 10641 }) 10642 } 10643 if err != nil { 10644 return nil, err 10645 } 10646 defer googleapi.CloseBody(res) 10647 if err := googleapi.CheckResponse(res); err != nil { 10648 return nil, gensupport.WrapError(err) 10649 } 10650 ret := &Operation{ 10651 ServerResponse: googleapi.ServerResponse{ 10652 Header: res.Header, 10653 HTTPStatusCode: res.StatusCode, 10654 }, 10655 } 10656 target := &ret 10657 if err := gensupport.DecodeResponse(target, res); err != nil { 10658 return nil, err 10659 } 10660 return ret, nil 10661 } 10662 10663 type ProjectsLocationsClustersNodePoolsGetCall struct { 10664 s *Service 10665 name string 10666 urlParams_ gensupport.URLParams 10667 ifNoneMatch_ string 10668 ctx_ context.Context 10669 header_ http.Header 10670 } 10671 10672 // Get: Retrieves the requested node pool. 10673 // 10674 // - name: The name (project, location, cluster, node pool id) of the node pool 10675 // to get. Specified in the format 10676 // `projects/*/locations/*/clusters/*/nodePools/*`. 10677 func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { 10678 c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10679 c.name = name 10680 return c 10681 } 10682 10683 // ClusterId sets the optional parameter "clusterId": Required. Deprecated. The 10684 // name of the cluster. This field has been deprecated and replaced by the name 10685 // field. 10686 func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall { 10687 c.urlParams_.Set("clusterId", clusterId) 10688 return c 10689 } 10690 10691 // NodePoolId sets the optional parameter "nodePoolId": Required. Deprecated. 10692 // The name of the node pool. This field has been deprecated and replaced by 10693 // the name field. 10694 func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall { 10695 c.urlParams_.Set("nodePoolId", nodePoolId) 10696 return c 10697 } 10698 10699 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 10700 // Google Developers Console project ID or project number 10701 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 10702 // This field has been deprecated and replaced by the name field. 10703 func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsGetCall { 10704 c.urlParams_.Set("projectId", projectId) 10705 return c 10706 } 10707 10708 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 10709 // the Google Compute Engine zone 10710 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 10711 // resides. This field has been deprecated and replaced by the name field. 10712 func (c *ProjectsLocationsClustersNodePoolsGetCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsGetCall { 10713 c.urlParams_.Set("zone", zone) 10714 return c 10715 } 10716 10717 // Fields allows partial responses to be retrieved. See 10718 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10719 // details. 10720 func (c *ProjectsLocationsClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsGetCall { 10721 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10722 return c 10723 } 10724 10725 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10726 // object's ETag matches the given value. This is useful for getting updates 10727 // only after the object has changed since the last request. 10728 func (c *ProjectsLocationsClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsGetCall { 10729 c.ifNoneMatch_ = entityTag 10730 return c 10731 } 10732 10733 // Context sets the context to be used in this call's Do method. 10734 func (c *ProjectsLocationsClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsGetCall { 10735 c.ctx_ = ctx 10736 return c 10737 } 10738 10739 // Header returns a http.Header that can be modified by the caller to add 10740 // headers to the request. 10741 func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header { 10742 if c.header_ == nil { 10743 c.header_ = make(http.Header) 10744 } 10745 return c.header_ 10746 } 10747 10748 func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { 10749 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10750 if c.ifNoneMatch_ != "" { 10751 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10752 } 10753 var body io.Reader = nil 10754 c.urlParams_.Set("alt", alt) 10755 c.urlParams_.Set("prettyPrint", "false") 10756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10757 urls += "?" + c.urlParams_.Encode() 10758 req, err := http.NewRequest("GET", urls, body) 10759 if err != nil { 10760 return nil, err 10761 } 10762 req.Header = reqHeaders 10763 googleapi.Expand(req.URL, map[string]string{ 10764 "name": c.name, 10765 }) 10766 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10767 } 10768 10769 // Do executes the "container.projects.locations.clusters.nodePools.get" call. 10770 // Any non-2xx status code is an error. Response headers are in either 10771 // *NodePool.ServerResponse.Header or (if a response was returned at all) in 10772 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10773 // whether the returned error was because http.StatusNotModified was returned. 10774 func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { 10775 gensupport.SetOptions(c.urlParams_, opts...) 10776 res, err := c.doRequest("json") 10777 if res != nil && res.StatusCode == http.StatusNotModified { 10778 if res.Body != nil { 10779 res.Body.Close() 10780 } 10781 return nil, gensupport.WrapError(&googleapi.Error{ 10782 Code: res.StatusCode, 10783 Header: res.Header, 10784 }) 10785 } 10786 if err != nil { 10787 return nil, err 10788 } 10789 defer googleapi.CloseBody(res) 10790 if err := googleapi.CheckResponse(res); err != nil { 10791 return nil, gensupport.WrapError(err) 10792 } 10793 ret := &NodePool{ 10794 ServerResponse: googleapi.ServerResponse{ 10795 Header: res.Header, 10796 HTTPStatusCode: res.StatusCode, 10797 }, 10798 } 10799 target := &ret 10800 if err := gensupport.DecodeResponse(target, res); err != nil { 10801 return nil, err 10802 } 10803 return ret, nil 10804 } 10805 10806 type ProjectsLocationsClustersNodePoolsListCall struct { 10807 s *Service 10808 parent string 10809 urlParams_ gensupport.URLParams 10810 ifNoneMatch_ string 10811 ctx_ context.Context 10812 header_ http.Header 10813 } 10814 10815 // List: Lists the node pools for a cluster. 10816 // 10817 // - parent: The parent (project, location, cluster name) where the node pools 10818 // will be listed. Specified in the format 10819 // `projects/*/locations/*/clusters/*`. 10820 func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *ProjectsLocationsClustersNodePoolsListCall { 10821 c := &ProjectsLocationsClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10822 c.parent = parent 10823 return c 10824 } 10825 10826 // ClusterId sets the optional parameter "clusterId": Required. Deprecated. The 10827 // name of the cluster. This field has been deprecated and replaced by the 10828 // parent field. 10829 func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall { 10830 c.urlParams_.Set("clusterId", clusterId) 10831 return c 10832 } 10833 10834 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 10835 // Google Developers Console project ID or project number 10836 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 10837 // This field has been deprecated and replaced by the parent field. 10838 func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsListCall { 10839 c.urlParams_.Set("projectId", projectId) 10840 return c 10841 } 10842 10843 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 10844 // the Google Compute Engine zone 10845 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 10846 // resides. This field has been deprecated and replaced by the parent field. 10847 func (c *ProjectsLocationsClustersNodePoolsListCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsListCall { 10848 c.urlParams_.Set("zone", zone) 10849 return c 10850 } 10851 10852 // Fields allows partial responses to be retrieved. See 10853 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10854 // details. 10855 func (c *ProjectsLocationsClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsListCall { 10856 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10857 return c 10858 } 10859 10860 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10861 // object's ETag matches the given value. This is useful for getting updates 10862 // only after the object has changed since the last request. 10863 func (c *ProjectsLocationsClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsListCall { 10864 c.ifNoneMatch_ = entityTag 10865 return c 10866 } 10867 10868 // Context sets the context to be used in this call's Do method. 10869 func (c *ProjectsLocationsClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsListCall { 10870 c.ctx_ = ctx 10871 return c 10872 } 10873 10874 // Header returns a http.Header that can be modified by the caller to add 10875 // headers to the request. 10876 func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header { 10877 if c.header_ == nil { 10878 c.header_ = make(http.Header) 10879 } 10880 return c.header_ 10881 } 10882 10883 func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { 10884 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10885 if c.ifNoneMatch_ != "" { 10886 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10887 } 10888 var body io.Reader = nil 10889 c.urlParams_.Set("alt", alt) 10890 c.urlParams_.Set("prettyPrint", "false") 10891 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") 10892 urls += "?" + c.urlParams_.Encode() 10893 req, err := http.NewRequest("GET", urls, body) 10894 if err != nil { 10895 return nil, err 10896 } 10897 req.Header = reqHeaders 10898 googleapi.Expand(req.URL, map[string]string{ 10899 "parent": c.parent, 10900 }) 10901 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10902 } 10903 10904 // Do executes the "container.projects.locations.clusters.nodePools.list" call. 10905 // Any non-2xx status code is an error. Response headers are in either 10906 // *ListNodePoolsResponse.ServerResponse.Header or (if a response was returned 10907 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10908 // check whether the returned error was because http.StatusNotModified was 10909 // returned. 10910 func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { 10911 gensupport.SetOptions(c.urlParams_, opts...) 10912 res, err := c.doRequest("json") 10913 if res != nil && res.StatusCode == http.StatusNotModified { 10914 if res.Body != nil { 10915 res.Body.Close() 10916 } 10917 return nil, gensupport.WrapError(&googleapi.Error{ 10918 Code: res.StatusCode, 10919 Header: res.Header, 10920 }) 10921 } 10922 if err != nil { 10923 return nil, err 10924 } 10925 defer googleapi.CloseBody(res) 10926 if err := googleapi.CheckResponse(res); err != nil { 10927 return nil, gensupport.WrapError(err) 10928 } 10929 ret := &ListNodePoolsResponse{ 10930 ServerResponse: googleapi.ServerResponse{ 10931 Header: res.Header, 10932 HTTPStatusCode: res.StatusCode, 10933 }, 10934 } 10935 target := &ret 10936 if err := gensupport.DecodeResponse(target, res); err != nil { 10937 return nil, err 10938 } 10939 return ret, nil 10940 } 10941 10942 type ProjectsLocationsClustersNodePoolsRollbackCall struct { 10943 s *Service 10944 name string 10945 rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest 10946 urlParams_ gensupport.URLParams 10947 ctx_ context.Context 10948 header_ http.Header 10949 } 10950 10951 // Rollback: Rolls back a previously Aborted or Failed NodePool upgrade. This 10952 // makes no changes if the last upgrade successfully completed. 10953 // 10954 // - name: The name (project, location, cluster, node pool id) of the node poll 10955 // to rollback upgrade. Specified in the format 10956 // `projects/*/locations/*/clusters/*/nodePools/*`. 10957 func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { 10958 c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10959 c.name = name 10960 c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest 10961 return c 10962 } 10963 10964 // Fields allows partial responses to be retrieved. See 10965 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10966 // details. 10967 func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsRollbackCall { 10968 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10969 return c 10970 } 10971 10972 // Context sets the context to be used in this call's Do method. 10973 func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsRollbackCall { 10974 c.ctx_ = ctx 10975 return c 10976 } 10977 10978 // Header returns a http.Header that can be modified by the caller to add 10979 // headers to the request. 10980 func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header { 10981 if c.header_ == nil { 10982 c.header_ = make(http.Header) 10983 } 10984 return c.header_ 10985 } 10986 10987 func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { 10988 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10989 var body io.Reader = nil 10990 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) 10991 if err != nil { 10992 return nil, err 10993 } 10994 c.urlParams_.Set("alt", alt) 10995 c.urlParams_.Set("prettyPrint", "false") 10996 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") 10997 urls += "?" + c.urlParams_.Encode() 10998 req, err := http.NewRequest("POST", urls, body) 10999 if err != nil { 11000 return nil, err 11001 } 11002 req.Header = reqHeaders 11003 googleapi.Expand(req.URL, map[string]string{ 11004 "name": c.name, 11005 }) 11006 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11007 } 11008 11009 // Do executes the "container.projects.locations.clusters.nodePools.rollback" call. 11010 // Any non-2xx status code is an error. Response headers are in either 11011 // *Operation.ServerResponse.Header or (if a response was returned at all) in 11012 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11013 // whether the returned error was because http.StatusNotModified was returned. 11014 func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11015 gensupport.SetOptions(c.urlParams_, opts...) 11016 res, err := c.doRequest("json") 11017 if res != nil && res.StatusCode == http.StatusNotModified { 11018 if res.Body != nil { 11019 res.Body.Close() 11020 } 11021 return nil, gensupport.WrapError(&googleapi.Error{ 11022 Code: res.StatusCode, 11023 Header: res.Header, 11024 }) 11025 } 11026 if err != nil { 11027 return nil, err 11028 } 11029 defer googleapi.CloseBody(res) 11030 if err := googleapi.CheckResponse(res); err != nil { 11031 return nil, gensupport.WrapError(err) 11032 } 11033 ret := &Operation{ 11034 ServerResponse: googleapi.ServerResponse{ 11035 Header: res.Header, 11036 HTTPStatusCode: res.StatusCode, 11037 }, 11038 } 11039 target := &ret 11040 if err := gensupport.DecodeResponse(target, res); err != nil { 11041 return nil, err 11042 } 11043 return ret, nil 11044 } 11045 11046 type ProjectsLocationsClustersNodePoolsSetAutoscalingCall struct { 11047 s *Service 11048 name string 11049 setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest 11050 urlParams_ gensupport.URLParams 11051 ctx_ context.Context 11052 header_ http.Header 11053 } 11054 11055 // SetAutoscaling: Sets the autoscaling settings of a specific node pool. 11056 // 11057 // - name: The name (project, location, cluster, node pool) of the node pool to 11058 // set autoscaler settings. Specified in the format 11059 // `projects/*/locations/*/clusters/*/nodePools/*`. 11060 func (r *ProjectsLocationsClustersNodePoolsService) SetAutoscaling(name string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 11061 c := &ProjectsLocationsClustersNodePoolsSetAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11062 c.name = name 11063 c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest 11064 return c 11065 } 11066 11067 // Fields allows partial responses to be retrieved. See 11068 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11069 // details. 11070 func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 11071 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11072 return c 11073 } 11074 11075 // Context sets the context to be used in this call's Do method. 11076 func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { 11077 c.ctx_ = ctx 11078 return c 11079 } 11080 11081 // Header returns a http.Header that can be modified by the caller to add 11082 // headers to the request. 11083 func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Header { 11084 if c.header_ == nil { 11085 c.header_ = make(http.Header) 11086 } 11087 return c.header_ 11088 } 11089 11090 func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) { 11091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11092 var body io.Reader = nil 11093 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) 11094 if err != nil { 11095 return nil, err 11096 } 11097 c.urlParams_.Set("alt", alt) 11098 c.urlParams_.Set("prettyPrint", "false") 11099 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAutoscaling") 11100 urls += "?" + c.urlParams_.Encode() 11101 req, err := http.NewRequest("POST", urls, body) 11102 if err != nil { 11103 return nil, err 11104 } 11105 req.Header = reqHeaders 11106 googleapi.Expand(req.URL, map[string]string{ 11107 "name": c.name, 11108 }) 11109 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11110 } 11111 11112 // Do executes the "container.projects.locations.clusters.nodePools.setAutoscaling" call. 11113 // Any non-2xx status code is an error. Response headers are in either 11114 // *Operation.ServerResponse.Header or (if a response was returned at all) in 11115 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11116 // whether the returned error was because http.StatusNotModified was returned. 11117 func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11118 gensupport.SetOptions(c.urlParams_, opts...) 11119 res, err := c.doRequest("json") 11120 if res != nil && res.StatusCode == http.StatusNotModified { 11121 if res.Body != nil { 11122 res.Body.Close() 11123 } 11124 return nil, gensupport.WrapError(&googleapi.Error{ 11125 Code: res.StatusCode, 11126 Header: res.Header, 11127 }) 11128 } 11129 if err != nil { 11130 return nil, err 11131 } 11132 defer googleapi.CloseBody(res) 11133 if err := googleapi.CheckResponse(res); err != nil { 11134 return nil, gensupport.WrapError(err) 11135 } 11136 ret := &Operation{ 11137 ServerResponse: googleapi.ServerResponse{ 11138 Header: res.Header, 11139 HTTPStatusCode: res.StatusCode, 11140 }, 11141 } 11142 target := &ret 11143 if err := gensupport.DecodeResponse(target, res); err != nil { 11144 return nil, err 11145 } 11146 return ret, nil 11147 } 11148 11149 type ProjectsLocationsClustersNodePoolsSetManagementCall struct { 11150 s *Service 11151 name string 11152 setnodepoolmanagementrequest *SetNodePoolManagementRequest 11153 urlParams_ gensupport.URLParams 11154 ctx_ context.Context 11155 header_ http.Header 11156 } 11157 11158 // SetManagement: Sets the NodeManagement options for a node pool. 11159 // 11160 // - name: The name (project, location, cluster, node pool id) of the node pool 11161 // to set management properties. Specified in the format 11162 // `projects/*/locations/*/clusters/*/nodePools/*`. 11163 func (r *ProjectsLocationsClustersNodePoolsService) SetManagement(name string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsLocationsClustersNodePoolsSetManagementCall { 11164 c := &ProjectsLocationsClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11165 c.name = name 11166 c.setnodepoolmanagementrequest = setnodepoolmanagementrequest 11167 return c 11168 } 11169 11170 // Fields allows partial responses to be retrieved. See 11171 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11172 // details. 11173 func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetManagementCall { 11174 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11175 return c 11176 } 11177 11178 // Context sets the context to be used in this call's Do method. 11179 func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetManagementCall { 11180 c.ctx_ = ctx 11181 return c 11182 } 11183 11184 // Header returns a http.Header that can be modified by the caller to add 11185 // headers to the request. 11186 func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Header { 11187 if c.header_ == nil { 11188 c.header_ = make(http.Header) 11189 } 11190 return c.header_ 11191 } 11192 11193 func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { 11194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11195 var body io.Reader = nil 11196 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) 11197 if err != nil { 11198 return nil, err 11199 } 11200 c.urlParams_.Set("alt", alt) 11201 c.urlParams_.Set("prettyPrint", "false") 11202 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setManagement") 11203 urls += "?" + c.urlParams_.Encode() 11204 req, err := http.NewRequest("POST", urls, body) 11205 if err != nil { 11206 return nil, err 11207 } 11208 req.Header = reqHeaders 11209 googleapi.Expand(req.URL, map[string]string{ 11210 "name": c.name, 11211 }) 11212 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11213 } 11214 11215 // Do executes the "container.projects.locations.clusters.nodePools.setManagement" call. 11216 // Any non-2xx status code is an error. Response headers are in either 11217 // *Operation.ServerResponse.Header or (if a response was returned at all) in 11218 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11219 // whether the returned error was because http.StatusNotModified was returned. 11220 func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11221 gensupport.SetOptions(c.urlParams_, opts...) 11222 res, err := c.doRequest("json") 11223 if res != nil && res.StatusCode == http.StatusNotModified { 11224 if res.Body != nil { 11225 res.Body.Close() 11226 } 11227 return nil, gensupport.WrapError(&googleapi.Error{ 11228 Code: res.StatusCode, 11229 Header: res.Header, 11230 }) 11231 } 11232 if err != nil { 11233 return nil, err 11234 } 11235 defer googleapi.CloseBody(res) 11236 if err := googleapi.CheckResponse(res); err != nil { 11237 return nil, gensupport.WrapError(err) 11238 } 11239 ret := &Operation{ 11240 ServerResponse: googleapi.ServerResponse{ 11241 Header: res.Header, 11242 HTTPStatusCode: res.StatusCode, 11243 }, 11244 } 11245 target := &ret 11246 if err := gensupport.DecodeResponse(target, res); err != nil { 11247 return nil, err 11248 } 11249 return ret, nil 11250 } 11251 11252 type ProjectsLocationsClustersNodePoolsSetSizeCall struct { 11253 s *Service 11254 name string 11255 setnodepoolsizerequest *SetNodePoolSizeRequest 11256 urlParams_ gensupport.URLParams 11257 ctx_ context.Context 11258 header_ http.Header 11259 } 11260 11261 // SetSize: SetNodePoolSizeRequest sets the size of a node pool. The new size 11262 // will be used for all replicas, including future replicas created by 11263 // modifying NodePool.locations. 11264 // 11265 // - name: The name (project, location, cluster, node pool id) of the node pool 11266 // to set size. Specified in the format 11267 // `projects/*/locations/*/clusters/*/nodePools/*`. 11268 func (r *ProjectsLocationsClustersNodePoolsService) SetSize(name string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsLocationsClustersNodePoolsSetSizeCall { 11269 c := &ProjectsLocationsClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11270 c.name = name 11271 c.setnodepoolsizerequest = setnodepoolsizerequest 11272 return c 11273 } 11274 11275 // Fields allows partial responses to be retrieved. See 11276 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11277 // details. 11278 func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetSizeCall { 11279 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11280 return c 11281 } 11282 11283 // Context sets the context to be used in this call's Do method. 11284 func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetSizeCall { 11285 c.ctx_ = ctx 11286 return c 11287 } 11288 11289 // Header returns a http.Header that can be modified by the caller to add 11290 // headers to the request. 11291 func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header { 11292 if c.header_ == nil { 11293 c.header_ = make(http.Header) 11294 } 11295 return c.header_ 11296 } 11297 11298 func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { 11299 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11300 var body io.Reader = nil 11301 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) 11302 if err != nil { 11303 return nil, err 11304 } 11305 c.urlParams_.Set("alt", alt) 11306 c.urlParams_.Set("prettyPrint", "false") 11307 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setSize") 11308 urls += "?" + c.urlParams_.Encode() 11309 req, err := http.NewRequest("POST", urls, body) 11310 if err != nil { 11311 return nil, err 11312 } 11313 req.Header = reqHeaders 11314 googleapi.Expand(req.URL, map[string]string{ 11315 "name": c.name, 11316 }) 11317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11318 } 11319 11320 // Do executes the "container.projects.locations.clusters.nodePools.setSize" call. 11321 // Any non-2xx status code is an error. Response headers are in either 11322 // *Operation.ServerResponse.Header or (if a response was returned at all) in 11323 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11324 // whether the returned error was because http.StatusNotModified was returned. 11325 func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11326 gensupport.SetOptions(c.urlParams_, opts...) 11327 res, err := c.doRequest("json") 11328 if res != nil && res.StatusCode == http.StatusNotModified { 11329 if res.Body != nil { 11330 res.Body.Close() 11331 } 11332 return nil, gensupport.WrapError(&googleapi.Error{ 11333 Code: res.StatusCode, 11334 Header: res.Header, 11335 }) 11336 } 11337 if err != nil { 11338 return nil, err 11339 } 11340 defer googleapi.CloseBody(res) 11341 if err := googleapi.CheckResponse(res); err != nil { 11342 return nil, gensupport.WrapError(err) 11343 } 11344 ret := &Operation{ 11345 ServerResponse: googleapi.ServerResponse{ 11346 Header: res.Header, 11347 HTTPStatusCode: res.StatusCode, 11348 }, 11349 } 11350 target := &ret 11351 if err := gensupport.DecodeResponse(target, res); err != nil { 11352 return nil, err 11353 } 11354 return ret, nil 11355 } 11356 11357 type ProjectsLocationsClustersNodePoolsUpdateCall struct { 11358 s *Service 11359 name string 11360 updatenodepoolrequest *UpdateNodePoolRequest 11361 urlParams_ gensupport.URLParams 11362 ctx_ context.Context 11363 header_ http.Header 11364 } 11365 11366 // Update: Updates the version and/or image type of a specific node pool. 11367 // 11368 // - name: The name (project, location, cluster, node pool) of the node pool to 11369 // update. Specified in the format 11370 // `projects/*/locations/*/clusters/*/nodePools/*`. 11371 func (r *ProjectsLocationsClustersNodePoolsService) Update(name string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsLocationsClustersNodePoolsUpdateCall { 11372 c := &ProjectsLocationsClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11373 c.name = name 11374 c.updatenodepoolrequest = updatenodepoolrequest 11375 return c 11376 } 11377 11378 // Fields allows partial responses to be retrieved. See 11379 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11380 // details. 11381 func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsUpdateCall { 11382 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11383 return c 11384 } 11385 11386 // Context sets the context to be used in this call's Do method. 11387 func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsUpdateCall { 11388 c.ctx_ = ctx 11389 return c 11390 } 11391 11392 // Header returns a http.Header that can be modified by the caller to add 11393 // headers to the request. 11394 func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header { 11395 if c.header_ == nil { 11396 c.header_ = make(http.Header) 11397 } 11398 return c.header_ 11399 } 11400 11401 func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { 11402 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11403 var body io.Reader = nil 11404 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) 11405 if err != nil { 11406 return nil, err 11407 } 11408 c.urlParams_.Set("alt", alt) 11409 c.urlParams_.Set("prettyPrint", "false") 11410 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 11411 urls += "?" + c.urlParams_.Encode() 11412 req, err := http.NewRequest("PUT", urls, body) 11413 if err != nil { 11414 return nil, err 11415 } 11416 req.Header = reqHeaders 11417 googleapi.Expand(req.URL, map[string]string{ 11418 "name": c.name, 11419 }) 11420 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11421 } 11422 11423 // Do executes the "container.projects.locations.clusters.nodePools.update" call. 11424 // Any non-2xx status code is an error. Response headers are in either 11425 // *Operation.ServerResponse.Header or (if a response was returned at all) in 11426 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11427 // whether the returned error was because http.StatusNotModified was returned. 11428 func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11429 gensupport.SetOptions(c.urlParams_, opts...) 11430 res, err := c.doRequest("json") 11431 if res != nil && res.StatusCode == http.StatusNotModified { 11432 if res.Body != nil { 11433 res.Body.Close() 11434 } 11435 return nil, gensupport.WrapError(&googleapi.Error{ 11436 Code: res.StatusCode, 11437 Header: res.Header, 11438 }) 11439 } 11440 if err != nil { 11441 return nil, err 11442 } 11443 defer googleapi.CloseBody(res) 11444 if err := googleapi.CheckResponse(res); err != nil { 11445 return nil, gensupport.WrapError(err) 11446 } 11447 ret := &Operation{ 11448 ServerResponse: googleapi.ServerResponse{ 11449 Header: res.Header, 11450 HTTPStatusCode: res.StatusCode, 11451 }, 11452 } 11453 target := &ret 11454 if err := gensupport.DecodeResponse(target, res); err != nil { 11455 return nil, err 11456 } 11457 return ret, nil 11458 } 11459 11460 type ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall struct { 11461 s *Service 11462 parent string 11463 urlParams_ gensupport.URLParams 11464 ifNoneMatch_ string 11465 ctx_ context.Context 11466 header_ http.Header 11467 } 11468 11469 // GetOpenidConfiguration: Gets the OIDC discovery document for the cluster. 11470 // See the OpenID Connect Discovery 1.0 specification 11471 // (https://openid.net/specs/openid-connect-discovery-1_0.html) for details. 11472 // 11473 // - parent: The cluster (project, location, cluster name) to get the discovery 11474 // document for. Specified in the format `projects/*/locations/*/clusters/*`. 11475 func (r *ProjectsLocationsClustersWellKnownService) GetOpenidConfiguration(parent string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 11476 c := &ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11477 c.parent = parent 11478 return c 11479 } 11480 11481 // Fields allows partial responses to be retrieved. See 11482 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11483 // details. 11484 func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 11485 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11486 return c 11487 } 11488 11489 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11490 // object's ETag matches the given value. This is useful for getting updates 11491 // only after the object has changed since the last request. 11492 func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 11493 c.ifNoneMatch_ = entityTag 11494 return c 11495 } 11496 11497 // Context sets the context to be used in this call's Do method. 11498 func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Context(ctx context.Context) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { 11499 c.ctx_ = ctx 11500 return c 11501 } 11502 11503 // Header returns a http.Header that can be modified by the caller to add 11504 // headers to the request. 11505 func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() http.Header { 11506 if c.header_ == nil { 11507 c.header_ = make(http.Header) 11508 } 11509 return c.header_ 11510 } 11511 11512 func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { 11513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11514 if c.ifNoneMatch_ != "" { 11515 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11516 } 11517 var body io.Reader = nil 11518 c.urlParams_.Set("alt", alt) 11519 c.urlParams_.Set("prettyPrint", "false") 11520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/.well-known/openid-configuration") 11521 urls += "?" + c.urlParams_.Encode() 11522 req, err := http.NewRequest("GET", urls, body) 11523 if err != nil { 11524 return nil, err 11525 } 11526 req.Header = reqHeaders 11527 googleapi.Expand(req.URL, map[string]string{ 11528 "parent": c.parent, 11529 }) 11530 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11531 } 11532 11533 // Do executes the "container.projects.locations.clusters.well-known.getOpenid-configuration" call. 11534 // Any non-2xx status code is an error. Response headers are in either 11535 // *GetOpenIDConfigResponse.ServerResponse.Header or (if a response was 11536 // returned at all) in error.(*googleapi.Error).Header. Use 11537 // googleapi.IsNotModified to check whether the returned error was because 11538 // http.StatusNotModified was returned. 11539 func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Do(opts ...googleapi.CallOption) (*GetOpenIDConfigResponse, error) { 11540 gensupport.SetOptions(c.urlParams_, opts...) 11541 res, err := c.doRequest("json") 11542 if res != nil && res.StatusCode == http.StatusNotModified { 11543 if res.Body != nil { 11544 res.Body.Close() 11545 } 11546 return nil, gensupport.WrapError(&googleapi.Error{ 11547 Code: res.StatusCode, 11548 Header: res.Header, 11549 }) 11550 } 11551 if err != nil { 11552 return nil, err 11553 } 11554 defer googleapi.CloseBody(res) 11555 if err := googleapi.CheckResponse(res); err != nil { 11556 return nil, gensupport.WrapError(err) 11557 } 11558 ret := &GetOpenIDConfigResponse{ 11559 ServerResponse: googleapi.ServerResponse{ 11560 Header: res.Header, 11561 HTTPStatusCode: res.StatusCode, 11562 }, 11563 } 11564 target := &ret 11565 if err := gensupport.DecodeResponse(target, res); err != nil { 11566 return nil, err 11567 } 11568 return ret, nil 11569 } 11570 11571 type ProjectsLocationsOperationsCancelCall struct { 11572 s *Service 11573 name string 11574 canceloperationrequest *CancelOperationRequest 11575 urlParams_ gensupport.URLParams 11576 ctx_ context.Context 11577 header_ http.Header 11578 } 11579 11580 // Cancel: Cancels the specified operation. 11581 // 11582 // - name: The name (project, location, operation id) of the operation to 11583 // cancel. Specified in the format `projects/*/locations/*/operations/*`. 11584 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 11585 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11586 c.name = name 11587 c.canceloperationrequest = canceloperationrequest 11588 return c 11589 } 11590 11591 // Fields allows partial responses to be retrieved. See 11592 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11593 // details. 11594 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 11595 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11596 return c 11597 } 11598 11599 // Context sets the context to be used in this call's Do method. 11600 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 11601 c.ctx_ = ctx 11602 return c 11603 } 11604 11605 // Header returns a http.Header that can be modified by the caller to add 11606 // headers to the request. 11607 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 11608 if c.header_ == nil { 11609 c.header_ = make(http.Header) 11610 } 11611 return c.header_ 11612 } 11613 11614 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 11615 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11616 var body io.Reader = nil 11617 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 11618 if err != nil { 11619 return nil, err 11620 } 11621 c.urlParams_.Set("alt", alt) 11622 c.urlParams_.Set("prettyPrint", "false") 11623 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") 11624 urls += "?" + c.urlParams_.Encode() 11625 req, err := http.NewRequest("POST", urls, body) 11626 if err != nil { 11627 return nil, err 11628 } 11629 req.Header = reqHeaders 11630 googleapi.Expand(req.URL, map[string]string{ 11631 "name": c.name, 11632 }) 11633 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11634 } 11635 11636 // Do executes the "container.projects.locations.operations.cancel" call. 11637 // Any non-2xx status code is an error. Response headers are in either 11638 // *Empty.ServerResponse.Header or (if a response was returned at all) in 11639 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11640 // whether the returned error was because http.StatusNotModified was returned. 11641 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 11642 gensupport.SetOptions(c.urlParams_, opts...) 11643 res, err := c.doRequest("json") 11644 if res != nil && res.StatusCode == http.StatusNotModified { 11645 if res.Body != nil { 11646 res.Body.Close() 11647 } 11648 return nil, gensupport.WrapError(&googleapi.Error{ 11649 Code: res.StatusCode, 11650 Header: res.Header, 11651 }) 11652 } 11653 if err != nil { 11654 return nil, err 11655 } 11656 defer googleapi.CloseBody(res) 11657 if err := googleapi.CheckResponse(res); err != nil { 11658 return nil, gensupport.WrapError(err) 11659 } 11660 ret := &Empty{ 11661 ServerResponse: googleapi.ServerResponse{ 11662 Header: res.Header, 11663 HTTPStatusCode: res.StatusCode, 11664 }, 11665 } 11666 target := &ret 11667 if err := gensupport.DecodeResponse(target, res); err != nil { 11668 return nil, err 11669 } 11670 return ret, nil 11671 } 11672 11673 type ProjectsLocationsOperationsGetCall struct { 11674 s *Service 11675 name string 11676 urlParams_ gensupport.URLParams 11677 ifNoneMatch_ string 11678 ctx_ context.Context 11679 header_ http.Header 11680 } 11681 11682 // Get: Gets the specified operation. 11683 // 11684 // - name: The name (project, location, operation id) of the operation to get. 11685 // Specified in the format `projects/*/locations/*/operations/*`. 11686 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 11687 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11688 c.name = name 11689 return c 11690 } 11691 11692 // OperationId sets the optional parameter "operationId": Required. Deprecated. 11693 // The server-assigned `name` of the operation. This field has been deprecated 11694 // and replaced by the name field. 11695 func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall { 11696 c.urlParams_.Set("operationId", operationId) 11697 return c 11698 } 11699 11700 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 11701 // Google Developers Console project ID or project number 11702 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 11703 // This field has been deprecated and replaced by the name field. 11704 func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *ProjectsLocationsOperationsGetCall { 11705 c.urlParams_.Set("projectId", projectId) 11706 return c 11707 } 11708 11709 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 11710 // the Google Compute Engine zone 11711 // (https://cloud.google.com/compute/docs/zones#available) in which the cluster 11712 // resides. This field has been deprecated and replaced by the name field. 11713 func (c *ProjectsLocationsOperationsGetCall) Zone(zone string) *ProjectsLocationsOperationsGetCall { 11714 c.urlParams_.Set("zone", zone) 11715 return c 11716 } 11717 11718 // Fields allows partial responses to be retrieved. See 11719 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11720 // details. 11721 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 11722 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11723 return c 11724 } 11725 11726 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11727 // object's ETag matches the given value. This is useful for getting updates 11728 // only after the object has changed since the last request. 11729 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 11730 c.ifNoneMatch_ = entityTag 11731 return c 11732 } 11733 11734 // Context sets the context to be used in this call's Do method. 11735 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 11736 c.ctx_ = ctx 11737 return c 11738 } 11739 11740 // Header returns a http.Header that can be modified by the caller to add 11741 // headers to the request. 11742 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 11743 if c.header_ == nil { 11744 c.header_ = make(http.Header) 11745 } 11746 return c.header_ 11747 } 11748 11749 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 11750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11751 if c.ifNoneMatch_ != "" { 11752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11753 } 11754 var body io.Reader = nil 11755 c.urlParams_.Set("alt", alt) 11756 c.urlParams_.Set("prettyPrint", "false") 11757 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 11758 urls += "?" + c.urlParams_.Encode() 11759 req, err := http.NewRequest("GET", urls, body) 11760 if err != nil { 11761 return nil, err 11762 } 11763 req.Header = reqHeaders 11764 googleapi.Expand(req.URL, map[string]string{ 11765 "name": c.name, 11766 }) 11767 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11768 } 11769 11770 // Do executes the "container.projects.locations.operations.get" call. 11771 // Any non-2xx status code is an error. Response headers are in either 11772 // *Operation.ServerResponse.Header or (if a response was returned at all) in 11773 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11774 // whether the returned error was because http.StatusNotModified was returned. 11775 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 11776 gensupport.SetOptions(c.urlParams_, opts...) 11777 res, err := c.doRequest("json") 11778 if res != nil && res.StatusCode == http.StatusNotModified { 11779 if res.Body != nil { 11780 res.Body.Close() 11781 } 11782 return nil, gensupport.WrapError(&googleapi.Error{ 11783 Code: res.StatusCode, 11784 Header: res.Header, 11785 }) 11786 } 11787 if err != nil { 11788 return nil, err 11789 } 11790 defer googleapi.CloseBody(res) 11791 if err := googleapi.CheckResponse(res); err != nil { 11792 return nil, gensupport.WrapError(err) 11793 } 11794 ret := &Operation{ 11795 ServerResponse: googleapi.ServerResponse{ 11796 Header: res.Header, 11797 HTTPStatusCode: res.StatusCode, 11798 }, 11799 } 11800 target := &ret 11801 if err := gensupport.DecodeResponse(target, res); err != nil { 11802 return nil, err 11803 } 11804 return ret, nil 11805 } 11806 11807 type ProjectsLocationsOperationsListCall struct { 11808 s *Service 11809 parent string 11810 urlParams_ gensupport.URLParams 11811 ifNoneMatch_ string 11812 ctx_ context.Context 11813 header_ http.Header 11814 } 11815 11816 // List: Lists all operations in a project in the specified zone or all zones. 11817 // 11818 // - parent: The parent (project and location) where the operations will be 11819 // listed. Specified in the format `projects/*/locations/*`. Location "-" 11820 // matches all zones and all regions. 11821 func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall { 11822 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11823 c.parent = parent 11824 return c 11825 } 11826 11827 // ProjectId sets the optional parameter "projectId": Required. Deprecated. The 11828 // Google Developers Console project ID or project number 11829 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 11830 // This field has been deprecated and replaced by the parent field. 11831 func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *ProjectsLocationsOperationsListCall { 11832 c.urlParams_.Set("projectId", projectId) 11833 return c 11834 } 11835 11836 // Zone sets the optional parameter "zone": Required. Deprecated. The name of 11837 // the Google Compute Engine zone 11838 // (https://cloud.google.com/compute/docs/zones#available) to return operations 11839 // for, or `-` for all zones. This field has been deprecated and replaced by 11840 // the parent field. 11841 func (c *ProjectsLocationsOperationsListCall) Zone(zone string) *ProjectsLocationsOperationsListCall { 11842 c.urlParams_.Set("zone", zone) 11843 return c 11844 } 11845 11846 // Fields allows partial responses to be retrieved. See 11847 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11848 // details. 11849 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 11850 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11851 return c 11852 } 11853 11854 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11855 // object's ETag matches the given value. This is useful for getting updates 11856 // only after the object has changed since the last request. 11857 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 11858 c.ifNoneMatch_ = entityTag 11859 return c 11860 } 11861 11862 // Context sets the context to be used in this call's Do method. 11863 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 11864 c.ctx_ = ctx 11865 return c 11866 } 11867 11868 // Header returns a http.Header that can be modified by the caller to add 11869 // headers to the request. 11870 func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 11871 if c.header_ == nil { 11872 c.header_ = make(http.Header) 11873 } 11874 return c.header_ 11875 } 11876 11877 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 11878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11879 if c.ifNoneMatch_ != "" { 11880 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11881 } 11882 var body io.Reader = nil 11883 c.urlParams_.Set("alt", alt) 11884 c.urlParams_.Set("prettyPrint", "false") 11885 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/operations") 11886 urls += "?" + c.urlParams_.Encode() 11887 req, err := http.NewRequest("GET", urls, body) 11888 if err != nil { 11889 return nil, err 11890 } 11891 req.Header = reqHeaders 11892 googleapi.Expand(req.URL, map[string]string{ 11893 "parent": c.parent, 11894 }) 11895 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11896 } 11897 11898 // Do executes the "container.projects.locations.operations.list" call. 11899 // Any non-2xx status code is an error. Response headers are in either 11900 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 11901 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11902 // check whether the returned error was because http.StatusNotModified was 11903 // returned. 11904 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 11905 gensupport.SetOptions(c.urlParams_, opts...) 11906 res, err := c.doRequest("json") 11907 if res != nil && res.StatusCode == http.StatusNotModified { 11908 if res.Body != nil { 11909 res.Body.Close() 11910 } 11911 return nil, gensupport.WrapError(&googleapi.Error{ 11912 Code: res.StatusCode, 11913 Header: res.Header, 11914 }) 11915 } 11916 if err != nil { 11917 return nil, err 11918 } 11919 defer googleapi.CloseBody(res) 11920 if err := googleapi.CheckResponse(res); err != nil { 11921 return nil, gensupport.WrapError(err) 11922 } 11923 ret := &ListOperationsResponse{ 11924 ServerResponse: googleapi.ServerResponse{ 11925 Header: res.Header, 11926 HTTPStatusCode: res.StatusCode, 11927 }, 11928 } 11929 target := &ret 11930 if err := gensupport.DecodeResponse(target, res); err != nil { 11931 return nil, err 11932 } 11933 return ret, nil 11934 } 11935 11936 type ProjectsZonesGetServerconfigCall struct { 11937 s *Service 11938 projectId string 11939 zone string 11940 urlParams_ gensupport.URLParams 11941 ifNoneMatch_ string 11942 ctx_ context.Context 11943 header_ http.Header 11944 } 11945 11946 // GetServerconfig: Returns configuration info about the Google Kubernetes 11947 // Engine service. 11948 // 11949 // - projectId: Deprecated. The Google Developers Console project ID or project 11950 // number 11951 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 11952 // This field has been deprecated and replaced by the name field. 11953 // - zone: Deprecated. The name of the Google Compute Engine zone 11954 // (https://cloud.google.com/compute/docs/zones#available) to return 11955 // operations for. This field has been deprecated and replaced by the name 11956 // field. 11957 func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { 11958 c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11959 c.projectId = projectId 11960 c.zone = zone 11961 return c 11962 } 11963 11964 // Name sets the optional parameter "name": The name (project and location) of 11965 // the server config to get, specified in the format `projects/*/locations/*`. 11966 func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { 11967 c.urlParams_.Set("name", name) 11968 return c 11969 } 11970 11971 // Fields allows partial responses to be retrieved. See 11972 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11973 // details. 11974 func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall { 11975 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11976 return c 11977 } 11978 11979 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11980 // object's ETag matches the given value. This is useful for getting updates 11981 // only after the object has changed since the last request. 11982 func (c *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall { 11983 c.ifNoneMatch_ = entityTag 11984 return c 11985 } 11986 11987 // Context sets the context to be used in this call's Do method. 11988 func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall { 11989 c.ctx_ = ctx 11990 return c 11991 } 11992 11993 // Header returns a http.Header that can be modified by the caller to add 11994 // headers to the request. 11995 func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { 11996 if c.header_ == nil { 11997 c.header_ = make(http.Header) 11998 } 11999 return c.header_ 12000 } 12001 12002 func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { 12003 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12004 if c.ifNoneMatch_ != "" { 12005 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12006 } 12007 var body io.Reader = nil 12008 c.urlParams_.Set("alt", alt) 12009 c.urlParams_.Set("prettyPrint", "false") 12010 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/serverconfig") 12011 urls += "?" + c.urlParams_.Encode() 12012 req, err := http.NewRequest("GET", urls, body) 12013 if err != nil { 12014 return nil, err 12015 } 12016 req.Header = reqHeaders 12017 googleapi.Expand(req.URL, map[string]string{ 12018 "projectId": c.projectId, 12019 "zone": c.zone, 12020 }) 12021 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12022 } 12023 12024 // Do executes the "container.projects.zones.getServerconfig" call. 12025 // Any non-2xx status code is an error. Response headers are in either 12026 // *ServerConfig.ServerResponse.Header or (if a response was returned at all) 12027 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12028 // whether the returned error was because http.StatusNotModified was returned. 12029 func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { 12030 gensupport.SetOptions(c.urlParams_, opts...) 12031 res, err := c.doRequest("json") 12032 if res != nil && res.StatusCode == http.StatusNotModified { 12033 if res.Body != nil { 12034 res.Body.Close() 12035 } 12036 return nil, gensupport.WrapError(&googleapi.Error{ 12037 Code: res.StatusCode, 12038 Header: res.Header, 12039 }) 12040 } 12041 if err != nil { 12042 return nil, err 12043 } 12044 defer googleapi.CloseBody(res) 12045 if err := googleapi.CheckResponse(res); err != nil { 12046 return nil, gensupport.WrapError(err) 12047 } 12048 ret := &ServerConfig{ 12049 ServerResponse: googleapi.ServerResponse{ 12050 Header: res.Header, 12051 HTTPStatusCode: res.StatusCode, 12052 }, 12053 } 12054 target := &ret 12055 if err := gensupport.DecodeResponse(target, res); err != nil { 12056 return nil, err 12057 } 12058 return ret, nil 12059 } 12060 12061 type ProjectsZonesClustersAddonsCall struct { 12062 s *Service 12063 projectId string 12064 zone string 12065 clusterId string 12066 setaddonsconfigrequest *SetAddonsConfigRequest 12067 urlParams_ gensupport.URLParams 12068 ctx_ context.Context 12069 header_ http.Header 12070 } 12071 12072 // Addons: Sets the addons for a specific cluster. 12073 // 12074 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 12075 // been deprecated and replaced by the name field. 12076 // - projectId: Deprecated. The Google Developers Console project ID or project 12077 // number 12078 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12079 // This field has been deprecated and replaced by the name field. 12080 // - zone: Deprecated. The name of the Google Compute Engine zone 12081 // (https://cloud.google.com/compute/docs/zones#available) in which the 12082 // cluster resides. This field has been deprecated and replaced by the name 12083 // field. 12084 func (r *ProjectsZonesClustersService) Addons(projectId string, zone string, clusterId string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsZonesClustersAddonsCall { 12085 c := &ProjectsZonesClustersAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12086 c.projectId = projectId 12087 c.zone = zone 12088 c.clusterId = clusterId 12089 c.setaddonsconfigrequest = setaddonsconfigrequest 12090 return c 12091 } 12092 12093 // Fields allows partial responses to be retrieved. See 12094 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12095 // details. 12096 func (c *ProjectsZonesClustersAddonsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersAddonsCall { 12097 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12098 return c 12099 } 12100 12101 // Context sets the context to be used in this call's Do method. 12102 func (c *ProjectsZonesClustersAddonsCall) Context(ctx context.Context) *ProjectsZonesClustersAddonsCall { 12103 c.ctx_ = ctx 12104 return c 12105 } 12106 12107 // Header returns a http.Header that can be modified by the caller to add 12108 // headers to the request. 12109 func (c *ProjectsZonesClustersAddonsCall) Header() http.Header { 12110 if c.header_ == nil { 12111 c.header_ = make(http.Header) 12112 } 12113 return c.header_ 12114 } 12115 12116 func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) { 12117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12118 var body io.Reader = nil 12119 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) 12120 if err != nil { 12121 return nil, err 12122 } 12123 c.urlParams_.Set("alt", alt) 12124 c.urlParams_.Set("prettyPrint", "false") 12125 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") 12126 urls += "?" + c.urlParams_.Encode() 12127 req, err := http.NewRequest("POST", urls, body) 12128 if err != nil { 12129 return nil, err 12130 } 12131 req.Header = reqHeaders 12132 googleapi.Expand(req.URL, map[string]string{ 12133 "projectId": c.projectId, 12134 "zone": c.zone, 12135 "clusterId": c.clusterId, 12136 }) 12137 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12138 } 12139 12140 // Do executes the "container.projects.zones.clusters.addons" call. 12141 // Any non-2xx status code is an error. Response headers are in either 12142 // *Operation.ServerResponse.Header or (if a response was returned at all) in 12143 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12144 // whether the returned error was because http.StatusNotModified was returned. 12145 func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12146 gensupport.SetOptions(c.urlParams_, opts...) 12147 res, err := c.doRequest("json") 12148 if res != nil && res.StatusCode == http.StatusNotModified { 12149 if res.Body != nil { 12150 res.Body.Close() 12151 } 12152 return nil, gensupport.WrapError(&googleapi.Error{ 12153 Code: res.StatusCode, 12154 Header: res.Header, 12155 }) 12156 } 12157 if err != nil { 12158 return nil, err 12159 } 12160 defer googleapi.CloseBody(res) 12161 if err := googleapi.CheckResponse(res); err != nil { 12162 return nil, gensupport.WrapError(err) 12163 } 12164 ret := &Operation{ 12165 ServerResponse: googleapi.ServerResponse{ 12166 Header: res.Header, 12167 HTTPStatusCode: res.StatusCode, 12168 }, 12169 } 12170 target := &ret 12171 if err := gensupport.DecodeResponse(target, res); err != nil { 12172 return nil, err 12173 } 12174 return ret, nil 12175 } 12176 12177 type ProjectsZonesClustersCompleteIpRotationCall struct { 12178 s *Service 12179 projectId string 12180 zone string 12181 clusterId string 12182 completeiprotationrequest *CompleteIPRotationRequest 12183 urlParams_ gensupport.URLParams 12184 ctx_ context.Context 12185 header_ http.Header 12186 } 12187 12188 // CompleteIpRotation: Completes master IP rotation. 12189 // 12190 // - clusterId: Deprecated. The name of the cluster. This field has been 12191 // deprecated and replaced by the name field. 12192 // - projectId: Deprecated. The Google Developers Console project ID or project 12193 // number 12194 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12195 // This field has been deprecated and replaced by the name field. 12196 // - zone: Deprecated. The name of the Google Compute Engine zone 12197 // (https://cloud.google.com/compute/docs/zones#available) in which the 12198 // cluster resides. This field has been deprecated and replaced by the name 12199 // field. 12200 func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall { 12201 c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12202 c.projectId = projectId 12203 c.zone = zone 12204 c.clusterId = clusterId 12205 c.completeiprotationrequest = completeiprotationrequest 12206 return c 12207 } 12208 12209 // Fields allows partial responses to be retrieved. See 12210 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12211 // details. 12212 func (c *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall { 12213 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12214 return c 12215 } 12216 12217 // Context sets the context to be used in this call's Do method. 12218 func (c *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall { 12219 c.ctx_ = ctx 12220 return c 12221 } 12222 12223 // Header returns a http.Header that can be modified by the caller to add 12224 // headers to the request. 12225 func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { 12226 if c.header_ == nil { 12227 c.header_ = make(http.Header) 12228 } 12229 return c.header_ 12230 } 12231 12232 func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { 12233 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12234 var body io.Reader = nil 12235 body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) 12236 if err != nil { 12237 return nil, err 12238 } 12239 c.urlParams_.Set("alt", alt) 12240 c.urlParams_.Set("prettyPrint", "false") 12241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") 12242 urls += "?" + c.urlParams_.Encode() 12243 req, err := http.NewRequest("POST", urls, body) 12244 if err != nil { 12245 return nil, err 12246 } 12247 req.Header = reqHeaders 12248 googleapi.Expand(req.URL, map[string]string{ 12249 "projectId": c.projectId, 12250 "zone": c.zone, 12251 "clusterId": c.clusterId, 12252 }) 12253 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12254 } 12255 12256 // Do executes the "container.projects.zones.clusters.completeIpRotation" call. 12257 // Any non-2xx status code is an error. Response headers are in either 12258 // *Operation.ServerResponse.Header or (if a response was returned at all) in 12259 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12260 // whether the returned error was because http.StatusNotModified was returned. 12261 func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12262 gensupport.SetOptions(c.urlParams_, opts...) 12263 res, err := c.doRequest("json") 12264 if res != nil && res.StatusCode == http.StatusNotModified { 12265 if res.Body != nil { 12266 res.Body.Close() 12267 } 12268 return nil, gensupport.WrapError(&googleapi.Error{ 12269 Code: res.StatusCode, 12270 Header: res.Header, 12271 }) 12272 } 12273 if err != nil { 12274 return nil, err 12275 } 12276 defer googleapi.CloseBody(res) 12277 if err := googleapi.CheckResponse(res); err != nil { 12278 return nil, gensupport.WrapError(err) 12279 } 12280 ret := &Operation{ 12281 ServerResponse: googleapi.ServerResponse{ 12282 Header: res.Header, 12283 HTTPStatusCode: res.StatusCode, 12284 }, 12285 } 12286 target := &ret 12287 if err := gensupport.DecodeResponse(target, res); err != nil { 12288 return nil, err 12289 } 12290 return ret, nil 12291 } 12292 12293 type ProjectsZonesClustersCreateCall struct { 12294 s *Service 12295 projectId string 12296 zone string 12297 createclusterrequest *CreateClusterRequest 12298 urlParams_ gensupport.URLParams 12299 ctx_ context.Context 12300 header_ http.Header 12301 } 12302 12303 // Create: Creates a cluster, consisting of the specified number and type of 12304 // Google Compute Engine instances. By default, the cluster is created in the 12305 // project's default network 12306 // (https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One 12307 // firewall is added for the cluster. After cluster creation, the Kubelet 12308 // creates routes for each node to allow the containers on that node to 12309 // communicate with all other instances in the cluster. Finally, an entry is 12310 // added to the project's global metadata indicating which CIDR range the 12311 // cluster is using. 12312 // 12313 // - projectId: Deprecated. The Google Developers Console project ID or project 12314 // number 12315 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12316 // This field has been deprecated and replaced by the parent field. 12317 // - zone: Deprecated. The name of the Google Compute Engine zone 12318 // (https://cloud.google.com/compute/docs/zones#available) in which the 12319 // cluster resides. This field has been deprecated and replaced by the parent 12320 // field. 12321 func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { 12322 c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12323 c.projectId = projectId 12324 c.zone = zone 12325 c.createclusterrequest = createclusterrequest 12326 return c 12327 } 12328 12329 // Fields allows partial responses to be retrieved. See 12330 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12331 // details. 12332 func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { 12333 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12334 return c 12335 } 12336 12337 // Context sets the context to be used in this call's Do method. 12338 func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall { 12339 c.ctx_ = ctx 12340 return c 12341 } 12342 12343 // Header returns a http.Header that can be modified by the caller to add 12344 // headers to the request. 12345 func (c *ProjectsZonesClustersCreateCall) Header() http.Header { 12346 if c.header_ == nil { 12347 c.header_ = make(http.Header) 12348 } 12349 return c.header_ 12350 } 12351 12352 func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { 12353 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12354 var body io.Reader = nil 12355 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) 12356 if err != nil { 12357 return nil, err 12358 } 12359 c.urlParams_.Set("alt", alt) 12360 c.urlParams_.Set("prettyPrint", "false") 12361 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") 12362 urls += "?" + c.urlParams_.Encode() 12363 req, err := http.NewRequest("POST", urls, body) 12364 if err != nil { 12365 return nil, err 12366 } 12367 req.Header = reqHeaders 12368 googleapi.Expand(req.URL, map[string]string{ 12369 "projectId": c.projectId, 12370 "zone": c.zone, 12371 }) 12372 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12373 } 12374 12375 // Do executes the "container.projects.zones.clusters.create" call. 12376 // Any non-2xx status code is an error. Response headers are in either 12377 // *Operation.ServerResponse.Header or (if a response was returned at all) in 12378 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12379 // whether the returned error was because http.StatusNotModified was returned. 12380 func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12381 gensupport.SetOptions(c.urlParams_, opts...) 12382 res, err := c.doRequest("json") 12383 if res != nil && res.StatusCode == http.StatusNotModified { 12384 if res.Body != nil { 12385 res.Body.Close() 12386 } 12387 return nil, gensupport.WrapError(&googleapi.Error{ 12388 Code: res.StatusCode, 12389 Header: res.Header, 12390 }) 12391 } 12392 if err != nil { 12393 return nil, err 12394 } 12395 defer googleapi.CloseBody(res) 12396 if err := googleapi.CheckResponse(res); err != nil { 12397 return nil, gensupport.WrapError(err) 12398 } 12399 ret := &Operation{ 12400 ServerResponse: googleapi.ServerResponse{ 12401 Header: res.Header, 12402 HTTPStatusCode: res.StatusCode, 12403 }, 12404 } 12405 target := &ret 12406 if err := gensupport.DecodeResponse(target, res); err != nil { 12407 return nil, err 12408 } 12409 return ret, nil 12410 } 12411 12412 type ProjectsZonesClustersDeleteCall struct { 12413 s *Service 12414 projectId string 12415 zone string 12416 clusterId string 12417 urlParams_ gensupport.URLParams 12418 ctx_ context.Context 12419 header_ http.Header 12420 } 12421 12422 // Delete: Deletes the cluster, including the Kubernetes endpoint and all 12423 // worker nodes. Firewalls and routes that were configured during cluster 12424 // creation are also deleted. Other Google Compute Engine resources that might 12425 // be in use by the cluster, such as load balancer resources, are not deleted 12426 // if they weren't present when the cluster was initially created. 12427 // 12428 // - clusterId: Deprecated. The name of the cluster to delete. This field has 12429 // been deprecated and replaced by the name field. 12430 // - projectId: Deprecated. The Google Developers Console project ID or project 12431 // number 12432 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12433 // This field has been deprecated and replaced by the name field. 12434 // - zone: Deprecated. The name of the Google Compute Engine zone 12435 // (https://cloud.google.com/compute/docs/zones#available) in which the 12436 // cluster resides. This field has been deprecated and replaced by the name 12437 // field. 12438 func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { 12439 c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12440 c.projectId = projectId 12441 c.zone = zone 12442 c.clusterId = clusterId 12443 return c 12444 } 12445 12446 // Name sets the optional parameter "name": The name (project, location, 12447 // cluster) of the cluster to delete. Specified in the format 12448 // `projects/*/locations/*/clusters/*`. 12449 func (c *ProjectsZonesClustersDeleteCall) Name(name string) *ProjectsZonesClustersDeleteCall { 12450 c.urlParams_.Set("name", name) 12451 return c 12452 } 12453 12454 // Fields allows partial responses to be retrieved. See 12455 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12456 // details. 12457 func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { 12458 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12459 return c 12460 } 12461 12462 // Context sets the context to be used in this call's Do method. 12463 func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall { 12464 c.ctx_ = ctx 12465 return c 12466 } 12467 12468 // Header returns a http.Header that can be modified by the caller to add 12469 // headers to the request. 12470 func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { 12471 if c.header_ == nil { 12472 c.header_ = make(http.Header) 12473 } 12474 return c.header_ 12475 } 12476 12477 func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { 12478 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12479 var body io.Reader = nil 12480 c.urlParams_.Set("alt", alt) 12481 c.urlParams_.Set("prettyPrint", "false") 12482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 12483 urls += "?" + c.urlParams_.Encode() 12484 req, err := http.NewRequest("DELETE", urls, body) 12485 if err != nil { 12486 return nil, err 12487 } 12488 req.Header = reqHeaders 12489 googleapi.Expand(req.URL, map[string]string{ 12490 "projectId": c.projectId, 12491 "zone": c.zone, 12492 "clusterId": c.clusterId, 12493 }) 12494 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12495 } 12496 12497 // Do executes the "container.projects.zones.clusters.delete" call. 12498 // Any non-2xx status code is an error. Response headers are in either 12499 // *Operation.ServerResponse.Header or (if a response was returned at all) in 12500 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12501 // whether the returned error was because http.StatusNotModified was returned. 12502 func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12503 gensupport.SetOptions(c.urlParams_, opts...) 12504 res, err := c.doRequest("json") 12505 if res != nil && res.StatusCode == http.StatusNotModified { 12506 if res.Body != nil { 12507 res.Body.Close() 12508 } 12509 return nil, gensupport.WrapError(&googleapi.Error{ 12510 Code: res.StatusCode, 12511 Header: res.Header, 12512 }) 12513 } 12514 if err != nil { 12515 return nil, err 12516 } 12517 defer googleapi.CloseBody(res) 12518 if err := googleapi.CheckResponse(res); err != nil { 12519 return nil, gensupport.WrapError(err) 12520 } 12521 ret := &Operation{ 12522 ServerResponse: googleapi.ServerResponse{ 12523 Header: res.Header, 12524 HTTPStatusCode: res.StatusCode, 12525 }, 12526 } 12527 target := &ret 12528 if err := gensupport.DecodeResponse(target, res); err != nil { 12529 return nil, err 12530 } 12531 return ret, nil 12532 } 12533 12534 type ProjectsZonesClustersGetCall struct { 12535 s *Service 12536 projectId string 12537 zone string 12538 clusterId string 12539 urlParams_ gensupport.URLParams 12540 ifNoneMatch_ string 12541 ctx_ context.Context 12542 header_ http.Header 12543 } 12544 12545 // Get: Gets the details for a specific cluster. 12546 // 12547 // - clusterId: Deprecated. The name of the cluster to retrieve. This field has 12548 // been deprecated and replaced by the name field. 12549 // - projectId: Deprecated. The Google Developers Console project ID or project 12550 // number 12551 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12552 // This field has been deprecated and replaced by the name field. 12553 // - zone: Deprecated. The name of the Google Compute Engine zone 12554 // (https://cloud.google.com/compute/docs/zones#available) in which the 12555 // cluster resides. This field has been deprecated and replaced by the name 12556 // field. 12557 func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { 12558 c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12559 c.projectId = projectId 12560 c.zone = zone 12561 c.clusterId = clusterId 12562 return c 12563 } 12564 12565 // Name sets the optional parameter "name": The name (project, location, 12566 // cluster) of the cluster to retrieve. Specified in the format 12567 // `projects/*/locations/*/clusters/*`. 12568 func (c *ProjectsZonesClustersGetCall) Name(name string) *ProjectsZonesClustersGetCall { 12569 c.urlParams_.Set("name", name) 12570 return c 12571 } 12572 12573 // Fields allows partial responses to be retrieved. See 12574 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12575 // details. 12576 func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { 12577 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12578 return c 12579 } 12580 12581 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12582 // object's ETag matches the given value. This is useful for getting updates 12583 // only after the object has changed since the last request. 12584 func (c *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall { 12585 c.ifNoneMatch_ = entityTag 12586 return c 12587 } 12588 12589 // Context sets the context to be used in this call's Do method. 12590 func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall { 12591 c.ctx_ = ctx 12592 return c 12593 } 12594 12595 // Header returns a http.Header that can be modified by the caller to add 12596 // headers to the request. 12597 func (c *ProjectsZonesClustersGetCall) Header() http.Header { 12598 if c.header_ == nil { 12599 c.header_ = make(http.Header) 12600 } 12601 return c.header_ 12602 } 12603 12604 func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { 12605 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12606 if c.ifNoneMatch_ != "" { 12607 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12608 } 12609 var body io.Reader = nil 12610 c.urlParams_.Set("alt", alt) 12611 c.urlParams_.Set("prettyPrint", "false") 12612 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 12613 urls += "?" + c.urlParams_.Encode() 12614 req, err := http.NewRequest("GET", urls, body) 12615 if err != nil { 12616 return nil, err 12617 } 12618 req.Header = reqHeaders 12619 googleapi.Expand(req.URL, map[string]string{ 12620 "projectId": c.projectId, 12621 "zone": c.zone, 12622 "clusterId": c.clusterId, 12623 }) 12624 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12625 } 12626 12627 // Do executes the "container.projects.zones.clusters.get" call. 12628 // Any non-2xx status code is an error. Response headers are in either 12629 // *Cluster.ServerResponse.Header or (if a response was returned at all) in 12630 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12631 // whether the returned error was because http.StatusNotModified was returned. 12632 func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { 12633 gensupport.SetOptions(c.urlParams_, opts...) 12634 res, err := c.doRequest("json") 12635 if res != nil && res.StatusCode == http.StatusNotModified { 12636 if res.Body != nil { 12637 res.Body.Close() 12638 } 12639 return nil, gensupport.WrapError(&googleapi.Error{ 12640 Code: res.StatusCode, 12641 Header: res.Header, 12642 }) 12643 } 12644 if err != nil { 12645 return nil, err 12646 } 12647 defer googleapi.CloseBody(res) 12648 if err := googleapi.CheckResponse(res); err != nil { 12649 return nil, gensupport.WrapError(err) 12650 } 12651 ret := &Cluster{ 12652 ServerResponse: googleapi.ServerResponse{ 12653 Header: res.Header, 12654 HTTPStatusCode: res.StatusCode, 12655 }, 12656 } 12657 target := &ret 12658 if err := gensupport.DecodeResponse(target, res); err != nil { 12659 return nil, err 12660 } 12661 return ret, nil 12662 } 12663 12664 type ProjectsZonesClustersLegacyAbacCall struct { 12665 s *Service 12666 projectId string 12667 zone string 12668 clusterId string 12669 setlegacyabacrequest *SetLegacyAbacRequest 12670 urlParams_ gensupport.URLParams 12671 ctx_ context.Context 12672 header_ http.Header 12673 } 12674 12675 // LegacyAbac: Enables or disables the ABAC authorization mechanism on a 12676 // cluster. 12677 // 12678 // - clusterId: Deprecated. The name of the cluster to update. This field has 12679 // been deprecated and replaced by the name field. 12680 // - projectId: Deprecated. The Google Developers Console project ID or project 12681 // number 12682 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12683 // This field has been deprecated and replaced by the name field. 12684 // - zone: Deprecated. The name of the Google Compute Engine zone 12685 // (https://cloud.google.com/compute/docs/zones#available) in which the 12686 // cluster resides. This field has been deprecated and replaced by the name 12687 // field. 12688 func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall { 12689 c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12690 c.projectId = projectId 12691 c.zone = zone 12692 c.clusterId = clusterId 12693 c.setlegacyabacrequest = setlegacyabacrequest 12694 return c 12695 } 12696 12697 // Fields allows partial responses to be retrieved. See 12698 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12699 // details. 12700 func (c *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall { 12701 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12702 return c 12703 } 12704 12705 // Context sets the context to be used in this call's Do method. 12706 func (c *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall { 12707 c.ctx_ = ctx 12708 return c 12709 } 12710 12711 // Header returns a http.Header that can be modified by the caller to add 12712 // headers to the request. 12713 func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { 12714 if c.header_ == nil { 12715 c.header_ = make(http.Header) 12716 } 12717 return c.header_ 12718 } 12719 12720 func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) { 12721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12722 var body io.Reader = nil 12723 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) 12724 if err != nil { 12725 return nil, err 12726 } 12727 c.urlParams_.Set("alt", alt) 12728 c.urlParams_.Set("prettyPrint", "false") 12729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") 12730 urls += "?" + c.urlParams_.Encode() 12731 req, err := http.NewRequest("POST", urls, body) 12732 if err != nil { 12733 return nil, err 12734 } 12735 req.Header = reqHeaders 12736 googleapi.Expand(req.URL, map[string]string{ 12737 "projectId": c.projectId, 12738 "zone": c.zone, 12739 "clusterId": c.clusterId, 12740 }) 12741 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12742 } 12743 12744 // Do executes the "container.projects.zones.clusters.legacyAbac" call. 12745 // Any non-2xx status code is an error. Response headers are in either 12746 // *Operation.ServerResponse.Header or (if a response was returned at all) in 12747 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12748 // whether the returned error was because http.StatusNotModified was returned. 12749 func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12750 gensupport.SetOptions(c.urlParams_, opts...) 12751 res, err := c.doRequest("json") 12752 if res != nil && res.StatusCode == http.StatusNotModified { 12753 if res.Body != nil { 12754 res.Body.Close() 12755 } 12756 return nil, gensupport.WrapError(&googleapi.Error{ 12757 Code: res.StatusCode, 12758 Header: res.Header, 12759 }) 12760 } 12761 if err != nil { 12762 return nil, err 12763 } 12764 defer googleapi.CloseBody(res) 12765 if err := googleapi.CheckResponse(res); err != nil { 12766 return nil, gensupport.WrapError(err) 12767 } 12768 ret := &Operation{ 12769 ServerResponse: googleapi.ServerResponse{ 12770 Header: res.Header, 12771 HTTPStatusCode: res.StatusCode, 12772 }, 12773 } 12774 target := &ret 12775 if err := gensupport.DecodeResponse(target, res); err != nil { 12776 return nil, err 12777 } 12778 return ret, nil 12779 } 12780 12781 type ProjectsZonesClustersListCall struct { 12782 s *Service 12783 projectId string 12784 zone string 12785 urlParams_ gensupport.URLParams 12786 ifNoneMatch_ string 12787 ctx_ context.Context 12788 header_ http.Header 12789 } 12790 12791 // List: Lists all clusters owned by a project in either the specified zone or 12792 // all zones. 12793 // 12794 // - projectId: Deprecated. The Google Developers Console project ID or project 12795 // number 12796 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12797 // This field has been deprecated and replaced by the parent field. 12798 // - zone: Deprecated. The name of the Google Compute Engine zone 12799 // (https://cloud.google.com/compute/docs/zones#available) in which the 12800 // cluster resides, or "-" for all zones. This field has been deprecated and 12801 // replaced by the parent field. 12802 func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall { 12803 c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12804 c.projectId = projectId 12805 c.zone = zone 12806 return c 12807 } 12808 12809 // Parent sets the optional parameter "parent": The parent (project and 12810 // location) where the clusters will be listed. Specified in the format 12811 // `projects/*/locations/*`. Location "-" matches all zones and all regions. 12812 func (c *ProjectsZonesClustersListCall) Parent(parent string) *ProjectsZonesClustersListCall { 12813 c.urlParams_.Set("parent", parent) 12814 return c 12815 } 12816 12817 // Fields allows partial responses to be retrieved. See 12818 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12819 // details. 12820 func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { 12821 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12822 return c 12823 } 12824 12825 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12826 // object's ETag matches the given value. This is useful for getting updates 12827 // only after the object has changed since the last request. 12828 func (c *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall { 12829 c.ifNoneMatch_ = entityTag 12830 return c 12831 } 12832 12833 // Context sets the context to be used in this call's Do method. 12834 func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall { 12835 c.ctx_ = ctx 12836 return c 12837 } 12838 12839 // Header returns a http.Header that can be modified by the caller to add 12840 // headers to the request. 12841 func (c *ProjectsZonesClustersListCall) Header() http.Header { 12842 if c.header_ == nil { 12843 c.header_ = make(http.Header) 12844 } 12845 return c.header_ 12846 } 12847 12848 func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { 12849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12850 if c.ifNoneMatch_ != "" { 12851 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12852 } 12853 var body io.Reader = nil 12854 c.urlParams_.Set("alt", alt) 12855 c.urlParams_.Set("prettyPrint", "false") 12856 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") 12857 urls += "?" + c.urlParams_.Encode() 12858 req, err := http.NewRequest("GET", urls, body) 12859 if err != nil { 12860 return nil, err 12861 } 12862 req.Header = reqHeaders 12863 googleapi.Expand(req.URL, map[string]string{ 12864 "projectId": c.projectId, 12865 "zone": c.zone, 12866 }) 12867 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12868 } 12869 12870 // Do executes the "container.projects.zones.clusters.list" call. 12871 // Any non-2xx status code is an error. Response headers are in either 12872 // *ListClustersResponse.ServerResponse.Header or (if a response was returned 12873 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12874 // check whether the returned error was because http.StatusNotModified was 12875 // returned. 12876 func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { 12877 gensupport.SetOptions(c.urlParams_, opts...) 12878 res, err := c.doRequest("json") 12879 if res != nil && res.StatusCode == http.StatusNotModified { 12880 if res.Body != nil { 12881 res.Body.Close() 12882 } 12883 return nil, gensupport.WrapError(&googleapi.Error{ 12884 Code: res.StatusCode, 12885 Header: res.Header, 12886 }) 12887 } 12888 if err != nil { 12889 return nil, err 12890 } 12891 defer googleapi.CloseBody(res) 12892 if err := googleapi.CheckResponse(res); err != nil { 12893 return nil, gensupport.WrapError(err) 12894 } 12895 ret := &ListClustersResponse{ 12896 ServerResponse: googleapi.ServerResponse{ 12897 Header: res.Header, 12898 HTTPStatusCode: res.StatusCode, 12899 }, 12900 } 12901 target := &ret 12902 if err := gensupport.DecodeResponse(target, res); err != nil { 12903 return nil, err 12904 } 12905 return ret, nil 12906 } 12907 12908 type ProjectsZonesClustersLocationsCall struct { 12909 s *Service 12910 projectId string 12911 zone string 12912 clusterId string 12913 setlocationsrequest *SetLocationsRequest 12914 urlParams_ gensupport.URLParams 12915 ctx_ context.Context 12916 header_ http.Header 12917 } 12918 12919 // Locations: Sets the locations for a specific cluster. Deprecated. Use 12920 // projects.locations.clusters.update 12921 // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) 12922 // instead. 12923 // 12924 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 12925 // been deprecated and replaced by the name field. 12926 // - projectId: Deprecated. The Google Developers Console project ID or project 12927 // number 12928 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 12929 // This field has been deprecated and replaced by the name field. 12930 // - zone: Deprecated. The name of the Google Compute Engine zone 12931 // (https://cloud.google.com/compute/docs/zones#available) in which the 12932 // cluster resides. This field has been deprecated and replaced by the name 12933 // field. 12934 func (r *ProjectsZonesClustersService) Locations(projectId string, zone string, clusterId string, setlocationsrequest *SetLocationsRequest) *ProjectsZonesClustersLocationsCall { 12935 c := &ProjectsZonesClustersLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12936 c.projectId = projectId 12937 c.zone = zone 12938 c.clusterId = clusterId 12939 c.setlocationsrequest = setlocationsrequest 12940 return c 12941 } 12942 12943 // Fields allows partial responses to be retrieved. See 12944 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12945 // details. 12946 func (c *ProjectsZonesClustersLocationsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLocationsCall { 12947 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12948 return c 12949 } 12950 12951 // Context sets the context to be used in this call's Do method. 12952 func (c *ProjectsZonesClustersLocationsCall) Context(ctx context.Context) *ProjectsZonesClustersLocationsCall { 12953 c.ctx_ = ctx 12954 return c 12955 } 12956 12957 // Header returns a http.Header that can be modified by the caller to add 12958 // headers to the request. 12959 func (c *ProjectsZonesClustersLocationsCall) Header() http.Header { 12960 if c.header_ == nil { 12961 c.header_ = make(http.Header) 12962 } 12963 return c.header_ 12964 } 12965 12966 func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) { 12967 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12968 var body io.Reader = nil 12969 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) 12970 if err != nil { 12971 return nil, err 12972 } 12973 c.urlParams_.Set("alt", alt) 12974 c.urlParams_.Set("prettyPrint", "false") 12975 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") 12976 urls += "?" + c.urlParams_.Encode() 12977 req, err := http.NewRequest("POST", urls, body) 12978 if err != nil { 12979 return nil, err 12980 } 12981 req.Header = reqHeaders 12982 googleapi.Expand(req.URL, map[string]string{ 12983 "projectId": c.projectId, 12984 "zone": c.zone, 12985 "clusterId": c.clusterId, 12986 }) 12987 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12988 } 12989 12990 // Do executes the "container.projects.zones.clusters.locations" call. 12991 // Any non-2xx status code is an error. Response headers are in either 12992 // *Operation.ServerResponse.Header or (if a response was returned at all) in 12993 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12994 // whether the returned error was because http.StatusNotModified was returned. 12995 func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 12996 gensupport.SetOptions(c.urlParams_, opts...) 12997 res, err := c.doRequest("json") 12998 if res != nil && res.StatusCode == http.StatusNotModified { 12999 if res.Body != nil { 13000 res.Body.Close() 13001 } 13002 return nil, gensupport.WrapError(&googleapi.Error{ 13003 Code: res.StatusCode, 13004 Header: res.Header, 13005 }) 13006 } 13007 if err != nil { 13008 return nil, err 13009 } 13010 defer googleapi.CloseBody(res) 13011 if err := googleapi.CheckResponse(res); err != nil { 13012 return nil, gensupport.WrapError(err) 13013 } 13014 ret := &Operation{ 13015 ServerResponse: googleapi.ServerResponse{ 13016 Header: res.Header, 13017 HTTPStatusCode: res.StatusCode, 13018 }, 13019 } 13020 target := &ret 13021 if err := gensupport.DecodeResponse(target, res); err != nil { 13022 return nil, err 13023 } 13024 return ret, nil 13025 } 13026 13027 type ProjectsZonesClustersLoggingCall struct { 13028 s *Service 13029 projectId string 13030 zone string 13031 clusterId string 13032 setloggingservicerequest *SetLoggingServiceRequest 13033 urlParams_ gensupport.URLParams 13034 ctx_ context.Context 13035 header_ http.Header 13036 } 13037 13038 // Logging: Sets the logging service for a specific cluster. 13039 // 13040 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 13041 // been deprecated and replaced by the name field. 13042 // - projectId: Deprecated. The Google Developers Console project ID or project 13043 // number 13044 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13045 // This field has been deprecated and replaced by the name field. 13046 // - zone: Deprecated. The name of the Google Compute Engine zone 13047 // (https://cloud.google.com/compute/docs/zones#available) in which the 13048 // cluster resides. This field has been deprecated and replaced by the name 13049 // field. 13050 func (r *ProjectsZonesClustersService) Logging(projectId string, zone string, clusterId string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsZonesClustersLoggingCall { 13051 c := &ProjectsZonesClustersLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13052 c.projectId = projectId 13053 c.zone = zone 13054 c.clusterId = clusterId 13055 c.setloggingservicerequest = setloggingservicerequest 13056 return c 13057 } 13058 13059 // Fields allows partial responses to be retrieved. See 13060 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13061 // details. 13062 func (c *ProjectsZonesClustersLoggingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLoggingCall { 13063 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13064 return c 13065 } 13066 13067 // Context sets the context to be used in this call's Do method. 13068 func (c *ProjectsZonesClustersLoggingCall) Context(ctx context.Context) *ProjectsZonesClustersLoggingCall { 13069 c.ctx_ = ctx 13070 return c 13071 } 13072 13073 // Header returns a http.Header that can be modified by the caller to add 13074 // headers to the request. 13075 func (c *ProjectsZonesClustersLoggingCall) Header() http.Header { 13076 if c.header_ == nil { 13077 c.header_ = make(http.Header) 13078 } 13079 return c.header_ 13080 } 13081 13082 func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) { 13083 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13084 var body io.Reader = nil 13085 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) 13086 if err != nil { 13087 return nil, err 13088 } 13089 c.urlParams_.Set("alt", alt) 13090 c.urlParams_.Set("prettyPrint", "false") 13091 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") 13092 urls += "?" + c.urlParams_.Encode() 13093 req, err := http.NewRequest("POST", urls, body) 13094 if err != nil { 13095 return nil, err 13096 } 13097 req.Header = reqHeaders 13098 googleapi.Expand(req.URL, map[string]string{ 13099 "projectId": c.projectId, 13100 "zone": c.zone, 13101 "clusterId": c.clusterId, 13102 }) 13103 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13104 } 13105 13106 // Do executes the "container.projects.zones.clusters.logging" call. 13107 // Any non-2xx status code is an error. Response headers are in either 13108 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13109 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13110 // whether the returned error was because http.StatusNotModified was returned. 13111 func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13112 gensupport.SetOptions(c.urlParams_, opts...) 13113 res, err := c.doRequest("json") 13114 if res != nil && res.StatusCode == http.StatusNotModified { 13115 if res.Body != nil { 13116 res.Body.Close() 13117 } 13118 return nil, gensupport.WrapError(&googleapi.Error{ 13119 Code: res.StatusCode, 13120 Header: res.Header, 13121 }) 13122 } 13123 if err != nil { 13124 return nil, err 13125 } 13126 defer googleapi.CloseBody(res) 13127 if err := googleapi.CheckResponse(res); err != nil { 13128 return nil, gensupport.WrapError(err) 13129 } 13130 ret := &Operation{ 13131 ServerResponse: googleapi.ServerResponse{ 13132 Header: res.Header, 13133 HTTPStatusCode: res.StatusCode, 13134 }, 13135 } 13136 target := &ret 13137 if err := gensupport.DecodeResponse(target, res); err != nil { 13138 return nil, err 13139 } 13140 return ret, nil 13141 } 13142 13143 type ProjectsZonesClustersMasterCall struct { 13144 s *Service 13145 projectId string 13146 zone string 13147 clusterId string 13148 updatemasterrequest *UpdateMasterRequest 13149 urlParams_ gensupport.URLParams 13150 ctx_ context.Context 13151 header_ http.Header 13152 } 13153 13154 // Master: Updates the master for a specific cluster. 13155 // 13156 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 13157 // been deprecated and replaced by the name field. 13158 // - projectId: Deprecated. The Google Developers Console project ID or project 13159 // number 13160 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13161 // This field has been deprecated and replaced by the name field. 13162 // - zone: Deprecated. The name of the Google Compute Engine zone 13163 // (https://cloud.google.com/compute/docs/zones#available) in which the 13164 // cluster resides. This field has been deprecated and replaced by the name 13165 // field. 13166 func (r *ProjectsZonesClustersService) Master(projectId string, zone string, clusterId string, updatemasterrequest *UpdateMasterRequest) *ProjectsZonesClustersMasterCall { 13167 c := &ProjectsZonesClustersMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13168 c.projectId = projectId 13169 c.zone = zone 13170 c.clusterId = clusterId 13171 c.updatemasterrequest = updatemasterrequest 13172 return c 13173 } 13174 13175 // Fields allows partial responses to be retrieved. See 13176 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13177 // details. 13178 func (c *ProjectsZonesClustersMasterCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMasterCall { 13179 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13180 return c 13181 } 13182 13183 // Context sets the context to be used in this call's Do method. 13184 func (c *ProjectsZonesClustersMasterCall) Context(ctx context.Context) *ProjectsZonesClustersMasterCall { 13185 c.ctx_ = ctx 13186 return c 13187 } 13188 13189 // Header returns a http.Header that can be modified by the caller to add 13190 // headers to the request. 13191 func (c *ProjectsZonesClustersMasterCall) Header() http.Header { 13192 if c.header_ == nil { 13193 c.header_ = make(http.Header) 13194 } 13195 return c.header_ 13196 } 13197 13198 func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) { 13199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13200 var body io.Reader = nil 13201 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) 13202 if err != nil { 13203 return nil, err 13204 } 13205 c.urlParams_.Set("alt", alt) 13206 c.urlParams_.Set("prettyPrint", "false") 13207 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") 13208 urls += "?" + c.urlParams_.Encode() 13209 req, err := http.NewRequest("POST", urls, body) 13210 if err != nil { 13211 return nil, err 13212 } 13213 req.Header = reqHeaders 13214 googleapi.Expand(req.URL, map[string]string{ 13215 "projectId": c.projectId, 13216 "zone": c.zone, 13217 "clusterId": c.clusterId, 13218 }) 13219 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13220 } 13221 13222 // Do executes the "container.projects.zones.clusters.master" call. 13223 // Any non-2xx status code is an error. Response headers are in either 13224 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13225 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13226 // whether the returned error was because http.StatusNotModified was returned. 13227 func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13228 gensupport.SetOptions(c.urlParams_, opts...) 13229 res, err := c.doRequest("json") 13230 if res != nil && res.StatusCode == http.StatusNotModified { 13231 if res.Body != nil { 13232 res.Body.Close() 13233 } 13234 return nil, gensupport.WrapError(&googleapi.Error{ 13235 Code: res.StatusCode, 13236 Header: res.Header, 13237 }) 13238 } 13239 if err != nil { 13240 return nil, err 13241 } 13242 defer googleapi.CloseBody(res) 13243 if err := googleapi.CheckResponse(res); err != nil { 13244 return nil, gensupport.WrapError(err) 13245 } 13246 ret := &Operation{ 13247 ServerResponse: googleapi.ServerResponse{ 13248 Header: res.Header, 13249 HTTPStatusCode: res.StatusCode, 13250 }, 13251 } 13252 target := &ret 13253 if err := gensupport.DecodeResponse(target, res); err != nil { 13254 return nil, err 13255 } 13256 return ret, nil 13257 } 13258 13259 type ProjectsZonesClustersMonitoringCall struct { 13260 s *Service 13261 projectId string 13262 zone string 13263 clusterId string 13264 setmonitoringservicerequest *SetMonitoringServiceRequest 13265 urlParams_ gensupport.URLParams 13266 ctx_ context.Context 13267 header_ http.Header 13268 } 13269 13270 // Monitoring: Sets the monitoring service for a specific cluster. 13271 // 13272 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 13273 // been deprecated and replaced by the name field. 13274 // - projectId: Deprecated. The Google Developers Console project ID or project 13275 // number 13276 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13277 // This field has been deprecated and replaced by the name field. 13278 // - zone: Deprecated. The name of the Google Compute Engine zone 13279 // (https://cloud.google.com/compute/docs/zones#available) in which the 13280 // cluster resides. This field has been deprecated and replaced by the name 13281 // field. 13282 func (r *ProjectsZonesClustersService) Monitoring(projectId string, zone string, clusterId string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsZonesClustersMonitoringCall { 13283 c := &ProjectsZonesClustersMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13284 c.projectId = projectId 13285 c.zone = zone 13286 c.clusterId = clusterId 13287 c.setmonitoringservicerequest = setmonitoringservicerequest 13288 return c 13289 } 13290 13291 // Fields allows partial responses to be retrieved. See 13292 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13293 // details. 13294 func (c *ProjectsZonesClustersMonitoringCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMonitoringCall { 13295 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13296 return c 13297 } 13298 13299 // Context sets the context to be used in this call's Do method. 13300 func (c *ProjectsZonesClustersMonitoringCall) Context(ctx context.Context) *ProjectsZonesClustersMonitoringCall { 13301 c.ctx_ = ctx 13302 return c 13303 } 13304 13305 // Header returns a http.Header that can be modified by the caller to add 13306 // headers to the request. 13307 func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header { 13308 if c.header_ == nil { 13309 c.header_ = make(http.Header) 13310 } 13311 return c.header_ 13312 } 13313 13314 func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) { 13315 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13316 var body io.Reader = nil 13317 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) 13318 if err != nil { 13319 return nil, err 13320 } 13321 c.urlParams_.Set("alt", alt) 13322 c.urlParams_.Set("prettyPrint", "false") 13323 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") 13324 urls += "?" + c.urlParams_.Encode() 13325 req, err := http.NewRequest("POST", urls, body) 13326 if err != nil { 13327 return nil, err 13328 } 13329 req.Header = reqHeaders 13330 googleapi.Expand(req.URL, map[string]string{ 13331 "projectId": c.projectId, 13332 "zone": c.zone, 13333 "clusterId": c.clusterId, 13334 }) 13335 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13336 } 13337 13338 // Do executes the "container.projects.zones.clusters.monitoring" call. 13339 // Any non-2xx status code is an error. Response headers are in either 13340 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13341 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13342 // whether the returned error was because http.StatusNotModified was returned. 13343 func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13344 gensupport.SetOptions(c.urlParams_, opts...) 13345 res, err := c.doRequest("json") 13346 if res != nil && res.StatusCode == http.StatusNotModified { 13347 if res.Body != nil { 13348 res.Body.Close() 13349 } 13350 return nil, gensupport.WrapError(&googleapi.Error{ 13351 Code: res.StatusCode, 13352 Header: res.Header, 13353 }) 13354 } 13355 if err != nil { 13356 return nil, err 13357 } 13358 defer googleapi.CloseBody(res) 13359 if err := googleapi.CheckResponse(res); err != nil { 13360 return nil, gensupport.WrapError(err) 13361 } 13362 ret := &Operation{ 13363 ServerResponse: googleapi.ServerResponse{ 13364 Header: res.Header, 13365 HTTPStatusCode: res.StatusCode, 13366 }, 13367 } 13368 target := &ret 13369 if err := gensupport.DecodeResponse(target, res); err != nil { 13370 return nil, err 13371 } 13372 return ret, nil 13373 } 13374 13375 type ProjectsZonesClustersResourceLabelsCall struct { 13376 s *Service 13377 projectId string 13378 zone string 13379 clusterId string 13380 setlabelsrequest *SetLabelsRequest 13381 urlParams_ gensupport.URLParams 13382 ctx_ context.Context 13383 header_ http.Header 13384 } 13385 13386 // ResourceLabels: Sets labels on a cluster. 13387 // 13388 // - clusterId: Deprecated. The name of the cluster. This field has been 13389 // deprecated and replaced by the name field. 13390 // - projectId: Deprecated. The Google Developers Console project ID or project 13391 // number 13392 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13393 // This field has been deprecated and replaced by the name field. 13394 // - zone: Deprecated. The name of the Google Compute Engine zone 13395 // (https://cloud.google.com/compute/docs/zones#available) in which the 13396 // cluster resides. This field has been deprecated and replaced by the name 13397 // field. 13398 func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall { 13399 c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13400 c.projectId = projectId 13401 c.zone = zone 13402 c.clusterId = clusterId 13403 c.setlabelsrequest = setlabelsrequest 13404 return c 13405 } 13406 13407 // Fields allows partial responses to be retrieved. See 13408 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13409 // details. 13410 func (c *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall { 13411 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13412 return c 13413 } 13414 13415 // Context sets the context to be used in this call's Do method. 13416 func (c *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall { 13417 c.ctx_ = ctx 13418 return c 13419 } 13420 13421 // Header returns a http.Header that can be modified by the caller to add 13422 // headers to the request. 13423 func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { 13424 if c.header_ == nil { 13425 c.header_ = make(http.Header) 13426 } 13427 return c.header_ 13428 } 13429 13430 func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) { 13431 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13432 var body io.Reader = nil 13433 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) 13434 if err != nil { 13435 return nil, err 13436 } 13437 c.urlParams_.Set("alt", alt) 13438 c.urlParams_.Set("prettyPrint", "false") 13439 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") 13440 urls += "?" + c.urlParams_.Encode() 13441 req, err := http.NewRequest("POST", urls, body) 13442 if err != nil { 13443 return nil, err 13444 } 13445 req.Header = reqHeaders 13446 googleapi.Expand(req.URL, map[string]string{ 13447 "projectId": c.projectId, 13448 "zone": c.zone, 13449 "clusterId": c.clusterId, 13450 }) 13451 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13452 } 13453 13454 // Do executes the "container.projects.zones.clusters.resourceLabels" call. 13455 // Any non-2xx status code is an error. Response headers are in either 13456 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13457 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13458 // whether the returned error was because http.StatusNotModified was returned. 13459 func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13460 gensupport.SetOptions(c.urlParams_, opts...) 13461 res, err := c.doRequest("json") 13462 if res != nil && res.StatusCode == http.StatusNotModified { 13463 if res.Body != nil { 13464 res.Body.Close() 13465 } 13466 return nil, gensupport.WrapError(&googleapi.Error{ 13467 Code: res.StatusCode, 13468 Header: res.Header, 13469 }) 13470 } 13471 if err != nil { 13472 return nil, err 13473 } 13474 defer googleapi.CloseBody(res) 13475 if err := googleapi.CheckResponse(res); err != nil { 13476 return nil, gensupport.WrapError(err) 13477 } 13478 ret := &Operation{ 13479 ServerResponse: googleapi.ServerResponse{ 13480 Header: res.Header, 13481 HTTPStatusCode: res.StatusCode, 13482 }, 13483 } 13484 target := &ret 13485 if err := gensupport.DecodeResponse(target, res); err != nil { 13486 return nil, err 13487 } 13488 return ret, nil 13489 } 13490 13491 type ProjectsZonesClustersSetMaintenancePolicyCall struct { 13492 s *Service 13493 projectId string 13494 zone string 13495 clusterId string 13496 setmaintenancepolicyrequest *SetMaintenancePolicyRequest 13497 urlParams_ gensupport.URLParams 13498 ctx_ context.Context 13499 header_ http.Header 13500 } 13501 13502 // SetMaintenancePolicy: Sets the maintenance policy for a cluster. 13503 // 13504 // - clusterId: The name of the cluster to update. 13505 // - projectId: The Google Developers Console project ID or project number 13506 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13507 // - zone: The name of the Google Compute Engine zone 13508 // (https://cloud.google.com/compute/docs/zones#available) in which the 13509 // cluster resides. 13510 func (r *ProjectsZonesClustersService) SetMaintenancePolicy(projectId string, zone string, clusterId string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsZonesClustersSetMaintenancePolicyCall { 13511 c := &ProjectsZonesClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13512 c.projectId = projectId 13513 c.zone = zone 13514 c.clusterId = clusterId 13515 c.setmaintenancepolicyrequest = setmaintenancepolicyrequest 13516 return c 13517 } 13518 13519 // Fields allows partial responses to be retrieved. See 13520 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13521 // details. 13522 func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMaintenancePolicyCall { 13523 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13524 return c 13525 } 13526 13527 // Context sets the context to be used in this call's Do method. 13528 func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetMaintenancePolicyCall { 13529 c.ctx_ = ctx 13530 return c 13531 } 13532 13533 // Header returns a http.Header that can be modified by the caller to add 13534 // headers to the request. 13535 func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header { 13536 if c.header_ == nil { 13537 c.header_ = make(http.Header) 13538 } 13539 return c.header_ 13540 } 13541 13542 func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { 13543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13544 var body io.Reader = nil 13545 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest) 13546 if err != nil { 13547 return nil, err 13548 } 13549 c.urlParams_.Set("alt", alt) 13550 c.urlParams_.Set("prettyPrint", "false") 13551 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") 13552 urls += "?" + c.urlParams_.Encode() 13553 req, err := http.NewRequest("POST", urls, body) 13554 if err != nil { 13555 return nil, err 13556 } 13557 req.Header = reqHeaders 13558 googleapi.Expand(req.URL, map[string]string{ 13559 "projectId": c.projectId, 13560 "zone": c.zone, 13561 "clusterId": c.clusterId, 13562 }) 13563 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13564 } 13565 13566 // Do executes the "container.projects.zones.clusters.setMaintenancePolicy" call. 13567 // Any non-2xx status code is an error. Response headers are in either 13568 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13569 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13570 // whether the returned error was because http.StatusNotModified was returned. 13571 func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13572 gensupport.SetOptions(c.urlParams_, opts...) 13573 res, err := c.doRequest("json") 13574 if res != nil && res.StatusCode == http.StatusNotModified { 13575 if res.Body != nil { 13576 res.Body.Close() 13577 } 13578 return nil, gensupport.WrapError(&googleapi.Error{ 13579 Code: res.StatusCode, 13580 Header: res.Header, 13581 }) 13582 } 13583 if err != nil { 13584 return nil, err 13585 } 13586 defer googleapi.CloseBody(res) 13587 if err := googleapi.CheckResponse(res); err != nil { 13588 return nil, gensupport.WrapError(err) 13589 } 13590 ret := &Operation{ 13591 ServerResponse: googleapi.ServerResponse{ 13592 Header: res.Header, 13593 HTTPStatusCode: res.StatusCode, 13594 }, 13595 } 13596 target := &ret 13597 if err := gensupport.DecodeResponse(target, res); err != nil { 13598 return nil, err 13599 } 13600 return ret, nil 13601 } 13602 13603 type ProjectsZonesClustersSetMasterAuthCall struct { 13604 s *Service 13605 projectId string 13606 zone string 13607 clusterId string 13608 setmasterauthrequest *SetMasterAuthRequest 13609 urlParams_ gensupport.URLParams 13610 ctx_ context.Context 13611 header_ http.Header 13612 } 13613 13614 // SetMasterAuth: Sets master auth materials. Currently supports changing the 13615 // admin password or a specific cluster, either via password generation or 13616 // explicitly setting the password. 13617 // 13618 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 13619 // been deprecated and replaced by the name field. 13620 // - projectId: Deprecated. The Google Developers Console project ID or project 13621 // number 13622 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13623 // This field has been deprecated and replaced by the name field. 13624 // - zone: Deprecated. The name of the Google Compute Engine zone 13625 // (https://cloud.google.com/compute/docs/zones#available) in which the 13626 // cluster resides. This field has been deprecated and replaced by the name 13627 // field. 13628 func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { 13629 c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13630 c.projectId = projectId 13631 c.zone = zone 13632 c.clusterId = clusterId 13633 c.setmasterauthrequest = setmasterauthrequest 13634 return c 13635 } 13636 13637 // Fields allows partial responses to be retrieved. See 13638 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13639 // details. 13640 func (c *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall { 13641 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13642 return c 13643 } 13644 13645 // Context sets the context to be used in this call's Do method. 13646 func (c *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall { 13647 c.ctx_ = ctx 13648 return c 13649 } 13650 13651 // Header returns a http.Header that can be modified by the caller to add 13652 // headers to the request. 13653 func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { 13654 if c.header_ == nil { 13655 c.header_ = make(http.Header) 13656 } 13657 return c.header_ 13658 } 13659 13660 func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { 13661 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13662 var body io.Reader = nil 13663 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) 13664 if err != nil { 13665 return nil, err 13666 } 13667 c.urlParams_.Set("alt", alt) 13668 c.urlParams_.Set("prettyPrint", "false") 13669 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") 13670 urls += "?" + c.urlParams_.Encode() 13671 req, err := http.NewRequest("POST", urls, body) 13672 if err != nil { 13673 return nil, err 13674 } 13675 req.Header = reqHeaders 13676 googleapi.Expand(req.URL, map[string]string{ 13677 "projectId": c.projectId, 13678 "zone": c.zone, 13679 "clusterId": c.clusterId, 13680 }) 13681 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13682 } 13683 13684 // Do executes the "container.projects.zones.clusters.setMasterAuth" call. 13685 // Any non-2xx status code is an error. Response headers are in either 13686 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13687 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13688 // whether the returned error was because http.StatusNotModified was returned. 13689 func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13690 gensupport.SetOptions(c.urlParams_, opts...) 13691 res, err := c.doRequest("json") 13692 if res != nil && res.StatusCode == http.StatusNotModified { 13693 if res.Body != nil { 13694 res.Body.Close() 13695 } 13696 return nil, gensupport.WrapError(&googleapi.Error{ 13697 Code: res.StatusCode, 13698 Header: res.Header, 13699 }) 13700 } 13701 if err != nil { 13702 return nil, err 13703 } 13704 defer googleapi.CloseBody(res) 13705 if err := googleapi.CheckResponse(res); err != nil { 13706 return nil, gensupport.WrapError(err) 13707 } 13708 ret := &Operation{ 13709 ServerResponse: googleapi.ServerResponse{ 13710 Header: res.Header, 13711 HTTPStatusCode: res.StatusCode, 13712 }, 13713 } 13714 target := &ret 13715 if err := gensupport.DecodeResponse(target, res); err != nil { 13716 return nil, err 13717 } 13718 return ret, nil 13719 } 13720 13721 type ProjectsZonesClustersSetNetworkPolicyCall struct { 13722 s *Service 13723 projectId string 13724 zone string 13725 clusterId string 13726 setnetworkpolicyrequest *SetNetworkPolicyRequest 13727 urlParams_ gensupport.URLParams 13728 ctx_ context.Context 13729 header_ http.Header 13730 } 13731 13732 // SetNetworkPolicy: Enables or disables Network Policy for a cluster. 13733 // 13734 // - clusterId: Deprecated. The name of the cluster. This field has been 13735 // deprecated and replaced by the name field. 13736 // - projectId: Deprecated. The Google Developers Console project ID or project 13737 // number 13738 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13739 // This field has been deprecated and replaced by the name field. 13740 // - zone: Deprecated. The name of the Google Compute Engine zone 13741 // (https://cloud.google.com/compute/docs/zones#available) in which the 13742 // cluster resides. This field has been deprecated and replaced by the name 13743 // field. 13744 func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { 13745 c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13746 c.projectId = projectId 13747 c.zone = zone 13748 c.clusterId = clusterId 13749 c.setnetworkpolicyrequest = setnetworkpolicyrequest 13750 return c 13751 } 13752 13753 // Fields allows partial responses to be retrieved. See 13754 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13755 // details. 13756 func (c *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall { 13757 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13758 return c 13759 } 13760 13761 // Context sets the context to be used in this call's Do method. 13762 func (c *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall { 13763 c.ctx_ = ctx 13764 return c 13765 } 13766 13767 // Header returns a http.Header that can be modified by the caller to add 13768 // headers to the request. 13769 func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { 13770 if c.header_ == nil { 13771 c.header_ = make(http.Header) 13772 } 13773 return c.header_ 13774 } 13775 13776 func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { 13777 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13778 var body io.Reader = nil 13779 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) 13780 if err != nil { 13781 return nil, err 13782 } 13783 c.urlParams_.Set("alt", alt) 13784 c.urlParams_.Set("prettyPrint", "false") 13785 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") 13786 urls += "?" + c.urlParams_.Encode() 13787 req, err := http.NewRequest("POST", urls, body) 13788 if err != nil { 13789 return nil, err 13790 } 13791 req.Header = reqHeaders 13792 googleapi.Expand(req.URL, map[string]string{ 13793 "projectId": c.projectId, 13794 "zone": c.zone, 13795 "clusterId": c.clusterId, 13796 }) 13797 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13798 } 13799 13800 // Do executes the "container.projects.zones.clusters.setNetworkPolicy" call. 13801 // Any non-2xx status code is an error. Response headers are in either 13802 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13803 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13804 // whether the returned error was because http.StatusNotModified was returned. 13805 func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13806 gensupport.SetOptions(c.urlParams_, opts...) 13807 res, err := c.doRequest("json") 13808 if res != nil && res.StatusCode == http.StatusNotModified { 13809 if res.Body != nil { 13810 res.Body.Close() 13811 } 13812 return nil, gensupport.WrapError(&googleapi.Error{ 13813 Code: res.StatusCode, 13814 Header: res.Header, 13815 }) 13816 } 13817 if err != nil { 13818 return nil, err 13819 } 13820 defer googleapi.CloseBody(res) 13821 if err := googleapi.CheckResponse(res); err != nil { 13822 return nil, gensupport.WrapError(err) 13823 } 13824 ret := &Operation{ 13825 ServerResponse: googleapi.ServerResponse{ 13826 Header: res.Header, 13827 HTTPStatusCode: res.StatusCode, 13828 }, 13829 } 13830 target := &ret 13831 if err := gensupport.DecodeResponse(target, res); err != nil { 13832 return nil, err 13833 } 13834 return ret, nil 13835 } 13836 13837 type ProjectsZonesClustersStartIpRotationCall struct { 13838 s *Service 13839 projectId string 13840 zone string 13841 clusterId string 13842 startiprotationrequest *StartIPRotationRequest 13843 urlParams_ gensupport.URLParams 13844 ctx_ context.Context 13845 header_ http.Header 13846 } 13847 13848 // StartIpRotation: Starts master IP rotation. 13849 // 13850 // - clusterId: Deprecated. The name of the cluster. This field has been 13851 // deprecated and replaced by the name field. 13852 // - projectId: Deprecated. The Google Developers Console project ID or project 13853 // number 13854 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13855 // This field has been deprecated and replaced by the name field. 13856 // - zone: Deprecated. The name of the Google Compute Engine zone 13857 // (https://cloud.google.com/compute/docs/zones#available) in which the 13858 // cluster resides. This field has been deprecated and replaced by the name 13859 // field. 13860 func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { 13861 c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13862 c.projectId = projectId 13863 c.zone = zone 13864 c.clusterId = clusterId 13865 c.startiprotationrequest = startiprotationrequest 13866 return c 13867 } 13868 13869 // Fields allows partial responses to be retrieved. See 13870 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13871 // details. 13872 func (c *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall { 13873 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13874 return c 13875 } 13876 13877 // Context sets the context to be used in this call's Do method. 13878 func (c *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall { 13879 c.ctx_ = ctx 13880 return c 13881 } 13882 13883 // Header returns a http.Header that can be modified by the caller to add 13884 // headers to the request. 13885 func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { 13886 if c.header_ == nil { 13887 c.header_ = make(http.Header) 13888 } 13889 return c.header_ 13890 } 13891 13892 func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { 13893 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13894 var body io.Reader = nil 13895 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) 13896 if err != nil { 13897 return nil, err 13898 } 13899 c.urlParams_.Set("alt", alt) 13900 c.urlParams_.Set("prettyPrint", "false") 13901 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") 13902 urls += "?" + c.urlParams_.Encode() 13903 req, err := http.NewRequest("POST", urls, body) 13904 if err != nil { 13905 return nil, err 13906 } 13907 req.Header = reqHeaders 13908 googleapi.Expand(req.URL, map[string]string{ 13909 "projectId": c.projectId, 13910 "zone": c.zone, 13911 "clusterId": c.clusterId, 13912 }) 13913 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13914 } 13915 13916 // Do executes the "container.projects.zones.clusters.startIpRotation" call. 13917 // Any non-2xx status code is an error. Response headers are in either 13918 // *Operation.ServerResponse.Header or (if a response was returned at all) in 13919 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13920 // whether the returned error was because http.StatusNotModified was returned. 13921 func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 13922 gensupport.SetOptions(c.urlParams_, opts...) 13923 res, err := c.doRequest("json") 13924 if res != nil && res.StatusCode == http.StatusNotModified { 13925 if res.Body != nil { 13926 res.Body.Close() 13927 } 13928 return nil, gensupport.WrapError(&googleapi.Error{ 13929 Code: res.StatusCode, 13930 Header: res.Header, 13931 }) 13932 } 13933 if err != nil { 13934 return nil, err 13935 } 13936 defer googleapi.CloseBody(res) 13937 if err := googleapi.CheckResponse(res); err != nil { 13938 return nil, gensupport.WrapError(err) 13939 } 13940 ret := &Operation{ 13941 ServerResponse: googleapi.ServerResponse{ 13942 Header: res.Header, 13943 HTTPStatusCode: res.StatusCode, 13944 }, 13945 } 13946 target := &ret 13947 if err := gensupport.DecodeResponse(target, res); err != nil { 13948 return nil, err 13949 } 13950 return ret, nil 13951 } 13952 13953 type ProjectsZonesClustersUpdateCall struct { 13954 s *Service 13955 projectId string 13956 zone string 13957 clusterId string 13958 updateclusterrequest *UpdateClusterRequest 13959 urlParams_ gensupport.URLParams 13960 ctx_ context.Context 13961 header_ http.Header 13962 } 13963 13964 // Update: Updates the settings for a specific cluster. 13965 // 13966 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 13967 // been deprecated and replaced by the name field. 13968 // - projectId: Deprecated. The Google Developers Console project ID or project 13969 // number 13970 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 13971 // This field has been deprecated and replaced by the name field. 13972 // - zone: Deprecated. The name of the Google Compute Engine zone 13973 // (https://cloud.google.com/compute/docs/zones#available) in which the 13974 // cluster resides. This field has been deprecated and replaced by the name 13975 // field. 13976 func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall { 13977 c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13978 c.projectId = projectId 13979 c.zone = zone 13980 c.clusterId = clusterId 13981 c.updateclusterrequest = updateclusterrequest 13982 return c 13983 } 13984 13985 // Fields allows partial responses to be retrieved. See 13986 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13987 // details. 13988 func (c *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall { 13989 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13990 return c 13991 } 13992 13993 // Context sets the context to be used in this call's Do method. 13994 func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall { 13995 c.ctx_ = ctx 13996 return c 13997 } 13998 13999 // Header returns a http.Header that can be modified by the caller to add 14000 // headers to the request. 14001 func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { 14002 if c.header_ == nil { 14003 c.header_ = make(http.Header) 14004 } 14005 return c.header_ 14006 } 14007 14008 func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { 14009 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14010 var body io.Reader = nil 14011 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) 14012 if err != nil { 14013 return nil, err 14014 } 14015 c.urlParams_.Set("alt", alt) 14016 c.urlParams_.Set("prettyPrint", "false") 14017 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") 14018 urls += "?" + c.urlParams_.Encode() 14019 req, err := http.NewRequest("PUT", urls, body) 14020 if err != nil { 14021 return nil, err 14022 } 14023 req.Header = reqHeaders 14024 googleapi.Expand(req.URL, map[string]string{ 14025 "projectId": c.projectId, 14026 "zone": c.zone, 14027 "clusterId": c.clusterId, 14028 }) 14029 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14030 } 14031 14032 // Do executes the "container.projects.zones.clusters.update" call. 14033 // Any non-2xx status code is an error. Response headers are in either 14034 // *Operation.ServerResponse.Header or (if a response was returned at all) in 14035 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14036 // whether the returned error was because http.StatusNotModified was returned. 14037 func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14038 gensupport.SetOptions(c.urlParams_, opts...) 14039 res, err := c.doRequest("json") 14040 if res != nil && res.StatusCode == http.StatusNotModified { 14041 if res.Body != nil { 14042 res.Body.Close() 14043 } 14044 return nil, gensupport.WrapError(&googleapi.Error{ 14045 Code: res.StatusCode, 14046 Header: res.Header, 14047 }) 14048 } 14049 if err != nil { 14050 return nil, err 14051 } 14052 defer googleapi.CloseBody(res) 14053 if err := googleapi.CheckResponse(res); err != nil { 14054 return nil, gensupport.WrapError(err) 14055 } 14056 ret := &Operation{ 14057 ServerResponse: googleapi.ServerResponse{ 14058 Header: res.Header, 14059 HTTPStatusCode: res.StatusCode, 14060 }, 14061 } 14062 target := &ret 14063 if err := gensupport.DecodeResponse(target, res); err != nil { 14064 return nil, err 14065 } 14066 return ret, nil 14067 } 14068 14069 type ProjectsZonesClustersNodePoolsAutoscalingCall struct { 14070 s *Service 14071 projectId string 14072 zone string 14073 clusterId string 14074 nodePoolId string 14075 setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest 14076 urlParams_ gensupport.URLParams 14077 ctx_ context.Context 14078 header_ http.Header 14079 } 14080 14081 // Autoscaling: Sets the autoscaling settings of a specific node pool. 14082 // 14083 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 14084 // been deprecated and replaced by the name field. 14085 // - nodePoolId: Deprecated. The name of the node pool to upgrade. This field 14086 // has been deprecated and replaced by the name field. 14087 // - projectId: Deprecated. The Google Developers Console project ID or project 14088 // number 14089 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14090 // This field has been deprecated and replaced by the name field. 14091 // - zone: Deprecated. The name of the Google Compute Engine zone 14092 // (https://cloud.google.com/compute/docs/zones#available) in which the 14093 // cluster resides. This field has been deprecated and replaced by the name 14094 // field. 14095 func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall { 14096 c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14097 c.projectId = projectId 14098 c.zone = zone 14099 c.clusterId = clusterId 14100 c.nodePoolId = nodePoolId 14101 c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest 14102 return c 14103 } 14104 14105 // Fields allows partial responses to be retrieved. See 14106 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14107 // details. 14108 func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsAutoscalingCall { 14109 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14110 return c 14111 } 14112 14113 // Context sets the context to be used in this call's Do method. 14114 func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsAutoscalingCall { 14115 c.ctx_ = ctx 14116 return c 14117 } 14118 14119 // Header returns a http.Header that can be modified by the caller to add 14120 // headers to the request. 14121 func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header { 14122 if c.header_ == nil { 14123 c.header_ = make(http.Header) 14124 } 14125 return c.header_ 14126 } 14127 14128 func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) { 14129 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14130 var body io.Reader = nil 14131 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) 14132 if err != nil { 14133 return nil, err 14134 } 14135 c.urlParams_.Set("alt", alt) 14136 c.urlParams_.Set("prettyPrint", "false") 14137 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") 14138 urls += "?" + c.urlParams_.Encode() 14139 req, err := http.NewRequest("POST", urls, body) 14140 if err != nil { 14141 return nil, err 14142 } 14143 req.Header = reqHeaders 14144 googleapi.Expand(req.URL, map[string]string{ 14145 "projectId": c.projectId, 14146 "zone": c.zone, 14147 "clusterId": c.clusterId, 14148 "nodePoolId": c.nodePoolId, 14149 }) 14150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14151 } 14152 14153 // Do executes the "container.projects.zones.clusters.nodePools.autoscaling" call. 14154 // Any non-2xx status code is an error. Response headers are in either 14155 // *Operation.ServerResponse.Header or (if a response was returned at all) in 14156 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14157 // whether the returned error was because http.StatusNotModified was returned. 14158 func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14159 gensupport.SetOptions(c.urlParams_, opts...) 14160 res, err := c.doRequest("json") 14161 if res != nil && res.StatusCode == http.StatusNotModified { 14162 if res.Body != nil { 14163 res.Body.Close() 14164 } 14165 return nil, gensupport.WrapError(&googleapi.Error{ 14166 Code: res.StatusCode, 14167 Header: res.Header, 14168 }) 14169 } 14170 if err != nil { 14171 return nil, err 14172 } 14173 defer googleapi.CloseBody(res) 14174 if err := googleapi.CheckResponse(res); err != nil { 14175 return nil, gensupport.WrapError(err) 14176 } 14177 ret := &Operation{ 14178 ServerResponse: googleapi.ServerResponse{ 14179 Header: res.Header, 14180 HTTPStatusCode: res.StatusCode, 14181 }, 14182 } 14183 target := &ret 14184 if err := gensupport.DecodeResponse(target, res); err != nil { 14185 return nil, err 14186 } 14187 return ret, nil 14188 } 14189 14190 type ProjectsZonesClustersNodePoolsCreateCall struct { 14191 s *Service 14192 projectId string 14193 zone string 14194 clusterId string 14195 createnodepoolrequest *CreateNodePoolRequest 14196 urlParams_ gensupport.URLParams 14197 ctx_ context.Context 14198 header_ http.Header 14199 } 14200 14201 // Create: Creates a node pool for a cluster. 14202 // 14203 // - clusterId: Deprecated. The name of the cluster. This field has been 14204 // deprecated and replaced by the parent field. 14205 // - projectId: Deprecated. The Google Developers Console project ID or project 14206 // number 14207 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14208 // This field has been deprecated and replaced by the parent field. 14209 // - zone: Deprecated. The name of the Google Compute Engine zone 14210 // (https://cloud.google.com/compute/docs/zones#available) in which the 14211 // cluster resides. This field has been deprecated and replaced by the parent 14212 // field. 14213 func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall { 14214 c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14215 c.projectId = projectId 14216 c.zone = zone 14217 c.clusterId = clusterId 14218 c.createnodepoolrequest = createnodepoolrequest 14219 return c 14220 } 14221 14222 // Fields allows partial responses to be retrieved. See 14223 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14224 // details. 14225 func (c *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall { 14226 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14227 return c 14228 } 14229 14230 // Context sets the context to be used in this call's Do method. 14231 func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { 14232 c.ctx_ = ctx 14233 return c 14234 } 14235 14236 // Header returns a http.Header that can be modified by the caller to add 14237 // headers to the request. 14238 func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { 14239 if c.header_ == nil { 14240 c.header_ = make(http.Header) 14241 } 14242 return c.header_ 14243 } 14244 14245 func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { 14246 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14247 var body io.Reader = nil 14248 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) 14249 if err != nil { 14250 return nil, err 14251 } 14252 c.urlParams_.Set("alt", alt) 14253 c.urlParams_.Set("prettyPrint", "false") 14254 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") 14255 urls += "?" + c.urlParams_.Encode() 14256 req, err := http.NewRequest("POST", urls, body) 14257 if err != nil { 14258 return nil, err 14259 } 14260 req.Header = reqHeaders 14261 googleapi.Expand(req.URL, map[string]string{ 14262 "projectId": c.projectId, 14263 "zone": c.zone, 14264 "clusterId": c.clusterId, 14265 }) 14266 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14267 } 14268 14269 // Do executes the "container.projects.zones.clusters.nodePools.create" call. 14270 // Any non-2xx status code is an error. Response headers are in either 14271 // *Operation.ServerResponse.Header or (if a response was returned at all) in 14272 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14273 // whether the returned error was because http.StatusNotModified was returned. 14274 func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14275 gensupport.SetOptions(c.urlParams_, opts...) 14276 res, err := c.doRequest("json") 14277 if res != nil && res.StatusCode == http.StatusNotModified { 14278 if res.Body != nil { 14279 res.Body.Close() 14280 } 14281 return nil, gensupport.WrapError(&googleapi.Error{ 14282 Code: res.StatusCode, 14283 Header: res.Header, 14284 }) 14285 } 14286 if err != nil { 14287 return nil, err 14288 } 14289 defer googleapi.CloseBody(res) 14290 if err := googleapi.CheckResponse(res); err != nil { 14291 return nil, gensupport.WrapError(err) 14292 } 14293 ret := &Operation{ 14294 ServerResponse: googleapi.ServerResponse{ 14295 Header: res.Header, 14296 HTTPStatusCode: res.StatusCode, 14297 }, 14298 } 14299 target := &ret 14300 if err := gensupport.DecodeResponse(target, res); err != nil { 14301 return nil, err 14302 } 14303 return ret, nil 14304 } 14305 14306 type ProjectsZonesClustersNodePoolsDeleteCall struct { 14307 s *Service 14308 projectId string 14309 zone string 14310 clusterId string 14311 nodePoolId string 14312 urlParams_ gensupport.URLParams 14313 ctx_ context.Context 14314 header_ http.Header 14315 } 14316 14317 // Delete: Deletes a node pool from a cluster. 14318 // 14319 // - clusterId: Deprecated. The name of the cluster. This field has been 14320 // deprecated and replaced by the name field. 14321 // - nodePoolId: Deprecated. The name of the node pool to delete. This field 14322 // has been deprecated and replaced by the name field. 14323 // - projectId: Deprecated. The Google Developers Console project ID or project 14324 // number 14325 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14326 // This field has been deprecated and replaced by the name field. 14327 // - zone: Deprecated. The name of the Google Compute Engine zone 14328 // (https://cloud.google.com/compute/docs/zones#available) in which the 14329 // cluster resides. This field has been deprecated and replaced by the name 14330 // field. 14331 func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall { 14332 c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14333 c.projectId = projectId 14334 c.zone = zone 14335 c.clusterId = clusterId 14336 c.nodePoolId = nodePoolId 14337 return c 14338 } 14339 14340 // Name sets the optional parameter "name": The name (project, location, 14341 // cluster, node pool id) of the node pool to delete. Specified in the format 14342 // `projects/*/locations/*/clusters/*/nodePools/*`. 14343 func (c *ProjectsZonesClustersNodePoolsDeleteCall) Name(name string) *ProjectsZonesClustersNodePoolsDeleteCall { 14344 c.urlParams_.Set("name", name) 14345 return c 14346 } 14347 14348 // Fields allows partial responses to be retrieved. See 14349 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14350 // details. 14351 func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall { 14352 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14353 return c 14354 } 14355 14356 // Context sets the context to be used in this call's Do method. 14357 func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { 14358 c.ctx_ = ctx 14359 return c 14360 } 14361 14362 // Header returns a http.Header that can be modified by the caller to add 14363 // headers to the request. 14364 func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { 14365 if c.header_ == nil { 14366 c.header_ = make(http.Header) 14367 } 14368 return c.header_ 14369 } 14370 14371 func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 14372 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14373 var body io.Reader = nil 14374 c.urlParams_.Set("alt", alt) 14375 c.urlParams_.Set("prettyPrint", "false") 14376 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") 14377 urls += "?" + c.urlParams_.Encode() 14378 req, err := http.NewRequest("DELETE", urls, body) 14379 if err != nil { 14380 return nil, err 14381 } 14382 req.Header = reqHeaders 14383 googleapi.Expand(req.URL, map[string]string{ 14384 "projectId": c.projectId, 14385 "zone": c.zone, 14386 "clusterId": c.clusterId, 14387 "nodePoolId": c.nodePoolId, 14388 }) 14389 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14390 } 14391 14392 // Do executes the "container.projects.zones.clusters.nodePools.delete" call. 14393 // Any non-2xx status code is an error. Response headers are in either 14394 // *Operation.ServerResponse.Header or (if a response was returned at all) in 14395 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14396 // whether the returned error was because http.StatusNotModified was returned. 14397 func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14398 gensupport.SetOptions(c.urlParams_, opts...) 14399 res, err := c.doRequest("json") 14400 if res != nil && res.StatusCode == http.StatusNotModified { 14401 if res.Body != nil { 14402 res.Body.Close() 14403 } 14404 return nil, gensupport.WrapError(&googleapi.Error{ 14405 Code: res.StatusCode, 14406 Header: res.Header, 14407 }) 14408 } 14409 if err != nil { 14410 return nil, err 14411 } 14412 defer googleapi.CloseBody(res) 14413 if err := googleapi.CheckResponse(res); err != nil { 14414 return nil, gensupport.WrapError(err) 14415 } 14416 ret := &Operation{ 14417 ServerResponse: googleapi.ServerResponse{ 14418 Header: res.Header, 14419 HTTPStatusCode: res.StatusCode, 14420 }, 14421 } 14422 target := &ret 14423 if err := gensupport.DecodeResponse(target, res); err != nil { 14424 return nil, err 14425 } 14426 return ret, nil 14427 } 14428 14429 type ProjectsZonesClustersNodePoolsGetCall struct { 14430 s *Service 14431 projectId string 14432 zone string 14433 clusterId string 14434 nodePoolId string 14435 urlParams_ gensupport.URLParams 14436 ifNoneMatch_ string 14437 ctx_ context.Context 14438 header_ http.Header 14439 } 14440 14441 // Get: Retrieves the requested node pool. 14442 // 14443 // - clusterId: Deprecated. The name of the cluster. This field has been 14444 // deprecated and replaced by the name field. 14445 // - nodePoolId: Deprecated. The name of the node pool. This field has been 14446 // deprecated and replaced by the name field. 14447 // - projectId: Deprecated. The Google Developers Console project ID or project 14448 // number 14449 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14450 // This field has been deprecated and replaced by the name field. 14451 // - zone: Deprecated. The name of the Google Compute Engine zone 14452 // (https://cloud.google.com/compute/docs/zones#available) in which the 14453 // cluster resides. This field has been deprecated and replaced by the name 14454 // field. 14455 func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { 14456 c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14457 c.projectId = projectId 14458 c.zone = zone 14459 c.clusterId = clusterId 14460 c.nodePoolId = nodePoolId 14461 return c 14462 } 14463 14464 // Name sets the optional parameter "name": The name (project, location, 14465 // cluster, node pool id) of the node pool to get. Specified in the format 14466 // `projects/*/locations/*/clusters/*/nodePools/*`. 14467 func (c *ProjectsZonesClustersNodePoolsGetCall) Name(name string) *ProjectsZonesClustersNodePoolsGetCall { 14468 c.urlParams_.Set("name", name) 14469 return c 14470 } 14471 14472 // Fields allows partial responses to be retrieved. See 14473 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14474 // details. 14475 func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { 14476 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14477 return c 14478 } 14479 14480 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14481 // object's ETag matches the given value. This is useful for getting updates 14482 // only after the object has changed since the last request. 14483 func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { 14484 c.ifNoneMatch_ = entityTag 14485 return c 14486 } 14487 14488 // Context sets the context to be used in this call's Do method. 14489 func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { 14490 c.ctx_ = ctx 14491 return c 14492 } 14493 14494 // Header returns a http.Header that can be modified by the caller to add 14495 // headers to the request. 14496 func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { 14497 if c.header_ == nil { 14498 c.header_ = make(http.Header) 14499 } 14500 return c.header_ 14501 } 14502 14503 func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { 14504 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14505 if c.ifNoneMatch_ != "" { 14506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14507 } 14508 var body io.Reader = nil 14509 c.urlParams_.Set("alt", alt) 14510 c.urlParams_.Set("prettyPrint", "false") 14511 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") 14512 urls += "?" + c.urlParams_.Encode() 14513 req, err := http.NewRequest("GET", urls, body) 14514 if err != nil { 14515 return nil, err 14516 } 14517 req.Header = reqHeaders 14518 googleapi.Expand(req.URL, map[string]string{ 14519 "projectId": c.projectId, 14520 "zone": c.zone, 14521 "clusterId": c.clusterId, 14522 "nodePoolId": c.nodePoolId, 14523 }) 14524 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14525 } 14526 14527 // Do executes the "container.projects.zones.clusters.nodePools.get" call. 14528 // Any non-2xx status code is an error. Response headers are in either 14529 // *NodePool.ServerResponse.Header or (if a response was returned at all) in 14530 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14531 // whether the returned error was because http.StatusNotModified was returned. 14532 func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { 14533 gensupport.SetOptions(c.urlParams_, opts...) 14534 res, err := c.doRequest("json") 14535 if res != nil && res.StatusCode == http.StatusNotModified { 14536 if res.Body != nil { 14537 res.Body.Close() 14538 } 14539 return nil, gensupport.WrapError(&googleapi.Error{ 14540 Code: res.StatusCode, 14541 Header: res.Header, 14542 }) 14543 } 14544 if err != nil { 14545 return nil, err 14546 } 14547 defer googleapi.CloseBody(res) 14548 if err := googleapi.CheckResponse(res); err != nil { 14549 return nil, gensupport.WrapError(err) 14550 } 14551 ret := &NodePool{ 14552 ServerResponse: googleapi.ServerResponse{ 14553 Header: res.Header, 14554 HTTPStatusCode: res.StatusCode, 14555 }, 14556 } 14557 target := &ret 14558 if err := gensupport.DecodeResponse(target, res); err != nil { 14559 return nil, err 14560 } 14561 return ret, nil 14562 } 14563 14564 type ProjectsZonesClustersNodePoolsListCall struct { 14565 s *Service 14566 projectId string 14567 zone string 14568 clusterId string 14569 urlParams_ gensupport.URLParams 14570 ifNoneMatch_ string 14571 ctx_ context.Context 14572 header_ http.Header 14573 } 14574 14575 // List: Lists the node pools for a cluster. 14576 // 14577 // - clusterId: Deprecated. The name of the cluster. This field has been 14578 // deprecated and replaced by the parent field. 14579 // - projectId: Deprecated. The Google Developers Console project ID or project 14580 // number 14581 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14582 // This field has been deprecated and replaced by the parent field. 14583 // - zone: Deprecated. The name of the Google Compute Engine zone 14584 // (https://cloud.google.com/compute/docs/zones#available) in which the 14585 // cluster resides. This field has been deprecated and replaced by the parent 14586 // field. 14587 func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall { 14588 c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14589 c.projectId = projectId 14590 c.zone = zone 14591 c.clusterId = clusterId 14592 return c 14593 } 14594 14595 // Parent sets the optional parameter "parent": The parent (project, location, 14596 // cluster name) where the node pools will be listed. Specified in the format 14597 // `projects/*/locations/*/clusters/*`. 14598 func (c *ProjectsZonesClustersNodePoolsListCall) Parent(parent string) *ProjectsZonesClustersNodePoolsListCall { 14599 c.urlParams_.Set("parent", parent) 14600 return c 14601 } 14602 14603 // Fields allows partial responses to be retrieved. See 14604 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14605 // details. 14606 func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { 14607 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14608 return c 14609 } 14610 14611 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14612 // object's ETag matches the given value. This is useful for getting updates 14613 // only after the object has changed since the last request. 14614 func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { 14615 c.ifNoneMatch_ = entityTag 14616 return c 14617 } 14618 14619 // Context sets the context to be used in this call's Do method. 14620 func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { 14621 c.ctx_ = ctx 14622 return c 14623 } 14624 14625 // Header returns a http.Header that can be modified by the caller to add 14626 // headers to the request. 14627 func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { 14628 if c.header_ == nil { 14629 c.header_ = make(http.Header) 14630 } 14631 return c.header_ 14632 } 14633 14634 func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { 14635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14636 if c.ifNoneMatch_ != "" { 14637 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14638 } 14639 var body io.Reader = nil 14640 c.urlParams_.Set("alt", alt) 14641 c.urlParams_.Set("prettyPrint", "false") 14642 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") 14643 urls += "?" + c.urlParams_.Encode() 14644 req, err := http.NewRequest("GET", urls, body) 14645 if err != nil { 14646 return nil, err 14647 } 14648 req.Header = reqHeaders 14649 googleapi.Expand(req.URL, map[string]string{ 14650 "projectId": c.projectId, 14651 "zone": c.zone, 14652 "clusterId": c.clusterId, 14653 }) 14654 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14655 } 14656 14657 // Do executes the "container.projects.zones.clusters.nodePools.list" call. 14658 // Any non-2xx status code is an error. Response headers are in either 14659 // *ListNodePoolsResponse.ServerResponse.Header or (if a response was returned 14660 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14661 // check whether the returned error was because http.StatusNotModified was 14662 // returned. 14663 func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { 14664 gensupport.SetOptions(c.urlParams_, opts...) 14665 res, err := c.doRequest("json") 14666 if res != nil && res.StatusCode == http.StatusNotModified { 14667 if res.Body != nil { 14668 res.Body.Close() 14669 } 14670 return nil, gensupport.WrapError(&googleapi.Error{ 14671 Code: res.StatusCode, 14672 Header: res.Header, 14673 }) 14674 } 14675 if err != nil { 14676 return nil, err 14677 } 14678 defer googleapi.CloseBody(res) 14679 if err := googleapi.CheckResponse(res); err != nil { 14680 return nil, gensupport.WrapError(err) 14681 } 14682 ret := &ListNodePoolsResponse{ 14683 ServerResponse: googleapi.ServerResponse{ 14684 Header: res.Header, 14685 HTTPStatusCode: res.StatusCode, 14686 }, 14687 } 14688 target := &ret 14689 if err := gensupport.DecodeResponse(target, res); err != nil { 14690 return nil, err 14691 } 14692 return ret, nil 14693 } 14694 14695 type ProjectsZonesClustersNodePoolsRollbackCall struct { 14696 s *Service 14697 projectId string 14698 zone string 14699 clusterId string 14700 nodePoolId string 14701 rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest 14702 urlParams_ gensupport.URLParams 14703 ctx_ context.Context 14704 header_ http.Header 14705 } 14706 14707 // Rollback: Rolls back a previously Aborted or Failed NodePool upgrade. This 14708 // makes no changes if the last upgrade successfully completed. 14709 // 14710 // - clusterId: Deprecated. The name of the cluster to rollback. This field has 14711 // been deprecated and replaced by the name field. 14712 // - nodePoolId: Deprecated. The name of the node pool to rollback. This field 14713 // has been deprecated and replaced by the name field. 14714 // - projectId: Deprecated. The Google Developers Console project ID or project 14715 // number 14716 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14717 // This field has been deprecated and replaced by the name field. 14718 // - zone: Deprecated. The name of the Google Compute Engine zone 14719 // (https://cloud.google.com/compute/docs/zones#available) in which the 14720 // cluster resides. This field has been deprecated and replaced by the name 14721 // field. 14722 func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { 14723 c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14724 c.projectId = projectId 14725 c.zone = zone 14726 c.clusterId = clusterId 14727 c.nodePoolId = nodePoolId 14728 c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest 14729 return c 14730 } 14731 14732 // Fields allows partial responses to be retrieved. See 14733 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14734 // details. 14735 func (c *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall { 14736 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14737 return c 14738 } 14739 14740 // Context sets the context to be used in this call's Do method. 14741 func (c *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall { 14742 c.ctx_ = ctx 14743 return c 14744 } 14745 14746 // Header returns a http.Header that can be modified by the caller to add 14747 // headers to the request. 14748 func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { 14749 if c.header_ == nil { 14750 c.header_ = make(http.Header) 14751 } 14752 return c.header_ 14753 } 14754 14755 func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { 14756 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14757 var body io.Reader = nil 14758 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) 14759 if err != nil { 14760 return nil, err 14761 } 14762 c.urlParams_.Set("alt", alt) 14763 c.urlParams_.Set("prettyPrint", "false") 14764 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") 14765 urls += "?" + c.urlParams_.Encode() 14766 req, err := http.NewRequest("POST", urls, body) 14767 if err != nil { 14768 return nil, err 14769 } 14770 req.Header = reqHeaders 14771 googleapi.Expand(req.URL, map[string]string{ 14772 "projectId": c.projectId, 14773 "zone": c.zone, 14774 "clusterId": c.clusterId, 14775 "nodePoolId": c.nodePoolId, 14776 }) 14777 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14778 } 14779 14780 // Do executes the "container.projects.zones.clusters.nodePools.rollback" call. 14781 // Any non-2xx status code is an error. Response headers are in either 14782 // *Operation.ServerResponse.Header or (if a response was returned at all) in 14783 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14784 // whether the returned error was because http.StatusNotModified was returned. 14785 func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14786 gensupport.SetOptions(c.urlParams_, opts...) 14787 res, err := c.doRequest("json") 14788 if res != nil && res.StatusCode == http.StatusNotModified { 14789 if res.Body != nil { 14790 res.Body.Close() 14791 } 14792 return nil, gensupport.WrapError(&googleapi.Error{ 14793 Code: res.StatusCode, 14794 Header: res.Header, 14795 }) 14796 } 14797 if err != nil { 14798 return nil, err 14799 } 14800 defer googleapi.CloseBody(res) 14801 if err := googleapi.CheckResponse(res); err != nil { 14802 return nil, gensupport.WrapError(err) 14803 } 14804 ret := &Operation{ 14805 ServerResponse: googleapi.ServerResponse{ 14806 Header: res.Header, 14807 HTTPStatusCode: res.StatusCode, 14808 }, 14809 } 14810 target := &ret 14811 if err := gensupport.DecodeResponse(target, res); err != nil { 14812 return nil, err 14813 } 14814 return ret, nil 14815 } 14816 14817 type ProjectsZonesClustersNodePoolsSetManagementCall struct { 14818 s *Service 14819 projectId string 14820 zone string 14821 clusterId string 14822 nodePoolId string 14823 setnodepoolmanagementrequest *SetNodePoolManagementRequest 14824 urlParams_ gensupport.URLParams 14825 ctx_ context.Context 14826 header_ http.Header 14827 } 14828 14829 // SetManagement: Sets the NodeManagement options for a node pool. 14830 // 14831 // - clusterId: Deprecated. The name of the cluster to update. This field has 14832 // been deprecated and replaced by the name field. 14833 // - nodePoolId: Deprecated. The name of the node pool to update. This field 14834 // has been deprecated and replaced by the name field. 14835 // - projectId: Deprecated. The Google Developers Console project ID or project 14836 // number 14837 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14838 // This field has been deprecated and replaced by the name field. 14839 // - zone: Deprecated. The name of the Google Compute Engine zone 14840 // (https://cloud.google.com/compute/docs/zones#available) in which the 14841 // cluster resides. This field has been deprecated and replaced by the name 14842 // field. 14843 func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall { 14844 c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14845 c.projectId = projectId 14846 c.zone = zone 14847 c.clusterId = clusterId 14848 c.nodePoolId = nodePoolId 14849 c.setnodepoolmanagementrequest = setnodepoolmanagementrequest 14850 return c 14851 } 14852 14853 // Fields allows partial responses to be retrieved. See 14854 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14855 // details. 14856 func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall { 14857 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14858 return c 14859 } 14860 14861 // Context sets the context to be used in this call's Do method. 14862 func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall { 14863 c.ctx_ = ctx 14864 return c 14865 } 14866 14867 // Header returns a http.Header that can be modified by the caller to add 14868 // headers to the request. 14869 func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { 14870 if c.header_ == nil { 14871 c.header_ = make(http.Header) 14872 } 14873 return c.header_ 14874 } 14875 14876 func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { 14877 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14878 var body io.Reader = nil 14879 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) 14880 if err != nil { 14881 return nil, err 14882 } 14883 c.urlParams_.Set("alt", alt) 14884 c.urlParams_.Set("prettyPrint", "false") 14885 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") 14886 urls += "?" + c.urlParams_.Encode() 14887 req, err := http.NewRequest("POST", urls, body) 14888 if err != nil { 14889 return nil, err 14890 } 14891 req.Header = reqHeaders 14892 googleapi.Expand(req.URL, map[string]string{ 14893 "projectId": c.projectId, 14894 "zone": c.zone, 14895 "clusterId": c.clusterId, 14896 "nodePoolId": c.nodePoolId, 14897 }) 14898 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14899 } 14900 14901 // Do executes the "container.projects.zones.clusters.nodePools.setManagement" call. 14902 // Any non-2xx status code is an error. Response headers are in either 14903 // *Operation.ServerResponse.Header or (if a response was returned at all) in 14904 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14905 // whether the returned error was because http.StatusNotModified was returned. 14906 func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 14907 gensupport.SetOptions(c.urlParams_, opts...) 14908 res, err := c.doRequest("json") 14909 if res != nil && res.StatusCode == http.StatusNotModified { 14910 if res.Body != nil { 14911 res.Body.Close() 14912 } 14913 return nil, gensupport.WrapError(&googleapi.Error{ 14914 Code: res.StatusCode, 14915 Header: res.Header, 14916 }) 14917 } 14918 if err != nil { 14919 return nil, err 14920 } 14921 defer googleapi.CloseBody(res) 14922 if err := googleapi.CheckResponse(res); err != nil { 14923 return nil, gensupport.WrapError(err) 14924 } 14925 ret := &Operation{ 14926 ServerResponse: googleapi.ServerResponse{ 14927 Header: res.Header, 14928 HTTPStatusCode: res.StatusCode, 14929 }, 14930 } 14931 target := &ret 14932 if err := gensupport.DecodeResponse(target, res); err != nil { 14933 return nil, err 14934 } 14935 return ret, nil 14936 } 14937 14938 type ProjectsZonesClustersNodePoolsSetSizeCall struct { 14939 s *Service 14940 projectId string 14941 zone string 14942 clusterId string 14943 nodePoolId string 14944 setnodepoolsizerequest *SetNodePoolSizeRequest 14945 urlParams_ gensupport.URLParams 14946 ctx_ context.Context 14947 header_ http.Header 14948 } 14949 14950 // SetSize: SetNodePoolSizeRequest sets the size of a node pool. The new size 14951 // will be used for all replicas, including future replicas created by 14952 // modifying NodePool.locations. 14953 // 14954 // - clusterId: Deprecated. The name of the cluster to update. This field has 14955 // been deprecated and replaced by the name field. 14956 // - nodePoolId: Deprecated. The name of the node pool to update. This field 14957 // has been deprecated and replaced by the name field. 14958 // - projectId: Deprecated. The Google Developers Console project ID or project 14959 // number 14960 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 14961 // This field has been deprecated and replaced by the name field. 14962 // - zone: Deprecated. The name of the Google Compute Engine zone 14963 // (https://cloud.google.com/compute/docs/zones#available) in which the 14964 // cluster resides. This field has been deprecated and replaced by the name 14965 // field. 14966 func (r *ProjectsZonesClustersNodePoolsService) SetSize(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsZonesClustersNodePoolsSetSizeCall { 14967 c := &ProjectsZonesClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14968 c.projectId = projectId 14969 c.zone = zone 14970 c.clusterId = clusterId 14971 c.nodePoolId = nodePoolId 14972 c.setnodepoolsizerequest = setnodepoolsizerequest 14973 return c 14974 } 14975 14976 // Fields allows partial responses to be retrieved. See 14977 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14978 // details. 14979 func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetSizeCall { 14980 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14981 return c 14982 } 14983 14984 // Context sets the context to be used in this call's Do method. 14985 func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetSizeCall { 14986 c.ctx_ = ctx 14987 return c 14988 } 14989 14990 // Header returns a http.Header that can be modified by the caller to add 14991 // headers to the request. 14992 func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header { 14993 if c.header_ == nil { 14994 c.header_ = make(http.Header) 14995 } 14996 return c.header_ 14997 } 14998 14999 func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { 15000 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 15001 var body io.Reader = nil 15002 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) 15003 if err != nil { 15004 return nil, err 15005 } 15006 c.urlParams_.Set("alt", alt) 15007 c.urlParams_.Set("prettyPrint", "false") 15008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") 15009 urls += "?" + c.urlParams_.Encode() 15010 req, err := http.NewRequest("POST", urls, body) 15011 if err != nil { 15012 return nil, err 15013 } 15014 req.Header = reqHeaders 15015 googleapi.Expand(req.URL, map[string]string{ 15016 "projectId": c.projectId, 15017 "zone": c.zone, 15018 "clusterId": c.clusterId, 15019 "nodePoolId": c.nodePoolId, 15020 }) 15021 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15022 } 15023 15024 // Do executes the "container.projects.zones.clusters.nodePools.setSize" call. 15025 // Any non-2xx status code is an error. Response headers are in either 15026 // *Operation.ServerResponse.Header or (if a response was returned at all) in 15027 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15028 // whether the returned error was because http.StatusNotModified was returned. 15029 func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15030 gensupport.SetOptions(c.urlParams_, opts...) 15031 res, err := c.doRequest("json") 15032 if res != nil && res.StatusCode == http.StatusNotModified { 15033 if res.Body != nil { 15034 res.Body.Close() 15035 } 15036 return nil, gensupport.WrapError(&googleapi.Error{ 15037 Code: res.StatusCode, 15038 Header: res.Header, 15039 }) 15040 } 15041 if err != nil { 15042 return nil, err 15043 } 15044 defer googleapi.CloseBody(res) 15045 if err := googleapi.CheckResponse(res); err != nil { 15046 return nil, gensupport.WrapError(err) 15047 } 15048 ret := &Operation{ 15049 ServerResponse: googleapi.ServerResponse{ 15050 Header: res.Header, 15051 HTTPStatusCode: res.StatusCode, 15052 }, 15053 } 15054 target := &ret 15055 if err := gensupport.DecodeResponse(target, res); err != nil { 15056 return nil, err 15057 } 15058 return ret, nil 15059 } 15060 15061 type ProjectsZonesClustersNodePoolsUpdateCall struct { 15062 s *Service 15063 projectId string 15064 zone string 15065 clusterId string 15066 nodePoolId string 15067 updatenodepoolrequest *UpdateNodePoolRequest 15068 urlParams_ gensupport.URLParams 15069 ctx_ context.Context 15070 header_ http.Header 15071 } 15072 15073 // Update: Updates the version and/or image type of a specific node pool. 15074 // 15075 // - clusterId: Deprecated. The name of the cluster to upgrade. This field has 15076 // been deprecated and replaced by the name field. 15077 // - nodePoolId: Deprecated. The name of the node pool to upgrade. This field 15078 // has been deprecated and replaced by the name field. 15079 // - projectId: Deprecated. The Google Developers Console project ID or project 15080 // number 15081 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 15082 // This field has been deprecated and replaced by the name field. 15083 // - zone: Deprecated. The name of the Google Compute Engine zone 15084 // (https://cloud.google.com/compute/docs/zones#available) in which the 15085 // cluster resides. This field has been deprecated and replaced by the name 15086 // field. 15087 func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall { 15088 c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15089 c.projectId = projectId 15090 c.zone = zone 15091 c.clusterId = clusterId 15092 c.nodePoolId = nodePoolId 15093 c.updatenodepoolrequest = updatenodepoolrequest 15094 return c 15095 } 15096 15097 // Fields allows partial responses to be retrieved. See 15098 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 15099 // details. 15100 func (c *ProjectsZonesClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsUpdateCall { 15101 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15102 return c 15103 } 15104 15105 // Context sets the context to be used in this call's Do method. 15106 func (c *ProjectsZonesClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsUpdateCall { 15107 c.ctx_ = ctx 15108 return c 15109 } 15110 15111 // Header returns a http.Header that can be modified by the caller to add 15112 // headers to the request. 15113 func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header { 15114 if c.header_ == nil { 15115 c.header_ = make(http.Header) 15116 } 15117 return c.header_ 15118 } 15119 15120 func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { 15121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 15122 var body io.Reader = nil 15123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) 15124 if err != nil { 15125 return nil, err 15126 } 15127 c.urlParams_.Set("alt", alt) 15128 c.urlParams_.Set("prettyPrint", "false") 15129 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") 15130 urls += "?" + c.urlParams_.Encode() 15131 req, err := http.NewRequest("POST", urls, body) 15132 if err != nil { 15133 return nil, err 15134 } 15135 req.Header = reqHeaders 15136 googleapi.Expand(req.URL, map[string]string{ 15137 "projectId": c.projectId, 15138 "zone": c.zone, 15139 "clusterId": c.clusterId, 15140 "nodePoolId": c.nodePoolId, 15141 }) 15142 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15143 } 15144 15145 // Do executes the "container.projects.zones.clusters.nodePools.update" call. 15146 // Any non-2xx status code is an error. Response headers are in either 15147 // *Operation.ServerResponse.Header or (if a response was returned at all) in 15148 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15149 // whether the returned error was because http.StatusNotModified was returned. 15150 func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15151 gensupport.SetOptions(c.urlParams_, opts...) 15152 res, err := c.doRequest("json") 15153 if res != nil && res.StatusCode == http.StatusNotModified { 15154 if res.Body != nil { 15155 res.Body.Close() 15156 } 15157 return nil, gensupport.WrapError(&googleapi.Error{ 15158 Code: res.StatusCode, 15159 Header: res.Header, 15160 }) 15161 } 15162 if err != nil { 15163 return nil, err 15164 } 15165 defer googleapi.CloseBody(res) 15166 if err := googleapi.CheckResponse(res); err != nil { 15167 return nil, gensupport.WrapError(err) 15168 } 15169 ret := &Operation{ 15170 ServerResponse: googleapi.ServerResponse{ 15171 Header: res.Header, 15172 HTTPStatusCode: res.StatusCode, 15173 }, 15174 } 15175 target := &ret 15176 if err := gensupport.DecodeResponse(target, res); err != nil { 15177 return nil, err 15178 } 15179 return ret, nil 15180 } 15181 15182 type ProjectsZonesOperationsCancelCall struct { 15183 s *Service 15184 projectId string 15185 zone string 15186 operationId string 15187 canceloperationrequest *CancelOperationRequest 15188 urlParams_ gensupport.URLParams 15189 ctx_ context.Context 15190 header_ http.Header 15191 } 15192 15193 // Cancel: Cancels the specified operation. 15194 // 15195 // - operationId: Deprecated. The server-assigned `name` of the operation. This 15196 // field has been deprecated and replaced by the name field. 15197 // - projectId: Deprecated. The Google Developers Console project ID or project 15198 // number 15199 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 15200 // This field has been deprecated and replaced by the name field. 15201 // - zone: Deprecated. The name of the Google Compute Engine zone 15202 // (https://cloud.google.com/compute/docs/zones#available) in which the 15203 // operation resides. This field has been deprecated and replaced by the name 15204 // field. 15205 func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall { 15206 c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15207 c.projectId = projectId 15208 c.zone = zone 15209 c.operationId = operationId 15210 c.canceloperationrequest = canceloperationrequest 15211 return c 15212 } 15213 15214 // Fields allows partial responses to be retrieved. See 15215 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 15216 // details. 15217 func (c *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall { 15218 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15219 return c 15220 } 15221 15222 // Context sets the context to be used in this call's Do method. 15223 func (c *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall { 15224 c.ctx_ = ctx 15225 return c 15226 } 15227 15228 // Header returns a http.Header that can be modified by the caller to add 15229 // headers to the request. 15230 func (c *ProjectsZonesOperationsCancelCall) Header() http.Header { 15231 if c.header_ == nil { 15232 c.header_ = make(http.Header) 15233 } 15234 return c.header_ 15235 } 15236 15237 func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 15238 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 15239 var body io.Reader = nil 15240 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 15241 if err != nil { 15242 return nil, err 15243 } 15244 c.urlParams_.Set("alt", alt) 15245 c.urlParams_.Set("prettyPrint", "false") 15246 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") 15247 urls += "?" + c.urlParams_.Encode() 15248 req, err := http.NewRequest("POST", urls, body) 15249 if err != nil { 15250 return nil, err 15251 } 15252 req.Header = reqHeaders 15253 googleapi.Expand(req.URL, map[string]string{ 15254 "projectId": c.projectId, 15255 "zone": c.zone, 15256 "operationId": c.operationId, 15257 }) 15258 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15259 } 15260 15261 // Do executes the "container.projects.zones.operations.cancel" call. 15262 // Any non-2xx status code is an error. Response headers are in either 15263 // *Empty.ServerResponse.Header or (if a response was returned at all) in 15264 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15265 // whether the returned error was because http.StatusNotModified was returned. 15266 func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 15267 gensupport.SetOptions(c.urlParams_, opts...) 15268 res, err := c.doRequest("json") 15269 if res != nil && res.StatusCode == http.StatusNotModified { 15270 if res.Body != nil { 15271 res.Body.Close() 15272 } 15273 return nil, gensupport.WrapError(&googleapi.Error{ 15274 Code: res.StatusCode, 15275 Header: res.Header, 15276 }) 15277 } 15278 if err != nil { 15279 return nil, err 15280 } 15281 defer googleapi.CloseBody(res) 15282 if err := googleapi.CheckResponse(res); err != nil { 15283 return nil, gensupport.WrapError(err) 15284 } 15285 ret := &Empty{ 15286 ServerResponse: googleapi.ServerResponse{ 15287 Header: res.Header, 15288 HTTPStatusCode: res.StatusCode, 15289 }, 15290 } 15291 target := &ret 15292 if err := gensupport.DecodeResponse(target, res); err != nil { 15293 return nil, err 15294 } 15295 return ret, nil 15296 } 15297 15298 type ProjectsZonesOperationsGetCall struct { 15299 s *Service 15300 projectId string 15301 zone string 15302 operationId string 15303 urlParams_ gensupport.URLParams 15304 ifNoneMatch_ string 15305 ctx_ context.Context 15306 header_ http.Header 15307 } 15308 15309 // Get: Gets the specified operation. 15310 // 15311 // - operationId: Deprecated. The server-assigned `name` of the operation. This 15312 // field has been deprecated and replaced by the name field. 15313 // - projectId: Deprecated. The Google Developers Console project ID or project 15314 // number 15315 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 15316 // This field has been deprecated and replaced by the name field. 15317 // - zone: Deprecated. The name of the Google Compute Engine zone 15318 // (https://cloud.google.com/compute/docs/zones#available) in which the 15319 // cluster resides. This field has been deprecated and replaced by the name 15320 // field. 15321 func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall { 15322 c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15323 c.projectId = projectId 15324 c.zone = zone 15325 c.operationId = operationId 15326 return c 15327 } 15328 15329 // Name sets the optional parameter "name": The name (project, location, 15330 // operation id) of the operation to get. Specified in the format 15331 // `projects/*/locations/*/operations/*`. 15332 func (c *ProjectsZonesOperationsGetCall) Name(name string) *ProjectsZonesOperationsGetCall { 15333 c.urlParams_.Set("name", name) 15334 return c 15335 } 15336 15337 // Fields allows partial responses to be retrieved. See 15338 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 15339 // details. 15340 func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { 15341 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15342 return c 15343 } 15344 15345 // IfNoneMatch sets an optional parameter which makes the operation fail if the 15346 // object's ETag matches the given value. This is useful for getting updates 15347 // only after the object has changed since the last request. 15348 func (c *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall { 15349 c.ifNoneMatch_ = entityTag 15350 return c 15351 } 15352 15353 // Context sets the context to be used in this call's Do method. 15354 func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall { 15355 c.ctx_ = ctx 15356 return c 15357 } 15358 15359 // Header returns a http.Header that can be modified by the caller to add 15360 // headers to the request. 15361 func (c *ProjectsZonesOperationsGetCall) Header() http.Header { 15362 if c.header_ == nil { 15363 c.header_ = make(http.Header) 15364 } 15365 return c.header_ 15366 } 15367 15368 func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { 15369 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 15370 if c.ifNoneMatch_ != "" { 15371 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15372 } 15373 var body io.Reader = nil 15374 c.urlParams_.Set("alt", alt) 15375 c.urlParams_.Set("prettyPrint", "false") 15376 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}") 15377 urls += "?" + c.urlParams_.Encode() 15378 req, err := http.NewRequest("GET", urls, body) 15379 if err != nil { 15380 return nil, err 15381 } 15382 req.Header = reqHeaders 15383 googleapi.Expand(req.URL, map[string]string{ 15384 "projectId": c.projectId, 15385 "zone": c.zone, 15386 "operationId": c.operationId, 15387 }) 15388 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15389 } 15390 15391 // Do executes the "container.projects.zones.operations.get" call. 15392 // Any non-2xx status code is an error. Response headers are in either 15393 // *Operation.ServerResponse.Header or (if a response was returned at all) in 15394 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15395 // whether the returned error was because http.StatusNotModified was returned. 15396 func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 15397 gensupport.SetOptions(c.urlParams_, opts...) 15398 res, err := c.doRequest("json") 15399 if res != nil && res.StatusCode == http.StatusNotModified { 15400 if res.Body != nil { 15401 res.Body.Close() 15402 } 15403 return nil, gensupport.WrapError(&googleapi.Error{ 15404 Code: res.StatusCode, 15405 Header: res.Header, 15406 }) 15407 } 15408 if err != nil { 15409 return nil, err 15410 } 15411 defer googleapi.CloseBody(res) 15412 if err := googleapi.CheckResponse(res); err != nil { 15413 return nil, gensupport.WrapError(err) 15414 } 15415 ret := &Operation{ 15416 ServerResponse: googleapi.ServerResponse{ 15417 Header: res.Header, 15418 HTTPStatusCode: res.StatusCode, 15419 }, 15420 } 15421 target := &ret 15422 if err := gensupport.DecodeResponse(target, res); err != nil { 15423 return nil, err 15424 } 15425 return ret, nil 15426 } 15427 15428 type ProjectsZonesOperationsListCall struct { 15429 s *Service 15430 projectId string 15431 zone string 15432 urlParams_ gensupport.URLParams 15433 ifNoneMatch_ string 15434 ctx_ context.Context 15435 header_ http.Header 15436 } 15437 15438 // List: Lists all operations in a project in the specified zone or all zones. 15439 // 15440 // - projectId: Deprecated. The Google Developers Console project ID or project 15441 // number 15442 // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). 15443 // This field has been deprecated and replaced by the parent field. 15444 // - zone: Deprecated. The name of the Google Compute Engine zone 15445 // (https://cloud.google.com/compute/docs/zones#available) to return 15446 // operations for, or `-` for all zones. This field has been deprecated and 15447 // replaced by the parent field. 15448 func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { 15449 c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15450 c.projectId = projectId 15451 c.zone = zone 15452 return c 15453 } 15454 15455 // Parent sets the optional parameter "parent": The parent (project and 15456 // location) where the operations will be listed. Specified in the format 15457 // `projects/*/locations/*`. Location "-" matches all zones and all regions. 15458 func (c *ProjectsZonesOperationsListCall) Parent(parent string) *ProjectsZonesOperationsListCall { 15459 c.urlParams_.Set("parent", parent) 15460 return c 15461 } 15462 15463 // Fields allows partial responses to be retrieved. See 15464 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 15465 // details. 15466 func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { 15467 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15468 return c 15469 } 15470 15471 // IfNoneMatch sets an optional parameter which makes the operation fail if the 15472 // object's ETag matches the given value. This is useful for getting updates 15473 // only after the object has changed since the last request. 15474 func (c *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall { 15475 c.ifNoneMatch_ = entityTag 15476 return c 15477 } 15478 15479 // Context sets the context to be used in this call's Do method. 15480 func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall { 15481 c.ctx_ = ctx 15482 return c 15483 } 15484 15485 // Header returns a http.Header that can be modified by the caller to add 15486 // headers to the request. 15487 func (c *ProjectsZonesOperationsListCall) Header() http.Header { 15488 if c.header_ == nil { 15489 c.header_ = make(http.Header) 15490 } 15491 return c.header_ 15492 } 15493 15494 func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { 15495 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 15496 if c.ifNoneMatch_ != "" { 15497 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15498 } 15499 var body io.Reader = nil 15500 c.urlParams_.Set("alt", alt) 15501 c.urlParams_.Set("prettyPrint", "false") 15502 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations") 15503 urls += "?" + c.urlParams_.Encode() 15504 req, err := http.NewRequest("GET", urls, body) 15505 if err != nil { 15506 return nil, err 15507 } 15508 req.Header = reqHeaders 15509 googleapi.Expand(req.URL, map[string]string{ 15510 "projectId": c.projectId, 15511 "zone": c.zone, 15512 }) 15513 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15514 } 15515 15516 // Do executes the "container.projects.zones.operations.list" call. 15517 // Any non-2xx status code is an error. Response headers are in either 15518 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 15519 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 15520 // check whether the returned error was because http.StatusNotModified was 15521 // returned. 15522 func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 15523 gensupport.SetOptions(c.urlParams_, opts...) 15524 res, err := c.doRequest("json") 15525 if res != nil && res.StatusCode == http.StatusNotModified { 15526 if res.Body != nil { 15527 res.Body.Close() 15528 } 15529 return nil, gensupport.WrapError(&googleapi.Error{ 15530 Code: res.StatusCode, 15531 Header: res.Header, 15532 }) 15533 } 15534 if err != nil { 15535 return nil, err 15536 } 15537 defer googleapi.CloseBody(res) 15538 if err := googleapi.CheckResponse(res); err != nil { 15539 return nil, gensupport.WrapError(err) 15540 } 15541 ret := &ListOperationsResponse{ 15542 ServerResponse: googleapi.ServerResponse{ 15543 Header: res.Header, 15544 HTTPStatusCode: res.StatusCode, 15545 }, 15546 } 15547 target := &ret 15548 if err := gensupport.DecodeResponse(target, res); err != nil { 15549 return nil, err 15550 } 15551 return ret, nil 15552 } 15553